Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0-beta.10 suddenly 6.77 MB in install size #1217

Open
akauppi opened this issue Jul 20, 2021 · 6 comments
Open

3.0.0-beta.10 suddenly 6.77 MB in install size #1217

akauppi opened this issue Jul 20, 2021 · 6 comments

Comments

@akauppi
Copy link

akauppi commented Jul 20, 2021

Reproduction

image

Source: https://packagephobia.com/result?p=node-fetch%403.0.0-beta.10

Is this okay?

@akauppi akauppi added the bug label Jul 20, 2021
@jimmywarting
Copy link
Collaborator

jimmywarting commented Jul 20, 2021

Hmm, it basically comes from fetch-blob@v3 that started depending on web-streams-polyfill

That is where it all came from...

@jimmywarting
Copy link
Collaborator

jimmywarting commented Jul 20, 2021

@MattiasBuelens someone here thinks you polyfill is huge (i do too)

$ npm pack web-streams-polyfill

npm notice === Tarball Details === 
npm notice name:          web-streams-polyfill                    
npm notice version:       3.0.3                                   
npm notice filename:      web-streams-polyfill-3.0.3.tgz          
npm notice package size:  1.2 MB                                  (1 232 068 bytes)
npm notice unpacked size: 7.0 MB                                  
npm notice shasum:        f49e487eedeca47a207c1aee41ee5578f884b42f
npm notice integrity:     sha512-d2H/t0eqRNM4w[...]tfMoFfetXaZnA==
npm notice total files:   42                                      
npm notice 

With a weekly 20,513,553 download of node-fetch that is like
1_232_068 * 20_513_553 / 1024 / 1024 / 1024 / 1024 = 22.9866529 TiB extra to downloaded from npm every week 🙃

if we unpack this tgz file on the HD with that ~7 MB of data that is like
6660000 * 20_513_553 / 1024 / 1024 / 1024 / 1024 = 124.25540533513413 TIB of Data that fills up the worlds hard drive every week

@jimmywarting
Copy link
Collaborator

he provides a number of different build versions (es5,6,2018) cjs esm etc

All we really need is one of those files.
that is like 27.4 kb

@jimmywarting
Copy link
Collaborator

jimmywarting commented Sep 6, 2021

web-stream-polyfill@4-beta reduced from 7.56 MB to 402 kB 🚀
Going to test it in fetch-blob to see how it works tomorrow maybe. Promise i would get back with a review of how the new version works

Progress is being made!

@jghaanstra
Copy link

Could we get a status update on this. 3.2.0 still contains the >7mb dependency.

@jimmywarting
Copy link
Collaborator

ping @matthew-andrews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants