Repository navigation
test: check the toolkit install ignores the caller's pnpm config - #23
Merged
Merged
Conversation
The release workflows run `pnpm --dir .release-toolkit install` from inside the caller's checkout. On ebcf84b a caller pnpm-workspace.yaml made that install run the caller's pnpm (12.14.0 for MetaEdit and notetweet) under its policy, or install the caller's packages instead of the toolkit's (exit 0, for quickadd). The toolkit's own pnpm-workspace.yaml fixed that in #22, but nothing would catch its removal. Self test now installs the toolkit inside a caller pinned to pnpm 12 with a hoisted node linker in both pnpm-workspace.yaml and .npmrc and an impossible minimumReleaseAge, then asserts the toolkit's pnpm ran, the toolkit's deps are installed and nothing was hoisted. It passes on main and fails on ebcf84b and on main without pnpm-workspace.yaml.
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.
The release workflows install the toolkit with
pnpm --dir .release-toolkit installfrom inside the caller's checkout. quickadd and MetaEdit have now merged apnpm-workspace.yaml, and notetweet_obsidian #77 adds one. Onebcf84b(today'sv4), that breaks the toolkit install in two ways:ebcf84bmain(33a397a)minimumReleaseAge,trustPolicy)minimumReleaseAge)mainalready fixes both cases. The toolkit's ownpnpm-workspace.yamlfrom #22 makes the toolkit its own workspace root. I checked that the caller'spnpm-workspace.yamland.npmrcsettings no longer reach the toolkit install, using anodeLinker: hoistedcanary in each:.npmrcand workspace file).--ignore-workspaceis not a safe alternative. It also drops the toolkit's ownautoInstallPeers: false, so the frozen install fails withERR_PNPM_LOCKFILE_CONFIG_MISMATCH.This PR changes no workflow behavior. It adds a Self test step that builds a hostile caller and runs the exact toolkit install command:
pnpm-workspace.yamland.npmrc, and sets an impossibleminimumReleaseAge.Run locally, the step passes on
main. It fails onebcf84b(wrong pnpm version) and onmainwithpnpm-workspace.yamldeleted (lockfile config mismatch).