mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-05 12:00:39 +00:00
Compare commits
1 Commits
6cbc239050
...
50c85078ab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50c85078ab |
@ -119,7 +119,6 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
|
|||||||
@ -23,11 +23,6 @@ inputs:
|
|||||||
description: When set to true, @pnpm/exe, which is a Node.js bundled package, will be installed, enabling using pnpm without Node.js.
|
description: When set to true, @pnpm/exe, which is a Node.js bundled package, will be installed, enabling using pnpm without Node.js.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
outputs:
|
|
||||||
dest:
|
|
||||||
description: Expanded path of inputs#dest
|
|
||||||
bin_dest:
|
|
||||||
description: Location of `pnpm` and `pnpx` command
|
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
main: dist/index.js
|
main: dist/index.js
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
|
|||||||
|
|
||||||
if (!GITHUB_WORKSPACE) {
|
if (!GITHUB_WORKSPACE) {
|
||||||
throw new Error(`No workspace is found.
|
throw new Error(`No workspace is found.
|
||||||
If you've intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
|
If you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
|
||||||
please run the actions/checkout before pnpm/action-setup.
|
please run the actions/checkout before pnpm/action-setup.
|
||||||
Otherwise, please specify the pnpm version in the action configuration.`)
|
Otherwise, please specify the pnpm version in the action configuration.`)
|
||||||
}
|
}
|
||||||
@ -109,13 +109,13 @@ function getPnpmVersionFromLockfile(
|
|||||||
): string | undefined {
|
): string | undefined {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case lockfileVersion === '5.3':
|
case lockfileVersion === '5.3':
|
||||||
return 'latest-6';
|
return '6';
|
||||||
case lockfileVersion === '5.4':
|
case lockfileVersion === '5.4':
|
||||||
return 'latest-7';
|
return '7';
|
||||||
case lockfileVersion === '6.0' || lockfileVersion === '6.1':
|
case lockfileVersion === '6.0' || lockfileVersion === '6.1':
|
||||||
return 'latest-8';
|
return '8';
|
||||||
case lockfileVersion === '7.0' || lockfileVersion === '9.0':
|
case lockfileVersion === '7.0' || lockfileVersion === '9.0':
|
||||||
return 'latest-9';
|
return '9';
|
||||||
default:
|
default:
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user