Skip to content

chore: replace fs-extra with native Node.js fs APIs#1876

Open
roli-lpci wants to merge 1 commit intodherault:masterfrom
roli-lpci:chore/remove-fs-extra
Open

chore: replace fs-extra with native Node.js fs APIs#1876
roli-lpci wants to merge 1 commit intodherault:masterfrom
roli-lpci:chore/remove-fs-extra

Conversation

@roli-lpci
Copy link
Copy Markdown

Summary

  • Replace all fs-extra usage with native Node.js fs / fs/promises APIs
  • Remove fs-extra from dependencies
  • All replacements available in the supported Node >= 20 runtime

Changes

fs-extra API Native replacement
ensureDir(path) mkdir(path, { recursive: true })
emptyDir(path) rm(path, { force: true, recursive: true }) + mkdir(path, { recursive: true })
remove(path) rm(path, { force: true, recursive: true })
pathExists(path) existsSync(path)

Files modified

  1. src/lambda/LambdaFunction.js — replaced emptyDir, ensureDir, remove
  2. src/lambda/handler-runner/docker-runner/DockerContainer.js — replaced ensureDir, pathExists
  3. tests/_testHelpers/compressArtifact.js — replaced ensureDir
  4. package.json — removed fs-extra dependency
  5. package-lock.json — regenerated

Testing

  • ESLint: 0 errors
  • Prettier: all files pass
  • Integration tests require SERVERLESS_ACCESS_KEY (CI will validate)

Replace all fs-extra usage with native Node.js equivalents:

- ensureDir() → mkdir({ recursive: true })
- emptyDir() → rm({ force: true, recursive: true }) + mkdir({ recursive: true })
- remove() → rm({ force: true, recursive: true })
- pathExists() → existsSync()

All replacements are available in the supported Node >= 20 runtime.

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