Commit Graph

229 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
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
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
Zoltan Kochan
fc06bc1257 feat!: run the action on Node.js 24 (#205) v4 v4.4.0 v5 v5.0.0 2026-03-13 11:30:26 +01:00
Zoltan Kochan
b906affcce Revert "feat!: run the action on Node.js 24 (#205)"
This reverts commit 9b5745cdf0.
v4.3.0
2026-03-11 15:54:42 +01:00
Zoltan Kochan
9b5745cdf0 feat!: run the action on Node.js 24 (#205) 2026-02-17 13:30:54 +01:00
Boosted-Bonobo
1e1c8eafbd ci: pin github actions (#199) 2025-12-15 14:31:35 +01:00
Khải
b9e1dbc72f fix(ci): exclude macos (#197) 2025-12-10 13:54:29 +01:00
Khải
61bc82c7df refactor: remove star imports (#196) 2025-12-10 13:14:52 +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
Chris Martin
ee7b8711bd Clarify that package_json_file is relative to GITHUB_WORKSPACE (#184)
* Clarify that package_json_file is relative to GITHUB_WORKSPACE

Clarify the description for package_json_file parameter to specify that the path must be relative to the repository root.

* Apply suggestion from @zkochan

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-12-07 01:36:02 +01:00
silverwind
3a0024f066 Remove unused @types/node-fetch dependency (#186) 2025-12-05 16:50:59 +01:00
Roman Usherenko
72f04517b7 Update README.md (#175)
fix the string run_install example
2025-12-05 15:32:46 +01:00
Adrian Riedel
41ff726559 feat: support installation from custom NPM registry (#179)
copy .npmrc from GitHub workspace if it exists so that PNPM respects custom
registry configurations when self-installing
v4.2.0
2025-10-08 10:48:14 +02:00
Matthias
f2b2b233b5 Remove --frozen-lockfile from examples (#171) 2025-07-11 00:08:35 +02:00
Matthias
77504a59bc Fix multiline run_install example in README.md (#167) 2025-06-25 18:10:02 +02:00
Kevin Cui
d648c2dd06 fix: not allow install multiple package manager (#161)
When a project has both npm and pnpm, using pnpm/action-setup will result in an error: `Multiple versions of pnpm specified`.

The previous implementation was only meant to avoid the "ERR_PNPM_BAD_PM_VERSION" error, but it did not take into account the situation of multiple different package managers.

Signed-off-by: Kevin Cui <bh@bugs.cc>
2025-03-28 08:37:14 +08:00
Zoltan Kochan
a7487c7e89 feat: update dist v4.1.0 2025-02-06 22:30:07 +01:00
Zoltan Kochan
fff70888d0 test: update pnpm to v9 2025-02-06 22:24:21 +01:00
Daniel Bayley
6e3017af18 docs: support package.yaml (#157) 2025-02-06 22:13:04 +01:00
Daniel Bayley
0cb0538c33 feat: support package.yaml (#156) 2025-02-06 22:04:41 +01:00
Azat S.
e303250a24 docs: update pnpm version in readme examples (#154) 2025-01-09 00:42:18 +01:00
Karl Horky
ac5bf11548 Update examples to use pnpm v9 (#142) 2024-08-14 16:07:48 +02:00
its-monotype
18ac635edf docs: remove redundant manual cache due to setup-node cache (#131) 2024-07-05 15:24:26 +02:00
Zoltan Kochan
0d0b43217a docs: add warning about v2 2024-07-05 14:37:28 +02:00
Karl Horky
0eb0e97082 Add readme example for omitting version (#134)
* Add readme example for omitting `version`

* docs: more detailed explanations

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>
2024-07-04 10:37:24 +02:00
hyesung oh
23657c8550 docs: change order of setup node and pnpm (#129) 2024-06-16 14:33:23 +02:00
Linda_pp
5d79380f29 fix: add missing outputs metadata to action.yml (#127) 2024-06-12 16:45:37 +02:00
Ben McCann
562dbbf611 fix: correct typo in error message (#125) 2024-06-12 16:44:03 +02:00
Ben McCann
00884bcdc5 docs: use cached pnpm installation (#128) 2024-06-12 16:38:46 +02:00
Zoltan Kochan
fe02b34f77 docs: bump action-setup version in README v4.0.0 2024-05-07 15:16:48 +02: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
Zoltan Kochan
2ab6dce4f5 docs(README): fix link to LICENSE 2024-03-27 22:17:57 +01:00
Ethan Neff
e280758d01 docs(README): update dependency versions (#117) 2024-03-27 22:12:51 +01:00
dependabot[bot]
129abb77bf Bump undici from 5.28.2 to 5.28.3 (#115)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 10:59:33 +01:00
Zoltan Kochan
a3252b78c4 docs(README): update version v3.0.0 2024-02-08 11:28:50 +01:00