Lets avoid transitively depending on `react-native`
Closed this issue · 9 comments
This is unexpected and takes ages to install
npm ls react-native
└─┬ ipfs-car@0.2.4
└─┬ ipfs-utils@8.1.3
└─┬ react-native-fetch-api@1.0.2
└─┬ react-native@0.64.2
It's just to get globSource
... let's just "vendor" (totally copy and paste) it for now.
https://github.com/vasco-santos/ipfs-car/blob/d71f4962c602bd54f291e84ecb5ca30025a30a50/src/pack/stream.ts#L9
To clarify for anyone following along at home, ipfs-car
does not meaningfully depend on react-native
, it just happens to have a transitive dependency that does, but for code that it never imports. So it's just taking up space and time during npm install
oh no! the ipfs-core-types
project transitively depends on react-native
as well
❯ npm ls react-native
ipfs-car@0.3.3 /Users/oli/Code/vasco-santos/ipfs-car
└─┬ ipfs-core-types@0.5.2
└─┬ interface-datastore@4.0.2
└─┬ ipfs-utils@8.1.3
└─┬ react-native-fetch-api@1.0.2
└─┬ react-native@0.64.2
and ipfs-core-utils
depends on ipfs-utils
as well, so we'd have to vendor normalizeAddInput
and ImportCandidateStream
and all that goes with them as well.
i'm thinking we should be consider dropping normalizeAddInput
and be stricter about what we accept as input.
oh no
Automatically installing peer dependencies is an exciting new feature introduced in npm 7.
– https://github.blog/2021-02-02-npm-7-is-now-generally-available/#peer-dependencies
Thanks for flagging this. I will see wether we can just bring the code here, or make a stricter input
This was fixed in ipfs/js-ipfs-utils#130