Skip to content

v0.52.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 07:05
· 272 commits to main since this release
402c212

Minor Changes

  • #460 1ac81a0 Thanks @mattiamanzati! - Add new diagnostic catchUnfailableEffect to warn when using catch functions on effects that never fail

    This diagnostic detects when catch error handling functions are applied to effects that have a never error type (meaning they cannot fail). It supports all Effect catch variants:

    • Effect.catchAll
    • Effect.catch
    • Effect.catchIf
    • Effect.catchSome
    • Effect.catchTag
    • Effect.catchTags

    Example:

    // Will trigger diagnostic
    const example = Effect.succeed(42).pipe(
      Effect.catchAll(() => Effect.void) // <- Warns here
    );
    
    // Will not trigger diagnostic
    const example2 = Effect.fail("error").pipe(
      Effect.catchAll(() => Effect.succeed(42))
    );

    The diagnostic works in both pipeable style (Effect.succeed(x).pipe(Effect.catchAll(...))) and data-first style (pipe(Effect.succeed(x), Effect.catchAll(...))), analyzing the error type at each position in the pipe chain.

  • #458 372a9a7 Thanks @mattiamanzati! - Refactor TypeParser internals to use symbol-based navigation instead of type-based navigation

    This change improves the reliability and performance of the TypeParser by switching from type-based navigation to symbol-based navigation when identifying Effect, Schema, and other Effect ecosystem APIs. The new implementation:

    • Uses TypeScript's symbol resolution APIs to accurately identify imports and references
    • Supports package name resolution to verify that identifiers actually reference the correct packages
    • Implements proper alias resolution for imported symbols
    • Adds caching for source file package information lookups
    • Provides new helper methods like isNodeReferenceToEffectModuleApi and isNodeReferenceToEffectSchemaModuleApi

    This is an internal refactoring that doesn't change the public API or functionality, but provides a more robust foundation for the language service features.