Remove fs-extra dependency#24
Merged
GrahamCampbell merged 2 commits intomainfrom Apr 30, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the fs-extra dependency by switching runtime filesystem utilities to built-in node:fs APIs and updating unit tests to use local test helpers for ensureDir / outputFile / remove.
Changes:
- Replace
fs-extrausage insrc/utils/fs/*withnode:fs/node:fs.promises. - Update unit tests to avoid
fs-extraby introducingtest/lib/fs.jshelpers. - Add a Windows symlink-skip helper + unit test to keep symlink-related tests stable on Windows environments.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/src/utils/glob.test.js | Switch test setup/teardown file ops from fs-extra to test/lib/fs helpers. |
| test/unit/src/utils/fs.test.js | Remove fs-extra, add sync existence + symlink edge-case tests, and use local fs helpers. |
| test/unit/src/utils/cache-hash.test.js | Replace fs-extra test file creation/cleanup with local helpers. |
| test/unit/src/state/LocalStateStorage.test.js | Replace fs-extra ensure/remove with local helpers. |
| test/unit/src/configuration/resolve-path.test.js | Replace fs-extra ensure/output/remove with local helpers. |
| test/unit/src/configuration/read.test.js | Replace fs-extra ensure/remove with local helpers. |
| test/unit/lib/skip-on-disabled-symlinks-in-windows.test.js | Add unit test coverage for the new Windows symlink-skip helper. |
| test/unit/components/framework/index.test.js | Replace fs-extra output/remove with local helpers in cache-hash related tests. |
| test/lib/skip-on-disabled-symlinks-in-windows.js | New helper to skip tests on Windows EPERM symlink failures. |
| test/lib/process-tmp-dir.js | Replace fs-extra removeSync with fs.rmSync. |
| test/lib/fs.js | New minimal replacements for fs-extra used in tests. |
| src/utils/fs/writeFile.js | Replace fs-extra.ensureDir/writeFile with fs.promises.mkdir/writeFile. |
| src/utils/fs/readFileSync.js | Replace fs-extra.readFileSync with fs.readFileSync. |
| src/utils/fs/readFile.js | Replace fs-extra.readFile with fs.promises.readFile. |
| src/utils/fs/fileExistsSync.js | Replace fs-extra.lstatSync with fs.lstatSync. |
| src/utils/fs/fileExists.js | Replace fs-extra.lstat with fs.promises.lstat. |
| package.json | Remove fs-extra from dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.