Skip to content

fix: move @types/readable-stream to dependencies - #62

Open
ZayanKhan-12 wants to merge 1 commit into
MetaMask:mainfrom
ZayanKhan-12:fix/move-types-readable-stream-to-dependencies
Open

fix: move @types/readable-stream to dependencies#62
ZayanKhan-12 wants to merge 1 commit into
MetaMask:mainfrom
ZayanKhan-12:fix/move-types-readable-stream-to-dependencies

Conversation

@ZayanKhan-12

@ZayanKhan-12ZayanKhan-12 commented Jul 22, 2026

Copy link
Copy Markdown

Explanation

Moves @types/readable-stream from devDependencies to dependencies.

The type declarations this package publishes to dist/ reference types from readable-stream (e.g. Duplex in ObjectMultiplex.d.ts and Substream.d.ts), and src/readable-stream.d.ts augments the readable-stream module. Since readable-stream@^3 ships no types of its own, these declarations only resolve through @types/readable-stream — so TypeScript consumers are currently forced to add it as their own dependency (see e.g. MetaMask/swaps-controller#333).

No yarn.lock change is needed: Yarn v1 lockfiles don't record dependency groups, and yarn install --frozen-lockfile passes unchanged.

References

Fixes#58

Changelog

Fixed

  • TypeScript consumers no longer need to install @types/readable-stream themselves: it is now a runtime dependency, since the published type declarations reference it

Checklist

  • I've updated the test suite for new or updated code as appropriate (no code change — yarn build and node test pass, 8/8)
  • I've updated documentation for new or updated code as appropriate (N/A)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate (none)

🤖 Generated with Claude Code


Note

Low Risk
Packaging-only change with no application logic; slightly increases install footprint for non-TypeScript users.

Overview
Moves @types/readable-stream from devDependencies to dependencies so it installs with the package.

Published dist/*.d.ts and src/readable-stream.d.ts rely on those types because readable-stream@^3 does not ship its own. Without this, TypeScript consumers had to add @types/readable-stream themselves.

No runtime or source changes—only package.json.

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

The type declarations emitted to `dist/` reference types from
`readable-stream`, which resolve through `@types/readable-stream`
(`readable-stream@^3` ships no types of its own). With the types
package in `devDependencies`, TypeScript consumers of this package
are forced to install `@types/readable-stream` themselves.
FixesMetaMask#58
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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