Files
effect/packages/cli/CHANGELOG.md
T
github-actions[bot]andgithub-actions[bot] e1e0b953c9 Version Packages (#2095)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-12 10:05:07 +13:00

45 KiB

@effect/cli

0.33.3

Patch Changes

0.33.2

Patch Changes

0.33.1

Patch Changes

0.33.0

Minor Changes

  • #2006 9a2d1c1 Thanks @github-actions! - With this change we now require a string key to be provided for all tags and renames the dear old Tag to GenericTag, so when previously you could do:

    import { Effect, Context } from "effect";
    interface Service {
      readonly _: unique symbol;
    }
    const Service = Context.Tag<
      Service,
      {
        number: Effect.Effect<never, never, number>;
      }
    >();
    

    you are now mandated to do:

    import { Effect, Context } from "effect";
    interface Service {
      readonly _: unique symbol;
    }
    const Service = Context.GenericTag<
      Service,
      {
        number: Effect.Effect<never, never, number>;
      }
    >("Service");
    

    This makes by default all tags globals and ensures better debuggaility when unexpected errors arise.

    Furthermore we introduce a new way of constructing tags that should be considered the new default:

    import { Effect, Context } from "effect";
    class Service extends Context.Tag("Service")<
      Service,
      {
        number: Effect.Effect<never, never, number>;
      }
    >() {}
    
    const program = Effect.flatMap(Service, ({ number }) => number).pipe(
      Effect.flatMap((_) => Effect.log(`number: ${_}`)),
    );
    

    this will use "Service" as the key and will create automatically an opaque identifier (the class) to be used at the type level, it does something similar to the above in a single shot.

  • #2006 1a77f72 Thanks @github-actions! - change Effect type parameters order from Effect<R, E, A> to Effect<A, E = never, R = never>

  • #2006 a34dbdc Thanks @github-actions! - - Schema: change type parameters order from Schema<R, I, A> to Schema<A, I = A, R = never>

    • Serializable: change type parameters order from Serializable<R, I, A> to Serializable<A, I, R>
    • Class: change type parameters order from Class<R, I, A, C, Self, Inherited> to Class<A, I, R, C, Self, Inherited>
    • PropertySignature: change type parameters order from PropertySignature<R, From, FromIsOptional, To, ToIsOptional> to PropertySignature<From, FromIsOptional, To, ToIsOptional, R = never>
  • #2006 b1e2086 Thanks @github-actions! - remove re-exports from platform packages

  • #2006 02c3461 Thanks @github-actions! - With this change we remove the Data.Data type and we make Equal.Equal & Hash.Hash implicit traits.

    The main reason is that Data.Data<A> was structurally equivalent to A & Equal.Equal but extending Equal.Equal doesn't mean that the equality is implemented by-value, so the type was simply adding noise without gaining any level of safety.

    The module Data remains unchanged at the value level, all the functions previously available are supposed to work in exactly the same manner.

    At the type level instead the functions return Readonly variants, so for example we have:

    import { Data } from "effect";
    
    const obj = Data.struct({
      a: 0,
      b: 1,
    });
    

    will have the obj typed as:

    declare const obj: {
      readonly a: number;
      readonly b: number;
    };
    
  • #2006 9a2d1c1 Thanks @github-actions! - This change enables Effect.serviceConstants and Effect.serviceMembers to access any constant in the service, not only the effects, namely it is now possible to do:

    import { Effect, Context } from "effect";
    
    class NumberRepo extends Context.TagClass("NumberRepo")<
      NumberRepo,
      {
        readonly numbers: Array<number>;
      }
    >() {
      static numbers = Effect.serviceConstants(NumberRepo).numbers;
    }
    

Patch Changes

0.32.2

Patch Changes

0.32.1

Patch Changes

0.32.0

Minor Changes

  • #2047 eb1f787 Thanks @tim-smart! - make array types in cli more permissive

    This change removes NonEmpty* arrays as input parameters, and removes use of ReadonlyArray as a return type (prefering Array instead).

    This allows more interop with the existing js ecosystem.

0.31.9

Patch Changes

0.31.8

Patch Changes

0.31.7

Patch Changes

0.31.6

Patch Changes

0.31.5

Patch Changes

0.31.4

Patch Changes

0.31.3

Patch Changes

  • #1990 003bb69 Thanks @IMax153! - fix stack overflow exception when nesting cli options / args in a command config

0.31.2

Patch Changes

0.31.1

Patch Changes

0.31.0

Minor Changes

  • #1984 eaab2e8 Thanks @IMax153! - default Options.repeated to return an empty array if option is not provided

Patch Changes

  • #1980 9cf3782 Thanks @IMax153! - fix CLI argument parsing to properly handle the case when a repeated option is not provided

0.30.6

Patch Changes

0.30.5

Patch Changes

0.30.4

Patch Changes

0.30.3

Patch Changes

0.30.2

Patch Changes

0.30.1

Patch Changes

0.30.0

Minor Changes

  • #1938 9a0d61f Thanks @IMax153! - rename mapOrFail to mapEffect for Command, Options, and Args modules

0.29.0

Minor Changes

  • #1925 86180cc Thanks @IMax153! - adds optional executable parameter to CliApp.make

    NOTE: This means that users are no longer required to manually remove the executable from the CLI arguments (i.e. process.argv.slice(2)). The executable is stripped from the CLI arguments internally within CliApp.make, so all command-line arguments can be provided directly to the CLI application.

Patch Changes

0.28.9

Patch Changes

0.28.8

Patch Changes

0.28.7

Patch Changes

0.28.6

Patch Changes

0.28.5

Patch Changes

0.28.4

Patch Changes

0.28.3

Patch Changes

0.28.2

Patch Changes

0.28.1

Patch Changes

0.28.0

Minor Changes

Patch Changes

0.27.0

Minor Changes

0.26.0

Minor Changes

0.25.4

Patch Changes

0.25.3

Patch Changes

0.25.2

Patch Changes

0.25.1

Patch Changes

  • #422 ca7dcd5 Thanks @tim-smart! - add Command.withHandler,transformHandler,provide,provideEffectDiscard

0.25.0

Minor Changes

Patch Changes

  • #411 07b3529 Thanks @IMax153! - default CliConfig.finalCheckBuiltIn to false

  • #404 70fc225 Thanks @IMax153! - remove "type" option from Prompt.text and add Prompt.password and Prompt.hidden which return Secret

  • #416 234c3f7 Thanks @IMax153! - Make help documentation print built-in options by default

    The printing of built-in options in the help documentation can be disabled by providing a custom CliConfig to your CLI application with showBuiltIns set to false.

0.24.0

Minor Changes

Patch Changes

0.23.1

Patch Changes

0.23.0

Minor Changes

Patch Changes

0.22.0

Minor Changes

0.21.0

Minor Changes

Patch Changes

  • #358 07eaa9d Thanks @IMax153! - add support for auto-generating completions for a cli program

0.20.1

Patch Changes

0.20.0

Minor Changes

0.19.0

Minor Changes

0.18.0

Minor Changes

0.17.0

Minor Changes

0.16.0

Minor Changes

Patch Changes

0.15.1

Patch Changes

0.15.0

Minor Changes

0.14.0

Minor Changes

0.13.0

Minor Changes

0.12.0

Minor Changes

0.11.0

Minor Changes

0.10.1

Patch Changes

0.10.0

Minor Changes

Patch Changes

0.9.0

Minor Changes

0.8.0

Minor Changes

0.7.0

Minor Changes

0.6.0

Minor Changes

0.5.0

Minor Changes

Patch Changes

0.4.1

Patch Changes

0.4.0

Minor Changes

0.3.0

Minor Changes

Patch Changes

0.2.0

Minor Changes

Patch Changes

0.1.0

Minor Changes

0.0.1

Patch Changes