Zoltan Kochan
1155470f3e
fix: honor devEngines.packageManager.onFail=error ( #252 ) ( #254 )
...
## Summary
- Export `pnpm_config_pm_on_fail=download` from the action so the bootstrap pnpm switches versions via `manage-package-manager-versions` instead of throwing `BAD_PM_VERSION` when a project pins `devEngines.packageManager.onFail = "error"` without supplying a `version:` input.
- Adds a `test_dev_engines_on_fail_error` workflow job (Linux/macOS/Windows, exact + range) that reproduces #252 .
Fixes #252 .
2026-05-11 01:51:30 +02:00
Zoltan Kochan
91ab88e261
fix: bin_dest output points to self-updated pnpm, not bootstrap ( #249 )
...
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (10.33.2, macos-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (10.33.2, ubuntu-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (10.33.2, windows-latest) (push) Has been cancelled
Test Action / Test bin_dest output points to requested version (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
* fix: bin_dest output points to self-updated pnpm, not bootstrap (#247 )
`pnpm self-update <version>` writes the target binary to
`${PNPM_HOME}/bin/`, leaving the bootstrap symlink at `${PNPM_HOME}/pnpm`
untouched. The `bin_dest` output was set to `${PNPM_HOME}`, so consumers
invoking `${{ steps.pnpm.outputs.bin_dest }}/pnpm` got the bootstrap
version (currently 11.0.4) instead of the version they requested.
PATH lookup hid the bug: `${PNPM_HOME}/bin` was prepended ahead of
`${PNPM_HOME}`, so `pnpm` resolved from PATH was the right one. Existing
version-respect tests only checked `pnpm --version`, not `bin_dest`.
Resolve `binDest` inside `runSelfInstaller` (target lives in
`${PNPM_HOME}/bin` after self-update, otherwise stays at `${PNPM_HOME}`)
and plumb it through to `setOutputs`. Add a regression test that invokes
`${bin_dest}/pnpm --version` directly across Linux/macOS/Windows.
* test(ci): pass bin_dest via env to survive Windows backslashes
Direct GitHub-expression interpolation of `${{ steps.pnpm.outputs.bin_dest }}`
into the bash script let bash eat the backslashes in the Windows path
(`C:Usersrunneradminsetup-pnpmnode_modules.binbin/pnpm`), failing with
"No such file or directory". Forward the value via env so the path
reaches bash unmangled.
* build: rebuild dist with clean lockfile-matched deps
2026-05-07 12:58:58 +02:00
Zoltan Kochan
e578e19d19
fix: update pnpm to 11.0.4
2026-05-04 12:08:02 +02:00
Zoltan Kochan
8912a9102a
fix: append (not prepend) action node dir to PATH for npm bootstrap ( #241 )
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
2026-05-02 16:10:46 +02:00
Ben Quarmby
26f6d4f2c5
fix: use npm co-located with the action node binary ( #239 )
...
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
* fix: use npm co-located with the action node binary
* fix: resolve npm by absolute path; guard against unset PATH
Follow-up to 5a9e198. Two refinements to the GHE self-hosted runner fix:
- Spawn npm via `path.join(dirname(process.execPath), 'npm[.cmd]')`
instead of relying on PATH lookup. This matches the original PR
description and is robust against PATH-shadowed npm installations.
- Avoid `"<dir>:undefined"` leaking into PATH when `process.env.PATH`
is unset (rare, but possible in stripped environments).
PATH still has the node directory prepended so npm's
`#!/usr/bin/env node` shebang can resolve node on Linux/macOS.
* fix: revert npm to PATH lookup; runner externals lacks npm
Revert 42e75a1's switch to absolute-path npm resolution. The premise
that npm is co-located with the action's node binary is false on
GitHub-hosted runners: `process.execPath` points into
`runner/externals/node24/bin/`, which contains node only — not npm.
The absolute-path spawn produced ENOENT on Linux/macOS and
"not recognized" on Windows.
Go back to spawning `'npm'` and relying on PATH lookup, which works
on standard runners (npm is on PATH from the runner image) and on
the GHE self-hosted setup that motivated the original fix. Keep the
node-directory prepend so npm's `#!/usr/bin/env node` shebang
resolves, and keep the unset-PATH guard.
---------
Co-authored-by: Zoltan Kochan <z@kochan.io >
2026-04-30 22:28:41 +02:00
Zoltan Kochan
903f9c1a6e
fix: update pnpm to 11.0.0-rc.5
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test version input is actually installed (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, macos-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, ubuntu-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, ubuntu-latest) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test packageManager field is respected (10.33.0, windows-latest) (push) Has been cancelled
Test Action / Test packageManager field is respected (9.15.5, windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
2026-04-21 20:27:39 +02:00
oniani1
71c92474e7
fix: pnpm self-update binary shadowed by bootstrap on PATH ( #230 )
...
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Problem
pnpm self-update installs the target version to PNPM_HOME/bin/pnpm, but the bootstrap binary at PNPM_HOME/pnpm has higher PATH precedence because addPath(pnpmHome) was called after addPath(pnpmHome/bin). @actions/core's addPath prepends, so the later call wins — the bootstrap version shadows the self-updated binary.
Fix
Swap the addPath call order so PNPM_HOME/bin (where self-update puts the target binary) has higher PATH precedence. The bootstrap pnpm is invoked via absolute path, so this doesn't affect the bootstrap step.
2026-04-18 15:00:23 +02:00
Zoltan Kochan
6e7bdbda5f
chore: bump bootstrap pnpm to 11.0.0-beta.4-1 and add update script
...
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (windows-latest) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (macos-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (ubuntu-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with devEngines.packageManager (windows-latest, >=9.15.0) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Add `pnpm run update-bootstrap [version]` to regenerate the bootstrap
lockfiles. Bumps from 11.0.0-beta.3 to 11.0.0-beta.4-1.
2026-03-30 00:09:19 +02:00
Zoltan Kochan
6b87c4621a
fix: Windows standalone mode — bypass broken npm shims ( #217 )
...
* fix: overwrite npm .cmd wrappers for @pnpm/exe on Windows
npm creates .cmd wrappers that invoke bin entries through `node`,
but @pnpm/exe bins are native executables, not JavaScript files.
This causes pnpm commands to silently fail on Windows.
* fix: copy pnpm.exe to .bin/ on Windows for standalone mode
The .cmd wrapper approach didn't work because CMD doesn't properly
wait for extensionless PE binaries. Instead, copy the actual .exe
(and .cmd for pnpx) from @pnpm/exe into .bin/ so PATHEXT finds
pnpm.exe directly, bypassing npm's broken node-wrapping shim.
* fix: add @pnpm/exe dir to PATH on Windows instead of .bin shims
On Windows, npm's .bin shims can't properly execute the extensionless
native binaries from @pnpm/exe. Instead of trying to fix the shims,
add the @pnpm/exe directory directly to PATH where pnpm.exe lives.
* test: validate pnpm --version output in CI
All version checks now capture output and assert it matches a semver
pattern. Previously, a silently failing pnpm (exit 0, no output)
would pass the tests.
* debug: log pnpm --version output during setup
* fix: remove duplicate addPath in setOutputs that shadowed pnpm.exe
setOutputs called addPath(node_modules/.bin) AFTER installPnpm had
already added the correct path (@pnpm/exe on Windows). Since
GITHUB_PATH entries are prepended, .bin ended up first in PATH,
causing PowerShell to find npm's broken shims instead of pnpm.exe.
* fix: add PNPM_HOME/bin to PATH on all platforms
* fix: address review feedback — PATH ordering and regex anchoring
- Swap addPath order so pnpmHome (with pnpm.exe) is prepended last
and has highest precedence over pnpmHome/bin.
- Anchor version regex with $ and allow prerelease suffixes.
2026-03-27 20:42:10 +01:00
Zoltan Kochan
994d756a33
feat: read pnpm version from devEngines.packageManager ( #211 )
...
* feat: read pnpm version from devEngines.packageManager field
When no version is specified in the action config or the packageManager
field of package.json, fall back to devEngines.packageManager.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: skip self-update for devEngines.packageManager and add CI tests
pnpm auto-switches to the right version when devEngines.packageManager
is set, so self-update is unnecessary. This also enables range support
(e.g. ">=9.15.0") which self-update doesn't handle.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-27 11:10:47 +01:00
Zoltan Kochan
62bce64275
fix: extract pnpm version from packageManager field instead of returning undefined ( #216 )
...
When packageManager is set to e.g. "pnpm@9.1.0+sha...", strip the
"pnpm@" prefix and any "+sha..." hash suffix so the action installs
the correct version. Previously returning undefined caused failures
on Windows.
2026-03-25 13:59:54 +01:00
Zoltan Kochan
58e6119fe4
feat!: replace bundled pnpm binary with npm + lockfile bootstrap ( #212 )
...
* feat!: replace bundled pnpm binary with npm + lockfile bootstrap
Remove the 9MB bundled pnpm.cjs/worker.js and instead use npm ci with
committed package-lock.json files (~5KB) to install a bootstrap pnpm,
which then installs the target version with integrity verification via
the project's pnpm-lock.yaml.
Also switch from ncc to esbuild and modernize to ESM.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: bundle as CJS to support @actions/* packages
The @actions/* packages use CJS require() for Node.js builtins,
which fails with "Dynamic require of 'os' is not supported" when
bundled as ESM. Switch esbuild output to CJS format.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: remove "type": "module" from package.json
Node.js treats dist/index.js as ESM due to "type": "module",
but the bundle uses CJS require() calls. Remove the field so
Node.js defaults to CJS for .js files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: remove packageManager field and fix Windows npm spawn
- Remove packageManager from package.json to avoid version conflict
when the action tests against itself (uses: ./)
- Use shell: true on Windows so spawn can find npm.cmd
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: always use pnpm (not @pnpm/exe) for bootstrap and update lockfile
The bootstrap only needs regular pnpm to install the target package.
@pnpm/exe requires install scripts which we skip with --ignore-scripts.
Also regenerate pnpm-lock.yaml to match current package.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: use --no-lockfile for target install
--lockfile-dir pointing to GITHUB_WORKSPACE causes the bootstrap pnpm
to use the project's pnpm-lock.yaml (which tracks project deps, not
pnpm itself), corrupting the install. Revert to --no-lockfile for now.
Lockfile-based integrity verification can be added when pnpm v11 has
proper support for verifying the pnpm package itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: run bootstrap pnpm via node instead of bin shim
Use `node .../pnpm/bin/pnpm.cjs` to run the bootstrap pnpm, matching
the approach used by the old bundled pnpm.cjs. This avoids issues with
the .bin symlink on different platforms.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: use pnpm self-update instead of installing target separately
- Bootstrap pnpm via npm ci (verified by lockfile)
- Use `pnpm self-update <version>` for explicit version
- Let pnpm handle packageManager field automatically
- Remove standalone/exe-specific install logic (pnpm handles this)
- Update tests to not run pnpm install against the action repo itself
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: support standalone mode with @pnpm/exe bootstrap
- When standalone=true, bootstrap with @pnpm/exe via npm ci
- When standalone=false, bootstrap with pnpm via npm ci
- Both use pnpm self-update to reach the target version
- Remove --ignore-scripts from npm ci so @pnpm/exe install scripts run
- Add standalone test back to CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* debug: add logging to diagnose pnpm not found on PATH
Log .bin directory contents after npm ci to understand why
pnpm binary is not found in subsequent CI steps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: ensure pnpm bin link exists after npm ci
npm ci sometimes doesn't create the .bin/pnpm symlink for
@pnpm/exe (observed on Linux CI). Manually create the symlink
if it's missing after npm ci completes.
This fixes the case where standalone=true with no explicit version
(relying on packageManager field) — pnpm self-update wouldn't run,
leaving .bin empty and pnpm not found on PATH.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: add PNPM_HOME/bin to PATH for pnpm v11
pnpm v11 moved global binaries from PNPM_HOME to PNPM_HOME/bin.
Add the new bin subdirectory to PATH so that pnpm's global bin
directory check passes. This is backwards compatible — the extra
PATH entry is harmless for older pnpm versions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
* fix: add packages field to pnpm-workspace.yaml
pnpm v9 requires the packages field in pnpm-workspace.yaml.
Without it, `pnpm --version` fails with "packages field missing or empty".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
* fix pnpm-workspace.yaml
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-21 14:02:31 +01:00
axel7083
2e223e0f0d
chore(workflows): adding pr-check.yaml to validate dist folder ( #213 )
...
* chore(workflows): adding pr-check.yaml to validate dist/index.js
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com >
* fix: update dist/index.js
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com >
---------
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com >
2026-03-19 14:52:48 +01:00
Jeremiasz Major
e94b270858
feat: store caching ( #188 )
...
* add pnpm store caching
* style: format
* no semicolons
* no star imports
* import order
* style: no star imports
---------
Co-authored-by: khai96_ <hvksmr1996@gmail.com >
2025-12-07 22:16:49 +01:00
Adrian Riedel
41ff726559
feat: support installation from custom NPM registry ( #179 )
...
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, false) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, true) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, false) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, true) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, false) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, true) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
copy .npmrc from GitHub workspace if it exists so that PNPM respects custom
registry configurations when self-installing
2025-10-08 10:48:14 +02:00
Zoltan Kochan
a7487c7e89
feat: update dist
Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (macos-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 9.15.5) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, false) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, true) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, false) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, true) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, false) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, true) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
2025-02-06 22:30:07 +01:00
Karl Horky
bee1f099e5
feat: throw error when multiple versions specified ( #122 )
...
* Throw error when multiple versions specified
* fix: fmt
* fix: fmt
* Swallow error on ENOENT
* Match versions
* refactor: install pnpm
---------
Co-authored-by: Khải <hvksmr1996@gmail.com >
Co-authored-by: Zoltan Kochan <z@kochan.io >
2024-05-06 23:24:46 +02:00
Sukka
ce859e384f
refactor: replace fs-extra with Node.js built-in fs methods ( #120 )
2024-04-16 11:26:31 +02:00
Erik Burton
1ee9c9d01d
feat!: node20 upgrade ( #110 )
...
* upgrade versions to latest
* remove usage of ts-schema-autogen
* fix: update pnpm sources
* update build/output
* use node20
* fix: run-install array output
* fix: maintain behaviour for parseRunInstall, error messages
* fix: another edge case for input.args
* fix: use zod for input validation
* fix: use zod.infer for exported RunInstall types
* fix: remove @types/js-yaml
---------
Co-authored-by: Zoltan Kochan <z@kochan.io >
2024-02-08 11:22:15 +01:00
Khải
d882d12c64
feat: standalone binary ( #92 )
...
Test Action / Test with dest (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with dest (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with dest (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, false) (push) Has been cancelled
Test Action / Test with standalone (macos-latest, true) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, false) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with standalone (ubuntu-latest, true) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, false) (push) Has been cancelled
Test Action / Test with standalone (windows-latest, true) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
* feat: add an option to install the self-contained binary version of pnpm
* test: add a test about nodejs_bundled
* style: remove an empty line
* chore: use newer pnpm
* chore: update dependencies
* feat: rename `nodejs_bundled` to `standalone`
as @zkochan suggested
* docs: add
---------
Co-authored-by: Takashi Sato <takashi@tks.st >
2023-07-26 14:50:04 +03:00
Kengo TODA
b27f801bf9
feat: add package_json_file option
...
Signed-off-by: Kengo TODA <skypencil@gmail.com >
2023-07-08 07:02:46 +08:00
Zoltan Kochan
21e88da200
fix(deps): update
2022-10-15 21:12:13 +03:00
Zoltan Kochan
fc3334fa11
build
2022-10-15 21:09:00 +03:00
Zoltan Kochan
958500fcab
fix: do not download pnpm from get.pnpm.io ( #46 )
...
* fix: do not download pnpm from get.pnpm.io
* fix: remove redundant files
2022-05-28 16:54:43 +03:00
Jack Works
35ab4267a1
fix: packageManager reader ( #35 )
...
Test Action / Test with default inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
* fix: packageManager reader
* chore: resolve review
* chore: run build
2022-02-25 12:43:26 +08:00
khai96_
11ba3424e0
fmt
Test Action / Test with default inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
2022-02-23 10:07:15 +07:00
Zoltan Kochan
225f3bb4b0
build
2022-02-22 11:34:20 +02:00
khai96_
e7c10c6fc5
Update dist/index.js
2022-02-22 13:04:41 +07:00
Jack Works
1d51e20937
feat: try support packageManager
2022-02-22 12:26:05 +08:00
Zoltan Kochan
d8ea532ac4
fix: retry fetch of pnpm script
...
close #22
2022-02-20 21:49:26 +02:00
khai96_
394c848db6
Update the bundle
2022-02-08 19:50:57 +07:00
Zoltan Kochan
eafb777c56
download script from pnpm.io
2022-02-08 00:39:20 +02:00
Zoltan Kochan
e6378df420
PNPM_HOME_PATH=>PNPM_HOME
Test Action / Test with default inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
2022-02-08 00:21:53 +02:00
Zoltan Kochan
6ff6e97bc6
The pnpm home directory should be added to PATH and PNPM_HOME
...
This change is needed to make the action compatible with pnpm v7.
Related breaking change in pnpm: pnpm/pnpm#4280
2022-02-07 23:15:44 +02:00
khai96_
7c4472dbcf
Forgot to specify working directory
2021-03-23 12:48:54 +07:00
khai96_
aefcd1e623
Use pnpm.js to install pnpm
2021-03-23 12:42:43 +07:00
khai96_
3a2c7247e1
Fix js-yaml usage
2021-03-23 11:43:49 +07:00
khai96_
8e1abe543f
Update dist/index.js
Test Action / Test with default inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with default inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (macos-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (ubuntu-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with explicit inputs (windows-latest, 4.11.1) (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
2020-10-05 21:51:43 +07:00
khai96_
83681c63a7
Make logs foldable
2020-05-09 21:50:47 +07:00
khai96_
b1febf84ed
Fix pruneStore
2020-05-09 21:41:25 +07:00
khai96_
c8fc1974e1
Run pnpm store prune post action
2020-05-09 21:15:50 +07:00
khai96_
291e58ad85
Enable post action
2020-05-09 21:02:32 +07:00
khai96_
1790ca7f76
Add pnpm install
2020-05-09 20:24:52 +07:00
khai96_
9a1617cf46
Rename install to install-pnpm
2020-05-09 20:03:45 +07:00
khai96_
6fe65dc1af
Move run-install to its own module
2020-05-09 20:01:25 +07:00
khai96_
91d3d73121
Correct validation error message
2020-05-09 19:52:48 +07:00
khai96_
e373fffa0a
Use ajv to validate schema
2020-05-09 19:45:31 +07:00
khai96_
bb24f595c2
Add schema generator
2020-05-09 19:24:07 +07:00
khai96_
d44b8c5e53
Add run_install input
2020-05-09 19:13:46 +07:00
khai96_
4b13327683
Re-add dist/index.js
2020-05-09 18:27:15 +07:00