Skip to content

Commit 2a3cc5e

Browse files
Upgrade minimum node version to 22 (#10305)
Node 20 EOL is at the end april, which means next Typespec release will drop support. We already have plenty of our dependencies that have dropped early and upgrading will allow us to use some nice built-in
1 parent be99cad commit 2a3cc5e

47 files changed

Lines changed: 81 additions & 54 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: internal
4+
packages:
5+
- "@typespec/asset-emitter"
6+
- "@typespec/bundler"
7+
- "@typespec/compiler"
8+
- "@typespec/eslint-plugin"
9+
- "@typespec/events"
10+
- "@typespec/html-program-viewer"
11+
- "@typespec/http-server-csharp"
12+
- "@typespec/http-specs"
13+
- "@typespec/http"
14+
- "@typespec/internal-build-utils"
15+
- "@typespec/json-schema"
16+
- "@typespec/library-linter"
17+
- "@typespec/openapi"
18+
- "@typespec/openapi3"
19+
- "@typespec/playground"
20+
- "@typespec/rest"
21+
- "@typespec/spec-api"
22+
- "@typespec/spec-coverage-sdk"
23+
- "@typespec/spector"
24+
- "@typespec/sse"
25+
- "@typespec/streams"
26+
- tmlanguage-generator
27+
- "@typespec/tspd"
28+
- typespec-vs
29+
- typespec-vscode
30+
- "@typespec/versioning"
31+
- "@typespec/xml"
32+
---
33+
34+
Upgrade minimum node version to 22

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TypeSpec is a language for defining cloud service APIs and shapes. This monorepo
1111

1212
### Prerequisites and Installation
1313

14-
- Install Node.js 20 LTS: `curl -fsSL https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-x64.tar.xz | tar -xJ --strip-components=1 -C /usr/local`
14+
- Install Node.js LTS:
1515
- Install pnpm globally: `npm install -g pnpm`
1616
- Install dependencies: `pnpm install` (takes ~1.5 minutes)
1717
- Install Playwright browsers (optional for UI testing): `npx playwright install`

.github/workflows/core-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, windows-latest]
18-
node-version: ["20.x", "22.x", "24.x"]
18+
node-version: ["22.x", "24.x"]
1919

2020
env:
2121
TYPESPEC_VS_CI_BUILD: true

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This section goes over the setup of the repo for development.
44

55
## Repo setup
66

7-
- Install [Node.js](https://nodejs.org/) 20 LTS
7+
- Install [Node.js](https://nodejs.org/) 24 LTS
88
- Install [pnpm](https://pnpm.io/)
99

1010
```bash

docker/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
# Build compiler
33
# --------------------------------
44
# cspell:ignore tdnf
5-
# mcr doesn't provide any update to date images for nodejs... so we use the devcontainers image for building.
6-
# FROM mcr.microsoft.com/azurelinux/base/nodejs:20.14 AS builder
7-
FROM mcr.microsoft.com/devcontainers/javascript-node:22 AS builder
5+
FROM mcr.microsoft.com/devcontainers/javascript-node:24 AS builder
86
COPY . /app
97

108
# Upgrade all packages per https://eng.ms/docs/more/containers-secure-supply-chain/updating.
@@ -24,7 +22,7 @@ RUN pnpm pack
2422
# --------------------------------
2523
# Setup final image
2624
# --------------------------------
27-
FROM mcr.microsoft.com/azurelinux/base/nodejs:20.14
25+
FROM mcr.microsoft.com/azurelinux/base/nodejs:24
2826

2927
COPY --from=builder /app/packages/compiler/*.tgz /tmp/compiler.tgz
3028

eng/tsp-core/pipelines/stages/ci-stages.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ stages:
1515

1616
strategy:
1717
matrix:
18-
"Node 20.x":
19-
nodeVersion: 20.x
2018
"Node 22.x":
2119
nodeVersion: 22.x
2220
"Node 24.x":
@@ -42,8 +40,6 @@ stages:
4240

4341
strategy:
4442
matrix:
45-
"Node 20.x":
46-
nodeVersion: 20.x
4743
"Node 22.x":
4844
nodeVersion: 22.x
4945
"Node 24.x":

packages/asset-emitter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"engines": {
26-
"node": ">=20.0.0"
26+
"node": ">=22.0.0"
2727
},
2828
"scripts": {
2929
"clean": "rimraf ./dist ./temp",

packages/best-practices/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
".": "./dist/src/index.js"
2424
},
2525
"engines": {
26-
"node": ">=20.0.0"
26+
"node": ">=22.0.0"
2727
},
2828
"scripts": {
2929
"clean": "rimraf ./dist ./temp",

packages/bundle-uploader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"type": "module",
2121
"main": "dist/src/index.js",
2222
"engines": {
23-
"node": ">=16.0.0"
23+
"node": ">=22.0.0"
2424
},
2525
"scripts": {
2626
"clean": "rimraf ./dist ./temp",

packages/bundler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"./vite": "./dist/src/vite/index.js"
2424
},
2525
"engines": {
26-
"node": ">=20.0.0"
26+
"node": ">=22.0.0"
2727
},
2828
"scripts": {
2929
"bundle": "node ./dist/src/cli.js",

0 commit comments

Comments
 (0)