Skip to content

chore: replace fs-extra with native node:fs#653

Open
roli-lpci wants to merge 1 commit intotschaub:mainfrom
roli-lpci:chore/remove-fs-extra
Open

chore: replace fs-extra with native node:fs#653
roli-lpci wants to merge 1 commit intotschaub:mainfrom
roli-lpci:chore/remove-fs-extra

Conversation

@roli-lpci
Copy link

Summary

  • Replace fs-extra dependency with native node:fs and node:fs/promises equivalents
  • Node.js has supported fs.rm, fs.cp, fs.mkdir({ recursive: true }), and other needed APIs natively since v16
  • Reduces the dependency tree

Changes

  • lib/util.js — replaced fs.ensureDir with fsp.mkdir({recursive: true}), fs.copy with fsp.copyFile
  • lib/git.js — replaced fs.exists with fs.existsSync, fs.mkdirp with fs.mkdirSync({recursive: true})
  • lib/index.js — replaced fs.removeSync with fs.rmSync, fs.stat with fsp.stat, fs.createFile with fsp.writeFile, fs.writeFile with fsp.writeFile
  • test/helper.js — replaced fs.copy with fs.cpSync
  • package.json — removed fs-extra from dependencies

Testing

  • All 32 existing tests pass
  • Linter passes clean

Part of the e18e ecosystem cleanup initiative.

Replace fs-extra dependency with native Node.js fs module equivalents.
Node.js has supported all the needed APIs natively since v16.

Part of the e18e ecosystem cleanup initiative.
See e18e/ecosystem-issues#33

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant