effect icon indicating copy to clipboard operation
effect copied to clipboard

Version Packages

Open github-actions[bot] opened this issue 1 year ago • 0 comments

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 bdff193 Thanks @gcanti! - - src/DevTools/Domain.ts
    • use OptionEncoded in SpanFrom
    • src/Machine.ts
      • use ExitEncoded in SerializableActor and boot

Patch Changes

@effect/[email protected]

Minor Changes

  • #2287 a1f44cb Thanks @tim-smart! - add option to /platform runMain to disable error reporting

  • #2279 bdff193 Thanks @gcanti! - - src/Worker.ts

    • use CauseEncoded in Worker namespace
    • src/WorkerError.ts
      • use CauseEncoded in Cause

Patch Changes

@effect/[email protected]

Minor Changes

Patch Changes

@effect/[email protected]

Minor Changes

Patch Changes

@effect/[email protected]

Minor Changes

  • #2279 bdff193 Thanks @gcanti! - - src/Router.ts
    • use ExitEncoded in Response and ResponseEffect

Patch Changes

@effect/[email protected]

Minor Changes

  • #2172 5d47ee0 Thanks @gcanti! - # Breaking Changes

    • The Format module has been removed

    AST module

    • Tuple has been refactored to TupleType, and its _tag has consequently been renamed. The type of its rest property has changed from Option.Option<ReadonlyArray.NonEmptyReadonlyArray<AST>> to ReadonlyArray<AST>.

    • Transform has been refactored to Transformation, and its _tag property has consequently been renamed. Its property transformation has now the type TransformationKind = FinalTransformation | ComposeTransformation | TypeLiteralTransformation.

    • createRecord has been removed

    • AST.to has been renamed to AST.typeAST

    • AST.from has been renamed to AST.encodedAST

    • ExamplesAnnotation and DefaultAnnotation now accept a type parameter

    • format has been removed: Before

      AST.format(ast, verbose?)
      

      Now

      ast.toString(verbose?)
      
    • setAnnotation has been removed (use annotations instead)

    • mergeAnnotations has been renamed to annotations

    • move defaultParseOption from Parser.ts to AST.ts

    ParseResult module

    • The ParseResult module now uses classes and custom constructors have been removed: Before

      import * as ParseResult from "@effect/schema/ParseResult";
      
      ParseResult.type(ast, actual);
      

      Now

      import * as ParseResult from "@effect/schema/ParseResult";
      
      new ParseResult.Type(ast, actual);
      
    • Transform has been refactored to Transformation, and its kind property now accepts "Encoded", "Transformation", or "Type" as values

    Schema module

    • uniqueSymbol has been renamed to uniqueSymbolFromSelf

    • Schema.Schema.To has been renamed to Schema.Schema.Type, and Schema.to to Schema.typeSchema

    • Schema.Schema.From has been renamed to Schema.Schema.Encoded, and Schema.from to Schema.encodedSchema

    • The type parameters of TaggedRequest have been swapped

    • The signature of PropertySignature has been changed from PropertySignature<From, FromOptional, To, ToOptional> to PropertySignature<ToToken extends Token, To, Key extends PropertyKey, FromToken extends Token, From, R>

    • Class APIs

      • Class APIs now expose fields and require an identifier
        -class A extends S.Class<A>()({ a: S.string }) {}
        +class A extends S.Class<A>("A")({ a: S.string }) {}
        
    • element and rest have been removed in favor of array and tuple:

      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);
      
    • optionalElement has 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 TreeFormatter in BrandSchemas

    • Schema annotations interfaces have been refactored:

      • add PropertySignatureAnnotations (baseline)
      • remove DocAnnotations
      • rename DeclareAnnotations to Annotations
    • the annotations option of the optional constructor has been replaced by the annotations method Before

      S.optional(S.string, {
        exact: true,
        annotations: { description: "description" },
      });
      

      Now

      S.optional(S.string, { exact: true }).annotations({
        description: "description",
      });
      

    Serializable module

    • The type parameters of SerializableWithResult and WithResult have been swapped

Patch Changes

  • #2172 5d47ee0 Thanks @gcanti! - ## Schema module

    • enhance the struct API 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 extend API 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 Annotable interface

    • add asSchema

    • add add Schema.Any, Schema.All, Schema.AnyNoContext helpers

    • refactor annotations API to be a method within the Schema interface

    • add support for AST.keyof, AST.getPropertySignatures, Parser.getSearchTree to Classes

    • fix BrandAnnotation type and add getBrandAnnotation

    • 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

[email protected]

Patch Changes

  • #2172 5d47ee0 Thanks @gcanti! - Brand: add refined overload

    export function refined<A extends Brand<any>>(
      f: (unbranded: Brand.Unbranded<A>) => Option.Option<Brand.BrandErrors>,
    ): Brand.Constructor<A>;
    

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

@effect/[email protected]

Patch Changes

github-actions[bot] avatar Mar 11 '24 15:03 github-actions[bot]