Skip to content

Commit db1e0c1

Browse files
authored
Remove fs-extra (#507)
Currently, `fs-extra` can be replaced with `node:fs` (the Node.js built-in module).
1 parent 2d4c76c commit db1e0c1

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

package-lock.json

-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@
221221
"@stylelint/postcss-css-in-js": "^0.37.2",
222222
"@stylelint/prettier-config": "^2.0.0",
223223
"@types/eslint": "^8.2.0",
224-
"@types/fs-extra": "^9.0.13",
225224
"@types/jest": "^27.0.3",
226225
"@types/path-is-inside": "^1.0.0",
227226
"@types/semver": "^7.3.9",
@@ -236,7 +235,6 @@
236235
"eslint-config-stylelint": "^15.0.0",
237236
"fast-deep-equal": "^3.1.3",
238237
"fast-glob": "^3.2.7",
239-
"fs-extra": "^10.0.0",
240238
"jest": "^27.4.3",
241239
"jest-runner-vscode": "^2.1.0",
242240
"jsonc-parser": "^3.0.0",

scripts/bundle.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import path from 'path';
2-
import fs from 'fs-extra';
1+
import path from 'node:path';
2+
import { rm } from 'node:fs/promises';
33
import * as esbuild from 'esbuild';
44
import glob from 'fast-glob';
55

@@ -14,7 +14,7 @@ async function bundle(): Promise<void> {
1414
const entryPoints = ['build/extension/index.js', 'build/extension/start-server.js'];
1515

1616
for (const item of await glob('dist/*', { cwd: rootDir })) {
17-
await fs.remove(item);
17+
await rm(item);
1818
}
1919

2020
const options: esbuild.BuildOptions = {

0 commit comments

Comments
 (0)