Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.2.5
->3.12.7
Release Notes
Effect-TS/effect (effect)
v3.12.7
Compare Source
Patch Changes
8dff1d1
Thanks @KhraksMamtsov! - Fix: Cannot find name 'MissingSelfGeneric'.v3.12.6
Compare Source
Patch Changes
#4307
289c13b
Thanks @gcanti! - Schema: Enhance error messages for discriminated unions.Before
After
#4298
8b4e75d
Thanks @KhraksMamtsov! - Added type-level validation for theEffect.Service
function to ensure theSelf
generic parameter is provided. If the generic is missing, theMissingSelfGeneric
type will be returned, indicating that the generic parameter must be specified. This improves type safety and prevents misuse of theEffect.Service
function.#4292
fc5e0f0
Thanks @gcanti! - ImproveUnknownException
error messagesUnknownException
error messages now include the name of the Effect api thatcreated the error.
#4309
004fd2b
Thanks @gcanti! - Schema: Enforce Finite Durations inDurationFromNanos
.This update ensures that
DurationFromNanos
only accepts finite durations. Previously, the schema did not explicitly enforce this constraint.A filter has been added to validate that the duration is finite.
#4314
b2a31be
Thanks @gcanti! - Duration: makeDurationValue
properties readonly.#4287
5514d05
Thanks @gcanti! - Array: FixEither
import and correctpartition
example.#4301
bf5f0ae
Thanks @gcanti! - Schema: FixBigIntFromNumber
to enforce upper and lower bounds.This update ensures the
BigIntFromNumber
schema adheres to safe integer limits by applying the following bounds:#4228
3b19bcf
Thanks @fubhy! - Fixed conflictingParseError
tags betweenCron
andSchema
#4294
b064b3b
Thanks @tim-smart! - ensure cause is rendered in FiberFailure#4307
289c13b
Thanks @gcanti! - Schema: Add Support for Infinity inDuration
.This update adds support for encoding
Duration.infinity
inSchema.Duration
.Before
Attempting to encode
Duration.infinity
resulted in aParseError
due to the lack of support forInfinity
inSchema.Duration
:After
The updated behavior successfully encodes
Duration.infinity
as[ -1, 0 ]
:#4300
f474678
Thanks @gcanti! - Schema: updatepluck
type signature to respect optional fields.Before
After
#4296
ee187d0
Thanks @gcanti! - fix: updateCause.isCause
type from 'never' to 'unknown'v3.12.5
Compare Source
Patch Changes
#4273
a8b0ddb
Thanks @gcanti! - Arbitrary: Fix bug adjusting array constraints for schemas with fixed and rest elementsThis fix ensures that when a schema includes both fixed elements and a rest element, the constraints for the array are correctly adjusted. The adjustment now subtracts the number of values generated by the fixed elements from the overall constraints.
#4259
507d546
Thanks @gcanti! - Schema: improve error messages for invalid transformationsBefore
After
#4273
a8b0ddb
Thanks @gcanti! - Schema: Extend Support for Array filters, closes #4269.Added support for
minItems
,maxItems
, anditemsCount
to all schemas whereA
extendsReadonlyArray
, includingNonEmptyArray
.Example
#4257
8db239b
Thanks @gcanti! - Schema: CorrectBigInt
andBigIntFromNumber
identifier annotations to follow naming conventions#4276
84a0911
Thanks @tim-smart! - fix formatting of time zone offsets that round to 60 minutes#4276
84a0911
Thanks @tim-smart! - ensure DateTimeZonedFromSelf arbitrary generates in the range supported by the time zone database#4267
3179a9f
Thanks @tim-smart! - ensure DateTime.Zoned produces valid dates#4264
6cb9b76
Thanks @gcanti! - Relocate theIssue
definition fromplatform/HttpApiError
toSchema
(renamed asArrayFormatterIssue
).#4266
1fcbe55
Thanks @gcanti! - Schema: Replace theTimeZoneFromSelf
interface with a class definition and fix the arbitraries forDateTimeUtcFromSelf
andDateTimeZonedFromSelf
(fc.date({ noInvalidDate: true })
).#4279
d9a63d9
Thanks @tim-smart! - improve performance of Effect.forkInv3.12.4
Compare Source
Patch Changes
#4231
5b50ea4
Thanks @KhraksMamtsov! - fixLayer.retry
andMetricPolling.retry
signatures#4253
c170a68
Thanks @sukovanej! - Use non-enumerable properties for mutable fields ofDateTime
objects.#4255
a66c2eb
Thanks @sukovanej! - Improve DateTime type preservationv3.12.3
Compare Source
Patch Changes
#4244
d7dac48
Thanks @gcanti! - Improve pattern handling by merging multiple patterns into a union, closes #4243.Previously, the algorithm always prioritized the first pattern when multiple patterns were encountered.
This fix introduces a merging strategy that combines patterns into a union (e.g.,
(?:${pattern1})|(?:${pattern2})
). By doing so, all patterns have an equal chance to generate values when usingFastCheck.stringMatching
.Example
#4252
1d7fd2b
Thanks @gcanti! - Fix: CorrectArbitrary.make
to support nestedTemplateLiteral
s.Previously,
Arbitrary.make
did not properly handle nestedTemplateLiteral
schemas, resulting in incorrect or empty outputs. This fix ensures that nested template literals are processed correctly, producing valid arbitrary values.Before
After
#4252
1d7fd2b
Thanks @gcanti! - Fix: AllowSchema.TemplateLiteral
to handle strings with linebreaks, closes #4251.Before
After
v3.12.2
Compare Source
Patch Changes
#4220
734af82
Thanks @KhraksMamtsov! - fix inference for contravariant type-parameters#4212
b63c780
Thanks @KhraksMamtsov! - RefineEffect.validateAll
return type to useNonEmptyArray
for errors.This refinement is possible because
Effect.validateAll
guarantees that when the input iterable is non-empty, any validation failure will produce at least one error. In such cases, the errors are inherently non-empty, making it safe and accurate to represent them using aNonEmptyArray
type. This change aligns the return type with the function's actual behavior, improving type safety and making the API more predictable for developers.#4219
c640d77
Thanks @whoisandy! - fix: ManagedRuntime.Context to work when Context is of type never#4236
0def088
Thanks @tim-smart! - fix color option for Logger.prettyLoggerv3.12.1
Compare Source
Patch Changes
#4194
302b57d
Thanks @KhraksMamtsov! - take concurrentFinalizers option in account inEffect.all
combinator#4202
0988083
Thanks @mikearnaldi! - Remove internal EffectError make sure errors are raised with Effect.fail in Effect.try#4185
8b46be6
Thanks @jessekelly881! - fixed incorrect type declaration in LibsqlClient.layer#4189
bfe8027
Thanks @tim-smart! - ensure Effect.timeoutTo sleep is interrupted#4190
16dd657
Thanks @IMax153! - extendIterableIterator
instead ofGenerator
inSingleShotGen
#4196
39db211
Thanks @mikearnaldi! - Avoid putting symbols in global to fix incompatibility with Temporal Sandbox.After speaking with James Watkins-Harvey we realized current Effect escapes the Temporal Worker sandbox that doesn't look for symbols when restoring global context in the isolate they create leading to memory leaks.
v3.12.0
Compare Source
Minor Changes
#4068
abb22a4
Thanks @titouancreach! - Added encodeUriComponent/decodeUriComponent for both Encoding and Schema#4068
f369a89
Thanks @vinassefranche! - Add Runtime.Runtime.Context type extractor#4068
642376c
Thanks @tim-smart! - add non-traced overload to Effect.fn#4068
3d2b7a7
Thanks @mikearnaldi! - Update fast-check to latest version#4068
73f9c6f
Thanks @wewelll! - add DateTimeUtcFromDate schema#4068
17cb451
Thanks @fubhy! - Added support forsecond
granularity toCron
.#4068
d801820
Thanks @fubhy! - AddedCron.unsafeParse
and allow passing theCron.parse
time zone parameter asstring
.#4068
e1eeb2d
Thanks @mikearnaldi! - add Effect.fnUntraced - an untraced version of Effect.fn#4068
c11f3a6
Thanks @QuentinJanuel! - Add Context.mergeAll to combine multiple Contexts into one.#4068
618f7e0
Thanks @tim-smart! - add span annotation to disable propagation to the tracer#4068
c0ba834
Thanks @titouancreach! - Add Schema.headNonEmpty for Schema.NonEmptyArrayPatch Changes
e1eeb2d
Thanks @mikearnaldi! - Carry both call-site and definition site in Effect.fn, auto-trace to anonv3.11.10
Compare Source
Patch Changes
#4176
39457d4
Thanks @mikearnaldi! - Fix Stream.scoped example#4181
a475cc2
Thanks @gcanti! - Schema: FixwithDecodingDefault
implementation to align with its signature (now removesundefined
from the AST).Additionally, a new constraint has been added to the signature to prevent calling
withDecodingDefault
afterwithConstructorDefault
, which previously led to the following issue:#4175
199214e
Thanks @gcanti! - Schema: refactor annotations:Export internal
Uint8
schemaExport internal
NonNegativeInt
schemaRemove title annotations that are identical to identifiers
Avoid setting a title annotation when applying branding
Add more title annotations to refinements
Improve
toString
output and provide more precise error messages for refinements:Before
After
toString
now combines all refinements with" & "
instead of showing only the last one."Expected ..."
) now uses the extended description to make the error message clearer.#4182
b3c160d
Thanks @mikearnaldi! - Replace absolute imports with relative onesv3.11.9
Compare Source
Patch Changes
#4113
1c08a0b
Thanks @thewilkybarkid! - Schema: Support template literals inSchema.Config
.Example
#4174
1ce703b
Thanks @gcanti! - Schema: Add support forTemplateLiteral
parameters inTemplateLiteral
, closes #4166.This update also adds support for
TemplateLiteral
andTemplateLiteralParser
parameters inTemplateLiteralParser
.Before
After
#4174
1ce703b
Thanks @gcanti! - Schema: Fix bug inTemplateLiteralParser
where unions of numeric literals were not coerced correctly.Before
After
v3.11.8
Compare Source
Patch Changes
1a6b52d
Thanks @gcanti! - Arbitrary: optimize date-based refinementsv3.11.7
Compare Source
Patch Changes
#4137
2408616
Thanks @gcanti! - Arbitrary: fix bug where refinements in declarations raised an incorrect missing annotation error, closes #4136#4138
cec0b4d
Thanks @gcanti! - JSONSchema: ignore never members in unions.Before
After
#4138
cec0b4d
Thanks @gcanti! - JSONSchema: handle thenullable
keyword for OpenAPI target, closes #4075.Before
After
#4128
8d978c5
Thanks @gcanti! - JSONSchema: addtype
for homogeneous enum schemas, closes #4127Before
After
#4138
cec0b4d
Thanks @gcanti! - JSONSchema: use{ "type": "null" }
to represent thenull
literalBefore
After
#4138
cec0b4d
Thanks @gcanti! - JSONSchema: handle empty native enums.Before
After
v3.11.6
Compare Source
Patch Changes
#4118
662d1ce
Thanks @gcanti! - Allow the transformation created by the Class API to be annotated on all its components: the type side, the transformation itself, and the encoded side.Example
#4126
31c62d8
Thanks @gcanti! - Rewrite the Arbitrary compiler from scratch, closes #2312v3.11.5
Compare Source
Patch Changes
#4019
9f5a6f7
Thanks @gcanti! - Add missingjsonSchema
annotations to the following filters:lowercased
capitalized
uncapitalized
uppercased
Before
After
#4111
22905cf
Thanks @gcanti! - JSONSchema: merge refinement fragments instead of just overwriting them.Before
After
#4019
9f5a6f7
Thanks @gcanti! - JSONSchema: Correct the output order when generating a JSON Schema from a Union that includes literals and primitive schemas.Before
After
#4107
1e59e4f
Thanks @tim-smart! - remove FnEffect type to improve return type of Effect.fn#4108
8d914e5
Thanks @gcanti! - JSONSchema: representnever
as{"not":{}}
Before
After
#4115
03bb00f
Thanks @tim-smart! - avoid using non-namespaced "async" internally#4019
9f5a6f7
Thanks @gcanti! - JSONSchema: fix special case inparseJson
handling to target the "to" side of the transformation only at the top level.Before
After
#4101
14e1149
Thanks @gcanti! - Schema: align themake
constructor of structs with the behavior of the Class API constructors when all fields have a default.Before
After
#4019
9f5a6f7
Thanks @gcanti! - JSONSchema: Fix issue whereidentifier
is ignored when a refinement is applied to a schema, closes #4012Before
After
#4019
9f5a6f7
Thanks @gcanti! - JSONSchema: Use identifier with Class APIs to create a$ref
instead of inlining the schema.Before
After
v3.11.4
Compare Source
Patch Changes
#4087
518b258
Thanks @tim-smart! - remove use of .unsafeAsync in non-suspended contexts#4010
6e323a3
Thanks @fubhy! - Add support for daylight savings time transitions#4010
6e323a3
Thanks @fubhy! - Improved efficiency ofCron.next
lookupv3.11.3
Compare Source
Patch Changes
#4080
90906f7
Thanks @gcanti! - Fix theSchema.TemplateLiteral
output type when the arguments include a branded type.Before
After
#4076
3862cd3
Thanks @gcanti! - Schema: fix bug inSchema.TemplateLiteralParser
resulting in a runtime error.Before
After
#4076
3862cd3
Thanks @gcanti! - SchemaAST: fixTemplateLiteral
model.Added
Literal
andUnion
as valid types.#4083 [
343b6aa
](https://redirect.github.com/Effect-TS/effecConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.