Repository navigation
Replace rimraf, temp, recursive-fs and slash with Node built-ins - #63
Merged
Merged
Conversation
- rimraf: fs.promises.rm with the same retries; the react-* temp glob becomes an explicit prefix match - temp: fs.mkdtempSync - recursive-fs: a local listFiles with the same order and symlink handling - slash: normalizePath (yazl converts backslashes anyway) - Drop the Q deferreds around directory listing so sync errors reject - sign: return the rejection when copying a single file fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashirman
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 2 of 4 of the dependency cleanup (REV-133). Removes four runtime dependencies without changing behaviour.
Changes
rimraf@2fs.promises.rmwithrecursive,forceandmaxRetries: 3. rimraf also retried busy errors 3 times, waiting 100 ms × the attempt number, and Node's retry works the same way.${tmpdir}/react-*globdeleteReactTempFolders()deletes every temp entry whose name starts withreact-. As before, a temp folder that can't be read means nothing is deleted.tempfs.mkdtempSync(path.join(os.tmpdir(), "code-push")). The old code also deleted and recreated the new empty folder, which had no effect, so that step is gone.recursive-fslistFiles()infile-utils.ts. It keeps the same breadth-first order and/-joined paths, and lists symlinks as files.slash@1normalizePath. yazl converts backslashes in entry names itself, so zip contents are unchanged.Related fixes:
generatePackageManifestFromDirectoryandpackageFileFromPathchain onlistFilesinstead of wrapping it in a Q deferred. An exception thrown while building the manifest or zip now rejects the promise instead of leaving it pending.sign.tsnow returns the rejection when copying a single-file release to the temp folder fails. Before, the error was dropped and signing failed later with a misleading error.hash-utilsimportsyauzldirectly instead of through an optionalrequire, which no longer did anything.Verification
tscandnpm run lintare clean.npm testpasses all 155 tests on macOS and on Linux (Docker, Node 20.19.0). That includes new tests intest/file-utils.tsforlistFilesandcopyFileToTmpDir.mainexactly. A symlinked folder fails the same way in both.🤖 Generated with Claude Code