Repository navigation
feat(playground): allow overwriting published package bundles - #12329
Open
Timothee Guerin (timotheeguerin) wants to merge 5 commits into
Open
Timothee Guerin (timotheeguerin) wants to merge 5 commits into
Timothee Guerin (timotheeguerin) wants to merge 5 commits into
Conversation
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
Timothee Guerin (timotheeguerin)
marked this pull request as ready for review
October 21, 2026 18:13
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Overwritten packages retain obsolete import mappings, leaving removed exports resolvable to stale blobs.
1 open issue
What changed in this PR
Adds opt-in replacement of published Playground bundles, avoiding manual blob deletion when correcting a release.
Changes:
- Propagates overwrite support through package, asset, and peer-dependency uploads.
- Adds CLI flags and a core publish pipeline parameter.
- Documents usage and records the change.
| File | Description |
|---|---|
| packages/bundle-uploader/src/upload-browser-package.ts | Allows replacing existing blobs. |
| packages/bundle-uploader/src/index.ts | Passes overwrite options through upload APIs. |
| packages/bundle-uploader/README.md | Documents overwrite commands and behavior. |
| eng/tsp-core/scripts/upload-bundler-packages.ts | Adds the core CLI flag. |
| eng/tsp-core/pipelines/publish.yml | Exposes the opt-in pipeline parameter. |
| eng/tsp-core/pipelines/jobs/build-packages.yml | Passes the parameter to the upload command. |
| eng/emitters/scripts/upload-bundled-emitter.ts | Adds standalone emitter overwrite support. |
| .chronus/changes/playground-upload-overwrite-2026-10-21.md | Records the tooling enhancement. |
Review effort: Balanced
Timothee Guerin (timotheeguerin)
enabled auto-merge
November 5, 2026 19:43
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open issues
Same concern as the core upload script: withparseArgs()defaulting tostrict: true, any… · NewparseArgs()defaults tostrict: true, which will now hard-fail this script on any unknown CLI… · NewparseArgs()defaults tostrict: true, which will now hard-fail this script on any unknown CLI… · New In overwrite mode this allocates a freshObject.keys(importMap)array per uploaded package, and… · New Passingconditions: undefinedworks in most cases, but it’s cleaner (and avoids any SDK… · New
Review effort: Lite
Comment on lines
+9
to
+14
| overwrite: { type: "boolean", default: false }, | ||
| }, | ||
| allowPositionals: true, | ||
| }); | ||
|
|
||
| const packageRelativePath = positionals[0]; |
| @@ -1,12 +1,20 @@ | |||
| // @ts-check | |||
| import { parseArgs } from "node:util"; | |||
Comment on lines
+9
to
+14
| const { values } = parseArgs({ | ||
| options: { | ||
| overwrite: { type: "boolean", default: false }, | ||
| }, | ||
| }); | ||
|
|
Comment on lines
+219
to
+225
| if (overwrite) { | ||
| for (const key of Object.keys(importMap)) { | ||
| if (key === manifest.name || key.startsWith(`${manifest.name}/`)) { | ||
| delete importMap[key]; | ||
| } | ||
| } | ||
| } |
| conditions: { | ||
| ifNoneMatch: "*", | ||
| }, | ||
| conditions: this.#overwrite ? undefined : { ifNoneMatch: "*" }, |
This branch has not been deployed
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.


An incorrectly published Playground bundle currently requires manually deleting every blob for that version before republishing.
Allow recovery with:
The core publish pipeline exposes the same opt-in switch; normal publishing continues to skip existing versions. Forced uploads replace manifests and content, including standalone package assets and bundled peer dependencies.
Fixes #9717