Skip to content

v0.46.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 20:01
· 298 commits to main since this release
104a907

Minor Changes

  • #424 4bbfdb0 Thanks @mattiamanzati! - Add support to mark a service as "leakable" via JSDoc tag. Services marked with @effect-leakable-service will be excluded from the leaking requirements diagnostic, allowing requirements that are expected to be provided per method invocation (e.g. HttpServerRequest).

    Example:

    /**
     * @effect-leakable-service
     */
    export class FileSystem extends Context.Tag("FileSystem")<
      FileSystem,
      {
        writeFile: (content: string) => Effect.Effect<void>;
      }
    >() {}
  • #428 ebaa8e8 Thanks @mattiamanzati! - Add diagnostic to warn when @effect-diagnostics-next-line comments have no effect. This helps identify unused suppression comments that don't actually suppress any diagnostics, improving code cleanliness.

    The new missingDiagnosticNextLine option controls the severity of this diagnostic (default: "warning"). Set to "off" to disable.

    Example:

    // This comment will trigger a warning because it doesn't suppress any diagnostic
    // @effect-diagnostics-next-line effect/floatingEffect:off
    const x = 1;
    
    // This comment is correctly suppressing a diagnostic
    // @effect-diagnostics-next-line effect/floatingEffect:off
    Effect.succeed(1);

Patch Changes

  • #426 22717bd Thanks @mattiamanzati! - Improve Layer Magic refactor with enhanced dependency sorting and cycle detection

    The Layer Magic refactor now includes:

    • Better handling of complex layer composition scenarios
    • Support for detecting missing layer implementations with helpful error messages