fix(upgrade): use npm pack for historical skeleton extraction in E2E test#3643
Merged
itsjustriley merged 1 commit intomainfrom Mar 31, 2026
Merged
fix(upgrade): use npm pack for historical skeleton extraction in E2E test#3643itsjustriley merged 1 commit intomainfrom
itsjustriley merged 1 commit intomainfrom
Conversation
…on extraction pnpm pack cannot resolve workspace:* and catalog: protocols in a detached git worktree (no lockfile, no node_modules). This caused the upgrade E2E test to fail for post-pnpm-migration commits (2026.1.1+) with ERR_PNPM_CANNOT_RESOLVE_WORKSPACE_PROTOCOL. npm pack is protocol-agnostic — it tars whatever is on disk without attempting resolution. We then resolve workspace:* and catalog: manually using tested helpers that read workspace package versions and the pnpm-workspace.yaml catalog section from the worktree. This approach defines the error out of existence: npm pack has no workspace requirements, so the entire class of "pnpm workspace not available" failures cannot occur. Pre-pnpm commits (2026.1.0 and older) have no protocols and skip resolution entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
We detected some changes in |
fredericoo
approved these changes
Mar 31, 2026
Contributor
fredericoo
left a comment
There was a problem hiding this comment.
lets go, fair enough!
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.
WHY are these changes introduced?
The upgrade E2E test (
upgrade-e2e.test.ts) extracts historical skeleton templates by checking out a git worktree at past release commits and runningpnpm pack. This fails on post-pnpm-migration commits (2026.1.1+) becausepnpm packcan't resolveworkspace:*andcatalog:protocols without an installed workspace (no lockfile, nonode_modules).PR #3640 attempted to fix this by using
pnpm packin a worktree, butpnpm packrequires a fully installed workspace to resolve protocols — which a bare worktree doesn't have.WHAT is this pull request doing?
Replaces
pnpm packwithnpm pack+ manual protocol resolution inextractSkeletonTemplate:npm packis protocol-agnostic — it tars whatever is on disk without trying to resolveworkspace:*orcatalog:. This defines the error out of existence.upgrade-e2e-utils.tsresolve protocols after extraction by reading workspace package versions and thepnpm-workspace.yamlcatalog section from the worktree.workspace:*<version>variant (e.g.workspace:*2026.1.1) seen in some changesets-published releases.HOW to test your changes?
Checklist
🤖 Generated with Claude Code