You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,19 @@ Allows changing the `node-version` passed to `actions/setup-node`.
38
38
node-version: 18
39
39
```
40
40
41
+
### `node-version-file`
42
+
43
+
Allows changing the `node-version-file` passed to `actions/setup-node`.
44
+
45
+
The default has changed from `actions/setup-node`'s `''` to `'package.json'`, enabling easy volta usage with 0 configuration for consumers of `wyvox/action-setup-pnpm`.
46
+
_not_ providing a volta config also have 0 consequence.
47
+
48
+
```yaml
49
+
- uses: wyvox/action-setup-pnpm@v3
50
+
with:
51
+
node-version-file: '.node-version'
52
+
```
53
+
41
54
### `node-registry-url`
42
55
43
56
Allows changing the `registry-url` passed to `actions/setup-node`.
Copy file name to clipboardExpand all lines: action.yml
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ inputs:
8
8
node-version:
9
9
description: "Override the default node version, or override what is specified in your project's volta config"
10
10
required: false
11
+
node-version-file:
12
+
description: "Override where the default node version is read from. By default this reads from package.json, which includes support for volta.node. Specifying node-version will override this"
13
+
required: false
14
+
default: 'package.json'
11
15
node-registry-url:
12
16
description: "Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN."
13
17
required: false
@@ -118,10 +122,13 @@ runs:
118
122
# Note also that volta's action does not have formal support for pnpm, nor its cache.
119
123
# - does not install pnpm
120
124
- name: 'Setup node and the cache for pnpm'
121
-
uses: actions/setup-node@v3
125
+
uses: actions/setup-node@v4
122
126
with:
123
127
cache: 'pnpm'
128
+
# If specified, takes precedence over node-version-file
124
129
node-version: ${{ inputs.node-version }}
130
+
# Default node version read from package.json, but can be changed by passing in inputs.node-version-file
0 commit comments