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

[dependencies-replacement] Replace fs-extra with node:fs/promises #225

Merged
merged 2 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-panthers-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@manypkg/cli": minor
---

Replace `fs-extra` with native `node:fs/promises`
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"prettier-plugin-packagejson": "^2.3.0",
"typescript": "^5.3.2"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"engines": {
"node": ">=14.18.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"chalk": "^2.4.2",
"detect-indent": "^6.0.0",
"find-up": "^4.1.0",
"fs-extra": "^8.1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, I've missed it but we might also want to drop this:

"@types/fs-extra": "^8.0.1",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add it to one of the next ones.

Wanted to add knip to catch stuff like this, but even though it's a dev dependency, it requires node 18.18. If we're fine with removing the engines field in the monrepo root?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yee - the monorepo root doesn't have to maintain that node version compat. Although I guess having the engines there makes it easier to control stuff right now. But well, I'd still be OK with removing it from there and making sure it's in all other package.json of our publishable packages

"normalize-path": "^3.0.0",
"p-limit": "^2.2.1",
"package-json": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs-extra";
import fs from "node:fs/promises";
import { Package, Tool } from "@manypkg/get-packages";
import path from "path";
import spawn from "spawndamnit";
Expand Down
Loading