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.14.2
Release Notes
Effect-TS/effect (effect)
v3.14.2
Compare Source
Patch Changes
#4646
f87991b
Thanks @gcanti! - SchemaAST: add missinggetSchemaIdAnnotation
API#4646
f87991b
Thanks @gcanti! - Arbitrary: fix bug where annotations were ignored.Before
After
#4648
0a3e3e1
Thanks @gcanti! - Schema:standardSchemaV1
now includes the schema, closes #4494.This update fixes an issue where passing
Schema.standardSchemaV1(...)
directly toJSONSchema.make
would throw aTypeError
. The schema was missing from the returned object, causing the JSON schema generation to fail.Now
standardSchemaV1
includes the schema itself, so it can be used withJSONSchema.make
without issues.Example
v3.14.1
Compare Source
Patch Changes
4a274fe
Thanks @tim-smart! - remove Context.ValidTagsById usagev3.14.0
Compare Source
Minor Changes
#4469
1f47e4e
Thanks @vinassefranche! - Add DateTime.nowAsDate creator#4469
26dd75f
Thanks @tim-smart! - expose the Layer.MemoMap via Layer.CurrentMemoMap to the layers being built#4469
04dff2d
Thanks @tim-smart! - add Tracer Span.addLinks, for dynamically linking spans#4469
c7fac0c
Thanks @LaureRC! - Add HashMap.every#4469
ffaa3f3
Thanks @vinassefranche! - Add Either.transposeOption#4469
ab957c1
Thanks @vinassefranche! - Make TestClock.setTime accept a DateTime.Input#4469
35db9ce
Thanks @LaureRC! - Add Effect.transposeMapOption#4469
cf77ea9
Thanks @f15u! - AddArray.window
function#4469
26dd75f
Thanks @tim-smart! - add LayerMap moduleA
LayerMap
allows you to create a map of Layer's that can be used todynamically access resources based on a key.
Here is an example of how you can use a
LayerMap
to create a service thatprovides access to multiple OpenAI completions services.
#4469
baaab60
Thanks @vinassefranche! - Make Runtime.run* apis dualPatch Changes
aba2d1d
Thanks @tim-smart! - preserve interruptors in channel executor .runInv3.13.12
Compare Source
Patch Changes
#4610
0c4803f
Thanks @gcanti! - Preserve specific annotations (e.g.,arbitrary
) when usingSchema.typeSchema
, closes #4609.Previously, annotations such as
arbitrary
were lost when callingSchema.typeSchema
on a transformation. This update ensures that certain annotations, which depend only on the "to" side of the transformation, are preserved.Annotations that are now retained:
examples
default
jsonSchema
arbitrary
pretty
equivalence
Example
Before
After
#4607
6f65ac4
Thanks @gcanti! - Add support forjsonSchema
annotations onSymbolFromSelf
index signatures.Before
After
v3.13.11
Compare Source
Patch Changes
#4601
fad8cca
Thanks @gcanti! - Schema: enhance the internalformatUnknown
function to handle various types including iterables, classes, and additional edge cases.Before
After
#4606
4296293
Thanks @gcanti! - Fix issue with generic filters when generating arbitraries, closes #4605.Previously, applying a
filter
to a schema when generating arbitraries could cause aTypeError
due to missing properties. This fix ensures that arbitraries are generated correctly when filters are used.Before
After
#4587
9c241ab
Thanks @gcanti! - Schema: simplifyStruct
andRecord
return types.#4591
082b0c1
Thanks @IMax153! - Improve clarity of theTimeoutException
error message#4604
be12983
Thanks @gcanti! - Add support for refinements toSchema.omit
, closes #4603.Before
After
#4593
de88127
Thanks @gcanti! - Schema: exportField
type.Useful for creating a type that can be used to add custom constraints to the fields of a struct.
v3.13.10
Compare Source
Patch Changes
#4578
527c964
Thanks @gcanti! - AllowtoString
Method to Be Overridden in Schema Classes, closes #4577.Previously, attempting to override the
toString
method in schema classes caused aTypeError
in the browser because the property was set as read-only (writable: false
). This fix makestoString
writable, allowing developers to override it when needed.v3.13.9
Compare Source
Patch Changes
2976e52
Thanks @giuliobracci! - FixMatch.tags
throwing exception onundefined
input valuev3.13.8
Compare Source
Patch Changes
#4567
c65d336
Thanks @rehos! - Schema:standardSchemaV1
now returns all errors by default and supports custom options.The
standardSchemaV1
now returns all validation errors by default (ParseOptions = { errors: "all" }
). Additionally, it now accepts an optionaloverrideOptions
parameter, allowing you to customize the default parsing behavior as needed.#4565
22d2ebb
Thanks @gcanti! - ParseResult.ArrayFormatter: correct_tag
fields forRefinement
andTransformation
issues, closes #4564.This update fixes an issue where
ParseResult.ArrayFormatter
incorrectly labeled Refinement and Transformation errors asType
in the output.Before
After
v3.13.7
Compare Source
Patch Changes
#4540
840cc73
Thanks @gcanti! - AddadditionalPropertiesStrategy
option toOpenApi.fromApi
, closes #4531.This update introduces the
additionalPropertiesStrategy
option inOpenApi.fromApi
, allowing control over how additional properties are handled in the generated OpenAPI schema."strict"
(default), additional properties are disallowed ("additionalProperties": false
)."allow"
, additional properties are allowed ("additionalProperties": true
), making APIs more flexible.The
additionalPropertiesStrategy
option has also been added to:JSONSchema.fromAST
OpenApiJsonSchema.makeWithDefs
Example
#4541
9bf8a74
Thanks @fubhy! - Disallowed excess properties for various function options#4554
87ba23c
Thanks @gcanti! - ConfigProvider:fromEnv
: add missingPartial
modifier.v3.13.6
Compare Source
Patch Changes
#4551
3154ce4
Thanks @gcanti! - Arbitrary:make
called onSchema.Class
now respects property annotations, closes #4550.Previously, when calling
Arbitrary.make
on aSchema.Class
, property-specific annotations (such asarbitrary
) were ignored, leading to unexpected values in generated instances.Before
Even though
a
had anarbitrary
annotation, the generated values were random:After
Now, the values respect the
arbitrary
annotation and return the expected constant:v3.13.4
Compare Source
Patch Changes
17d9e89
Thanks @gcanti! - Schema: ExportMakeOptions
type, closes #4532.v3.13.3
Compare Source
Patch Changes
#4502
cc5588d
Thanks @gcanti! - Schema: More Accurate Return Types forDataFromSelf
andData
.This update refines the return types of
DataFromSelf
andData
, making them clearer and more specific, especially when working with structured schemas.Before
The return types were more generic, making it harder to see the underlying structure:
After
Now, the return types clearly reflect the original schema structure:
#4510
623c8cd
Thanks @gcanti! - Schema: More Accurate Return Type forcompose
.Before
After
#4488
00b4eb1
Thanks @gcanti! - Schema: more precise return types when filters are involved.Example (with
Schema.maxLength
)Before
After
String filters:
maxLength
minLength
length
pattern
startsWith
endsWith
includes
lowercased
capitalized
uncapitalized
uppercased
nonEmptyString
trimmed
Number filters:
finite
greaterThan
greaterThanOrEqualTo
lessThan
lessThanOrEqualTo
int
multipleOf
between
nonNaN
positive
negative
nonPositive
nonNegative
BigInt filters:
greaterThanBigInt
greaterThanOrEqualToBigInt
lessThanBigInt
lessThanOrEqualToBigInt
betweenBigInt
positiveBigInt
negativeBigInt
nonNegativeBigInt
nonPositiveBigInt
Duration filters:
lessThanDuration
lessThanOrEqualToDuration
greaterThanDuration
greaterThanOrEqualToDuration
betweenDuration
Array filters:
minItems
maxItems
itemsCount
Date filters:
validDate
lessThanDate
lessThanOrEqualToDate
greaterThanDate
greaterThanOrEqualToDate
betweenDate
BigDecimal filters:
greaterThanBigDecimal
greaterThanOrEqualToBigDecimal
lessThanBigDecimal
lessThanOrEqualToBigDecimal
positiveBigDecimal
nonNegativeBigDecimal
negativeBigDecimal
nonPositiveBigDecimal
betweenBigDecimal
#4508
f2aee98
Thanks @gcanti! - Schema: More Accurate Return Types forArrayEnsure
andNonEmptyArrayEnsure
.Before
After
#4509
fb798eb
Thanks @gcanti! - Schema: More Accurate Return Types for:transformLiteral
clamp
clampBigInt
clampDuration
clampBigDecimal
head
headNonEmpty
headOrElse
#4524
2251b15
Thanks @gcanti! - Schema: More Accurate Return Type forparseNumber
.Before
After
#4483
2e15c1e
Thanks @mikearnaldi! - Fix nested batching#4514
a4979db
Thanks @gcanti! - Schema: add missingfrom
property tobrand
interface.Before
After
#4496
b74255a
Thanks @tim-smart! - ensure fibers can't be added to Fiber{Handle,Set,Map} during closing#4419
d7f6a5c
Thanks @KhraksMamtsov! - Fix Context.Tag unification#4495
9dd8979
Thanks @KhraksMamtsov! - SimplifysortWith
,sort
,reverse
,sortBy
,unzip
,dedupe
signatures in Array module#4507
477b488
Thanks @gcanti! - Schema: More Accurate Return Type forparseJson(schema)
.Before
After
#4519
10932cb
Thanks @gcanti! - RefactorJSONSchema
to useadditionalProperties
instead ofpatternProperties
for simple records, closes #4518.This update improves how records are represented in JSON Schema by replacing
patternProperties
withadditionalProperties
, resolving issues in OpenAPI schema generation.Why the change?
patternProperties
, which caused problems with OpenAPI tools.openapi-ts
, struggled withpatternProperties
, generatingRecord<string, never>
instead of the correct type.patternProperties
, OpenAPI failed to generate proper response examples, displaying only{}
.OpenApi.Transform
, which was messy and lacked type safety.Before
After
Now,
additionalProperties
is used instead, which properly represents an open-ended record:#4501
9f6c784
Thanks @gcanti! - Schema: Add Missingdeclare
API Interface to Expose Type Parameters.Example
#4487
2c639ec
Thanks @gcanti! - Schema: more precise return types when transformations are involved.Chunk
NonEmptyChunk
Redacted
Option
OptionFromNullOr
OptionFromUndefinedOr
OptionFromNullishOr
Either
EitherFromUnion
ReadonlyMap
Map
HashMap
ReadonlySet
Set
HashSet
List
Cause
Exit
SortedSet
head
headNonEmpty
headOrElse
Example (with
Schema.Chunk
)Before
After
#4492
886aaa8
Thanks @gcanti! - Schema: ImproveLiteral
return type — now returnsSchemaClass
instead ofSchema
v3.13.2
Compare Source
Patch Changes
#4472
31be72a
Thanks @gcanti! - FixSchema.Enums
toString()
method to display correct enum values.Now,
toString()
correctly displays the actual enum values instead of internal numeric indices.Before
After
v3.13.1
Compare Source
Patch Changes
b56a211
Thanks @FizzyElt! - fix Option filterMap examplev3.13.0
Compare Source
Minor Changes
#4280
8baef83
Thanks @tim-smart! - add Promise based apis to Fiber{Handle,Set,Map} modules#4280
655bfe2
Thanks @gcanti! - AddEffect.transposeOption
, closes #3142.Converts an
Option
of anEffect
into anEffect
of anOption
.Details
This function transforms an
Option<Effect<A, E, R>>
into anEffect<Option<A>, E, R>
. If theOption
isNone
, the resultingEffect
will immediately succeed with a
None
value. If theOption
isSome
, theinner
Effect
will be executed, and its result wrapped in aSome
.Example
#4280
d90cbc2
Thanks @indietyp! - AddEffect.whenLogLevel
, which conditionally executes an effect if the specified log level is enabled#4280
75632bd
Thanks @tim-smart! - add RcMap.touch, for reseting the idle timeout for an item#4280
c874a2e
Thanks @LaureRC! - Add HashMap.some#4280
bf865e5
Thanks @tim-smart! - allow accessing args in Effect.fn pipe#4280
f98b2b7
Thanks @tim-smart! - add RcMap.invalidate api, for removing a resource from an RcMap#4280
de8ce92
Thanks @mikearnaldi! - Add Layer.updateService mirroring Effect.updateService#4280
db426a5
Thanks @KhraksMamtsov! -Differ
implementsPipeable
#4280
6862444
Thanks @thewilkybarkid! - Make it easy to convert a DateTime.Zoned to a DateTime.Utc#4280
5fc8a90
Thanks @gcanti! - Add missingEither.void
constructor.#4280
546a492
Thanks @vinassefranche! - AddHashMap.toValues
andHashSet.toValues
getters#4280
65c4796
Thanks @tim-smart! - add {FiberHandle,FiberSet,FiberMap}.awaitEmpty apis#4280
9760fdc
Thanks @gcanti! - Schema: AddstandardSchemaV1
API to Generate a Standard Schema v1.Example
#4280
5b471e7
Thanks @fubhy! - AddedDuration.formatIso
andDuration.fromIso
for formatting and parsing ISO8601 durations.#4280
4f810cc
Thanks @tim-smart! - add Effect.filterEffect* apisEffect.filterEffectOrElse
Filters an effect with an effectful predicate, falling back to an alternative
effect if the predicate fails.
Effect.filterEffectOrFail
Filters an effect with an effectful predicate, failing with a custom error if the predicate fails.
Patch Changes
cf8b2dd
Thanks @KhraksMamtsov! -Trie<out A>
type annotations have been aligned. The type parameter was made covariant because the structure is immutable.v3.12.12
Compare Source
Patch Changes
#4440
4018eae
Thanks @gcanti! - Schema: add missing support for tuple annotations inTaggedRequest
.#4439
543d36d
Thanks @gcanti! - Schedule: fix unsafetapOutput
signature.Previously,
tapOutput
allowed using an output type that wasn't properly inferred, leading to potential runtime errors. Now, TypeScript correctly detects mismatches at compile time, preventing unexpected crashes.Before (Unsafe, Causes Runtime Error)
After (Safe, Catches Type Error at Compile Time)
#4447
f70a65a
Thanks @gcanti! - Preserve functionlength
property inEffect.fn
/Effect.fnUntraced
, closes #4435Previously, functions created with
Effect.fn
andEffect.fnUntraced
always had a.length
of0
, regardless of their actual number of parameters. This has been fixed so that thelength
property correctly reflects the exConfiguration
📅 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.