Compare commits

..

6 Commits

Author SHA1 Message Date
Zoltan Kochan b635341b3e chore: rebuild bundle after reverting bootstrap pnpm to 11.0.4 2026-05-11 01:49:47 +02:00
Zoltan Kochan 025de3876f test: assert env var directly instead of relying on pnpm runtime behavior
The previous version of this test self-updated to pnpm 10.33.0 and expected
pnpm --version to fail under devEngines.onFail=error. But pnpm v10 only reads
the packageManager field, not devEngines, so the check never fired and the
test failed.

Switch the assertion to the contract the af8e203 scope fix actually enforces:
when an explicit version: is supplied, pnpm_config_pm_on_fail must not be
exported by the action. That's deterministic and pnpm-version-agnostic.
2026-05-11 01:49:23 +02:00
Zoltan Kochan 5c388c2b3b test: assert onFail=error stays strict when explicit version is supplied
Adds a manifest_pin matrix entry combining `version: 10.33.0` with
`devEngines.packageManager` pinned to 9.15.5/onFail=error. The action
self-updates to 10.33.0, then `pnpm --version` must fail with
BAD_PM_VERSION — confirming pnpm_config_pm_on_fail=download is scoped to
the no-target-version branch and does not silently override the user's
strict policy.
2026-05-11 01:49:23 +02:00
Zoltan Kochan 84fa52c3d7 ci: consolidate test matrix and stop double-firing on PRs
- Limit push trigger to master so PRs run jobs once instead of twice.
- Fold test_default_inputs / test_dest / test_version_respects_request /
  test_bin_dest_output into one cross-OS `smoke` job (5 matrix entries:
  ubuntu × 2 versions + ubuntu custom-dest + macos + windows).
- Fold test_package_manager_field / test_dev_engines /
  test_dev_engines_on_fail_error into one ubuntu-only `manifest_pin` job
  (6 matrix entries) — manifest handling is OS-independent.
- Keep standalone and run_install but ubuntu-only.

Total runs per PR push: ~88 → 14.
2026-05-11 01:49:22 +02:00
Zoltan Kochan 07ad39cba4 refactor: scope pm_on_fail override to the no-target-version branch
Only export `pnpm_config_pm_on_fail=download` when the action is relying on
bootstrap pnpm's runtime switch. When the user passes an explicit `version:`
input, self-update aligns the binary and we should not silently override their
`devEngines.packageManager.onFail = "error"` policy.
2026-05-11 01:49:22 +02:00
Zoltan Kochan 052c4ffb7d fix: honor devEngines.packageManager.onFail=error (#252)
Export pnpm_config_pm_on_fail=download so the bootstrap pnpm switches to
the version pinned in devEngines.packageManager instead of throwing
BAD_PM_VERSION on the user's first invocation.
2026-05-11 01:49:22 +02:00
3 changed files with 77 additions and 79 deletions
-1
View File
@@ -1 +0,0 @@
* @zkochan
+71 -71
View File
File diff suppressed because one or more lines are too long
+6 -7
View File
@@ -8,16 +8,16 @@ import pnpmInstall from './pnpm-install'
import pruneStore from './pnpm-store-prune' import pruneStore from './pnpm-store-prune'
async function main() { async function main() {
const inputs = getInputs()
if (getState('is_post') === 'true') { if (getState('is_post') === 'true') {
await runPost() await runPost(inputs)
} else { } else {
await runMain() await runMain(inputs)
} }
} }
async function runMain() { async function runMain(inputs: Inputs) {
const inputs = getInputs()
saveState('inputs', inputs)
saveState('is_post', 'true') saveState('is_post', 'true')
const binDest = await installPnpm(inputs) const binDest = await installPnpm(inputs)
@@ -30,8 +30,7 @@ async function runMain() {
pnpmInstall(inputs) pnpmInstall(inputs)
} }
async function runPost() { async function runPost(inputs: Inputs) {
const inputs = JSON.parse(getState('inputs')) as Inputs
pruneStore(inputs) pruneStore(inputs)
await saveCache(inputs) await saveCache(inputs)
} }