Repository navigation
fix(cli): delete the temp .vsix that publish packages - #2286
Merged
Merged
Conversation
netomi
force-pushed
the
cleanup-temp-files
branch
from
October 3, 2026 20:41
da8eff6 to
127f07a
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Cleanup is scoped to generated files, regression coverage addresses the affected paths, and no blocking issues remain.
Review effort: Balanced
Findings: None
What changed in this PR
Ensures CLI publishing removes generated temporary VSIX files while preserving user-supplied packages.
Changes:
- Adds cleanup after successful or failed publishing.
- Tests cleanup, target fan-out, and supplied-file preservation.
- Documents the fix in the CLI changelog.
| File | Description |
|---|---|
| cli/test/unit/publish.spec.ts | Adds cleanup and file-preservation regression tests. |
| cli/src/publish.ts | Removes generated packages in a finally block. |
| cli/CHANGELOG.md | Records the temporary-file cleanup fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
publish packaged into a file in the OS temp directory and never removed it, leaving one .vsix behind per package and target. It is now removed once publishing finishes, whether it succeeded, failed, or was skipped as a duplicate. A .vsix supplied by the user is left alone. Signed-off-by: Trivikram Kamat <[email protected]>
Three of the new temp-file-cleanup tests broke once rebased past eclipse-openvsx#2129/ eclipse-openvsx#2287's size-limit overhaul: - 'when it exceeds the registry size limit' relied on the old client-side size check, which is now advisory for a pre-1.3.0 registry (it warns and publishes rather than rejecting). Switched it to a namespace size-limit override on a 1.3.0+ registry, which does still reject before upload. - 'given as --packagePath' and 'given as --extensionFile, even when the registry rejects it' called the now-async givenExtensionFile() without awaiting it, so they exercised a Promise instead of a file path. Also adds a regression test for the finally-block fix: a cleanup failure (e.g. EBUSY on a locked temp dir) must not replace the original publish error. Co-Authored-By: Claude Sonnet 5 <[email protected]>
netomi
force-pushed
the
cleanup-temp-files
branch
from
October 4, 2026 20:28
127f07a to
5451c1a
Compare
Contributor
|
Thanks for this fix, @trivikr! I rebased this onto current
Full suite (139 tests) and lint pass. Let me know if you'd like anything changed. |
netomi
approved these changes
Oct 4, 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.
Refs: #2284 (comment)
ovsx publishpackaged into a.vsixin the OS temp directory and never removed it, leaving one file per package and target.doPublishnow removes the file it packaged in afinally, so it isdeleted whether publishing succeeds or fails. A user-supplied
.vsixisnever deleted.
The other temp files are already cleaned up:
verify.tsremoves the downloaded.sigzipand.pemin afinally.registry.tsdownloadremoves the partial file on failure.