Version Packages
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@effect/[email protected]
Minor Changes
- #2279
bdff193Thanks @gcanti! - -src/DevTools/Domain.ts- use
OptionEncodedinSpanFrom src/Machine.ts- use
ExitEncodedinSerializableActorandboot
- use
- use
Patch Changes
- Updated dependencies [
5d47ee0,5d47ee0,1cb7f9c,5d47ee0,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- @effect/[email protected]
- [email protected]
- @effect/[email protected]
- @effect/[email protected]
@effect/[email protected]
Minor Changes
-
#2287
a1f44cbThanks @tim-smart! - add option to /platform runMain to disable error reporting -
#2279
bdff193Thanks @gcanti! - -src/Worker.ts- use
CauseEncodedinWorkernamespace src/WorkerError.ts- use
CauseEncodedinCause
- use
- use
Patch Changes
-
#2284
1cb7f9cThanks @tim-smart! - use Schema.declare for http multipart PersistedFile schema -
#2283
509be1aThanks @tim-smart! - add SocketCloseError with additional metadata -
#2284
1cb7f9cThanks @tim-smart! - add more http multipart data type refinements -
#2281
e7ca973Thanks @tim-smart! - add OpenTimeout error to websocket client -
#2286
d910dd2Thanks @tim-smart! - allow optional fields in http form schemas -
#2281
e7ca973Thanks @tim-smart! - support closing a Socket by writing a CloseEvent -
Updated dependencies [
5d47ee0,5d47ee0,5d47ee0]:- @effect/[email protected]
- [email protected]
@effect/[email protected]
Minor Changes
- #2287
a1f44cbThanks @tim-smart! - add option to /platform runMain to disable error reporting
Patch Changes
- Updated dependencies [
5d47ee0,1cb7f9c,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- [email protected]
- @effect/[email protected]
@effect/[email protected]
Minor Changes
- #2287
a1f44cbThanks @tim-smart! - add option to /platform runMain to disable error reporting
Patch Changes
-
#2283
509be1aThanks @tim-smart! - add SocketCloseError with additional metadata -
#2281
e7ca973Thanks @tim-smart! - support closing a Socket by writing a CloseEvent -
Updated dependencies [
5d47ee0,1cb7f9c,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- [email protected]
- @effect/[email protected]
@effect/[email protected]
Minor Changes
Patch Changes
- Updated dependencies [
5d47ee0,5d47ee0,1cb7f9c,5d47ee0,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- @effect/[email protected]
- [email protected]
- @effect/[email protected]
@effect/[email protected]
Minor Changes
-
#2172
5d47ee0Thanks @gcanti! - # Breaking Changes- The
Formatmodule has been removed
ASTmodule-
Tuplehas been refactored toTupleType, and its_taghas consequently been renamed. The type of itsrestproperty has changed fromOption.Option<ReadonlyArray.NonEmptyReadonlyArray<AST>>toReadonlyArray<AST>. -
Transformhas been refactored toTransformation, and its_tagproperty has consequently been renamed. Its propertytransformationhas now the typeTransformationKind = FinalTransformation | ComposeTransformation | TypeLiteralTransformation. -
createRecordhas been removed -
AST.tohas been renamed toAST.typeAST -
AST.fromhas been renamed toAST.encodedAST -
ExamplesAnnotationandDefaultAnnotationnow accept a type parameter -
formathas been removed: BeforeAST.format(ast, verbose?)Now
ast.toString(verbose?) -
setAnnotationhas been removed (useannotationsinstead) -
mergeAnnotationshas been renamed toannotations -
move
defaultParseOptionfromParser.tstoAST.ts
ParseResultmodule-
The
ParseResultmodule now uses classes and custom constructors have been removed: Beforeimport * as ParseResult from "@effect/schema/ParseResult"; ParseResult.type(ast, actual);Now
import * as ParseResult from "@effect/schema/ParseResult"; new ParseResult.Type(ast, actual); -
Transformhas been refactored toTransformation, and itskindproperty now accepts"Encoded","Transformation", or"Type"as values
Schemamodule-
uniqueSymbolhas been renamed touniqueSymbolFromSelf -
Schema.Schema.Tohas been renamed toSchema.Schema.Type, andSchema.totoSchema.typeSchema -
Schema.Schema.Fromhas been renamed toSchema.Schema.Encoded, andSchema.fromtoSchema.encodedSchema -
The type parameters of
TaggedRequesthave been swapped -
The signature of
PropertySignaturehas been changed fromPropertySignature<From, FromOptional, To, ToOptional>toPropertySignature<ToToken extends Token, To, Key extends PropertyKey, FromToken extends Token, From, R> -
Class APIs
- Class APIs now expose
fieldsand require an identifier-class A extends S.Class<A>()({ a: S.string }) {} +class A extends S.Class<A>("A")({ a: S.string }) {}
- Class APIs now expose
-
elementandresthave been removed in favor ofarrayandtuple:Before
import * as S from "@effect/schema/Schema"; const schema1 = S.tuple().pipe(S.rest(S.number), S.element(S.boolean)); const schema2 = S.tuple(S.string).pipe( S.rest(S.number), S.element(S.boolean), );Now
import * as S from "@effect/schema/Schema"; const schema1 = S.array(S.number, S.boolean); const schema2 = S.tuple([S.string], S.number, S.boolean); -
optionalElementhas been refactored:Before
import * as S from "@effect/schema/Schema"; const schema = S.tuple(S.string).pipe(S.optionalElement(S.number));Now
import * as S from "@effect/schema/Schema"; const schema = S.tuple(S.string, S.optionalElement(S.number)); -
use
TreeFormatterinBrandSchemas -
Schema annotations interfaces have been refactored:
- add
PropertySignatureAnnotations(baseline) - remove
DocAnnotations - rename
DeclareAnnotationstoAnnotations
- add
-
the
annotationsoption of theoptionalconstructor has been replaced by theannotationsmethod BeforeS.optional(S.string, { exact: true, annotations: { description: "description" }, });Now
S.optional(S.string, { exact: true }).annotations({ description: "description", });
Serializablemodule- The type parameters of
SerializableWithResultandWithResulthave been swapped
- The
Patch Changes
-
#2172
5d47ee0Thanks @gcanti! - ##Schemamodule-
enhance the
structAPI to allow records:const schema1 = S.struct( { a: S.number }, { key: S.string, value: S.number }, ); // or const schema2 = S.struct({ a: S.number }, S.record(S.string, S.number)); -
enhance the
extendAPI to allow nested (non-overlapping) fields:const A = S.struct({ a: S.struct({ b: S.string }) }); const B = S.struct({ a: S.struct({ c: S.number }) }); const schema = S.extend(A, B); /* same as: const schema = S.struct({ a: S.struct({ b: S.string, c: S.number }) }) */ -
add
Annotableinterface -
add
asSchema -
add add
Schema.Any,Schema.All,Schema.AnyNoContexthelpers -
refactor
annotationsAPI to be a method within theSchemainterface -
add support for
AST.keyof,AST.getPropertySignatures,Parser.getSearchTreeto Classes -
fix
BrandAnnotationtype and addgetBrandAnnotation -
add
annotations?parameter to Class constructors:import * as AST from "@effect/schema/AST"; import * as S from "@effect/schema/Schema"; class A extends S.Class<A>()( { a: S.string, }, { description: "some description..." }, // <= annotations ) {} console.log(AST.getDescriptionAnnotation((A.ast as AST.Transform).to)); // => { _id: 'Option', _tag: 'Some', value: 'some description...' }
-
-
Updated dependencies [
5d47ee0]:
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0,5d47ee0,1cb7f9c,5d47ee0,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- @effect/[email protected]
- [email protected]
- @effect/[email protected]
- @effect/[email protected]
- @effect/[email protected]
[email protected]
Patch Changes
-
#2172
5d47ee0Thanks @gcanti! - Brand: addrefinedoverloadexport function refined<A extends Brand<any>>( f: (unbranded: Brand.Unbranded<A>) => Option.Option<Brand.BrandErrors>, ): Brand.Constructor<A>;
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0]:
@effect/[email protected]
Patch Changes
-
#2283
509be1aThanks @tim-smart! - add SocketCloseError with additional metadata -
Updated dependencies [
5d47ee0,1cb7f9c,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- [email protected]
- @effect/[email protected]
- @effect/[email protected]
@effect/[email protected]
Patch Changes
-
#2283
509be1aThanks @tim-smart! - add SocketCloseError with additional metadata -
Updated dependencies [
5d47ee0,1cb7f9c,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- [email protected]
- @effect/[email protected]
- @effect/[email protected]
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0]:- [email protected]
- @effect/[email protected]
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0]:- [email protected]
- @effect/[email protected]
- @effect/[email protected]
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0,5d47ee0,1cb7f9c,5d47ee0,bdff193,509be1a,1cb7f9c,e7ca973,a1f44cb,d910dd2,e7ca973,bdff193]:- @effect/[email protected]
- [email protected]
- @effect/[email protected]
- @effect/[email protected]
@effect/[email protected]
Patch Changes
- Updated dependencies [
5d47ee0]: