Skip to content

Commit 2c0c547

Browse files
committed
chore: update pnpm/action-setup
Add new package_json_path input. Set default pnpm version to 'null'
1 parent 0883aee commit 2c0c547

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

.github/renovate.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,5 @@
2626
"groupName": "major-update"
2727
}
2828
],
29-
"extends": [
30-
"config:recommended",
31-
":pinVersions",
32-
"npm:unpublishSafe",
33-
":prNotPending",
34-
":preserveSemverRanges",
35-
":rebaseStalePrs"
36-
]
29+
"extends": ["config:recommended", ":pinVersions", "npm:unpublishSafe", ":prNotPending", ":preserveSemverRanges", ":rebaseStalePrs"]
3730
}

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout your repository using git
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: setup node and pnpm
16-
uses: dafnik/setup-node-pnpm@v3
16+
uses: dafnik/setup-node-pnpm@v4
1717
# with:
18-
# pnpm: 8
1918
# node: 22
2019
# node-file: ''
2120
# cwd: '.'
@@ -24,14 +23,15 @@ jobs:
2423
```
2524

2625
<!-- prettier-ignore-start -->
27-
| Inputs | Default value | Description |
28-
|--------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
29-
| `pnpm` | `9` | PNPM version to install |
30-
| `node` | `22` | Version Spec of the version to use in SemVer notation.<br /> It also emits such aliases as lts, latest, nightly and canary builds.<br /> Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node |
31-
| `node-file` | `''` | File containing the version Spec of the version to use.<br /> Examples: .nvmrc, .node-version, .tool-versions.<br /> If `node` and `node-file` are both provided the action will use version from `node-file`. |
32-
| `cwd` | `.` | Changes pnpm-lock.yaml lookup location and the work directory of "pnpm install" if enabled |
33-
| `install` | `false` | Runs "pnpm install" in working directory |
34-
| `install-ignore-scripts` | `false` | Runs "pnpm install --ignore-scripts" in working directory. Enable "install" or "install-ignore-scripts" only once |
26+
| Inputs | Default value | Description |
27+
|--------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
28+
| `pnpm` | `null` | PNPM version to install |
29+
| `node` | `22` | Version Spec of the version to use in SemVer notation.<br /> It also emits such aliases as lts, latest, nightly and canary builds.<br /> Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node |
30+
| `node-file` | `''` | File containing the version Spec of the version to use.<br /> Examples: .nvmrc, .node-version, .tool-versions.<br /> If `node` and `node-file` are both provided the action will use the version from `node-file`. |
31+
| `cwd` | `.` | Changes pnpm-lock.yaml lookup location and the work directory of "pnpm install" if enabled |
32+
| `package_file` | `package.json` | File path to the package.json to read "packageManager" configuration (also supports package.yml). Works in conjunction with "cwd" input. |
33+
| `install` | `false` | Runs "pnpm install" in working directory |
34+
| `install-ignore-scripts` | `false` | Runs "pnpm install --ignore-scripts" in working directory. Enable "install" or "install-ignore-scripts" only once |
3535
<!-- prettier-ignore-end -->
3636

3737
Furthermore, see [action.yml](action.yml)

action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ inputs:
99
pnpm:
1010
description: 'PNPM version'
1111
required: false
12-
default: '9'
12+
default: 'null'
1313
node:
1414
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
1515
required: false
1616
default: '22'
1717
node-file:
18-
description: 'File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.'
18+
description: 'File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions. If "node" and "node-file" are both provided the action will use the version from "node-file".'
1919
required: false
2020
default: ''
2121
cwd:
2222
description: 'Work directory'
2323
required: false
2424
default: '.'
25+
package_file:
26+
description: 'File path to the package.json to read "packageManager" configuration (also supports package.yml). Works in conjunction with "cwd"'
27+
required: false
28+
default: 'package.json'
2529
install:
2630
description: 'Runs pnpm install'
2731
required: false
@@ -38,6 +42,7 @@ runs:
3842
uses: pnpm/action-setup@v4
3943
with:
4044
version: ${{ inputs.pnpm }}
45+
package_json_file: '${{ inputs.cwd }}/${{ inputs.package_file }}'
4146

4247
- name: use Node.js ${{ inputs.node }}
4348
if: "${{ inputs.node-file == '' }}"

0 commit comments

Comments
 (0)