Compare commits

..

15 Commits

Author SHA1 Message Date
Zoltan Kochan 3de0023fce fix pnpm-workspace.yaml 2026-03-21 14:00:14 +01:00
Zoltan Kochan f489bfced8 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>
2026-03-21 13:59:54 +01:00
Zoltan Kochan 25df77c6d2 Merge remote-tracking branch 'origin/master' into next 2026-03-21 13:56:09 +01:00
Zoltan Kochan 53ef38b049 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>
2026-03-21 13:53:41 +01:00
Zoltan Kochan 1f69135d3d 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>
2026-03-17 12:33:11 +01:00
Zoltan Kochan c3b2a5fad6 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>
2026-03-17 01:45:30 +01:00
Zoltan Kochan 0ffe724fa5 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>
2026-03-16 02:29:31 +01:00
Zoltan Kochan a722bd2d87 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>
2026-03-16 02:24:28 +01:00
Zoltan Kochan 49b8837b49 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>
2026-03-16 02:15:16 +01:00
Zoltan Kochan 9fbc6cd1d1 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>
2026-03-16 02:06:14 +01:00
Zoltan Kochan af96d9fd0e 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>
2026-03-16 02:02:44 +01:00
Zoltan Kochan 1fb299a44f 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>
2026-03-16 01:58:24 +01:00
Zoltan Kochan 24a61aa18d 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>
2026-03-16 01:55:56 +01:00
Zoltan Kochan ab0b84aeb1 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>
2026-03-16 01:54:09 +01:00
Zoltan Kochan dc312cdfd7 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>
2026-03-16 01:52:34 +01:00
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v4
with: with:
version: 10 version: 10
``` ```
@@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v4
``` ```
### Install pnpm and a few npm packages ### Install pnpm and a few npm packages
@@ -122,7 +122,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v4
with: with:
version: 10 version: 10
run_install: | run_install: |
@@ -146,7 +146,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 10 version: 10
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -101,8 +101,8 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
} }
if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) { if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) {
// Strip the "pnpm@" prefix and any "+sha..." hash suffix // pnpm will handle version management via packageManager field
return packageManager.replace('pnpm@', '').replace(/\+.*$/, '') return undefined
} }
if (!GITHUB_WORKSPACE) { if (!GITHUB_WORKSPACE) {