Uh oh!
There was an error while loading. Please reload this page.
fix: move @types/readable-stream to dependencies - #62
Open
ZayanKhan-12 wants to merge 1 commit into
Open
Conversation
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>
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.
Explanation
Moves
@types/readable-streamfromdevDependenciestodependencies.The type declarations this package publishes to
dist/reference types fromreadable-stream(e.g.DuplexinObjectMultiplex.d.tsandSubstream.d.ts), andsrc/readable-stream.d.tsaugments thereadable-streammodule. Sincereadable-stream@^3ships 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.lockchange is needed: Yarn v1 lockfiles don't record dependency groups, andyarn install --frozen-lockfilepasses unchanged.References
Fixes#58
Changelog
Fixed
@types/readable-streamthemselves: it is now a runtime dependency, since the published type declarations reference itChecklist
yarn buildandnode testpass, 8/8)🤖 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-streamfromdevDependenciestodependenciesso it installs with the package.Published
dist/*.d.tsandsrc/readable-stream.d.tsrely on those types becausereadable-stream@^3does not ship its own. Without this, TypeScript consumers had to add@types/readable-streamthemselves.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.