Skip to content

chore: replace rimraf with native fs.rm()#2631

Open
roli-lpci wants to merge 1 commit intoAzure:mainfrom
roli-lpci:chore/replace-rimraf-with-native-fs-rm
Open

chore: replace rimraf with native fs.rm()#2631
roli-lpci wants to merge 1 commit intoAzure:mainfrom
roli-lpci:chore/replace-rimraf-with-native-fs-rm

Conversation

@roli-lpci
Copy link

@roli-lpci roli-lpci commented Feb 25, 2026

Summary

  • Replace rimraf dependency with Node.js built-in fs.rm() with { recursive: true, force: true }
  • Remove rimraf from package.json dependencies
  • All existing tests continue to pass

This aligns with the e18e ecosystem cleanup initiative — rimraf is a thin wrapper around fs.rm() which has been available since Node.js 14.14.0.

Test plan

  • Verify npm test passes
  • Verify blob/queue/table storage cleanup operations work correctly
  • Verify no remaining references to rimraf in source

Remove the rimraf package (and @types/rimraf) by replacing all usages
with Node.js built-in fs.promises.rm(), which has been stable since
Node 14.14.0. This removes one production dependency from the bundle.

Source code: rimrafAsync in src/common/utils/utils.ts is now a thin
wrapper around fs.promises.rm with recursive + force options and
Windows-specific maxRetries for EPERM resilience.

Test code: rmRecursive in tests/testutils.ts uses the same approach.

npm scripts: clean/clean:deep now use scripts/clean.js, a zero-dependency
Node script that handles both static paths and glob patterns.

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