cz-cli icon indicating copy to clipboard operation
cz-cli copied to clipboard

chore: replace fs-extra with native node:fs

Open roli-lpci opened this issue 9 months ago • 0 comments

Summary

  • Replace fs-extra dependency with native node:fs equivalents
  • Node.js has supported fs.mkdir({ recursive: true }), fs.rmSync, and fs.cpSync natively since v16, which is well within the project's engine requirement of >= 12
  • Reduces dependency count and install footprint

Changes

  • src/commitizen/commit.js: Replace ensureDir() from fs-extra with native fs.mkdir() with { recursive: true } callback
  • test/tools/clean.js: Replace fs.removeSync() with fs.rmSync(), fs.copySync() with fs.cpSync(), using native fs import
  • package.json: Remove fs-extra from dependencies

Testing

  • All 50 existing tests pass
  • Coverage thresholds met (statements 80%, branches 80%, functions 80%, lines 80%)

Part of the e18e ecosystem cleanup.

roli-lpci avatar Feb 28 '26 00:02 roli-lpci