Fix pnpm 12.2.1 compatibility: use --store-dir in prepareArtifactoryForPnpmBuild - #3692
Open
agrasth wants to merge 1 commit into
Open
Fix pnpm 12.2.1 compatibility: use --store-dir in prepareArtifactoryForPnpmBuild#3692agrasth wants to merge 1 commit into
agrasth wants to merge 1 commit into
Conversation
…in test helper prepareArtifactoryForPnpmBuild used a single-dash flag (-store-dir) which pnpm 12.x no longer accepts as a long option, causing all tests that call initPnpmFilesTest or initPnpmWorkspaceTest to fail with: error: unexpected argument '-s' found Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Contributor
|
I have read the CLA Document and I hereby sign the CLA pm-compat-fixer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
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.
Summary
TestPnpmPublishWorkspace,TestPnpmInstallAndPublishNormalProject,TestPnpmInstallAndPublishWorkspace, andTestPnpmInstallWithPreviousBuildCacheall failed with:The
prepareArtifactoryForPnpmBuildhelper (pnpm_test.go:514) constructed the cache-warm command with a single-dash long option:pnpm interprets
-store-diras the short flag-sfollowed by a positional argumenttore-dir=..., and pnpm 12.x rejects unknown short flags with a hard error. All prior pnpm versions tolerated single-dash long options (as aliases or silently ignored), but pnpm 12 dropped that tolerance.The same
--store-dirflag was already spelled correctly (double-dash) everywhere else in the file — this was an isolated typo in the one test helper function.Fix
Changed the single-dash
-store-dir=to double-dash--store-dir=on line 514 ofpnpm_test.goinsideprepareArtifactoryForPnpmBuild. This is a test-only fix — no product behavior changed.Compatibility impact
No exported symbols were changed. This is a one-character fix in a test helper function. All other supported pnpm versions are unaffected because
--store-dirhas been valid in pnpm since long before the supported range.Test plan
go build ./...— could not run: Go is not installed in the fix-authoring environment. The change is a string literal in a test file with no logic impact; a compile error here is not plausible.gofmt -l pnpm_test.go— could not run for the same reason. The change is a single character inside a string literal; no formatting impact.go vet ./...— could not run for the same reason.