All versions since 4.0.0-beta.78
4.0.0-beta.78
Patch Changes
-
#2333
7836b8eThanks @tim-smart! - Fix Schema.Defect JSON encoding for Error values whose message property is not a string. -
#2329
35d49a3Thanks @alvarosevilla95! - Retry Redis scripts afterNOSCRIPTand declare the token bucket refill key
4.0.0-beta.79
Patch Changes
-
#2364
b9704dcThanks @mikearnaldi! - Fix module-level side effects that defeated bundler tree-shaking.Bare top-level statements cannot be
#__PURE__-annotated by the build, so bundlers must retain them and everything they reference, even in bundles that never use the code:Option: the standaloneObject.defineProperty(SomeProto, "valueOrUndefined", ...)statement anchored the wholeOptionproto chain into every bundle. It is now folded into theSomeProtoinitializer.Headers: same pattern withObject.defineProperties(Proto, ...), folded into the initializer.Logger: module-levelprocess.stdout.isTTYproperty reads (potential getters, never droppable) moved insideconsolePretty.Utils: wheninternalCallwas unused, its dropped binding left behind a retained initializer tail (standard/forcedprobe with computed property reads). The selection is now wrapped in a single pure-annotated call.
A minimal
Effect.succeed(123).pipe(Effect.runFork)bundle shrinks by ~1.3% gzipped; bundles that don’t useOptionorHeadersno longer pay for them. -
#2339
a207113Thanks @tim-smart! - Fix EntityManager defect restarts so in-flight requests are replayed instead of being dropped when the old entity scope is interrupted. -
#2362
5e9b9e2Thanks @fubhy! - Fix Graph traversal and shortest-path algorithms to traverse undirected edges independently of their stored source/target orientation. -
#2366
7c128aeThanks @IMax153! - Fix string seed encoding in Random.withSeed so short, trailing, and astral UTF-8 bytes affect deterministic streams. -
#2352
0ada457Thanks @alvarosevilla95! - Fix the RedisRateLimiterStoretoken-bucket failing with opaque errors under memory pressure: it now writes its keys with a TTL and guards against a missing refill timestamp. -
#2359
d7cc5a2Thanks @gcanti! - FixStructkey renaming andSchema.encodeKeysto support symbol keys, and reject duplicate encoded keys. -
#2365
aad63beThanks @gcanti! - FixSchemaencoding so container-level checks are validated against the decoded value instead of the encoded output.Disallow adding checks directly to
Schema.suspend(...); add the checks to the suspended schema instead.Fix
StructWithRestso index signatures do not re-parse or overwrite fixed properties. -
#2342
09809f6Thanks @gcanti! - Use generic ordered constraints for schema arbitrary derivation.Range checks such as
isGreaterThan,isLessThan, andisBetweennow populatectx.constraints.orderedinstead of type-specific range fields onnumber,date, orbigintconstraints. CustomtoArbitraryannotations that read range constraints should migrate toctx.constraints.ordered.This also fixes BigDecimal arbitrary generation by adapting decimal bounds to the generated scale, avoiding invalid fast-check bigint ranges for narrow decimal intervals.
-
#2368
2fddda5Thanks @IMax153! - Encode HTTP API client path parameters when building request URLs. -
#2348
5f21768Thanks @gcanti! - Update Schema arbitrary derivation to use the new filter metadata, candidate generation, optional derivation reports, recursion-aware generation, and the renamedOrderedConstraint<T>model.Migration from the previous v4 API:
- Replace filter annotations from
toArbitraryConstraint: constrainttoarbitrary: { constraint }. When a filter cannot be described as a constraint, usearbitrary: { candidate }to add a weighted source that is still checked by the filter. - Replace bucketed constraints with the flat
Schema.Annotations.ToArbitrary.Constraintshape:string.minLength,array.minLength, object property counts, collection sizes ->minLengthstring.maxLength,array.maxLength, object property counts, collection sizes ->maxLengthstring.patterns->patternsnumber.isInteger->integernumber.noNaN->noNaNnumber.noDefaultInfinity->noInfinitydate.noInvalidDate->validarray.comparatorfor uniqueness ->uniqueusing Effect equalityordered.min/minExcluded/max/maxExcluded->ordered.minimum/exclusiveMinimum/maximum/exclusiveMaximum
- In arbitrary hooks, read
context.constraintinstead ofcontext.constraints. Replacecontext.isSuspendwithcontext.recursion; when combining finite and recursive branches, passcontext.recursiontofc.oneofwith the finite branch first. - Generic declaration hooks now receive type parameters as
{ arbitrary, terminal }. Atomic declarations may still return a bareFastCheck.Arbitrary<T>, but generic declarations should return{ arbitrary, terminal }when they can preserve a finite terminal branch. Schema.toArbitrary(schema, { report: true })now returns{ value, report }; without{ report: true }, it keeps returning the arbitrary directly.Schema.toArbitraryLazyalways returns a lazy arbitrary.
- Replace filter annotations from
-
#2343
f27003eThanks @MohanedMashaly! - Add meta-var that shows log level and bash options in command line.
4.0.0-beta.80
Patch Changes
-
#2205
d944330Thanks @lloydrichards! - add support for merging external events intoPrompt.customrender loops via an optionaleventsdequeue andreceivehandler.The prompt races user input against events from the dequeue, allowing background events to trigger re-renders without waiting for a keypress:
const eventQueue = yield * Queue.make<number>();const prompt = Prompt.custom({ count: 0 },Queue.asDequeue(eventQueue), // <-- provide the event queue as a dequeue to the prompt{render: (state) => Effect.succeed(`Count: ${state.count}`),process: (input, state) =>Effect.succeed(Match.value(input).pipe(// handle user inputMatch.tag("Input", () => Action.Submit({ value: state.count })),// handle external events from the queueMatch.tag("Event", (input) =>Action.NextFrame({ state: { count: state.count + input.value } }),),Match.exhaustive,),),clear: () => Effect.succeed(""),},); -
#2369
f48659fThanks @gcanti! - Round fractional durations symmetrically when normalizing to nanoseconds. -
#2373
7652aaaThanks @StarpTech! - Stream.fromReadableStream: swallow thereader.cancel()rejection in the finalizer. Cancelling the reader of an already-errored ReadableStream rejects with the stored error, which turned the typedonErrorfailure into a defect. -
#2371
98630b7Thanks @gcanti! - EmitSchema.ObjectKeywordas an object-or-array JSON Schema union. -
#2376
90ae23cThanks @fubhy! - AddGraph.successorsandGraph.predecessors, deprecateGraph.neighborsDirected, and fix graph algorithm edge cases around reversal, undirected edge queries, shortest-path weight validation, topological sort initials, and strongly connected components.
4.0.0-beta.81
Patch Changes
-
#2387
93cb4f8Thanks @gcanti! -Config.withDefaultnow only recovers from missing data for literal/union schemas. Invalid present values now propagate validation errors instead of using the default, closes #2384. -
#2388
60341d9Thanks @gcanti! -Config.withDefaultno longer recovers from schema filter failures. A filter failure means a present value reached refinement checks, so using the default could hide invalid configuration values. -
#2389
1105ab5Thanks @gcanti! - FixSchema.toTaggedUnion(...).isAnyOfnarrowing for custom discriminant keys, closes #2386.Previously, the type predicate always extracted union members by
_tag, even whentoTaggedUnionwas created with a different discriminant key. Runtime behavior already used the supplied key, so this aligns the type-level narrowing with the existing runtime behavior. -
#2270
4500fbfThanks @IMax153! - Add HTTP API streaming response support
4.0.0-beta.82
Patch Changes
- #2391
193690bThanks @IMax153! - Fix HttpApiEndpoint endpoint error inference when success schemas include streams.
4.0.0-beta.83
Patch Changes
- #2394
1f2e8ceThanks @IMax153! - Fix published HttpApi declaration files by exporting schema metadata types referenced by public declarations.
4.0.0-beta.84
Patch Changes
-
#2420
87f52baThanks @tim-smart! - AddEffect.transposeOptionfor converting anOption<Effect<A, E, R>>into anEffect<Option<A>, E, R>. -
#2374
b8ee07fThanks @gcanti! - Import unconstrained JSON Schema nodes asSchema.Jsoninstead ofSchema.Unknown. -
#2407
867c0d7Thanks @gcanti! - Normalize error behavior for Schema and SchemaParser boundary APIs.SchemaErrornow extendsData.TaggedError, so it is also a nativeError. SchemaParser Promise APIs now reject anErrorwhose cause is theSchemaIssue.Issuefor schema failures.Schema and SchemaParser
EffectandExitadapters now preserve full causes while mapping schema issue failures to their public error type. Theis,asserts,Promise,Sync,Result,Option,make, andmakeOptionadapters now distinguish schema issues from non-schema causes. Schema-only failures are converted to the adapter’s normal representation (false, rejected or thrown schema error,Result.fail, orNone), while non-schema causes throw or reject with anErrorwhose cause is the underlyingCause. -
#2409
b93bc6cThanks @tim-smart! - Fix Stream.runForEachWhile so it continues across chunk boundaries while the predicate returns true and stops when the predicate returns false. -
#2424
57d387fThanks @tim-smart! - Fix cluster workflow activity defect hydration -
#2403
bacca41Thanks @lloydrichards! - align ProcessInput.Input runtime field name with type definition on Prompt.custom -
#2423
0f8ac79Thanks @tim-smart! - RpcGroup.toHandlers is definition first -
#2383
25b4482Thanks @gcanti! - Fix config path composition and directory-backed lookup behavior.ConfigProvider.orElsenow keeps each side’s ownnestedandmapInputbehavior. ApplyingnestedormapInputto a combined provider now applies the same transformation to both sides.ConfigProviderpath transformations now compose as a single path function. This makesnestedandmapInputbehave consistently with normal function composition.Config.nestednow tracks the logical config path inConfigitself instead of wrapping the provider. This keeps lookup paths and schema error paths aligned. The low-levelConfig.makeconstructor is no longer exported; use config constructors and combinators, or implement custom lookup behavior withConfigProvider.make.ConfigProvider.fromDirnow returnsundefinedwhen neither a file nor a directory exists at the requested path, soorElsecan fall back instead of failing withSourceError. -
#2415
9cf3a25Thanks @gcanti! - FixEffect.trythunk usage andEffect.tryPromisemapper and signal handling defects.Effect.trynow supports passing a thunk directly, matchingEffect.tryPromise. Thrown values from direct-thunk usage are mapped toCause.UnknownError.When a promise handled by
Effect.tryPromiserejected and the customcatchmapper threw while mapping that rejection, the effect could remain pending and produce an unhandled rejection. The mapper is now guarded consistently with the synchronous throw path, so a thrown mapper error becomes an Effect defect. The JSDoc forEffect.tryandEffect.tryPromisewas also corrected.Effect.tryPromisenow also only creates anAbortControllerwhen the wrapped thunk declares anAbortSignalparameter. -
#2417
8def767Thanks @tim-smart! - deduplicate SqlResolver.findById requests
4.0.0-beta.85
Patch Changes
-
#2436
328d97cThanks @MohanedMashaly! - change default operation in redis from LPUSH TO RPUSH -
#2431
8441836Thanks @gcanti! - Derive template literal arbitraries from encoded parts, closes #2414. -
#2439
074e436Thanks @gcanti! - Allow schema class.extendto accept aStructand preserve checks from the extension schema, closes #2419. -
#2444
c1dfd60Thanks @bweis! - Avoid throwing whenError.stackTraceLimitis non-writable (frozen intrinsics / SES / deterministic sandboxes such as Temporal).Effect manipulates
Error.stackTraceLimitin several internal spots to capture short or empty stack traces cheaply. In hardened environments whereErroris frozen andstackTraceLimitis read-only, assigning to it throws, which broke Effect entirely. Stack-trace-limit manipulation is now best-effort and silently no-ops when the property cannot be modified, mirroring Node’s own internal guard. Behavior in normal (writable) environments is unchanged. -
#2425
2ba316bThanks @tim-smart! - Add Random.choice for selecting a random element from an iterable. -
#2434
7ce7344Thanks @gcanti! - Use semantic matching for TemplateLiteral parsing and index signature keysReplace regex-based TemplateLiteral parsing with backtracking segmentation over template literal parts, applying part checks during matching.
Use schema membership when selecting Record index signature keys, including checked string, number, symbol, and TemplateLiteral parameters. Tighten valid index signature parameters on both type and encoded sides, and preserve key parameter semantics in codec transformations.
4.0.0-beta.86
Patch Changes
-
#2462
0b5795aThanks @tim-smart! - AddStatement.valuesUnpreparedfor returning unprepared SQL statement rows as arrays. -
#2455
3e3a859Thanks @fubhy! - FixCron.nextskipping earlier matching days when the upcoming day-of-month does not exist in the current month. -
#2454
7dbec24Thanks @StarpTech! - Exclude response metadata from HTTP server span failures after response headers have been sent. -
#2449
d8c00a1Thanks @gcanti! - Fix Schema handling of encoded-side checks for container ASTs.Checks added after
flipare now preserved asencodingChecksacrossDeclaration,Arrays,Objects, andUnion, even when rebuilding the AST does not change child nodes.toTypenow projects those checks consistently, and parsing applies encoded-side checks to the local encoded value when an encoding chain is present without allowing encoded-sideparseOptionsannotations to affect the current parser side. -
#2446
85b6317Thanks @IMax153! - Allow schemas provided to CLI flags / arguments to utilize the environment required by the CLI -
#2452
6d0fda0Thanks @gcanti! - Remove thekeepDeclarationsoption fromSchema.toCodecStringTree. -
#2461
108a933Thanks @tim-smart! - Fail RpcClient HTTP requests with a defect when the response stream closes before the request receives a terminal response. -
#2442
7e1f455Thanks @gcanti! - Improve Schema type-level performance by lazily computing schema views, specializing common struct projections, and using lighter schema constraints at API boundaries that do not need the full schema protocol.This also adds the Schema type-performance benchmark suite, introduces
Schema.toCodecArrayFromSingle, preserves canonical StringTree array codecs, renames the arbitrary-generation annotation constraint for clarity, and updates affected codec, parser, channel, SQL, HTTP API, persistence, RPC, AI, OpenAPI, and workflow typings to match the refined Schema surface. -
#2464
46b3e79Thanks @tim-smart! - do not use performance.timeOrigin and calculate origins lazily
4.0.0-beta.87
Patch Changes
-
#2468
5a0c1a4Thanks @gcanti! - Expose the original input schema onSchema.toType,Schema.toEncoded,Schema.toCodecJson, andSchema.toCodecStringTreeresults via theschemaproperty. This aligns these schema wrappers with other wrappers that retain their source schema for type-level and runtime introspection. -
#2466
1eea2eaThanks @gcanti! - UseURL.canParseto validate URL string schema decoding before constructing aURL. This avoids relying on thrown exceptions for routine validation while preserving the same invalid URL issue and successful decode output.
4.0.0-beta.88
Patch Changes
-
#2472
911f1b8Thanks @tim-smart! - Add adaptive consume and feedback operations to the unstable persistent RateLimiterStore API, including in-memory and Redis-backed bounded cooldown, learning, learned pacing, and expiry behavior for 429 Retry-After feedback. -
#2457
8beeeeaThanks @P0lip! - Localize missing rpc method errors to the provided request id -
#2428
c306fcfThanks @MrGovindan! - AddisOpentoLatchto allow querying the latch’s open state
4.0.0-beta.89
Patch Changes
-
#2475
b7d46abThanks @tim-smart! - UpdateSchema.Voidto model ignoredvoidreturn values.Runtime parsing now accepts any present value and discards it as
undefined. This matches TypeScriptvoidreturn values, where callers do not observe the returned value. UseSchema.Undefinedwhen the input must be exactlyundefined. -
#2479
7777e15Thanks @tim-smart! - Add custom error callbacks to Effect.fromOption. -
#2480
5376197Thanks @tim-smart! - render causes in OtlpTracer exception events
4.0.0-beta.90
Patch Changes
- #2483
d237fdfThanks @tim-smart! - FixConfig.schemaso missing array values are treated as missing data, allowingConfig.withDefaultto apply.
4.0.0-beta.91 Latest
Patch Changes
-
#2498
b135b25Thanks @gcanti! - FixSchedule.andThenResultto emitselfoutputs asFailureandotheroutputs asSuccess, closes #2497. -
#2488
aaa21a3Thanks @fubhy! - FixString.camelCaseandString.pascalCasehandling of numeric word segments, and addString.configCasefor configuration key casing. -
#2485
3475ee6Thanks @tim-smart! - fix RequestResolver interruption