Update Node Version
Use this skill when the request is to update major Node.js version across some or all of the repository.
Task List
Begin with a plain Markdown checklist that works in AI Agent:
- [ ] Identify which projects should move to the new Node line
- [ ] Inspect all current Node, npm, Docker, and type-version declarations
- [ ] Update the affected config and package files together
- [ ] Re-bootstrap dependencies with wrapper commands
- [ ] Run wrapper-based validation on every changed target
- [ ] Summarize the new version mapping and any compatibility limits
Workflow
- Determine the scope:
- projects which don't belong to a particular angular major version,
- specific versioned Angular fixtures,
- or the whole repo.
- Inspect the current version mapping in:
- root
.nvmrc, docs/.nvmrc, tests-e2e/.nvmrc, and affected e2e/*/.nvmrc
compose.yml
.circleci/config.yml and any CI workflow that pins a Node version
- root, docs, tests-e2e, and affected e2e
package.json files
- Keep related version declarations aligned:
- Docker image tag
.nvmrc
npm version
engines.npm
@types/node where applicable
- Do not assume every Angular fixture can move to the newest Node major. Preserve per-target compatibility unless the task explicitly changes that support boundary.
- Re-bootstrap changed targets with
sh compose.sh <target>.
- Validate with
sh test.sh for root, e2e, and every changed target.
- If changing dependency metadata requires a lockfile refresh, use the
update-package-locks skill instead of an ad-hoc npm command.
Commands
# Bootstrap changed targets with a unique compose namespace.
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh root
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh e2e
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh <target>
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh docs
# Validate changed targets.
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh root
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh e2e
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh <target>
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> docker compose run --rm docs npm run build
Validation
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh root
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh e2e
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh <target> for each target whose Node line changed
COMPOSE_PROJECT_NAME=ngmocks_node_<unique> docker compose run --rm docs npm run build when the docs Node line changed
Guardrails
- Never assume the root Node version should also be used by every legacy Angular fixture.
- Follow
AGENTS.md's Docker-only execution rule. Use only existing wrappers or repo Compose services running existing
npm scripts; never use local runtimes or custom install, build, test, or check scripts, including inside Docker.
- If an approved command fails or required tooling is missing, report the command, error, and remaining work to the
user and discuss the solution before trying a workaround.
- Keep npm compatibility aligned with the chosen Node version.
- Use one unique
COMPOSE_PROJECT_NAME for all commands in the same worktree.
- If a commit is requested for a pure Node-image update, use
chore(docker): updating node images.
1---2name: update-node-version3description: Use when updating major Node.js versions across ng-mocks projects, including CI/CD, .nvmrc, Docker images, npm compatibility, @types/node, and wrapper-based validation.4---56# Update Node Version78Use this skill when the request is to update major Node.js version across some or all of the repository.910## Task List1112Begin with a plain Markdown checklist that works in AI Agent:1314```md15- [ ] Identify which projects should move to the new Node line16- [ ] Inspect all current Node, npm, Docker, and type-version declarations17- [ ] Update the affected config and package files together18- [ ] Re-bootstrap dependencies with wrapper commands19- [ ] Run wrapper-based validation on every changed target20- [ ] Summarize the new version mapping and any compatibility limits21```2223## Workflow24251. Determine the scope:26 - projects which don't belong to a particular angular major version,27 - specific versioned Angular fixtures,28 - or the whole repo.292. Inspect the current version mapping in:30 - root `.nvmrc`, `docs/.nvmrc`, `tests-e2e/.nvmrc`, and affected `e2e/*/.nvmrc`31 - `compose.yml`32 - `.circleci/config.yml` and any CI workflow that pins a Node version33 - root, docs, tests-e2e, and affected e2e `package.json` files343. Keep related version declarations aligned:35 - Docker image tag36 - `.nvmrc`37 - `npm` version38 - `engines.npm`39 - `@types/node` where applicable404. Do not assume every Angular fixture can move to the newest Node major. Preserve per-target compatibility unless the task explicitly changes that support boundary.415. Re-bootstrap changed targets with `sh compose.sh <target>`.426. Validate with `sh test.sh` for root, e2e, and every changed target.437. If changing dependency metadata requires a lockfile refresh, use the `update-package-locks` skill instead of an ad-hoc npm command.4445## Commands4647```bash48# Bootstrap changed targets with a unique compose namespace.49COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh root50COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh e2e51COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh <target>52COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh compose.sh docs5354# Validate changed targets.55COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh root56COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh e2e57COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh <target>58COMPOSE_PROJECT_NAME=ngmocks_node_<unique> docker compose run --rm docs npm run build59```6061## Validation6263- `COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh root`64- `COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh e2e`65- `COMPOSE_PROJECT_NAME=ngmocks_node_<unique> sh test.sh <target>` for each target whose Node line changed66- `COMPOSE_PROJECT_NAME=ngmocks_node_<unique> docker compose run --rm docs npm run build` when the docs Node line changed6768## Guardrails6970- Never assume the root Node version should also be used by every legacy Angular fixture.71- Follow `AGENTS.md`'s Docker-only execution rule. Use only existing wrappers or repo Compose services running existing72 npm scripts; never use local runtimes or custom install, build, test, or check scripts, including inside Docker.73- If an approved command fails or required tooling is missing, report the command, error, and remaining work to the74 user and discuss the solution before trying a workaround.75- Keep npm compatibility aligned with the chosen Node version.76- Use one unique `COMPOSE_PROJECT_NAME` for all commands in the same worktree.77- If a commit is requested for a pure Node-image update, use `chore(docker): updating node images`.