refactor(deps): replace mkdirp, uuid, tmp with node builtins#779
refactor(deps): replace mkdirp, uuid, tmp with node builtins#779parker-snyk merged 5 commits intomainfrom
Conversation
- Replace fs.rmdirSync with fs.rmSync({ recursive, force }) in system
tests to handle non-empty temp dirs left by getImageArchive creating
subdirs before a failed pull
- Extend .snyk ignore expiry for SNYK-JS-TAR-15307072/15416075/15456201
(transitive via snyk-nodejs-lockfile-parser > @yarnpkg/core > tar)
from 2026-04-03 to 2026-07-06
596995d to
69c1073
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
What does this PR do?
Removes
mkdirp,uuid, andtmpfrom dependencies and uses native Node built-ins (fs,crypto,os) instead. Since the minimum supported Node version is 20.19, we can safely use features likefs.mkdirSync(..., { recursive: true })andcrypto.randomUUID().Where should the reviewer start?
lib/analyzer/image-inspector.tsandlib/image-save-path.tshave the main functional changes.test/system/docker.spec.tshas a minor test fix to clean up temporary mock tarballs properly.How should this be manually tested?
npm run test:systemandnpm run test:unit.Any background context you want to provide?
This was prompted by a desire to trim down the dependency tree. Moving off of
tmpalso forced us to be explicit about test cleanup, avoiding silent file leaks in/tmpduring the test suite.What are the relevant tickets?
CN-1003
Screenshots
N/A
Additional questions
None