Skip to content

Remove fs-extra dependency#24

Merged
GrahamCampbell merged 2 commits intomainfrom
chore/remove-fs-extra
Apr 30, 2026
Merged

Remove fs-extra dependency#24
GrahamCampbell merged 2 commits intomainfrom
chore/remove-fs-extra

Conversation

@GrahamCampbell
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-extra usage in src/utils/fs/* with node:fs / node:fs.promises.
  • Update unit tests to avoid fs-extra by introducing test/lib/fs.js helpers.
  • 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.

Comment thread test/lib/skip-on-disabled-symlinks-in-windows.js
Comment thread test/lib/skip-on-disabled-symlinks-in-windows.js Outdated
Comment thread test/unit/lib/skip-on-disabled-symlinks-in-windows.test.js Outdated
Comment thread test/lib/skip-on-disabled-symlinks-in-windows.js
@GrahamCampbell GrahamCampbell merged commit 752a0dd into main Apr 30, 2026
4 checks passed
@GrahamCampbell GrahamCampbell deleted the chore/remove-fs-extra branch April 30, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants