Uh oh!
There was an error while loading. Please reload this page.
fix: make @types/readable-stream a runtime dependency - #63
Closed
ZayanKhan-12 wants to merge 1 commit into
Closed
Conversation
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
commented
Aug 4, 2026
Author
Closing as a duplicate of #62, which I opened earlier for the same issue — apologies for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
@types/readable-streamis 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-streamas a dependency themselves — see e.g. https://github.com/MetaMask/swaps-controller/pull/333/files#r1829249847.This moves
@types/readable-streamfromdevDependenciestodependenciesso it resolves transitively for consumers. No version change (4.0.0), no lockfile change.Fixes#58
Testing
yarn install --frozen-lockfile— lockfile unchangedyarn 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-streamfromdevDependenciestodependenciesinpackage.json.Published declarations under
dist/*.d.tspull in types from that package (viareadable-streamusage andsrc/readable-stream.d.tsaugmentation), so keeping it dev-only forced downstream projects to add the types themselves. Version stays pinned at4.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.