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 through2 with node:stream #148

Open
talentlessguy opened this issue Jan 20, 2025 · 0 comments
Open

Replace through2 with node:stream #148

talentlessguy opened this issue Jan 20, 2025 · 0 comments
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each

Comments

@talentlessguy
Copy link

talentlessguy commented Jan 20, 2025

From through2 GitHub repo:

Since Node.js introduced Simplified Stream Construction, many uses of through2 have become redundant. Consider whether you really need to use through2 or just want to use the 'readable-stream' package, or the core 'stream' package (which is derived from 'readable-stream'):

const { Transform } = require('readable-stream')

const transformer = new Transform({
  transform(chunk, enc, callback) {
    // ...
  }
})

In fact, there's no need to use readable-stream either, it can be replaced straight up with node:stream.

Here's a list of top 50 packages depending on through2:

# Downloads Traffic Version Package PR
1 21.32M 85.46 GB ^3.0.1 mississippi
2 12.33M 49.43 GB ^2.0.1 metro-symbolicate facebook/metro#1430
3 11.68M 46.81 GB ^2.0.3 gunzip-maybe mafintosh/gunzip-maybe#11
4 11.06M 44.35 GB ^2.0.3 peek-stream
5 8.77M 35.15 GB ^2.0.0 get-pkg-repo
6 7.59M 30.44 GB ^4.0.2 through2-filter
7 6.51M 26.09 GB ^2.0.0 browserify
8 5.70M 22.86 GB ~2.0.0 git-log-parser
9 5.42M 21.74 GB ^2.0.1 copyfiles
10 4.36M 17.47 GB ^2.0.0 module-deps
11 4.29M 17.22 GB ^2.0.0 browser-pack
12 4.27M 17.11 GB ^2.0.0 insert-module-globals
13 4.26M 17.07 GB ^2.0.0 deps-sort
14 3.86M 15.48 GB ^2.0.0 gulp-util
15 3.58M 14.34 GB ^4.0.0 ndjson
16 3.20M 12.81 GB ~2.0.3 static-module
17 3.07M 12.32 GB ^2.0.0 brfs
18 3.06M 12.26 GB ^2.0.0 quote-stream
19 2.81M 11.27 GB ~0.4.1 html-tokenize
20 2.70M 10.82 GB ^2.0.0 gulp-sourcemaps
21 2.45M 9.81 GB ^4.0.2 watchify
22 2.28M 9.15 GB ~2.0.3 progress-stream
23 1.86M 7.46 GB ^2.0.0 @cypress/browserify-preprocessor
24 1.86M 7.44 GB ^2.0.0 coffeeify
25 1.80M 7.23 GB ^2.0.3 @gulp-sourcemaps/map-sources
26 1.78M 7.13 GB ^2.0.0 gulp-concat
27 1.61M 6.47 GB ^2.0.0 gulp-header
28 1.50M 6.01 GB ^3.0.1 @gulp-sourcemaps/identity-map
29 1.43M 5.75 GB ^2.0.0 gulp-uglify
30 1.43M 5.74 GB ^2.0.1 gulp-sort
31 1.40M 5.60 GB 2.0.3 csv-streamify
32 1.33M 5.32 GB ^0.6.1 ldjson-stream
33 1.23M 4.93 GB ^0.6.3 glsl-tokenizer
34 1.19M 4.75 GB ^3.0.1 gulp-if
35 1.18M 4.73 GB ^3.0.1 ternary-stream
36 1.14M 4.59 GB ^4.0.2 native-run
37 1.06M 4.24 GB ^2.0.0 gulp-babel
38 1.03M 4.11 GB ^2.0.1 glslify
39 956.32k 3.83 GB ^2.0.0 through2-concurrent
40 953.14k 3.82 GB ^2.0.1 lsofi
41 889.58k 3.57 GB ^4.0.2 minio
42 871.86k 3.50 GB ^0.6.3 css-rule-stream
43 822.30k 3.30 GB 3.0.1 gulp-clean-css
44 784.84k 3.15 GB ^4.0.2 npm-watch
45 758.21k 3.04 GB ^2.0.0 maxstache-stream
46 729.47k 2.92 GB ^2.0.3 gulp-plumber
47 720.82k 2.89 GB ^2.0.0 fbjs-scripts
48 681.12k 2.73 GB ^3.0.1 gulp-typescript
49 679.85k 2.73 GB ~0.6.3 hyperquest
50 612.66k 2.46 GB ^4.0.2 through2-map
@Fuzzyma Fuzzyma added the umbrella issue This issue contains a list of dependents of a package and tracks the progress in each label Jan 20, 2025
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