Releases: Effect-TS/effect
Release list
effect@4.0.0-rc.113
Patch Changes
-
#7738
49e3901Thanks @kitlangton! - Retain completed tool approval results in non-streaming responses so Chat records them and does not replay approved tools on later turns. -
#7483
b945dedThanks @tim-smart! - Align runtime type IDs with their module paths. Effect markers now omit legacy grouping prefixes and theunstablepath segment, while OpenTelemetry spans use theOtelTracermodule path. Custom implementations that copy these marker strings must adopt the corrected IDs. -
#8014
d6422f4Thanks @kitlangton! - FixEffect.allto retain errors and required services from every branch of a union of record inputs. -
#8095
5a80204Thanks @gcanti! - FixArbitrary.schemato respect applicable index signatures when generating and shrinking object properties, including fixed fields inSchema.StructWithRestand overlapping records.Combine compatible string, number, and bigint constraints during generation so cases such as a
Stringfield constrained by aNonEmptyStringrecord remain productive at size zero. Other intersections are validated and may exhaust the discard budget. -
#7796
53511efThanks @kitlangton! - FixSchema.ArrayEnsureto preserve array-valued element branches and outer-array encoding cardinality. -
#8067
79ae49fThanks @purwasadr! - FixAtomRpc.queryreturningneverfor RPCs whose middleware declares servicerequires. The return-type conditional now infers all sixRpctype parameters, matchingmutationand every utility inRpc. -
#7463
0d083baThanks @tim-smart! - Remove themimeruntime dependency. The neweffect/unstable/http/Mimemodule provides top-level lookup functions
backed by a vendored standard MIME registry. -
#7477
be0f822Thanks @candrewlee14! - Allow sockets to use browser, Bun, and Node WebSocket implementations without consumer casts. Platform constructors
now support typed opening-handshake headers where available. -
#7587
debe8fdThanks @kitlangton! - FixCache.invalidateWhenandScopedCache.invalidateWhendeleting a replacement entry while waiting for an earlier lookup. -
#7585
a8588f9Thanks @kitlangton! - Fix interruption ofCache.refreshfor a missing key removing a newer value written byCache.set. -
#7596
f17eb0aThanks @kitlangton! - FixCache.refreshandScopedCache.refreshexceeding capacity when an existing key is evicted while its refresh is in progress. Publishing the refreshed entry now evicts older entries as needed, releasing their resources inScopedCache. -
#7595
f30cbfeThanks @kitlangton! - FixCache.refreshfor an initially missing key deleting a newer cached value when the refresh completes with zero time to live. -
#7614
78cc9c0Thanks @kitlangton! - PreventCachefrom retaining synchronously interrupted lookups. -
#7563
ccbdbd5Thanks @alvarosevilla95! - Respect custom HTTP header redaction when recording server span attributes. -
#7254
a63dcbfThanks @gcanti! - Add the experimental Schema-firsteffect/unstable/arbitrary/Arbitrarymodule for native generation without
fast-check.Arbitrary.schemaderives an opaque arbitrary from the decoded SchemaType,Arbitrary.sampleEffect
provides interruptible sampling with typed exhaustion, andArbitrary.checkEffectreturns structured property results.
The initial implementation supports bounded discards, shrinking, replay, and recursive and mutually recursive Schemas.
SampleErrorandExhaustedinclude the effective seed so discarded runs remain reproducible even when the caller did
not provide one.Arbitrary.isArbitraryidentifies values through the module's nominal protocol. Numeric constraints
retainNaNwhen it is accepted by their supportedOrder.Numberbounds. Union derivation validatesoneOf
exclusivity and isolates lazy cross-member shrinking from unrelated random generation. Object derivation keeps
optional-property selection constructive when candidate fields have different recursive costs.
Struct, Record, JSON-object, and record-shapedArbitrary.alloutputs periodically use a null prototype as an edge
case, preserving that prototype throughout shrinking and replay without perturbing structural PRNG choices. The change
adds 0.01–0.03 KB gzip to representative Arbitrary fixtures and leaves production-only bundle sentinels unchanged.Add
Arbitrary.map,Arbitrary.flatMap,Arbitrary.filter,Arbitrary.filterMap, andArbitrary.allfor composing
derived Arbitraries without exposing a second catalog of primitive constructors. Filtering remains bounded and
promotes valid shrink descendants through rejected nodes.maxShrinksbounds every inspected shrink candidate,
including candidates rejected before property evaluation, while retaining the best shrunk input found when the
budget is exhausted.flatMapprovides deterministic dependent generation, source-first shrinking, post-source PRNG
checkpoints, and one shared residual recursion budget.allcombines tuples, iterables, and records with a shared
budget, randomized internal generation order, stable output shape, and independent member shrinking. Arbitrary values
implementPipeablefor composition with data-last combinators.Add the experimental Schema
arbitraryConstraintandtoCodecArbitraryannotations and their
Schema.Annotations.ToArbitrarytypes. Declarations can provide a Schema Link optimized for generation, while filters
can contribute native semantic constraints. The callback receives decoded type parameters and normalized constraints.
The compiler owns efficient representations for common built-ins, including JSON, RegExp, URL, Date, byte arrays,
ReadonlyMap, and ReadonlySet. Effect-specific HashMap, HashSet, Chunk, Graph, BigDecimal, and date-time declarations keep
local generation Links, while declarations with productive canonical codecs require no arbitrary-specific annotation.
Schema.isUniqueKeyprovides key-based Map uniqueness for explicit array representations.The same ownership policy applies to formatter and equivalence derivation: implementations for common declarations
live in their compiler, while domain-specific and dynamically constructed declarations retain local annotations.
Declarations whose intrinsicEqualimplementation already matches their Schema equivalence need no annotation or
compiler special case. This keeps unused common callbacks out of production Schema bundles.Against the previous layout,
schema-toArbitrarydecreases from 36.68 KB to 33.24 KB gzip and
arbitrary-combinatorsdecreases from 37.16 KB to 33.70 KB.schema-toFormatterincreases from 18.92 KB to 19.49 KB
andschema-toEquivalenceincreases from 19.05 KB to 19.39 KB because callers that explicitly derive these capabilities
now retain the common declaration handlers. Generic production fixtures remain unchanged; an equivalence-specific
production fixture using common declarations decreases from 20.75 KB to 20.48 KB, while declarations whose intrinsic
equality is sufficient decrease from 23.42 KB to 23.34 KB. An Arbitrary-specific production fixture using common
declarations decreases from 20.35 KB to 19.61 KB, while one using the locally annotated BigDecimal and date-time
declarations increases from 18.34 KB to 23.01 KB.
The complete 31-scenario native Arbitrary comparison reports no statistically classified runtime regression; the five
moved BigDecimal and date-time scenarios remain within measurement noise.Add
SchemaGetter.forbiddenEncoding, a reusable getter for the encode side of decode-only Schema transformations.Remove the fast-check bridge from the
effectpackage, includingSchema.toArbitraryand
effect/testing/FastCheck. Replace the legacySchema.Annotations.ToArbitrarycallback contract with the native
Schema-first types. Theeffectpackage no longer depends on ...
@effect/vitest@4.0.0-rc.113
Patch Changes
-
#7254
a63dcbfThanks @gcanti! - Add the experimental Schema-firsteffect/unstable/arbitrary/Arbitrarymodule for native generation without
fast-check.Arbitrary.schemaderives an opaque arbitrary from the decoded SchemaType,Arbitrary.sampleEffect
provides interruptible sampling with typed exhaustion, andArbitrary.checkEffectreturns structured property results.
The initial implementation supports bounded discards, shrinking, replay, and recursive and mutually recursive Schemas.
SampleErrorandExhaustedinclude the effective seed so discarded runs remain reproducible even when the caller did
not provide one.Arbitrary.isArbitraryidentifies values through the module's nominal protocol. Numeric constraints
retainNaNwhen it is accepted by their supportedOrder.Numberbounds. Union derivation validatesoneOf
exclusivity and isolates lazy cross-member shrinking from unrelated random generation. Object derivation keeps
optional-property selection constructive when candidate fields have different recursive costs.
Struct, Record, JSON-object, and record-shapedArbitrary.alloutputs periodically use a null prototype as an edge
case, preserving that prototype throughout shrinking and replay without perturbing structural PRNG choices. The change
adds 0.01–0.03 KB gzip to representative Arbitrary fixtures and leaves production-only bundle sentinels unchanged.Add
Arbitrary.map,Arbitrary.flatMap,Arbitrary.filter,Arbitrary.filterMap, andArbitrary.allfor composing
derived Arbitraries without exposing a second catalog of primitive constructors. Filtering remains bounded and
promotes valid shrink descendants through rejected nodes.maxShrinksbounds every inspected shrink candidate,
including candidates rejected before property evaluation, while retaining the best shrunk input found when the
budget is exhausted.flatMapprovides deterministic dependent generation, source-first shrinking, post-source PRNG
checkpoints, and one shared residual recursion budget.allcombines tuples, iterables, and records with a shared
budget, randomized internal generation order, stable output shape, and independent member shrinking. Arbitrary values
implementPipeablefor composition with data-last combinators.Add the experimental Schema
arbitraryConstraintandtoCodecArbitraryannotations and their
Schema.Annotations.ToArbitrarytypes. Declarations can provide a Schema Link optimized for generation, while filters
can contribute native semantic constraints. The callback receives decoded type parameters and normalized constraints.
The compiler owns efficient representations for common built-ins, including JSON, RegExp, URL, Date, byte arrays,
ReadonlyMap, and ReadonlySet. Effect-specific HashMap, HashSet, Chunk, Graph, BigDecimal, and date-time declarations keep
local generation Links, while declarations with productive canonical codecs require no arbitrary-specific annotation.
Schema.isUniqueKeyprovides key-based Map uniqueness for explicit array representations.The same ownership policy applies to formatter and equivalence derivation: implementations for common declarations
live in their compiler, while domain-specific and dynamically constructed declarations retain local annotations.
Declarations whose intrinsicEqualimplementation already matches their Schema equivalence need no annotation or
compiler special case. This keeps unused common callbacks out of production Schema bundles.Against the previous layout,
schema-toArbitrarydecreases from 36.68 KB to 33.24 KB gzip and
arbitrary-combinatorsdecreases from 37.16 KB to 33.70 KB.schema-toFormatterincreases from 18.92 KB to 19.49 KB
andschema-toEquivalenceincreases from 19.05 KB to 19.39 KB because callers that explicitly derive these capabilities
now retain the common declaration handlers. Generic production fixtures remain unchanged; an equivalence-specific
production fixture using common declarations decreases from 20.75 KB to 20.48 KB, while declarations whose intrinsic
equality is sufficient decrease from 23.42 KB to 23.34 KB. An Arbitrary-specific production fixture using common
declarations decreases from 20.35 KB to 19.61 KB, while one using the locally annotated BigDecimal and date-time
declarations increases from 18.34 KB to 23.01 KB.
The complete 31-scenario native Arbitrary comparison reports no statistically classified runtime regression; the five
moved BigDecimal and date-time scenarios remain within measurement noise.Add
SchemaGetter.forbiddenEncoding, a reusable getter for the encode side of decode-only Schema transformations.Remove the fast-check bridge from the
effectpackage, includingSchema.toArbitraryand
effect/testing/FastCheck. Replace the legacySchema.Annotations.ToArbitrarycallback contract with the native
Schema-first types. Theeffectpackage no longer depends on fast-check.Migrate
TestSchema.Asserts.verifyLosslessTransformationandTestSchema.Asserts.arbitrary().verifyGenerationto the
native runner. Both methods now accept native check options directly, bound unsuccessful generation, and include the
shrunk input and replay token in property failures.Use the Arbitrary runner for all
@effect/vitestproperty tests. Property inputs may combine Schemas and Arbitraries,
and are composed directly withArbitrary.all; check options are available througharbitrary. Raw fast-check
arbitraries and thefastCheckoptions object are no longer supported. As with the previous fast-check adapter, thrown
exceptions, defects, and typed failures from a property are shrinkable falsifications; Effect interruption remains an
interruption.Optimize constructive regular-expression generation by caching feasible lengths on the compiled pattern, computing
sequence-suffix feasibility once, and precomputing character-class metadata. Seeded generation, shrinking, and replay
remain unchanged.Optimize
BigDecimal.OrderandBigDecimal.Equivalencewith a shared hybrid comparator. Ordinary scale differences
use cached, bounded coefficient alignment, while large differences are compared without materializing their decimal
zeroes.BigDecimal.makenow rejects scales that are not safe integers.Before its removal, the materialized fast-check bridge fixture
schema-toArbitrary-materialized-fast-check.tsmeasured 79.00 KB minified and gzipped.Representative runtime measurements against corresponding hand-written fast-check 4.9.0 arbitraries are shown below.
Values are median latency on Node 24.12.0 and Apple M3; lower is better. Both implementations validate the
same output domains, although their generation distributions are not identical. Native speedup is fast-check latency
divided by Native latency, so higher is better.Scenario fast-check Native Native speedup 32 recursive samples 150 µs 103 µs 1.45x 128 optional Struct samples 244 µs 86.0 µs 2.84x 128 constrained strings 742 µs 49.7 µs 14.86x RegExp derivation and first sample 13.4 ms 30.8 µs 429.02x 64 RegExp strings 595 µs 919 µs 0.64x RegExp failure and shrinking 168 µs 88.2 µs 1.91x 128 bounded numbers 68.9 µs 21.8 µs 3.18x 128 Uint8Arraysamples98.3 µs 74.4 µs 1.32x 128 BigDecimalsamples66.6 µs 56.3 µs 1.18x 128 DateTime.Utcsamples71.2 µs 50.5 µs 1.42x 128 named time zones 52.2 µs 27.9 µs 1.85x 128 time zones 63.7 µs 33.8 µs 1.89x 128 zoned date-times 130 µs 112 µs 1.16x 32 samples through Schema filter 65.9 µs 49.4 µs 1.33x 32 unique arrays 156 µs 132 µs 1.18x 128 literal samples 40.0 µs 3.70 µs 10.78x 128 mapped samples 59.0 µs 14.1 µs 4.21x 128 samples through passing filter 58.9 µs 13.9 µs 4.23x 32 samples through selective filter 66.1 µs 42.9 µs 1.54x 128 filterMapsamples75.7 µs 31.5 µs 2.40x Filtered failure and shrinking 12.7 µs 7.71 µs 1.66x 128 alltuple samples43.5 µs 18.5 µs 2.35x 128 allrecord samples81.0 µs 30.4 µs 2.66x 128 dependent flatMapsamples125 µs 67.2 µs 1.86x flatMapfailure and shrinking20.1 µs 6.71 µs 2.99x Replay flatMapshrink path14.3 µs 6.57 µs 2.17x Passing property, 100 runs 42.3 µs 27.1 µs 1.56x TestSchema, 100 generations44.5 µs 35.9 µs 1.24x First failure plus one shrink 8.77 µs 1.30 µs 6.75x Replay recorded failure 6.35 µs 1.19 µs 5.36x Cold recursive derivation is not included because the native fixture constructs and compiles a Schema, while the
fast-check fixture constructs a hand-written arbitrary; it is not a like-for-like warm-generator comparison.Add a guide for the native module and ...
@effect/sql-sqlite-wasm@4.0.0-rc.113
Patch Changes
-
#7951
f4981cfThanks @kitlangton! - Start incoming MessagePort queues after registering the SQLite WASM client and OPFS worker listeners. Fresh ports, including a SharedWorker's client port, no longer require manual activation to receive ready messages and query replies or process worker requests. -
#7953
4b7e6c7Thanks @kitlangton! - Preserve statement-specific column names in SQLite WASM worker-backed query results. -
#7947
88593e4Thanks @kitlangton! - Preserve native SQLite error codes in OPFS worker replies so the client can classify constraint failures asConstraintErrorinstead ofUnknownError. For coded worker failures,SqlError.reason.causenow contains a{ message, code }record instead of a string. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5, [d681c2e](https://github.com/Effect-TS/effect/commit/d681c2eb1bb07d782540286368e8b425...
@effect/sql-sqlite-react-native@4.0.0-rc.113
Patch Changes
- #7469
3787c46Thanks @gjermundgaraba! - Return selected rows from synchronous and asynchronous OP-SQLite value queries. - Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997,d386979,fc9fedf,7750dbe,fc91af6,39b9738, [88093b5](https://github.com/Effect-TS/effect/commit/88093b57951a1b597599fe4772ab690b36a...
@effect/sql-sqlite-node@4.0.0-rc.113
Patch Changes
-
#7484
5612962Thanks @Kashkovsky! - Allow read-only SQLite clients to usewithTransactionwhenPRAGMA query_onlyis enabled. Writable clients continue
to reserve the writer lock when a transaction starts. -
#7722
4daa260Thanks @kitlangton! - Capture unprepared statement preparation failures as typedSqlErrors. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997,d386979,fc9fedf, [7750dbe](https://github.com/Effect-TS/eff...
@effect/sql-sqlite-do@4.0.0-rc.113
Patch Changes
- #7732
412bc40Thanks @kitlangton! - Report synchronous Durable Object SQL streaming failures as recoverableSqlErrorvalues. - Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997,d386979,fc9fedf,7750dbe,fc91af6,39b9738, [88093b5](https://github.com/Effect-TS/effect/commit/88093b57951a1b597599fe4772ab...
@effect/sql-sqlite-bun@4.0.0-rc.113
Patch Changes
-
#7484
5612962Thanks @Kashkovsky! - Allow read-only SQLite clients to usewithTransactionwhenPRAGMA query_onlyis enabled. Writable clients continue
to reserve the writer lock when a transaction starts. -
#7831
5fe42ceThanks @kitlangton! - Allow database exports insidewithTransactionto complete instead of waiting indefinitely. The exported snapshot
includes the transaction's uncommitted writes, while exports outside that transaction still wait for it to finish. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997, [d386979](https://github.com/Effect-TS/effect/commit/d386979fedbdd433d28816f9c...
@effect/sql-pglite@4.0.0-rc.113
Patch Changes
-
#7534
c1693ffThanks @tim-smart! - Update production dependencies to their latest releases. -
#7720
2b3a9a3Thanks @kitlangton! - Preserve string values passed tosql.jsonwhen using PGlite. -
#7456
8fb2d0bThanks @candrewlee14! - Align PGlitelistenwith the PostgreSQL client. It now returns a scoped dequeue after the listener is installed, providing an explicit readiness boundary and preserving notifications received before the first take. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18, [2245997](https://github.com/Effect-TS/effect/commit/2245997ad221459...
@effect/sql-pg@4.0.0-rc.113
Patch Changes
-
#7426
534b8b9Thanks @tim-smart! - Replace@effect/sql-pg'spgruntime with a native PostgreSQL client.PgConnectionandPgPoolnow handle connection setup, binary queries, prepared statements, pipelining, streaming, notifications, cancellation, and custom codecs.PgConnection.listenandPgClient.listenreturn scoped notification dequeues after PostgreSQL confirms the subscription.PgClientuses the native stack, and the legacyfromPool,fromClient, andmakeWithconstructors are removed.Breaking changes
fromPool,fromClient, andmakeWithare removed. Usemakefor a pool ormakeClientfor one connection.PgClient.listenreturns a scopedEffect<Dequeue<string>, SqlError, Scope>instead of aStream. Acquisition completes after PostgreSQL confirmsLISTEN, so notifications sent after it returns cannot be missed.PgClientConfig.typesnow accepts aPgTypes.Registryinstead ofpg.CustomTypesConfig. Plain object parameters are no longer inferred as JSON; wrap them withsql.json.- Query strings must contain one statement. PostgreSQL's extended protocol rejects multi-statement strings.
- Results use the native binary codecs. In particular,
int8decodes tobigint,dateto a string, timestamps to Unix epoch milliseconds, andbyteaor unknown OIDs toUint8Array.executeRawreturns the nativePgConnection.Resultshape rather thanpg.Result. - Named prepared statements are enabled by default. Set
prepare: falsewhen using a pooler that cannot preserve prepared statements between queries.Statement.unpreparedandStatement.valuesUnprepareduse unnamed extended queries without adding entries to the prepared-statement cache.
Inferred parameters stay permissive: strings bind untyped so the backend derives the type from the statement, and safe integers beyond the
int4range bind asint8.Add
Pool.reservefor exclusive access to a concurrent pool item, and fix waiter wakeups and capacity replacement after invalidation. -
#7509
c405edcThanks @tim-smart! - Set the defaultmultiplexConcurrencyto 32 when PostgreSQL connection multiplexing is enabled. Set a lower value explicitly to limit how many statements share each connection. -
#7503
96ea948Thanks @tim-smart! - Allow each PostgreSQL pool connection to complete its first checkout before applyingconnectionTTL, so a zero TTL
disables connection reuse without entering an invalidate/reconnect loop. -
#7502
e203638Thanks @tim-smart! - Add amaxMessageSizeconnection option so PostgreSQL clients can receive backend messages larger than the 16 MiB default. -
#7524
0a08ae0Thanks @fubhy! - AddNetAddressundereffect/unstable/netfor MAC, IP, internet socket, and Unix socket addresses, with checked parsing, schemas, equality, canonical string serialization, and URL formatting. Companion modulesIpInterfaceandIpNetworkrepresent IP interfaces and CIDR networks.HTTP and socket servers now expose
NetAddress.SocketAddress. Replace TCPhostnameaccess withNetAddress.formatIp(address.address)and useUnixPathAddress.pathfor Unix sockets. URL helpers bracket IPv6 addresses and reject scoped IPv6. Bun and Deno HTTP server layers can now fail withServeErrorwhen listener address conversion fails.PostgreSQL
inetvalues now useIpInterface;cidrvalues useIpNetworkand reject addresses with host bits set. -
#7734
fe3830aThanks @kitlangton! - Honor explicitssloptions when PostgreSQL URLs usesslmode=preferorsslmode=allow. -
#7504
9adb9f2Thanks @tim-smart! - Reject PostgreSQL LISTEN and NOTIFY channel names longer than 63 UTF-8 bytes. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1, [027ceb9](https://github.com/Effect-TS/effect/commit/027ceb91e003fbc36f0559f72e1c614cd9198c1a...
@effect/sql-mysql2@4.0.0-rc.113
Patch Changes
-
#8096
cce221eThanks @tim-smart! - Update dependencies to their latest compatible versions. -
#7534
c1693ffThanks @tim-smart! - Update production dependencies to their latest releases. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,ed74b18,2245997,d386979,fc9fedf,7750dbe, [fc91af6](https://github.com/Effect-TS/effect/commit/fc91af659d0682659e6347eede...