Skip to content

Commit

Permalink
Replace fs-extra with node:fs/promises
Browse files Browse the repository at this point in the history
  • Loading branch information
VanTanev committed Oct 13, 2024
1 parent 045f7d7 commit 5b4f44f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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",
"normalize-path": "^3.0.0",
"p-limit": "^2.2.1",
"package-json": "^8.1.0",
Expand Down
5 changes: 3 additions & 2 deletions 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 All @@ -10,7 +10,8 @@ export async function writePackage(pkg: Package) {
return fs.writeFile(
path.join(pkg.dir, "package.json"),
JSON.stringify(pkg.packageJson, null, indent) +
(pkgRaw.endsWith("\n") ? "\n" : "")
(pkgRaw.endsWith("\n") ? "\n" : ""),
"utf-8"
);
}

Expand Down

0 comments on commit 5b4f44f

Please sign in to comment.