Skip to content

fix: make @types/readable-stream a runtime dependency - #63

Closed
ZayanKhan-12 wants to merge 1 commit into
MetaMask:mainfrom
ZayanKhan-12:fix/58-types-readable-stream-dependency
Closed

fix: make @types/readable-stream a runtime dependency#63
ZayanKhan-12 wants to merge 1 commit into
MetaMask:mainfrom
ZayanKhan-12:fix/58-types-readable-stream-dependency

Conversation

@ZayanKhan-12

@ZayanKhan-12ZayanKhan-12 commented Aug 4, 2026

Copy link
Copy Markdown

Description

@types/readable-stream is currently a devDependency, but the published type declarations (dist/*.d.ts) reference types from it. TypeScript consumers therefore fail to resolve the types unless they add @types/readable-stream as a dependency themselves — see e.g. https://github.com/MetaMask/swaps-controller/pull/333/files#r1829249847.

This moves @types/readable-stream from devDependencies to dependencies so it resolves transitively for consumers. No version change (4.0.0), no lockfile change.

Fixes#58

Testing

  • yarn install --frozen-lockfile — lockfile unchanged
  • yarn test (builds with tsc + runs the tape suite) — 8/8 pass

🤖 Generated with Claude Code


Note

Low Risk
Packaging-only change with no runtime or API behavior changes; slightly increases install footprint for all consumers.

Overview
Fixes TypeScript resolution for package consumers by moving @types/readable-stream from devDependencies to dependencies in package.json.

Published declarations under dist/*.d.ts pull in types from that package (via readable-stream usage and src/readable-stream.d.ts augmentation), so keeping it dev-only forced downstream projects to add the types themselves. Version stays pinned at 4.0.0; no application or build logic changes.

Reviewed by Cursor Bugbot for commit 92e2046. Bugbot is set up for automated code reviews on this repo. Configure here.

The published type declarations reference types from @types/readable-stream,
so TypeScript consumers fail to resolve them unless they add the package
themselves (e.g. MetaMask/swaps-controller#333). Moving it from
devDependencies to dependencies makes the types resolve transitively.
FixesMetaMask#58
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ZayanKhan-12
ZayanKhan-12 requested a review from a team as a code ownerAugust 4, 2026 00:11
@ZayanKhan-12

Copy link
Copy Markdown
Author

Closing as a duplicate of #62, which I opened earlier for the same issue — apologies for the noise.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@types/readable-stream should be a dependency, not a dev dependency

1 participant

@ZayanKhan-12