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: docs/advanced-usage.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,35 @@ steps:
71
71
- run: npm test
72
72
```
73
73
74
-
When using the `package.json` input, the action will look for `volta.node` first. If `volta.node` isn't defined, then it will look for `engines.node`.
74
+
When using the `package.json` input, the action will look in following field for a specified Node version:
75
+
1. It checks `volta.node` first.
76
+
2. Then it checks `devEngines.runtime`.
77
+
3. Then it will look for `engines.node`.
78
+
4. Otherwise it tries to resolve the file defined by [`volta.extends`](https://docs.volta.sh/advanced/workspaces)
79
+
and look for `volta.node` or `engines.node` recursively.
80
+
81
+
### Example with `devEngines`
82
+
83
+
When a runtime engine (`engines.node`) is defined but also a development engine (`devEngines.runtime`) then the `devEngine` runtime version is used.
84
+
This example will install a Node version based on the `^20.10` pattern.
85
+
86
+
```json
87
+
{
88
+
"engines": {
89
+
"node": "^20 || ^22"
90
+
},
91
+
"devEngines": {
92
+
"runtime": {
93
+
"name": "node",
94
+
"version": "^20.10"
95
+
}
96
+
}
97
+
}
98
+
```
99
+
100
+
### Example with volta pinned Node version
101
+
102
+
When both `engines.node` and `volta.node` is defined the value in `volta.node` is used.
75
103
76
104
```json
77
105
{
@@ -84,8 +112,6 @@ When using the `package.json` input, the action will look for `volta.node` first
84
112
}
85
113
```
86
114
87
-
Otherwise, when [`volta.extends`](https://docs.volta.sh/advanced/workspaces) is defined, then it will resolve the corresponding file and look for `volta.node` or `engines.node` recursively.
88
-
89
115
## Architecture
90
116
91
117
You can use any of the [supported operating systems](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners), and the compatible `architecture` can be selected using `architecture`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).
0 commit comments