Skip to content

Declare TypeScript as a peer dependency for isolated linkers #772

Description

@alan-roe

@effect/language-service@0.87.2 imports typescript/lib/tsserverlibrary, but its package manifest declares no dependency or peer dependency on typescript.

With an isolated linker, that import can fall through to an unrelated hoisted package. For example, a Bun workspace with root dependencies typescript@6.0.3 and @typescript/native: npm:typescript@7.0.2 hoists the aliased TypeScript 7 package for the language service. The CLI then fails with:

Package subpath './lib/tsserverlibrary' is not defined by "exports" in node_modules/.bun/node_modules/typescript/package.json

Reproduction:

  1. Configure Bun's isolated linker.
  2. Install @effect/language-service@0.87.2, typescript@6, and an alias such as @typescript/native: npm:typescript@7 at the workspace root.
  3. Run bunx effect-language-service overview --file <effect-source.ts>.

Please declare typescript as a peer dependency (ideally the supported TypeScript 5/6 range documented by the CLI). This gives isolated linkers the dependency edge needed to place the consumer's supported TypeScript beside the language-service package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions