Skip to content

Published .d.ts import types of optional peers (dockerode, MCP SDK): errors with skipLibCheck: false #346

Description

@LinuxDevil

Found while working A6b (#244).

With skipLibCheck: false, a consumer who has not installed the optional peers gets errors inside our declarations:

  • dist/index.d.ts: import Docker from 'dockerode' -> TS2307 (and TS7016 if dockerode is installed without @types/dockerode; dockerode ships no types and @types/dockerode is not a peer).
  • dist/schema-*.d.ts: import { Client } from '@modelcontextprotocol/sdk/client/index.js' -> TS2307 without the MCP SDK.

Cause: public option types name Docker.DockerOptions (SubprocessSandbox) and the MCP SDK's Client, Transport, OAuthClientProvider and so on. skipLibCheck: true (the default in most templates) hides it.

pack-smoke's new strict-libs check (A6b) installs these packages into the smoke project so it checks our own declarations; it does not fix the leak. Possible fixes: structural types for the few members used, or @types/dockerode plus the MCP SDK as documented requirements for skipLibCheck: false. Needs an owner decision on which; no change to the published types was made for this in A6b.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions