Skip to content

Commit 3b57a0f

Browse files
committed
docs: consolidate advanced usage
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent f3b3cab commit 3b57a0f

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

docs/advanced-usage.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,41 +92,25 @@ steps:
9292

9393
When using the `package.json` input, the action will look in the following fields for a specified Node version:
9494
1. It checks `volta.node` first.
95-
2. Then it checks `devEngines.runtime`.
95+
2. Then it checks `devEngines.runtime` for an entry with `"name": "node"`.
9696
3. Then it will look for `engines.node`.
9797
4. Otherwise it tries to resolve the file defined by [`volta.extends`](https://docs.volta.sh/advanced/workspaces)
9898
and look for `volta.node`, `devEngines.runtime`, or `engines.node` recursively.
9999

100-
### Example with `devEngines`
101-
102-
When a runtime engine (`engines.node`) is defined but also a development engine (`devEngines.runtime`) then the `devEngines.runtime` version is used.
103-
This example will install a Node version based on the `^20.10` pattern.
104100

105101
```json
106102
{
107103
"engines": {
108-
"node": "^19"
104+
"node": "^22 || ^24"
109105
},
110106
"devEngines": {
111107
"runtime": {
112108
"name": "node",
113-
"version": "^20.10"
109+
"version": "^24.3"
114110
}
115-
}
116-
}
117-
```
118-
119-
### Example with volta pinned Node version
120-
121-
When both `engines.node` and `volta.node` is defined the value in `volta.node` is used.
122-
123-
```json
124-
{
125-
"engines": {
126-
"node": ">=16.0.0"
127111
},
128112
"volta": {
129-
"node": "16.0.0"
113+
"node": "24.11.1"
130114
}
131115
}
132116
```

0 commit comments

Comments
 (0)