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

Removing fs-extra from packages with async node:fs support #33

Open
jordanfinners opened this issue Mar 2, 2024 · 7 comments
Open

Removing fs-extra from packages with async node:fs support #33

jordanfinners opened this issue Mar 2, 2024 · 7 comments
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each

Comments

@jordanfinners
Copy link

In newer versions of Node, theres a promises API for the file system which has a lot of overlap with https://www.npmjs.com/package/fs-extra

@43081j
Copy link
Collaborator

43081j commented Mar 3, 2024

this will be a big one.

thankfully, fs-extra isn't bloated but you are right it could be removed entirely from many projects

we will have to look up the engines constraint of popular packages depending on it, and remove fs-extra if they're on a node version which ships async fs

@43081j 43081j changed the title FS Extra Removing fs-extra from packages with async node:fs support Mar 3, 2024
@psulek
Copy link

psulek commented Jun 23, 2024

Be aware that fs-extra is not just polyfill, it adds extra functionality like emptyDir, and so which does not have direct replacement, but of course can be replaced with similar code as fs-extra.

@43081j
Copy link
Collaborator

43081j commented Jun 23, 2024

you're right

its a pretty useful package for sure. we should only really move projects away from it for the stuff that has native equivalents in their supported node versions (e.g. recursive readdir, async methods, etc)

@pralkarz
Copy link

pralkarz commented Dec 3, 2024

Top 100 dependents that still use fs-extra.

# Downloads Traffic Version Package
1 56.64M 864.81 GB ^10.0.0 fork-ts-checker-webpack-plugin
2 39.27M 599.52 GB ^11.2.0 get-uri
3 23.81M 363.58 GB ^9.1.0 cypress
4 19.85M 303.04 GB ^8.1.0 streamroller
5 18.02M 275.18 GB ^9.0.1 workbox-build
6 13.29M 202.91 GB ^11.2.0 unzipper
7 11.76M 179.60 GB ^10.0.0 react-scripts
8 10.24M 156.37 GB ~7.0.1 @rushstack/node-core-library
9 10.16M 155.07 GB ^9.0.0 patch-package
10 9.72M 148.40 GB ^8.1.0 @react-native-community/cli
11 7.16M 109.36 GB ^11.2.0 aws-cdk-lib
12 6.28M 95.92 GB ^11.0.0 @semantic-release/npm
13 5.71M 87.12 GB ^9.0.0 @expo/prebuild-config
14 5.57M 85.01 GB ^10.0.0 mochawesome-report-generator
15 5.46M 83.35 GB ^11.2.0 lerna
16 5.38M 82.10 GB ^11.2.0 @lerna/create
17 5.13M 78.32 GB ^7.0.1 @changesets/config
18 5.12M 78.19 GB ^7.0.1 @changesets/read
19 5.10M 77.89 GB ^7.0.1 @changesets/pre
20 5.07M 77.48 GB ^8.1 @oclif/errors
21 5.07M 77.38 GB ^7.0.1 @changesets/cli
22 5.02M 76.62 GB ^7.0.1 @changesets/apply-release-plan
23 5.01M 76.54 GB ^7.0.1 @changesets/write
24 4.55M 69.46 GB ^8.1.0 eslint-loader
25 4.48M 68.39 GB ^9.0.1 @storybook/manager-webpack4
26 4.42M 67.51 GB ^11.1.0 vite-plugin-checker
27 4.26M 65.10 GB ^9.1.0 expo-modules-autolinking
28 4.15M 63.38 GB 9.0.0 @expo/image-utils
29 4.15M 63.30 GB 9.1.0 commitizen
30 4.04M 61.65 GB ^9.1.0 @serverless/dashboard-plugin
31 3.94M 60.09 GB ^7.0.1 mochawesome-merge
32 3.86M 58.96 GB ^8.1.0 @electron/get
33 3.79M 57.90 GB ^9.1.0 @expo/metro-config
34 3.61M 55.08 GB ^11.0.0 @semantic-release/changelog
35 3.54M 54.05 GB ~8.1.0 @expo/cli
36 3.21M 49.01 GB 3.0.1 browser-sync
37 3.14M 47.99 GB ^10.0.0 rollup-plugin-typescript2
38 3.10M 47.36 GB ^11.2.0 vite-plugin-inspect
39 2.94M 44.93 GB 9.1.0 @module-federation/dts-plugin
40 2.94M 44.81 GB 10.1.0 @openapitools/openapi-generator-cli
41 2.93M 44.75 GB ^8.1 cli-ux
42 2.91M 44.47 GB 9.1.0 @module-federation/third-party-dts-extractor
43 2.80M 42.82 GB 9.1.0 @module-federation/managers
44 2.80M 42.68 GB ^9.0.1 @storybook/manager-webpack5
45 2.77M 42.36 GB ^11.0.0 postcss-cli
46 2.65M 40.44 GB ^11.1.1 azurite
47 2.62M 39.96 GB ^9.1.0 @vue/cli-service
48 2.49M 37.99 GB ^9.1.0 sequelize-cli
49 2.37M 36.14 GB ^11.2.0 nitropack
50 2.32M 35.44 GB 8.1.0 @vercel/fun
51 2.25M 34.32 GB ^11.1.1 @electron/universal
52 2.18M 33.35 GB ^9.0.0 @ionic/utils-fs
53 2.17M 33.11 GB 11.1.0 @vercel/gatsby-plugin-vercel-builder
54 2.13M 32.46 GB ^9.0.1 @electron/notarize
55 2.13M 32.46 GB ^11.2.0 serverless-offline
56 2.10M 32.13 GB ^10.1.0 firebase-tools
57 2.09M 31.94 GB ^9.0.1 ember-cli-typescript
58 2.04M 31.22 GB ^11.2.0 gatsby-core-utils
59 1.98M 30.27 GB ^8.1.0 rollup-plugin-copy
60 1.97M 30.14 GB 9.1.0 @module-federation/data-prefetch
61 1.91M 29.18 GB 11.2.0 sonarqube-scanner
62 1.89M 28.87 GB ^9.1.0 @lerna/conventional-commits
63 1.88M 28.77 GB ^9.1.0 @lerna/symlink-dependencies
64 1.88M 28.77 GB ^9.1.0 @lerna/symlink-binary
65 1.88M 28.77 GB ^9.1.0 @lerna/npm-install
66 1.88M 28.76 GB ^9.1.0 @lerna/npm-publish
67 1.88M 28.73 GB ^9.1.0 @lerna/create-symlink
68 1.88M 28.72 GB ^9.1.0 @lerna/resolve-symlink
69 1.88M 28.65 GB ^9.1.0 @lerna/get-packed
70 1.86M 28.41 GB ^9.0.0 @cypress/browserify-preprocessor
71 1.85M 28.28 GB ^10.1.0 cypress-terminal-report
72 1.82M 27.86 GB ^10.1.0 fixturify
73 1.82M 27.74 GB ^9.1.0 @lerna/profiler
74 1.79M 27.29 GB ^10.0.0 fixturify-project
75 1.65M 25.25 GB ^9.1.0 @stackbit/sdk
76 1.65M 25.21 GB ^9.1.0 @stackbit/utils
77 1.65M 25.18 GB ^8.1.0 @stackbit/cms-core
78 1.65M 25.18 GB ^11.1.1 @docusaurus/utils
79 1.64M 25.05 GB ^8.1.0 broccoli-output-wrapper
80 1.60M 24.48 GB ^1.0.0 phantomjs-prebuilt
81 1.60M 24.47 GB ^10.0.0 @electron/osx-sign
82 1.60M 24.45 GB ^11.1.1 @docusaurus/core
83 1.59M 24.24 GB ^10.0.0 @remix-run/dev
84 1.57M 23.99 GB ^11.1.1 @docusaurus/mdx-loader
85 1.57M 23.96 GB ^11.2.0 @docusaurus/utils-validation
86 1.56M 23.86 GB ^11.2.0 @compodoc/compodoc
87 1.54M 23.47 GB ^8.1.0 cucumber-html-reporter
88 1.52M 23.20 GB ^11.1.1 @compodoc/ngd-transformer
89 1.50M 22.89 GB ^11.1.1 gh-pages
90 1.49M 22.78 GB ^10.1.0 builder-util
91 1.48M 22.60 GB ^10.1.0 electron-publish
92 1.44M 22.03 GB ^10.1.0 app-builder-lib
93 1.44M 21.97 GB ^8.0.0 s3rver
94 1.39M 21.28 GB ^10.0.1 cypress-mochawesome-reporter
95 1.39M 21.27 GB ^10.1.0 dmg-builder
96 1.38M 21.11 GB ^10.1.0 electron-builder
97 1.37M 20.89 GB ^8.0.1 fs-merger
98 1.36M 20.80 GB ^7.0.1 mock-aws-s3
99 1.35M 20.58 GB ^11.1.0 vite-plugin-static-copy
100 1.30M 19.83 GB ^11.1.1 @docusaurus/plugin-content-docs

@alexparish
Copy link

The change to get-uri is merged but still waiting for it to be published: TooTallNate/proxy-agents#341

@alexparish
Copy link

get-uri version 6.0.4 has now been published removing the fs-extra dependency 🎉

@Taureon
Copy link

Taureon commented Dec 7, 2024

Top 100 dependents that still use fs-extra.

Downloads Traffic Version Package

[Contents of the table I expunged so the quote wouldn't be huge]

If I did my math right, that sums up to 7040 GB (and 6440.48 GB without get-uri) of inefficiently used bandwidth per month.
Awesome, I love npm.

@Fuzzyma Fuzzyma added the umbrella issue This issue contains a list of dependents of a package and tracks the progress in each label Dec 18, 2024
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

7 participants