Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .chronus/changes/node-22-min-2026-3-8-12-27-17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@typespec/asset-emitter"
- "@typespec/bundler"
- "@typespec/compiler"
- "@typespec/eslint-plugin"
- "@typespec/events"
- "@typespec/html-program-viewer"
- "@typespec/http-server-csharp"
- "@typespec/http-specs"
- "@typespec/http"
- "@typespec/internal-build-utils"
- "@typespec/json-schema"
- "@typespec/library-linter"
- "@typespec/openapi"
- "@typespec/openapi3"
- "@typespec/playground"
- "@typespec/rest"
- "@typespec/spec-api"
- "@typespec/spec-coverage-sdk"
- "@typespec/spector"
- "@typespec/sse"
- "@typespec/streams"
- tmlanguage-generator
- "@typespec/tspd"
- typespec-vs
- typespec-vscode
- "@typespec/versioning"
- "@typespec/xml"
---

Upgrade minimum node version to 22
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TypeSpec is a language for defining cloud service APIs and shapes. This monorepo

### Prerequisites and Installation

- 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`
- Install Node.js LTS:
- Install pnpm globally: `npm install -g pnpm`
- Install dependencies: `pnpm install` (takes ~1.5 minutes)
- Install Playwright browsers (optional for UI testing): `npx playwright install`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: ["20.x", "22.x", "24.x"]
node-version: ["22.x", "24.x"]

env:
TYPESPEC_VS_CI_BUILD: true
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section goes over the setup of the repo for development.

## Repo setup

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

```bash
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# Build compiler
# --------------------------------
# cspell:ignore tdnf
# mcr doesn't provide any update to date images for nodejs... so we use the devcontainers image for building.
# FROM mcr.microsoft.com/azurelinux/base/nodejs:20.14 AS builder
FROM mcr.microsoft.com/devcontainers/javascript-node:22 AS builder
FROM mcr.microsoft.com/devcontainers/javascript-node:24 AS builder
COPY . /app

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

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

Expand Down
4 changes: 0 additions & 4 deletions eng/tsp-core/pipelines/stages/ci-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ stages:

strategy:
matrix:
"Node 20.x":
nodeVersion: 20.x
"Node 22.x":
nodeVersion: 22.x
"Node 24.x":
Expand All @@ -42,8 +40,6 @@ stages:

strategy:
matrix:
"Node 20.x":
nodeVersion: 20.x
"Node 22.x":
nodeVersion: 22.x
"Node 24.x":
Expand Down
2 changes: 1 addition & 1 deletion packages/asset-emitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/best-practices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
".": "./dist/src/index.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/bundle-uploader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "module",
"main": "dist/src/index.js",
"engines": {
"node": ">=16.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"./vite": "./dist/src/vite/index.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"bundle": "node ./dist/src/cli.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"./dist/src/core/logger/console-sink.js": "./dist/src/core/logger/console-sink.browser.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"bin": {
"tsp": "cmd/tsp.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-typespec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"type": "commonjs",
"main": "dist/src/index.js",
"engines": {
"node": ">=14.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/html-program-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"./style.css": "./dist/style.css"
},
"engines": {
"node": ">=14.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server-csharp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/http-specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test": "echo \"Error: no test specified\""
},
"engines": {
"node": ">=16.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"#test/*": "./test/*"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-build-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"typespec-build-tool": "cmd/cli.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"tspMain": "lib/main.tsp",
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/library-linter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"tspMain": "dist/src/index.js",
"engines": {
"node": ">=14.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/monarch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
".": "./dist/src/index.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"#test/*": "./test/*"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"tsp-pack": "cmd/cli.js"
},
"engines": {
"node": ">=18.0.0"
"node": ">=22.0.0"
},
"scripts": {
"bundle": "node ./dist/src/cli.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"./style.css": "./dist/lib/style.css"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./dist-dev ./temp ./samples/dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"./styles.css": "./dist/style.css"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./dist-dev ./temp ./typespecContents.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"./style.css": "./dist/style.css"
},
"engines": {
"node": ">=14.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/spec-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test": "vitest run"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/spec-coverage-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"clean": "rimraf dist/ temp/"
},
"engines": {
"node": ">=16.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/spec-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"./style.css": "./dist/style.css"
},
"engines": {
"node": ">=16.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/spector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test:ui": "vitest --ui"
},
"engines": {
"node": ">=16.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/sse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"./testing": "./dist/src/testing/index.js"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This package contains the logic for building and bundling the TypeSpec CLI as a standalone executable.

It requires node 20+ to use node single executable. https://nodejs.org/api/single-executable-applications.html
It requires node 22+ to use node single executable. https://nodejs.org/api/single-executable-applications.html

It is also possible to build with bun (code is there) but there is some issue due to signing. Goal will be to migrate to bun when those are resolved.
2 changes: 1 addition & 1 deletion packages/standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"type": "module",
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
4 changes: 2 additions & 2 deletions packages/standalone/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { writeSeaConfig } from "./sea-config.js";
// cspell:ignore postject

const [major, minor, patch] = process.versions.node.split(".").map(Number);
if (major < 20) {
console.error("Cannot build standalone cli on node under 20");
if (major < 22) {
console.error("Cannot build standalone cli on node under 22");
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/streams/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
2 changes: 1 addition & 1 deletion packages/tmlanguage-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"main": "dist/tmlanguage-generator.js",
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
Expand Down
Loading
Loading