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

Replace readable-stream with native API #147

Open
Fuzzyma opened this issue Jan 19, 2025 · 5 comments
Open

Replace readable-stream with native API #147

Fuzzyma opened this issue Jan 19, 2025 · 5 comments
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each

Comments

@Fuzzyma
Copy link
Collaborator

Fuzzyma commented Jan 19, 2025

Readable Stream was always available in node and the readable-stream package seems to be a more stable target than node itself. However, in a lot of places nodes stream might suffice

Version 4: Node 12 - 18 are covered
Version 3: Node 6 - 10
Version 2: Node 0.8 - 8

Especially if the package uses es newer versions of node, the stream api should be stable enough to replace it with native

npx github:Fuzzyma/e18e-tools readable-stream -n 100 -q -o md -U https://npm.devminer.xyz/registry
# Downloads Traffic Version Package Issues
1 151.25M 8291.68 GB ^4.2.0 bl rvagg/bl#150
2 131.64M 7216.50 GB 3 through2 #147 (comment)
3 92.36M 5063.11 GB ^3.0.2 concat-stream
4 74.91M 4106.37 GB ^3.1.1 duplexify
5 57.42M 3147.64 GB ^4.0.0 archiver-utils
6 53.01M 2906.21 GB ^3.4.0 winston
7 50.16M 2749.65 GB ^3.6.0 hash-base
8 49.96M 2738.72 GB ^2.0.1 hpack.js
9 48.88M 2679.87 GB ^3.0.6 spdy-transport
10 48.50M 2658.98 GB ^2.0.1 memory-fs #147 (comment)
11 47.54M 2606.00 GB ^3.5.0 stream-browserify
12 45.21M 2478.19 GB ^3.6.2 winston-transport
13 41.93M 2298.55 GB ^4.0.0 archiver archiverjs/node-archiver#799
14 41.93M 2298.54 GB ^4.0.0 zip-stream archiverjs/node-zip-stream#247
15 41.43M 2271.29 GB ^4.0.0 compress-commons
16 41.32M 2265.32 GB ^4.0.0 crc32-stream
17 39.98M 2191.97 GB ^2.0.5 lazystream
18 37.86M 2075.45 GB ~2.3.6 jszip
19 37.23M 2040.86 GB ^2.3.8 browserify-sign
20 36.75M 2014.78 GB ^3.6.0 stream-http
21 34.65M 1899.33 GB ^2.0.2 duplexer2
22 34.42M 1886.67 GB ^2.0.0 from2
23 24.42M 1338.45 GB ^3.1.1 flush-write-stream
24 21.78M 1193.74 GB ^2.3.3 node-libs-browser
25 20.14M 1104.16 GB ^2.1.5 parallel-transform
26 20.06M 1099.82 GB 1 || 2 fs-write-stream-atomic
27 17.76M 973.50 GB ^3.6.0 readable-web-to-node-stream
28 10.69M 586.06 GB ^2.0.2 stream-combiner2
29 10.08M 552.55 GB ^4.0.0 cloneable-readable
30 7.28M 399.22 GB ^3.6.0 exceljs
31 6.88M 377.24 GB 1.1.x ftp
32 6.51M 356.77 GB ^2.0.2 browserify
33 6.34M 347.29 GB ^3.6.0 multistream
34 6.10M 334.40 GB ^4.5.2 node-polyfill-webpack-plugin
35 5.83M 319.52 GB ^4.1.0 stdout-stream
36 5.40M 296.24 GB 1.x >=1.1. amqplib
37 5.04M 276.25 GB ~1.0.31 noms
38 4.36M 239.21 GB ^4.4.2 mqtt
39 4.36M 238.87 GB ^2.0.2 module-deps
40 4.21M 230.90 GB ^2.0.2 stream-splicer
41 4.14M 226.72 GB ^2.0.2 read-only-stream
42 4.10M 224.67 GB ^3.6.0 keccak
43 3.85M 210.98 GB ^3.5.0 docker-modem
44 3.66M 200.72 GB 2.3.7 mysql
45 3.62M 198.21 GB ^3.6.1 newrelic
46 3.58M 196.15 GB ^3.6.0 ndjson
47 3.20M 175.20 GB ~2.3.3 static-module
48 3.19M 174.87 GB ^3.4.0 level-iterator-stream
49 2.81M 154.16 GB ~1.0.27-1 html-tokenize
50 2.10M 115.30 GB ^4.5.2 gettext-parser
51 2.10M 114.93 GB ^2.3.3 @httptoolkit/websocket-stream
52 1.97M 108.02 GB ^3.6.2 elastic-apm-node
53 1.94M 106.54 GB ^3.4.0 isomorphic-git
54 1.78M 97.66 GB ^3.4.0 bufferstreams
55 1.75M 96.16 GB ^2.0.2 replacestream
56 1.72M 94.55 GB ^3.6.0 node-stdlib-browser
57 1.72M 94.45 GB ^3.6.0 simple-websocket
58 1.37M 75.20 GB ^1.0.33 css-tokenize
59 1.29M 70.57 GB ^2.0.0 read-all-stream
60 1.27M 69.67 GB ^3.0.6 stream-chopper
61 1.27M 69.41 GB ^2.3.3 websocket-stream
62 1.26M 69.18 GB ^1.0.31 ftp-response-parser
63 1.14M 62.73 GB ^4.5.2 elevenlabs
64 947.31k 51.93 GB ^2.1.4 stream-meter
65 936.27k 51.33 GB ^3.4.0 block-stream2
66 915.53k 50.19 GB ^2.1.4 tar-pack
67 907.55k 49.75 GB ~1.0.2 memory-streams
68 902.47k 49.47 GB ^3.6.2 @metamask/providers
69 897.92k 49.22 GB ^3.6.2 || ^4.4.2 extension-port-stream
70 889.47k 48.76 GB ^3.6.0 @aws-crypto/encrypt-node
71 889.29k 48.75 GB ^3.6.0 @aws-crypto/decrypt-node
72 857.85k 47.03 GB ^3.4.0 string-to-stream
73 849.85k 46.59 GB ^3.6.2 @metamask/object-multiplex
74 788.03k 43.20 GB 1.1.x imap
75 786.46k 43.11 GB ^4.0.0 level-ws
76 782.12k 42.88 GB ^3.6.0 merkle-patricia-tree
77 762.84k 41.82 GB ^2.0.0 azure-storage
78 749.99k 41.11 GB ^3.6.2 @metamask/sdk
79 706.68k 38.74 GB ^3.6.2 @metamask/json-rpc-middleware-stream
80 705.99k 38.70 GB 4.5.2 quicktype-core
81 648.61k 35.56 GB 2 streaming-json-stringify
82 635.25k 34.82 GB ~1.0.26-4 fwd-stream
83 633.77k 34.74 GB ^2.3.3 obj-multiplex
84 585.93k 32.12 GB ^1.0.26-4 level-blobs
85 556.23k 30.49 GB ^1.0.33 varstream
86 544.67k 29.86 GB ^2.1.5 stream-iterate
87 537.34k 29.46 GB ^3.0.0 msgpack5
88 520.90k 28.56 GB ^3.4.0 memory-stream
89 513.12k 28.13 GB ^4.5.2 cohere-ai
90 466.35k 25.57 GB ^3.6.0 simple-peer
91 429.17k 23.53 GB ^2.2.2 gulp-watch
92 409.17k 22.43 GB ~2.1.0 stream-array
93 401.00k 21.98 GB ^3.6.0 lzma-native
94 397.33k 21.78 GB ^4.5.2 @fastify/compress
95 391.01k 21.44 GB ^2.0.2 buffer-to-vinyl
96 382.13k 20.95 GB ~1.1.9 gif-encoder
97 379.80k 20.82 GB ^3.4.0 gulp-decompress
98 365.17k 20.02 GB ^2.0.0 vinyl-assign
99 362.12k 19.85 GB ^1.1.8 decompress-zip
100 361.91k 19.84 GB ~1.0.33-1 contentstream
@Fuzzyma Fuzzyma added the umbrella issue This issue contains a list of dependents of a package and tracks the progress in each label Jan 19, 2025
@Fuzzyma Fuzzyma changed the title replace readable-stream with native Implementation Replace readable-stream with native API Jan 19, 2025
@Fuzzyma
Copy link
Collaborator Author

Fuzzyma commented Jan 19, 2025

For through2 I think it is more useful to migrate people away from it directly since its not been updated for 5 years.
The list of though2 doesnt look impressive but the dependents of the dependents have huge download counts and therefore I think it would be worth it as well

// EDIT: Issue tracking this: #148

@talentlessguy
Copy link

talentlessguy commented Jan 19, 2025

@talentlessguy
Copy link

For through2 I think it is more useful to migrate people away from it directly since its not been updated for 5 years. The list of though2 doesnt look impressive but the dependents of the dependents have huge download counts and therefore I think it would be worth it as well

to add, it can be replaced with node:stream as well, everything that through2 has built-in stream has as well

@Fuzzyma
Copy link
Collaborator Author

Fuzzyma commented Jan 20, 2025

A comment from Matteo about this topic: rvagg/bl#150 (comment)

@talentlessguy
Copy link

https://github.com/webpack/memory-fs is deprecated in favor of memfs which doesn't depend on readable-stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each
Projects
None yet
Development

No branches or pull requests

2 participants