Skip to content

Commit 9479a31

Browse files
chore(ado-script): bump default Node install to 22.x (#1036)
* fix(runtimes): replace deprecated NodeTool@0 with UseNode@1 Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com> * docs: update NodeTool@0 references to UseNode@1 Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com> * chore(ado-script): bump default Node install to 22.x Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent c6057cb commit 9479a31

54 files changed

Lines changed: 180 additions & 183 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/ado-script.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ GitHub-typed repos return before any SDK load.
251251
┌──────────────────────┐
252252
│ Generated pipeline │
253253
│ Setup job: │
254-
│ 1. NodeTool@0
254+
│ 1. UseNode@1
255255
│ 2. curl + sha256 │ downloads ado-script.zip
256256
│ + unzip │ from the matching ado-aw release
257257
│ 3. node gate/index │ reads GATE_SPEC env var
@@ -449,7 +449,7 @@ bundle**:
449449
When `filters:` lowers to non-empty checks, `AdoScriptExtension::declarations()`
450450
returns three typed `Declarations::setup_steps` entries for the Setup job:
451451

452-
1. **`NodeTool@0`** — installs Node 20.x LTS, capped at
452+
1. **`UseNode@1`** — installs Node 22.x LTS, capped at
453453
`timeoutInMinutes: 5`.
454454
2. **`curl` download + verify + extract** — fetches `checksums.txt`
455455
and `ado-script.zip` from the `githubnext/ado-aw` release matching
@@ -467,7 +467,7 @@ PR contributor activates (`on.pr` configured and not disabled),
467467
`AdoScriptExtension::declarations()` returns the install + download pair in
468468
`Declarations::agent_prepare_steps` for the Agent job:
469469

470-
1. **`NodeTool@0`** — same shape as above.
470+
1. **`UseNode@1`** — same shape as above.
471471
2. **`curl` download + verify + extract** — same artefact, same
472472
verification.
473473
3. **`bash: node '/tmp/ado-aw-scripts/ado-script/import.js'`**
@@ -619,7 +619,7 @@ If a future bundle blows the budget:
619619
Node. Stage 3 keeps a Rust-only execution path.
620620
- Migrating the agent-stats parser. It runs in-pipeline as part of
621621
Stage 1 wrap-up and has no TypeScript dependency need.
622-
- Bundling Node itself. Pipelines install Node via `NodeTool@0`.
622+
- Bundling Node itself. Pipelines install Node via `UseNode@1`.
623623

624624
## See also
625625

docs/filter-ir.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ runtime-import resolver — see [`runtime-imports.md`](runtime-imports.md).
364364

365365
For the gate path it controls:
366366

367-
1. **Node install step** — emits a `NodeTool@0` step pinned to Node 20.x
367+
1. **Node install step** — emits a `UseNode@1` step pinned to Node 22.x
368368
LTS so `gate.js` has a runtime.
369369
2. **Download step** — fetches `ado-script.zip` from the ado-aw release
370370
artifacts, verifies its SHA256 checksum via `checksums.txt`, then

docs/front-matter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runtimes: # optional runtime configuration (language enviro
4949
# python: # Alternative object format (pin version, configure internal feed)
5050
# version: "3.12"
5151
# feed-url: "https://pkgs.dev.azure.com/myorg/_packaging/myfeed/pypi/simple/"
52-
# node: true # Node.js runtime — auto-installs via NodeTool@0 (see docs/runtimes.md)
52+
# node: true # Node.js runtime — auto-installs via UseNode@1 (see docs/runtimes.md)
5353
# node: # Alternative object format (pin version, configure internal feed)
5454
# version: "22.x"
5555
# feed-url: "https://pkgs.dev.azure.com/ORG/PROJECT/_packaging/FEED/npm/registry/"

docs/ir.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub enum Step {
8686
Use the typed structs whenever the compiler owns the step:
8787

8888
- `Step::Bash` for inline bash (`BashStep::script` is the raw body, not a YAML block).
89-
- `Step::Task` for ADO task invocations such as `NodeTool@0`, `UsePythonVersion@0`, or `UseDotNet@2`. For compiler-generated built-in tasks, prefer `src/compile/ir/tasks.rs` factory helpers over ad-hoc `TaskStep::new(...)` calls.
89+
- `Step::Task` for ADO task invocations such as `UseNode@1`, `UsePythonVersion@0`, or `UseDotNet@2`. For compiler-generated built-in tasks, prefer `src/compile/ir/tasks.rs` factory helpers over ad-hoc `TaskStep::new(...)` calls.
9090
- `Step::Checkout` for `checkout:` steps.
9191
- `Step::Download` for pipeline-artifact downloads.
9292
- `Step::Publish` for pipeline-artifact publishes. Under 1ES, lowering moves publish steps into `templateContext.outputs` so artifacts are published by the 1ES template machinery exactly once.

docs/runtime-imports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ compile time instead of on the pipeline runner.
7878
- **Runtime**: `import.js` is ncc-bundled into `ado-script.zip`.
7979
The always-on `AdoScriptExtension` contributes three typed
8080
`Declarations::agent_prepare_steps` entries to the Agent job:
81-
`NodeTool@0` install, the `ado-script.zip` download/verify/extract,
81+
`UseNode@1` install, the `ado-script.zip` download/verify/extract,
8282
and the `node import.js` resolver invocation. All three run on the
8383
same VM as the agent — ADO jobs are VM-isolated, so the bundle must
8484
be downloaded inside whichever job consumes it.

docs/runtimes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ When enabled, the compiler:
7171

7272
### Node.js (`node:`)
7373

74-
Node.js runtime. Auto-installs Node.js via `NodeTool@0`, emits `npmAuthenticate@0` for internal feed access, adds Node ecosystem domains to the AWF network allowlist, extends the bash command allow-list, and optionally injects feed URL env vars for npm.
74+
Node.js runtime. Auto-installs Node.js via `UseNode@1`, emits `npmAuthenticate@0` for internal feed access, adds Node ecosystem domains to the AWF network allowlist, extends the bash command allow-list, and optionally injects feed URL env vars for npm.
7575

7676
```yaml
7777
# Simple enablement (installs default Node LTS)
@@ -89,18 +89,18 @@ runtimes:
8989

9090
| Field | Type | Description |
9191
|-------|------|-------------|
92-
| `version` | string | Node.js version to install (e.g., `"22.x"`, `"20.x"`). Passed to `NodeTool@0` `versionSpec`. Defaults to `"22.x"`. |
92+
| `version` | string | Node.js version to install (e.g., `"22.x"`, `"20.x"`). Passed to `UseNode@1` `version`. Defaults to `"22.x"`. |
9393
| `feed-url` | string | Internal npm registry URL. Injects `NPM_CONFIG_REGISTRY` env var into the agent environment. |
9494
| `config` | string | Path to an .npmrc config file. Accepted with a warning — the file will not be available inside the AWF agent environment until proxy-auth support lands. |
9595

9696
When enabled, the compiler:
97-
- Contributes a `NodeTool@0` task to `Declarations::agent_prepare_steps` (runs before AWF)
97+
- Contributes a `UseNode@1` task to `Declarations::agent_prepare_steps` (runs before AWF)
9898
- If `feed-url` or `config` is set, also injects `npmAuthenticate@0` (and an ensure-`.npmrc` step) to authenticate the ADO build service identity for internal feeds
9999
- Auto-adds `node`, `npm`, `npx` to the bash command allow-list
100100
- Adds Node ecosystem domains to the network allowlist (npmjs.org, nodejs.org, etc.)
101101
- If `feed-url` is set, injects `NPM_CONFIG_REGISTRY` env var into the agent environment
102102
- Appends a prompt supplement informing the agent about Node.js availability
103-
- No AWF mounts or PATH prepends needed — `NodeTool@0` installs to `/opt/hostedtoolcache` (auto-mounted by AWF) and publishes PATH entries that AWF merges via `$GITHUB_PATH`
103+
- No AWF mounts or PATH prepends needed — `UseNode@1` installs to `/opt/hostedtoolcache` (auto-mounted by AWF) and publishes PATH entries that AWF merges via `$GITHUB_PATH`
104104
- Note: AWF overlays `~/.npmrc` with `/dev/null` for credential security — the `NPM_CONFIG_REGISTRY` env var approach avoids conflicting with this overlay
105105

106106
### .NET (`dotnet:`)

site/src/content/docs/guides/extending.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ let step = Step::Bash(
122122
use crate::compile::ir::step::{Step, TaskStep};
123123

124124
let step = Step::Task(
125-
TaskStep::new("NodeTool@0", "Install Node.js")
126-
.with_input("versionSpec", "20.x"),
125+
TaskStep::new("UseNode@1", "Install Node.js")
126+
.with_input("version", "20.x"),
127127
);
128128
```
129129

130-
Use `TaskStep` for Azure DevOps built-in tasks such as `NodeTool@0`, `UsePythonVersion@0`, and `UseDotNet@2`.
130+
Use `TaskStep` for Azure DevOps built-in tasks such as `UseNode@1`, `UsePythonVersion@0`, and `UseDotNet@2`.
131131

132132
### Download and publish steps
133133

site/src/content/docs/reference/ado-script.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ the agent prompt, then exits 0 so the rest of the pipeline can continue.
139139
┌──────────────────────┐
140140
│ Generated pipeline │
141141
│ Setup job: │
142-
│ 1. NodeTool@0
142+
│ 1. UseNode@1
143143
│ 2. curl + sha256 │ downloads ado-script.zip
144144
│ + unzip │ from the matching ado-aw release
145145
│ 3. node gate/index │ reads GATE_SPEC env var
@@ -314,7 +314,7 @@ bundle**:
314314
When `filters:` lowers to non-empty checks, `AdoScriptExtension::declarations()`
315315
returns three typed `Declarations::setup_steps` entries for the Setup job:
316316

317-
1. **`NodeTool@0`** — installs Node 20.x LTS, capped at
317+
1. **`UseNode@1`** — installs Node 22.x LTS, capped at
318318
`timeoutInMinutes: 5`.
319319
2. **`curl` download + verify + extract** — fetches `checksums.txt`
320320
and `ado-script.zip` from the `githubnext/ado-aw` release matching
@@ -333,7 +333,7 @@ download first, then appends the relevant invocation steps.
333333

334334
**`import.js` invocation** — active when `inlined-imports: false` (the default):
335335

336-
1. **`NodeTool@0`** — installs Node 20.x LTS, capped at `timeoutInMinutes: 5`.
336+
1. **`UseNode@1`** — installs Node 22.x LTS, capped at `timeoutInMinutes: 5`.
337337
2. **`curl` download + verify + extract** — same artefact and verification as the Setup job.
338338
3. **`bash: node '/tmp/ado-aw-scripts/ado-script/import.js'`**
339339
expands `{{#runtime-import …}}` markers in
@@ -469,7 +469,7 @@ If a future bundle blows the budget:
469469
Node. Stage 3 keeps a Rust-only execution path.
470470
- Migrating the agent-stats parser. It runs in-pipeline as part of
471471
Stage 1 wrap-up and has no TypeScript dependency need.
472-
- Bundling Node itself. Pipelines install Node via `NodeTool@0`.
472+
- Bundling Node itself. Pipelines install Node via `UseNode@1`.
473473

474474
## See also
475475

site/src/content/docs/reference/filter-ir.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ runtime-import resolver — see [Runtime Imports](/ado-aw/reference/runtime-impo
365365

366366
For the gate path it controls:
367367

368-
1. **Node install step** -- emits a `NodeTool@0` step pinned to Node 20.x
368+
1. **Node install step** -- emits a `UseNode@1` step pinned to Node 22.x
369369
LTS so the gate evaluator has a runtime.
370370
2. **Download step** -- fetches `ado-script.zip` from the ado-aw release
371371
artifacts, verifies its SHA256 checksum via `checksums.txt`, then

site/src/content/docs/reference/front-matter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ runtimes: # optional runtime configuration (language enviro
5151
# python: # Alternative object format (pin version, configure internal feed)
5252
# version: "3.12"
5353
# feed-url: "https://pkgs.dev.azure.com/myorg/_packaging/myfeed/pypi/simple/"
54-
# node: true # Node.js runtime -- auto-installs via NodeTool@0 (see docs/runtimes.md)
54+
# node: true # Node.js runtime -- auto-installs via UseNode@1 (see docs/runtimes.md)
5555
# node: # Alternative object format (pin version, configure internal feed)
5656
# version: "22.x"
5757
# feed-url: "https://pkgs.dev.azure.com/ORG/PROJECT/_packaging/FEED/npm/registry/"

0 commit comments

Comments
 (0)