2
mirror of https://github.com/pnpm/action-setup.git synced 2026-08-13 16:01:31 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
Zoltan Kochan b543421fa5 feat: cache the lockfile verification log regardless of cache
The log is under a kilobyte and pnpm writes it on every install, not only
where supply-chain policies are configured: the integrity and tarball-URL
checks are unconditional. A job that starts without it re-checks every
lockfile entry against the registry — on a ~2000-entry lockfile with a warm
store, 13.5s vs 1.5s with `minimumReleaseAge` and `trustPolicy` configured,
and still 6.7s vs 1.6s with no policies at all.

Tying that to the `cache` input made the common case slow for no saving worth
counting, so the log is now restored and saved on its own key whether or not
the store is cached. `cache` goes back to meaning what its name says.
2026-08-13 16:56:49 +02:00
Zoltan Kochan c0a6b0ff36 perf: cache pnpm's lockfile verification results
pnpm v11 and newer verify every lockfile entry against the configured
supply-chain policies (`minimumReleaseAge`, `trustPolicy`, ...) and memoize
the verdict in `<cacheDir>/lockfile-verified.jsonl`. The action cached only
the store, so every job started with that verdict missing and re-checked the
whole lockfile against the registry — on typescript-eslint's repository,
16.6s of a 17.6s install on Linux and 40.1s of 42.4s on Windows.

The verdict depends on the lockfile content and the policies, never on the
runner, so it is cached under its own key alongside the store cache and
restored without prefix fallback: an entry recorded for a different lockfile
could never be reused. Saving happens before `pnpm store prune`, which drops
the log along with the store's other derived state.

Anything that goes wrong here only costs the next job the re-verification, so
failures are reported as warnings instead of failing the build. Older pnpm
versions never write the log, and the post step then finds nothing to save.
2026-08-13 13:59:37 +02:00
Andrew Haines 551b42e879 docs(README): fix cache_dependency_path type (#257)
* docs(README): fix `cache_dependency_path` type

* docs(README): add multiple lockfile example

* docs: update input description to match README
2026-05-11 16:41:41 +02:00
Zoltan Kochan fc06bc1257 feat!: run the action on Node.js 24 (#205) 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.
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
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
Linda_pp 5d79380f29 fix: add missing outputs metadata to action.yml (#127) 2024-06-12 16:45:37 +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)
* 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
George Tan f4129fb46e fix
Update node version, see https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2022-10-11 10:56:24 +08:00
Zoltan Kochan 10693b3829 Update action.yml 2022-05-28 17:23:43 +03:00
Jack Works 35ab4267a1 fix: packageManager reader (#35)
* fix: packageManager reader

* chore: resolve review

* chore: run build
2022-02-25 12:43:26 +08:00
khai96_ aefcd1e623 Use pnpm.js to install pnpm 2021-03-23 12:42:43 +07:00
khai96_ 291e58ad85 Enable post action 2020-05-09 21:02:32 +07:00
khai96_ d44b8c5e53 Add run_install input 2020-05-09 19:13:46 +07:00
khai96_ a8a17c004c Rename 2020-05-08 17:11:08 +07:00
khai96_ 67c4d48a5e Set branding 2020-05-08 14:48:07 +07:00
khai96_ fecab58a2f Change default 2020-05-08 14:25:08 +07:00
khai96_ 9e216ad38c Create GitHub Actions manifest 2020-05-08 13:22:27 +07:00