diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 97bc8ce10..97f2d63ea 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -2,9 +2,17 @@
"name": "TypeScript Website codespace",
"dockerFile": "Dockerfile",
+ "features": {
+ "ghcr.io/devcontainers/features/github-cli": "latest",
+ },
+
// Set *default* container specific settings.json values on container create.
- "settings": {
- "terminal.integrated.shell.linux": "/bin/bash"
+ "customizations": {
+ "vscode": {
+ "settings": {
+ "terminal.integrated.shell.linux": "/bin/bash"
+ }
+ }
},
"forwardPorts": [8000],
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..1860f11d5
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,22 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for more information:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+# https://containers.dev/guide/dependabot
+
+version: 2
+updates:
+ - package-ecosystem: 'github-actions'
+ directory: '/'
+ schedule:
+ interval: 'weekly'
+ groups:
+ github-actions:
+ patterns:
+ - '*'
+
+ - package-ecosystem: 'devcontainers'
+ directory: '/'
+ schedule:
+ interval: weekly
+
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 222882b20..d4b6472b8 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -24,10 +24,10 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
- node-version: "18.x"
- - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
+ node-version: "20.x"
+ - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- run: pnpm install
@@ -41,7 +41,7 @@ jobs:
# Verify it compiles
- run: pnpm build-site
- - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
+ - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
with:
name: site
@@ -50,12 +50,6 @@ jobs:
# Run all the package's tests
- run: pnpm test
- # danger for PR builds
- - if: github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id && matrix.os == 'ubuntu-latest'
- run: "pnpm danger ci"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- run: |
git add .
if ! git diff --staged --exit-code --quiet; then
@@ -71,7 +65,7 @@ jobs:
- name: Upload diff artifact
if: ${{ failure() && steps.check-diff.conclusion == 'failure' }}
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: missing.patch
path: missing.patch
@@ -83,10 +77,10 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 'lts/*'
- - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
+ - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- run: pnpm install
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index c95eeefe3..deb997521 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -44,7 +44,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
+ uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
with:
config-file: ./.github/codeql/codeql-configuration.yml
# Override language selection by uncommenting this and choosing your languages
@@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
- uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
+ uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -68,4 +68,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
+ uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml
index a8bb746f5..b98edba1e 100644
--- a/.github/workflows/deploy-preview.yml
+++ b/.github/workflows/deploy-preview.yml
@@ -132,7 +132,7 @@ jobs:
- name: Download site build from PR
if: ${{ steps.get-info.outputs.result != 'null' }}
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: site
path: site
diff --git a/.github/workflows/deploy-prod-static.yml b/.github/workflows/deploy-prod-static.yml
index 72aaa2ec7..65cbe588a 100644
--- a/.github/workflows/deploy-prod-static.yml
+++ b/.github/workflows/deploy-prod-static.yml
@@ -31,11 +31,11 @@ jobs:
with:
# Fetch the full history, to build attribution.json
fetch-depth: 0
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
- node-version: "18.x"
+ node-version: "20.x"
- - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
+ - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
# Builds the modules, and boostraps the other modules
- name: Build website
@@ -52,7 +52,7 @@ jobs:
cp -r packages/typescriptlang-org/public site
- name: Setup Pages
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
+ uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Upload artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v3
@@ -69,4 +69,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml
index 8b3c56c06..fe51ebf34 100644
--- a/.github/workflows/publish-packages.yml
+++ b/.github/workflows/publish-packages.yml
@@ -22,11 +22,11 @@ jobs:
fetch-depth: 0
filter: blob:none
token: ${{ secrets.TS_BOT_TOKEN }}
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
- node-version: "18.x"
+ node-version: "20.x"
registry-url: "https://registry.npmjs.org/"
- - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
+ - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- name: Prepare website v2
run: |
diff --git a/.npmrc b/.npmrc
deleted file mode 100644
index 62f08cddb..000000000
--- a/.npmrc
+++ /dev/null
@@ -1,2 +0,0 @@
-shell-emulator=true
-publish-branch=v2
diff --git a/README.md b/README.md
index 4752dfef1..14b9bb2a9 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,11 @@
目前为了保持稳定,我们仍然采取原有的本地化方式进行构建,即在本仓库触发 Vercel 的构建。而在 [ts-zh-docs/TypeScript-zh-Website](https://github.com/ts-zh-docs/TypeScript-zh-Website) 进行更新。一切有关翻译的讨论都将移至那个仓库,本仓库只负责构建工作。**中文文档的线上地址请访问[这里](https://www.tslang.com.cn)**。
+<<<<<<< HEAD
本地开发环境构建步骤:
+=======
+This repo uses pnpm workspaces with node 20+, and [watchman](https://facebook.github.io/watchman/docs/install.html). (Windows users can install [watchman via chocolatey](https://chocolatey.org/packages/watchman))
+>>>>>>> 119f931a639c9215a27311fde459c6db0b8718e4
1. 使用 Node 18.x 版本。
2. 使用 `pnpm` 命令安装依赖。
diff --git a/dangerfile.ts b/dangerfile.ts
deleted file mode 100644
index 33701c036..000000000
--- a/dangerfile.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// You can test it by running
-// pnpm danger pr https://github.com/microsoft/TypeScript-Website/pull/115
-
-// Blocked on PR deploys, see CI.yml
-// import lighthouse from "danger-plugin-lighthouse"
-
-// Spell check all the things
-const { default: spellcheck } = require("danger-plugin-spellcheck")
-spellcheck({ settings: "microsoft/TypeScript-Website@spellcheck.json" })
diff --git a/package.json b/package.json
index 394907f6f..25ab3f58e 100644
--- a/package.json
+++ b/package.json
@@ -2,30 +2,32 @@
"private": true,
"name": "root",
"engines": {
+<<<<<<< HEAD
"node": "20",
"pnpm": ">=9"
+=======
+ "node": ">= 20.19"
+>>>>>>> 119f931a639c9215a27311fde459c6db0b8718e4
},
"devDependencies": {
- "@changesets/changelog-github": "^0.5.0",
- "@changesets/cli": "^2.27.5",
+ "@changesets/changelog-github": "^0.5.2",
+ "@changesets/cli": "^2.29.8",
"@oss-docs/sync": "^1.1.4",
- "@types/express": "^4.17.6",
- "@types/node": "^18.19.121",
- "@types/react": "^18.3.2",
+ "@types/express": "^5.0.6",
+ "@types/node": "^25.3.3",
+ "@types/prettier": "^2.7.3",
+ "@types/react": "^18.3.28",
"chalk": "^4.1.2",
- "concurrently": "^8.2.2",
- "cross-env": "^7.0.2",
- "danger": "^13.0.5",
- "danger-plugin-lighthouse": "^0.5.2",
- "danger-plugin-spellcheck": "^2.1.0",
- "fb-watchman": "^2.0.1",
- "glob": "^7.2.3",
+ "concurrently": "^9.2.1",
+ "cross-env": "^10.1.0",
+ "fb-watchman": "^2.0.2",
+ "glob": "^13.0.6",
"gray-matter": "4.0.3",
- "reflect-metadata": "^0.1.13",
- "remark": "^11.0.2",
- "remark-html": "^10.0.0",
- "remark-shiki-twoslash": "^3.1.3",
- "serve-handler": "^6.1.2"
+ "prettier": "^2.8.8",
+ "reflect-metadata": "^0.2.2",
+ "remark": "^13.0.0",
+ "remark-html": "^13.0.2",
+ "remark-shiki-twoslash": "^3.1.3"
},
"pnpm": {
"overrides": {
@@ -33,21 +35,35 @@
"remark-shiki-twoslash>@typescript/vfs": "link:./packages/typescript-vfs",
"shiki-twoslash>@typescript/twoslash": "link:./packages/ts-twoslasher",
"shiki-twoslash>@typescript/vfs": "link:./packages/typescript-vfs",
- "@types/react": "^18.2.77",
+ "@types/react": "^18.3.28",
"@types/estree": "0.0.46",
"@types/eslint": "7.29.0",
"assert": "2.0.0",
"rollup-plugin-typescript2": "0.36.0",
- "typescript": "6.0.0-dev.20260213",
+ "typescript": "6.0.2",
"tslib": "^2.6.2",
- "prettier": "^2.0.2",
- "sharp": "0.28.1"
+ "sharp": "0.34.5",
+ "webpack": "^5.105.3"
},
"patchedDependencies": {
- "react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825": "patches/react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825.patch",
- "react-intl@3.12.1": "patches/react-intl@3.12.1.patch",
"gatsby-remark-shiki-twoslash@3.0.38": "patches/gatsby-remark-shiki-twoslash@3.0.38.patch"
- }
+ },
+ "ignoredBuiltDependencies": [
+ "@parcel/watcher",
+ "core-js",
+ "core-js-pure",
+ "es5-ext",
+ "lmdb",
+ "msgpackr-extract",
+ "spawn-sync",
+ "unrs-resolver"
+ ],
+ "onlyBuiltDependencies": [
+ "esbuild",
+ "gatsby",
+ "gatsby-cli",
+ "sharp"
+ ]
},
"jest": {
"transformIgnorePatterns": [
@@ -76,5 +92,5 @@
],
"onlyPublishWithReleaseLabel": true
},
- "packageManager": "pnpm@9.1.2+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7"
+ "packageManager": "pnpm@10.30.3+sha512.c961d1e0a2d8e354ecaa5166b822516668b7f44cb5bd95122d590dd81922f606f5473b6d23ec4a5be05e7fcd18e8488d47d978bbe981872f1145d06e9a740017"
}
diff --git a/packages/ata/package.json b/packages/ata/package.json
index 6e0951e1e..14bb952cc 100644
--- a/packages/ata/package.json
+++ b/packages/ata/package.json
@@ -12,7 +12,7 @@
"type": "module",
"types": "src/userFacingTypes.d.ts",
"scripts": {
- "build": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=esm --platform=node --target=es2015 && cpy src/userFacingTypes.d.ts dist/ --rename=index.d.ts && cpy src/ ../sandbox/src/vendor/ata",
+ "build": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=esm --platform=node --target=es2015 && cpy src/userFacingTypes.d.ts dist/ --rename=index.d.ts && cpy src/ ../sandbox/src/vendor/ata --flat",
"test": "jest",
"bootstrap": "pnpm build"
},
@@ -20,11 +20,11 @@
"access": "public"
},
"devDependencies": {
- "@types/jest": "^29.5.12",
- "cpy-cli": "^3.1.1",
- "esbuild": "^0.17.8",
+ "@types/jest": "^30.0.0",
+ "cpy-cli": "^7.0.0",
+ "esbuild": "^0.27.3",
"esbuild-jest": "^0.5.0",
- "jest": "^29.5.0"
+ "jest": "^30.2.0"
},
"peerDependencies": {
"typescript": ">=4.4.4"
diff --git a/packages/community-meta/package.json b/packages/community-meta/package.json
index 468204ad0..c43ed0e6d 100644
--- a/packages/community-meta/package.json
+++ b/packages/community-meta/package.json
@@ -4,12 +4,10 @@
"license": "MIT",
"version": "1.0.0",
"dependencies": {
- "moment": "2.24.0",
- "moment-timezone": "0.5.28"
+ "moment": "2.30.1",
+ "moment-timezone": "0.6.0"
},
"scripts": {
"build": "node scripts/generateRichMeetupData.js"
- },
- "devDependencies": {
}
}
diff --git a/packages/create-typescript-playground-plugin/CHANGELOG.md b/packages/create-typescript-playground-plugin/CHANGELOG.md
index e784f0ecf..2e177d38a 100644
--- a/packages/create-typescript-playground-plugin/CHANGELOG.md
+++ b/packages/create-typescript-playground-plugin/CHANGELOG.md
@@ -1,5 +1,11 @@
# create-typescript-playground-plugin
+## 1.3.3
+
+### Patch Changes
+
+- [#3509](https://github.com/microsoft/TypeScript-Website/pull/3509) [`0daa298`](https://github.com/microsoft/TypeScript-Website/commit/0daa298f2f4526f8c66baff00b8df0290e37a4d4) Thanks [@jakebailey](https://github.com/jakebailey)! - Bump dependencies
+
## 1.3.2
### Patch Changes
diff --git a/packages/create-typescript-playground-plugin/package.json b/packages/create-typescript-playground-plugin/package.json
index f9b07161a..d7a14177f 100644
--- a/packages/create-typescript-playground-plugin/package.json
+++ b/packages/create-typescript-playground-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "create-typescript-playground-plugin",
- "version": "1.3.2",
+ "version": "1.3.3",
"bin": "index.js",
"author": "TypeScript team",
"license": "MIT",
@@ -15,8 +15,8 @@
},
"scripts": {},
"dependencies": {
- "cross-spawn": "^7.0.5",
- "gunzip-maybe": "^1.4.1",
- "tar-fs": "^2.1.0"
+ "cross-spawn": "^7.0.6",
+ "gunzip-maybe": "^1.4.2",
+ "tar-fs": "^3.1.1"
}
}
diff --git a/packages/documentation/copy/en/project-config/Compiler Options.md b/packages/documentation/copy/en/project-config/Compiler Options.md
index 72eaa57dc..9fe309c03 100644
--- a/packages/documentation/copy/en/project-config/Compiler Options.md
+++ b/packages/documentation/copy/en/project-config/Compiler Options.md
@@ -63,57 +63,66 @@ tsc app.ts util.ts --target esnext --outfile index.js
Gives local information for help on the CLI.
-
- --init |
+
+ --ignoreConfig |
boolean
|
|
+ Ignore the tsconfig found and build with commandline options and files.
+ |
+
+
+ --init |
+ boolean
+ |
+
+|
Initializes a TypeScript project and creates a tsconfig.json file.
|
-
+
--listFilesOnly |
boolean
|
-|
+ |
|
Print names of files that are part of the compilation and then stop processing.
|
-
+
--locale |
string
|
-|
+ |
|
Set the language of the messaging from TypeScript. This does not affect emit.
|
-
+
--project |
string
|
-|
+ |
|
Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
|
-
+
--showConfig |
boolean
|
-|
+ |
|
Print the final configuration instead of building.
|
-
+
--version |
boolean
|
-|
+ |
|
Print the compiler's version.
|
@@ -285,7 +294,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
--allowJs |
boolean
|
- false
+ | false, unless checkJs is set
|
|
@@ -318,8 +327,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --allowUnreachableCode |
boolean
|
-
- |
+ |
|
Disable error reporting for unreachable code.
@@ -329,8 +337,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --allowUnusedLabels |
boolean
|
-
- |
+ |
|
Disable error reporting for unused labels.
@@ -362,8 +369,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --baseUrl |
string
|
-
- |
+ |
|
Specify the base directory to resolve bare specifier module names.
@@ -406,8 +412,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --customConditions |
list
|
-
- |
+ |
|
Conditions to set in addition to the resolver-specific defaults when resolving imports.
@@ -428,8 +433,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --declarationDir |
string
|
-
- |
+ |
|
Specify the output directory for generated declaration files.
@@ -637,8 +641,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --generateTrace |
string
|
-
- |
+ |
|
Generates an event trace and a list of types.
@@ -725,8 +728,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --jsx |
preserve, react, react-native, react-jsx, or react-jsxdev
|
-
- |
+ |
|
Specify what JSX code is generated.
@@ -780,8 +782,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --lib |
list
|
-
- |
+ |
|
Specify a set of bundled library declaration files that describe the target runtime environment.
@@ -791,7 +792,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --libReplacement |
boolean
|
- true
+ | false
|
|
@@ -824,8 +825,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --mapRoot |
string
|
-
- |
+ |
|
Specify the location where debugger should locate map files instead of generated locations.
@@ -879,8 +879,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --moduleSuffixes |
list
|
-
- |
+ |
|
List of file name suffixes to search when resolving a module.
@@ -1077,7 +1076,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --noUncheckedSideEffectImports |
boolean
|
- false
+ | true
|
|
@@ -1110,8 +1109,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --out |
string
|
-
- |
+ |
|
Deprecated setting. Use outFile instead.
@@ -1121,8 +1119,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --outDir |
string
|
-
- |
+ |
|
Specify an output folder for all emitted files.
@@ -1132,8 +1129,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --outFile |
string
|
-
- |
+ |
|
Specify a file that bundles all outputs into one JavaScript file. If declaration is true, also designates a file that bundles all .d.ts output.
@@ -1143,8 +1139,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --paths |
object
|
-
- |
+ |
|
Specify a set of entries that re-map imports to additional lookup locations.
@@ -1154,8 +1149,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --plugins |
list
|
-
- |
+ |
|
Specify a list of language service plugins to include.
@@ -1341,208 +1335,215 @@ tsc app.ts util.ts --target esnext --outfile index.js
| --sourceRoot |
string
|
-
- |
+ |
|
Specify the root path for debuggers to find the reference source code.
|
-
- --stopBuildOnErrors |
+
+ --stableTypeOrdering |
boolean
|
-
+ | false
|
|
+ Ensure types are ordered stably and deterministically across compilations.
+ |
+
+
+ --stopBuildOnErrors |
+ boolean
+ |
+ |
+
+|
Skip building downstream projects on error in upstream project.
|
-
+
--strict |
boolean
|
- false
+ | true
|
-|
+ |
|
Enable all strict type-checking options.
|
-
+
--strictBindCallApply |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
Check that the arguments for bind, call, and apply methods match the original function.
|
-
+
--strictBuiltinIteratorReturn |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
Built-in iterators are instantiated with a TReturn type of undefined instead of any.
|
-
+
--strictFunctionTypes |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
When assigning functions, check to ensure parameters and the return values are subtype-compatible.
|
-
+
--strictNullChecks |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
When type checking, take into account null and undefined.
|
-
+
--strictPropertyInitialization |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
Check for class properties that are declared but not set in the constructor.
|
-
+
--stripInternal |
boolean
|
false
|
-|
+ |
|
Disable emitting declarations that have @internal in their JSDoc comments.
|
-
+
--suppressExcessPropertyErrors |
boolean
|
false
|
-|
+ |
|
Disable reporting of excess property errors during the creation of object literals.
|
-
+
--suppressImplicitAnyIndexErrors |
boolean
|
false
|
-|
+ |
|
Suppress noImplicitAny errors when indexing objects that lack index signatures.
|
-
+
--target |
- es3, es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, or esnext
+ | es3, es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, es2025, or esnext
|
es2023 if module is node20; esnext if module is nodenext; ES5 otherwise.
|
-|
+ |
|
Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
|
-
+
--traceResolution |
boolean
|
false
|
-|
+ |
|
Log paths used during the moduleResolution process.
|
-
+
--tsBuildInfoFile |
string
|
.tsbuildinfo
|
-|
+ |
|
The file to store .tsbuildinfo incremental build information in.
|
-
+
--typeRoots |
list
|
-
- |
+ |
-|
+ |
|
Specify multiple folders that act like ./node_modules/@types.
|
-
+
--types |
list
|
-
- |
+ |
-|
+ |
|
Specify type package names to be included without being referenced in a source file.
|
-
+
--useDefineForClassFields |
boolean
|
true if target is ES2022 or higher, including ESNext; false otherwise.
|
-|
+ |
|
Emit ECMAScript-standard-compliant class fields.
|
-
+
--useUnknownInCatchVariables |
boolean
|
true if strict; false otherwise.
|
-|
+ |
|
Default catch clause variables as unknown instead of any.
|
-
+
--verbatimModuleSyntax |
boolean
|
false
|
-|
+ |
|
Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.
|
diff --git a/packages/documentation/copy/en/release-notes/TypeScript 6.0.md b/packages/documentation/copy/en/release-notes/TypeScript 6.0.md
new file mode 100644
index 000000000..4523b88fb
--- /dev/null
+++ b/packages/documentation/copy/en/release-notes/TypeScript 6.0.md
@@ -0,0 +1,785 @@
+---
+title: TypeScript 6.0
+layout: docs
+permalink: /docs/handbook/release-notes/typescript-6-0.html
+oneline: TypeScript 6.0 Release Notes
+---
+
+## Less Context-Sensitivity on `this`-less Functions
+
+When parameters don't have explicit types written out, TypeScript can usually infer them based on an expected type, or even through other arguments in the same function call.
+
+```ts
+declare function callIt(obj: {
+ produce: (x: number) => T,
+ consume: (y: T) => void,
+}): void;
+
+// Works, no issues.
+callIt({
+ produce: (x: number) => x * 2,
+ consume: y => y.toFixed(),
+});
+
+// Works, no issues even though the order of the properties is flipped.
+callIt({
+ consume: y => y.toFixed(),
+ produce: (x: number) => x * 2,
+});
+```
+
+Here, TypeScript can infer the type of `y` in the `consume` function based on the inferred `T` from the `produce` function, regardless of the order of the properties.
+But what about if these functions were written using *method syntax* instead of arrow function syntax?
+
+```ts
+declare function callIt(obj: {
+ produce: (x: number) => T,
+ consume: (y: T) => void,
+}): void;
+
+// Works fine, `x` is inferred to be a number.
+callIt({
+ produce(x: number) { return x * 2; },
+ consume(y) { return y.toFixed(); },
+});
+
+callIt({
+ consume(y) { return y.toFixed(); },
+ // ~
+ // error: 'y' is of type 'unknown'.
+
+ produce(x: number) { return x * 2; },
+});
+```
+
+Strangely enough, the second call to `callIt` results in an error because TypeScript is not able to infer the type of `y` in the `consume` method.
+What's happening here is that when TypeScript is trying to find candidates for `T`, it will first skip over functions whose parameters don't have explicit types.
+It does this because certain functions may need the inferred type of `T` to be correctly checked - in our case, we need to know the type of `T` to analyze our `consume` function.
+
+These functions are called *contextually sensitive functions* - basically, functions that have parameters without explicit types.
+Eventually the type system will need to figure out types for these parameters - but this is a bit at odds with how inference works in generic functions because the two "pull" on types in different directions.
+
+```ts
+function callFunc(callback: (x: T) => void, value: T) {
+ return callback(value);
+}
+
+callFunc(x => x.toFixed(), 42);
+// ^
+// We need to figure out the type of `x` here,
+// but we also need to figure out the type of `T` to check the callback.
+```
+
+To solve this, TypeScript skips over contextually sensitive functions during type argument inference, and instead checks and infers from other arguments first.
+If skipping over contextually sensitive functions doesn't work, inference just continues across any unchecked arguments, going left-to-right in the argument list.
+In the example immediately above, TypeScript will skip over the callback during inference for `T`, but will then look at the second argument, `42`, and infer that `T` is `number`.
+Then, when it comes back to check the callback, it will have a contextual type of `(x: number) => void`, which allows it to infer that `x` is a `number` as well.
+
+So what's going on in our earlier examples?
+
+```ts
+// Arrow syntax - no errors.
+callIt({
+ consume: y => y.toFixed(),
+ produce: (x: number) => x * 2,
+});
+
+// Method syntax - errors!
+callIt({
+ consume(y) { return y.toFixed(); },
+ // ~
+ // error: 'y' is of type 'unknown'.
+
+ produce(x: number) { return x * 2; },
+});
+```
+
+In both examples, `produce` is assigned a function with an explicitly-typed `x` parameter.
+Shouldn't they be checked identically?
+
+The issue is subtle: most functions (like the ones using method syntax) have an implicit `this` parameter, but arrow functions do not.
+Any usage of `this` could require "pulling" on the type of `T` - for example, knowing the type of the containing object literal could in turn require the type of `consume`, which uses `T`.
+
+But we're not using `this`!
+Sure, the function might have a `this` value at runtime, but it's never used!
+
+TypeScript 6.0 takes this into account when it decides if a function is contextually sensitive or not.
+If `this` is never actually *used* in a function, then it is not considered contextually sensitive.
+That means these functions will be seen as higher-priority when it comes to type inference, and all of our examples above now work!
+
+[This change was provided](https://github.com/microsoft/TypeScript/pull/62243) thanks to the work of [Mateusz Burzyński](https://github.com/Andarist).
+
+## Subpath Imports Starting with `#/`
+
+When Node.js added support for modules, it added a feature called ["subpath imports"](https://nodejs.org/api/packages.html#subpath-imports).
+This is basically [a field called `imports`](https://nodejs.org/api/packages.html#imports) which allows packages to create internal aliases for modules within their package.
+
+```json
+{
+ "name": "my-package",
+ "type": "module",
+ "imports": {
+ "#root/*": "./dist/*"
+ }
+}
+```
+
+This allows modules in `my-package` to import from paths starting with `#root/`
+
+```js
+import * as utils from "#root/utils.js";
+```
+
+instead of using a relative path like the following.
+
+```js
+import * as utils from "../../utils.js";
+```
+
+One minor annoyance with this feature has been that developers always had to write *something* after the `#` when specifying a subpath import.
+Here, we used `root`, but it is a bit useless since there is no directory we're mapping over other than `./dist/`
+
+Developers who have used bundlers are also accustomed to using path-mapping to avoid long relative paths.
+A familiar convention with bundlers has been to use a simple `@/` as the prefix.
+Unfortunately, subpath imports could not start with `#/` at all, leading to a lot of confusion for developers trying to adopt them in their projects.
+
+But more recently, [Node.js added support for subpath imports starting with `#/`](https://github.com/nodejs/node/pull/60864).
+This allows packages to use a simple `#/` prefix for their subpath imports without needing to add an extra segment.
+
+```json
+{
+ "name": "my-package",
+ "type": "module",
+ "imports": {
+ "#/*": "./dist/*"
+ }
+}
+```
+
+This is supported in newer Node.js 20 releases, and so TypeScript now supports it under the options `nodenext` and `bundler` for the `--moduleResolution` setting.
+
+This work was done thanks to [magic-akari](https://github.com/magic-akari), and [the implementing pull request can be found here](https://github.com/microsoft/TypeScript/pull/62844).
+
+## Combining `--moduleResolution bundler` with `--module commonjs`
+
+TypeScript's `--moduleResolution bundler` setting was previously only allowed to be used with `--module esnext` or `--module preserve`;
+however, with the deprecation of `--moduleResolution node` (a.k.a. `--moduleResolution node10`), this new combination is often the most suitable upgrade path for many projects.
+
+Projects will often want to instead plan out a migration towards either
+
+* `--module preserve` and `--moduleResolution bundler`
+* `--module nodenext`
+
+depending on your project type (e.g. bundled web app, Bun app, or Node.js app).
+
+More information can be found at [this implementing pull request](https://github.com/microsoft/TypeScript/pull/62320).
+
+## The `--stableTypeOrdering` Flag
+
+As part of our ongoing work on [TypeScript's native port](https://devblogs.microsoft.com/typescript/typescript-native-port/), we've introduced a new flag called `--stableTypeOrdering` intended to assist with 6.0-to-7.0 migrations.
+
+Today, TypeScript assigns type IDs (internal tracking numbers) to types in the order they are encountered, and uses these IDs to sort union types in a consistent manner.
+A similar process occurs for properties.
+As a result, the order in which things are declared in a program can have possibly surprising effects on things like declaration emit.
+
+For example, consider the declaration emit from this file:
+```ts
+// Input: some-file.ts
+export function foo(condition: boolean) {
+ return condition ? 100 : 500;
+}
+
+// Output: some-file.d.ts
+export declare function foo(condition: boolean): 100 | 500;
+// ^^^^^^^^^
+// Note the order of this union: 100, then 500.
+```
+
+If we add an unrelated `const` *above* `foo`, the declaration emit changes:
+
+```ts
+// Input: some-file.ts
+const x = 500;
+export function foo(condition: boolean) {
+ return condition ? 100 : 500;
+}
+
+// Output: some-file.d.ts
+export declare function foo(condition: boolean): 500 | 100;
+// ^^^^^^^^^
+// Note the change in order here.
+```
+
+This happens because the literal type `500` gets a lower type ID than `100` because it was processed first when analyzing the `const x` declaration.
+In very rare cases this change in ordering can even cause errors to appear or disappear based on program processing order, but in general, the main place you might notice this ordering is in the emitted declaration files, or in the way types are displayed in your editor.
+
+One of the major architectural improvements in TypeScript 7 is parallel type checking, which dramatically improves overall check time.
+However, parallelism introduces a challenge: when different type-checkers visit nodes, types, and symbols in different orders, the internal IDs assigned to these constructs become non-deterministic.
+This in turn leads to confusing non-deterministic output, where two files with identical contents in the same program can produce different declaration files, or even calculate different errors when analyzing the same file.
+To fix this, TypeScript 7.0 sorts its internal objects (e.g. types and symbols) according to a deterministic algorithm based on the content of the object.
+This ensures that all checkers encounter the same object order regardless of how and when they were created.
+As a consequence, in the given example, TypeScript 7 will *always* print `100 | 500`, removing the ordering instability entirely.
+
+This means that TypeScript 6 and 7 can and do sometimes display different ordering.
+While these ordering changes are almost always benign, if you're comparing compiler outputs between runs (for example, checking emitted declaration files in 6.0 vs 7.0), these different orderings can produce a lot of noise that makes it difficult to assess correctness.
+Occasionally though, you may witness a change in ordering that causes a type error to appear or disappear, which can be even more confusing.
+
+To help with this situation, in 6.0, you can specify the new `--stableTypeOrdering` flag.
+This makes 6.0's type ordering behavior match 7.0's, reducing the number of differences between the two codebases.
+Note that we don't necessarily encourage using this flag all the time as it can add a substantial slowdown to type-checking (up to 25% depending on codebase).
+
+If you encounter a type error using `--stableTypeOrdering`, this is typically due to inference differences.
+The previous inference without `--stableTypeOrdering` *happened* to work based on the current ordering of types in your program.
+To help with this, you'll often benefit from providing an explicit type somewhere.
+Often, this will be a type argument
+
+```diff
+- someFunctionCall(/*...*/);
++ someFunctionCall(/*...*/);
+```
+
+or a variable annotation for an argument you intend to pass into a call.
+
+```diff
+- const someVariable = { /*... some complex object ...*/ };
++ const someVariable: SomeExplicitType = { /*... some complex object ...*/ };
+
+someFunctionCall(someVariable);
+```
+
+**Note that this flag is only intended to help diagnose differences between 6.0 and 7.0 - it is not intended to be used as a long-term feature**
+
+[See more at this pull-request](https://github.com/microsoft/TypeScript/pull/63084).
+
+## `es2025` option for `target` and `lib`
+
+TypeScript 6.0 adds support for the `es2025` option for both `target` and `lib`.
+While there are no new JavaScript language features in ES2025, this new target adds new types for built-in APIs (e.g. `RegExp.escape`), and moves a few declarations from `esnext` into `es2025` (e.g. `Promise.try`, `Iterator` methods, and `Set` methods).
+Work to enable [the new target](https://github.com/microsoft/TypeScript/pull/63046) was contributed thanks to [Kenta Moriuchi](https://github.com/petamoriken).
+
+## New Types for `Temporal`
+
+The long-awaited [Temporal proposal](https://github.com/tc39/proposal-temporal) has reached stage 4 and will be part of a future ECMAScript standard.
+TypeScript 6.0 now includes built-in types for the Temporal API, so you can start using it in your TypeScript code today via `--target esnext` or `"lib": ["esnext"]` (or the more-granular `esnext.temporal`).
+
+```ts
+let yesterday = Temporal.Now.instant().subtract({
+ hours: 24,
+});
+
+let tomorrow = Temporal.Now.instant().add({
+ hours: 24,
+});
+
+console.log(`Yesterday: ${yesterday}`);
+console.log(`Tomorrow: ${tomorrow}`);
+```
+
+Temporal is already usable in several runtimes, and with stage 4 status it is now officially part of the JavaScript language.
+[Documentation on the Temporal APIs is available on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal).
+
+[This work](https://github.com/microsoft/TypeScript/pull/62628) was contributed thanks to GitHub user [Renegade334](https://github.com/Renegade334).
+
+## New Types for "upsert" Methods (a.k.a. `getOrInsert`)
+
+A common pattern with `Map`s is to check if a key exists, and if not, set and fetch a default value.
+
+```ts
+function processOptions(compilerOptions: Map) {
+ let strictValue: unknown;
+ if (compilerOptions.has("strict")) {
+ strictValue = compilerOptions.get("strict");
+ }
+ else {
+ strictValue = true;
+ compilerOptions.set("strict", strictValue);
+ }
+ // ...
+}
+```
+
+This pattern can be tedious.
+[ECMAScript's "upsert" proposal](https://github.com/tc39/proposal-upsert) recently reached stage 4, and introduces 2 new methods on `Map` and `WeakMap`:
+
+- `getOrInsert`
+- `getOrInsertComputed`
+
+These methods have been added to the `esnext` lib so that you can start using them immediately in TypeScript 6.0.
+
+With `getOrInsert`, we can replace our code above with the following:
+
+```ts
+function processOptions(compilerOptions: Map) {
+ let strictValue = compilerOptions.getOrInsert("strict", true);
+ // ...
+}
+```
+
+`getOrInsertComputed` works similarly, but is for cases where the default value may be expensive to compute (e.g. requires lots of computations, allocations, or does long-running synchronous I/O).
+Instead, it takes a callback that will only be called if the key is not already present.
+
+```ts
+someMap.getOrInsertComputed("someKey", () => {
+ return computeSomeExpensiveValue(/*...*/);
+});
+```
+
+This callback is also given the key as an argument, which can be useful for cases where the default value is based on the key.
+
+```ts
+someMap.getOrInsertComputed(someKey, computeSomeExpensiveDefaultValue);
+
+function computeSomeExpensiveValue(key: string) {
+ // ...
+}
+```
+
+[This update](https://github.com/microsoft/TypeScript/pull/62612) was contributed thanks to GitHub user [Renegade334](https://github.com/Renegade334).
+
+## `RegExp.escape`
+
+When constructing some literal string to match within a regular expression, it is important to escape special regular expression characters like `*`, `+`, `?`, `(`, `)`, etc.
+The [RegExp Escaping ECMAScript proposal](https://github.com/tc39/proposal-regex-escaping) has reached stage 4, and introduces a new `RegExp.escape` function that takes care of this for you.
+
+```ts
+function matchWholeWord(word: string, text: string) {
+ const escapedWord = RegExp.escape(word);
+ const regex = new RegExp(`\\b${escapedWord}\\b`, "g");
+ return text.match(regex);
+}
+```
+
+`RegExp.escape` is available in the `es2025` lib, so you can start using it in TypeScript 6.0 today.
+
+[This work](https://github.com/microsoft/TypeScript/pull/63046) was contributed thanks [Kenta Moriuchi](https://github.com/petamoriken).
+
+## The `dom` lib Now Contains `dom.iterable` and `dom.asynciterable`
+
+TypeScript's `lib` option allows you to specify which global declarations your target runtime has.
+One option is `dom` to represent web environments (i.e. browsers, who implement [the DOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model)).
+Previously, the DOM APIs were partially split out into `dom.iterable` and `dom.asynciterable` for environments that didn't support `Iterable`s and `AsyncIterable`s.
+This meant that you had to explicitly add `dom.iterable` to use iteration methods on DOM collections like `NodeList` or `HTMLCollection`.
+
+In TypeScript 6.0, the contents of `lib.dom.iterable.d.ts` and `lib.dom.asynciterable.d.ts` are fully included in `lib.dom.d.ts`.
+You can still reference `dom.iterable` and `dom.asynciterable` in your configuration file's `"lib"` array, but they are now just empty files.
+
+```ts
+// Before TypeScript 6.0, this required "lib": ["dom", "dom.iterable"]
+// Now it works with just "lib": ["dom"]
+for (const element of document.querySelectorAll("div")) {
+ console.log(element.textContent);
+}
+```
+
+This is a quality-of-life improvement that eliminates a common point of confusion, since no major modern browser lacks these capabilities.
+If you were already including both `dom` and `dom.iterable`, you can now simplify to just `dom`.
+
+See more [at this issue](https://github.com/microsoft/TypeScript/issues/60959) and its [corresponding pull request](https://github.com/microsoft/TypeScript/pull/62111).
+
+## Breaking Changes and Deprecations in TypeScript 6.0
+
+TypeScript 6.0 arrives as a significant transition release, designed to prepare developers for TypeScript 7.0, the upcoming native port of the TypeScript compiler.
+While TypeScript 6.0 maintains full compatibility with your existing TypeScript knowledge and continues to be API compatible with TypeScript 5.9, this release introduces a number of breaking changes and deprecations that reflect the evolving JavaScript ecosystem and set the stage for TypeScript 7.0.
+
+In the two years since TypeScript 5.0, we've seen ongoing shifts in how developers write and ship JavaScript:
+
+- Virtually every runtime environment is now "evergreen". True legacy environments (ES5) are vanishingly rare.
+- Bundlers and ESM have become the most common module targets for new projects, though CommonJS remains a major target. AMD and other in-browser userland module systems are much rarer than they were in 2012.
+- Almost all packages can be consumed through some module system. UMD packages still exist, but virtually no new code is available *only* as a global variable.
+- `tsconfig.json` is nearly universal as a configuration mechanism.
+- Appetite for "stricter" typing continues to grow.
+- TypeScript build performance is top of mind. Despite the gains of TypeScript 7, performance must always remain a key goal, and options which can't be supported in a performant way need to be more strongly justified.
+
+So TypeScript 6.0 and 7.0 are designed with these realities in mind.
+For TypeScript 6.0, these deprecations can be ignored by setting `"ignoreDeprecations": "6.0"` in your tsconfig; however, note that TypeScript 7.0 *will not* support any of these deprecated options.
+
+Some necessary adjustments can be automatically performed with a codemod or tool.
+For example, the [experimental `ts5to6` tool](https://github.com/andrewbranch/ts5to6) can automatically adjust `baseUrl` and `rootDir` across your codebase.
+
+### Up-Front Adjustments
+
+We'll cover specific adjustments below, but we have to note that some deprecations and behavior changes do not necessarily have an error message that directly points to the underlying issue.
+So we'll note up-front that **many projects will need to do at least one of the following**:
+
+* Set the `"types"` array in tsconfig, typically to `"types": ["node"]`.
+
+ `"types": ["*"]` will restore the 5.9 behavior, but we recommend using an explicit array to improve build performance and predictability.
+
+ You'll typically know this is the issue if you see a *lot* of type errors related to missing identifiers or unresolved built-in modules.
+* Set `"rootDir": "./src"` if you were previously relying on this being inferred
+
+ You'll often know this is the issue if you see files being written to `./dist/src/index.js` instead of `./dist/index.js`.
+
+### Simple Default Changes
+
+Several compiler options now have updated default values that better reflect modern development practices.
+
+- **`strict` is now `true` by default**:
+ The appetite for stricter typing continues to grow, and we've found that most new projects want `strict` mode enabled.
+ If you were already using `"strict": true`, nothing changes for you.
+ If you were relying on the previous default of `false`, you'll need to explicitly set `"strict": false` in your `tsconfig.json`.
+
+- **`module` defaults to `esnext`**:
+ Similarly, the new default `module` is `esnext`, acknowledging that ESM is now the dominant module format.
+
+- **`target` defaults to current-year ES version**:
+ The new default `target` is the most recent supported ECMAScript spec version (effectively a floating target).
+ Right now, that target is `es2025`.
+ This reflects the reality that most developers are shipping to evergreen runtimes and don't need to compile down to older ECMAScript versions.
+
+- **`noUncheckedSideEffectImports` is now `true` by default**:
+ This helps catch issues with typos in side-effect-only imports.
+
+- **`libReplacement` is now `false` by default**:
+ This flag previously incurred a large number of failed module resolutions for every run, which in turn increased the number of locations we needed to watch under `--watch` and editor scenarios.
+ In a new project, `libReplacement` never does anything until other explicit configuration takes place, so it makes sense to turn this off by default for the sake of better performance by default.
+
+If these new defaults break your project, you can specify the previous values explicitly in your `tsconfig.json`.
+
+### `rootDir` now defaults to `.`
+
+`rootDir` controls the directory structure of your output files relative to the output directory.
+Previously, if you did not specify a `rootDir`, it was inferred based on the common directory of all non-declaration input files.
+But this often meant that it was impossible to know if a file belonged to a project without trying to load and parse that project.
+It also meant that TypeScript had to spend more time inferring that common source directory by analyzing every file path in the program.
+
+In TypeScript 6.0, the default `rootDir` will always be the directory containing the `tsconfig.json` file.
+`rootDir` will only be inferred when using `tsc` from the command line without a `tsconfig.json` file.
+
+If you have source files any level deeper than your `tsconfig.json` directory and were relying on TypeScript to infer a common root directory for source files, you'll need to explicitly set `rootDir`:
+
+```diff
+ {
+ "compilerOptions": {
+ // ...
++ "rootDir": "./src"
+ },
+ "include": ["./src"]
+ }
+```
+
+Likewise, if your `tsconfig.json` referenced files outside of the containing `tsconfig.json`, you would need to adjust your `rootDir` to include those files.
+
+```diff
+ {
+ "compilerOptions": {
+ // ...
++ "rootDir": "../src"
+ },
+ "include": ["../src/**/*.tests.ts"]
+ }
+```
+
+See more at [the discussion here](https://github.com/microsoft/TypeScript/issues/62194) and [the implementation here](https://github.com/microsoft/TypeScript/pull/62418).
+
+### `types` now defaults to `[]`
+
+In a `tsconfig.json`, the `types` field of `compilerOptions` specifies a list of package names to be included in the global scope during compilation.
+Typically, packages in `node_modules` are automatically included via imports in your source code;
+but for convenience, TypeScript would also include all packages in `node_modules/@types` by default, so that you can get global declarations like `process` or the `"fs"` module from `@types/node`, or `describe` and `it` from `@types/jest`, without needing to import them directly.
+
+In a sense, the `types` value previously defaulted to "enumerate everything in `node_modules/@types`".
+This can be *very* expensive, as a normal repository setup these days might transitively pull in hundreds of `@types` packages, especially in multi-project workspaces with flattened `node_modules`.
+Modern projects almost always need only `@types/node`, `@types/jest`, or a handful of other common global-affecting packages.
+
+In TypeScript 6.0, the default `types` value will be `[]` (an empty array).
+This change prevents projects from unintentionally pulling in hundreds or even thousands of unneeded declaration files at build time.
+Many projects we've looked at have improved their build time anywhere from 20-50% just by setting `types` appropriately.
+
+**This will affect many projects.** You will likely need to add `"types": ["node"]` or a few others:
+
+```diff
+ {
+ "compilerOptions": {
+ // Explicitly list the @types packages you need
++ "types": ["node", "jest"]
+ }
+ }
+```
+
+You can also specify a `*` entry to re-enable the old enumeration behavior:
+
+```diff
+ {
+ "compilerOptions": {
+ // Load ALL the types - the default from TypeScript 5.9 and before.
++ "types": ["*"]
+ }
+ }
+```
+
+If you end up with new error messages like the following:
+
+```
+Cannot find module '...' or its corresponding type declarations.
+Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
+Cannot find name 'path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
+Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
+Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig.
+Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
+```
+
+it's likely that you need to add some entries to your `types` field.
+
+See more at [the proposal here](https://github.com/microsoft/TypeScript/issues/62195) along with [the implementing pull request here](https://github.com/microsoft/TypeScript/pull/63054).
+
+### Deprecated: `target: es5`
+
+The ECMAScript 5 target was important for a long time to support legacy browsers; but its successor, ECMAScript 2015 (ES6), was released over a decade ago, and all modern browsers have supported it for many years.
+With Internet Explorer's retirement, and the universality of evergreen browsers, there are very few use cases for ES5 output today.
+
+TypeScript's lowest target will now be ES2015, and the `target: es5` option is deprecated. If you were using `target: es5`, you'll need to migrate to a newer target or use an external compiler.
+If you still need ES5 output, we recommend using an external compiler to either directly compile your TypeScript source, or to post-process TypeScript's outputs.
+
+[See more about this deprecation here](https://github.com/microsoft/TypeScript/issues/62196) along with [its implementing pull request](https://github.com/microsoft/TypeScript/pull/63067).
+
+### Deprecated: `--downlevelIteration`
+
+`--downlevelIteration` only has effects on ES5 emit, and since `--target es5` has been deprecated, `--downlevelIteration` no longer serves a purpose.
+
+Subtly, using `--downlevelIteration false` with `--target es2015` did not error in TypeScript 5.9 and earlier, even though it had no effect.
+In TypeScript 6.0, setting `--downlevelIteration` at all will lead to a deprecation error.
+
+See [the implementation here](https://github.com/microsoft/TypeScript/pull/63071).
+
+### Deprecated: `--moduleResolution node` (a.k.a. `--moduleResolution node10`)
+
+`--moduleResolution node` encoded a specific version of Node.js's module resolution algorithm that most-accurately reflected the behavior of Node.js 10.
+Unfortunately, this target (and its name) ignores many updates to Node.js's resolution algorithm that have occurred since then, and it is no longer a good representation of the behavior of modern Node.js versions.
+
+In TypeScript 6.0, `--moduleResolution node` (specifically, `--moduleResolution node10`) is deprecated.
+Users who were using `--moduleResolution node` should usually migrate to `--moduleResolution nodenext` if they plan on targeting Node.js directly, or `--moduleResolution bundler` if they plan on using a bundler or Bun.
+
+See more [at this issue](https://github.com/microsoft/TypeScript/issues/62200) and [its corresponding pull request](https://github.com/microsoft/TypeScript/pull/62338).
+
+### Deprecated: `amd`, `umd`, and `systemjs` values of `module`
+
+The following flag values are no longer supported
+
+- `--module amd`
+- `--module umd`
+- `--module systemjs`
+- `--module none`
+
+AMD, UMD, and SystemJS were important during the early days of JavaScript modules when browsers lacked native module support.
+The semantics of "none" were never well-defined and often led to confusion.
+Today, ESM is universally supported in browsers and Node.js, and both import maps and bundlers have become favored ways for filling in the gaps.
+If you're still targeting these module systems, consider migrating to an appropriate ECMAScript module-emitting target, adopt a bundler or different compiler, or stay on TypeScript 5.x until you can migrate.
+
+This also implies dropped support for the `amd-module` directive, which will no longer have any effect.
+
+See more at [the proposal issue](https://github.com/microsoft/TypeScript/issues/62199) along with [the implementing pull request](https://github.com/microsoft/TypeScript/pull/62669).
+
+### Deprecated: `--baseUrl`
+
+The `baseUrl` option is most-commonly used in conjunction with `paths`, and is typically used as a prefix for every value in `paths`.
+Unfortunately, `baseUrl` is also considered a look-up root for module resolution.
+
+For example, given the following `tsconfig.json`
+
+```json5
+{
+ "compilerOptions": {
+ // ...
+ "baseUrl": "./src",
+ "paths": {
+ "@app/*": ["app/*"],
+ "@lib/*": ["lib/*"]
+ }
+ }
+}
+```
+
+and an import like
+
+```ts
+import * as someModule from "someModule.js";
+```
+
+TypeScript will probably resolve this to `src/someModule.js`, even if the developer only intended to add mappings for modules starting with `@app/` and `@lib/`.
+
+In the best case, this also often leads to "worse-looking" paths that bundlers would ignore;
+but it often meant that that many import paths that would never have worked at runtime are considered "just fine" by TypeScript.
+
+`path` mappings have not required specifying `baseUrl` for a long time, and in practice, most projects that use `baseUrl` only use it as a prefix for their `paths` entries.
+In TypeScript 6.0, `baseUrl` is deprecated and will no longer be considered a look-up root for module resolution.
+
+Developers who used `baseUrl` as a prefix for path-mapping entries can simply remove `baseUrl` and add the prefix to their `paths` entries:
+
+```diff json5
+ {
+ "compilerOptions": {
+ // ...
+- "baseUrl": "./src",
+ "paths": {
+- "@app/*": ["app/*"],
+- "@lib/*": ["lib/*"]
++ "@app/*": ["./src/app/*"],
++ "@lib/*": ["./src/lib/*"]
+ }
+ }
+ }
+```
+
+Developers who actually *did* use `baseUrl` as a look-up root can also add an explicit path mapping to preserve the old behavior:
+
+```json5
+{
+ "compilerOptions": {
+ // ...
+ "paths": {
+ // A new catch-all that replaces the baseUrl:
+ "*": ["./src/*"],
+
+ // Every other path now has an explicit common prefix:
+ "@app/*": ["./src/app/*"],
+ "@lib/*": ["./src/lib/*"],
+ }
+ }
+}
+```
+
+However, this is extremely rare.
+We recommend most developers simply remove `baseUrl` and add the appropriate prefixes to their `paths` entries.
+
+See more [at this issue](https://github.com/microsoft/TypeScript/issues/62207) and [the corresponding pull request](https://github.com/microsoft/TypeScript/pull/62509).
+
+### Deprecated: `--moduleResolution classic`
+
+The `moduleResolution: classic` setting has been removed.
+The `classic` resolution strategy was TypeScript's original module resolution algorithm, and predates Node.js's resolution algorithm becoming a de facto standard.
+Today, all practical use cases are served by `nodenext` or `bundler`.
+If you were using `classic`, migrate to one of these modern resolution strategies.
+
+See more at [this issue](https://github.com/microsoft/TypeScript/issues/62206) and [the implementing pull request](https://github.com/microsoft/TypeScript/pull/62669).
+
+### Deprecated: `--esModuleInterop false` and `--allowSyntheticDefaultImports false`
+
+The following settings can no longer be set to `false`:
+
+- `esModuleInterop`
+- `allowSyntheticDefaultImports`
+
+`esModuleInterop` and `allowSyntheticDefaultImports` were originally opt-in to avoid breaking existing projects.
+However, the behavior they enable has been the recommended default for years.
+Setting them to `false` often led to subtle runtime issues when consuming CommonJS modules from ESM.
+In TypeScript 6.0, the safer interop behavior is always enabled.
+
+If you have imports that rely on the old behavior, you may need to adjust them:
+
+```ts
+// Before (with esModuleInterop: false)
+import * as express from "express";
+
+// After (with esModuleInterop always enabled)
+import express from "express";
+```
+
+See more at [this issue](https://github.com/microsoft/TypeScript/issues/62529) and [its implementing pull request](https://github.com/microsoft/TypeScript/pull/62567).
+
+### Deprecated: `--alwaysStrict false`
+
+The `alwaysStrict` flag refers to inference and emit of the `"use strict";` directive.
+In TypeScript 6.0, all code will be assumed to be in [JavaScript strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode), which is a set of JS semantics that most-noticeably affects syntactic corner cases around reserved words.
+If you have "sloppy mode" code that uses reserved words like `await`, `static`, `private`, or `public` as regular identifiers, you'll need to rename them.
+If you relied on subtle semantics around the meaning of `this` in non-strict code, you may need to adjust your code as well.
+
+See more [at this issue](https://github.com/microsoft/TypeScript/issues/62213) and [its corresponding pull request](https://github.com/microsoft/TypeScript/pull/63089).
+
+### Deprecated: `outFile`
+
+The `--outFile` option has been removed from TypeScript 6.0. This option was originally designed to concatenate multiple input files into a single output file. However, external bundlers like Webpack, Rollup, esbuild, Vite, Parcel, and others now do this job faster, better, and with far more configurability. Removing this option simplifies the implementation and allows us to focus on what TypeScript does best: type-checking and declaration emit. If you're currently using `--outFile`, you'll need to migrate to an external bundler. Most modern bundlers have excellent TypeScript support out of the box.
+
+### Deprecated: legacy `module` Syntax for namespaces
+
+Early versions of TypeScript used the `module` keyword to declare namespaces:
+
+```ts
+// ❌ Deprecated syntax - now an error
+module Foo {
+ export const bar = 10;
+}
+```
+
+This syntax was later aliased to the modern preferred form using the `namespace` keyword:
+
+```ts
+// ✅ The correct syntax
+namespace Foo {
+ export const bar = 10;
+}
+```
+
+When `namespace` was introduced, the `module` syntax was simply discouraged.
+A few years ago, the TypeScript language service started marking the keyword as deprecated, suggesting `namespace` in its place.
+
+In TypeScript 6.0, using `module` where `namespace` is expected is now a hard deprecation.
+This change is necessary because `module` blocks are a potential ECMAScript proposal that would conflict with the legacy TypeScript syntax.
+
+The ambient module declaration form remains fully supported:
+
+```ts
+// ✅ Still works perfectly
+declare module "some-module" {
+ export function doSomething(): void;
+}
+```
+
+See [this issue](https://github.com/microsoft/TypeScript/issues/62211) and its [corresponding pull request](https://github.com/microsoft/TypeScript/pull/62876) for more details.
+
+### Deprecated: `asserts` Keyword on Imports
+
+The `asserts` keyword was proposed to the JavaScript language via the import assertions proposal;
+however, the proposal eventually morphed into [the import attributes proposal](https://github.com/tc39/proposal-import-attributes), which uses the `with` keyword instead of `asserts`.
+
+Thus, the `asserts` syntax is now deprecated in TypeScript 6.0, and using it will lead to an error:
+
+```ts
+// ❌ Deprecated syntax - now an error.
+import blob from "./blahb.json" asserts { type: "json" }
+// ~~~~~~~
+// error: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'.
+```
+
+Instead, use the `with` syntax for import attributes:
+
+```ts
+// ✅ Works with the new import attributes syntax.
+import blob from "./blahb.json" with { type: "json" }
+```
+
+See more at [this issue](https://github.com/microsoft/TypeScript/issues/62210) and its [corresponding pull request](https://github.com/microsoft/TypeScript/pull/63077).
+
+
+### Deprecated: `no-default-lib` Directives
+
+The `/// ` directive has been largely misunderstood and misused.
+In TypeScript 6.0, this directive is no longer supported.
+If you were using it, consider using `--noLib` or `--libReplacement` instead.
+
+[See more here](https://github.com/microsoft/TypeScript/issues/62209) and at [the corresponding pull request](https://github.com/microsoft/TypeScript/pull/62435).
+
+### Specifying Command-Line Files When `tsconfig.json` Exists is Now an Error
+
+Currently, if you run `tsc foo.ts` in a folder where a `tsconfig.json` exists, the config file is completely ignored.
+This was often very confusing if you expected checking and emit options to apply to the input file.
+
+In TypeScript 6.0, if you run `tsc` with file arguments in a directory containing a `tsconfig.json`, an error will be issued to make this behavior explicit:
+
+```
+error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.
+```
+
+If it is the case that you wanted to ignore the `tsconfig.json` and just compile `foo.ts` with TypeScript's defaults, you can use the new `--ignoreConfig` flag.
+
+```sh
+tsc --ignoreConfig foo.ts
+```
+
+See more [at this issue](https://github.com/microsoft/TypeScript/issues/62197) and its [corresponding pull request](https://github.com/microsoft/TypeScript/pull/62477).
+
+## Preparing for TypeScript 7.0
+
+TypeScript 6.0 is designed as a transition release.
+While options deprecated in TypeScript 6.0 will continue to work without errors when `"ignoreDeprecations": "6.0"` is set, those options will be **removed entirely in TypeScript 7.0** (the native TypeScript port).
+If you're seeing deprecation warnings after upgrading to TypeScript 6.0, we strongly recommend addressing them before adopting TypeScript 7.0 (or trying [native previews](https://www.npmjs.com/package/@typescript/native-preview)) in your project.
diff --git a/packages/documentation/scripts/types/AllFilenames.d.ts b/packages/documentation/scripts/types/AllFilenames.d.ts
index bc06bcfe1..c91226c7b 100644
--- a/packages/documentation/scripts/types/AllFilenames.d.ts
+++ b/packages/documentation/scripts/types/AllFilenames.d.ts
@@ -132,6 +132,7 @@ export type AllDocsPages =
| "release-notes/TypeScript 5.7.md"
| "release-notes/TypeScript 5.8.md"
| "release-notes/TypeScript 5.9.md"
+ | "release-notes/TypeScript 6.0.md"
| "tutorials/ASP.NET Core.md"
| "tutorials/Angular.md"
| "tutorials/Babel with TypeScript.md"
diff --git a/packages/glossary/package.json b/packages/glossary/package.json
index 665e12bb0..c3ce1aeec 100644
--- a/packages/glossary/package.json
+++ b/packages/glossary/package.json
@@ -14,6 +14,6 @@
"semi": true
},
"devDependencies": {
- "ts-node": "*"
+ "ts-node": "^10.9.2"
}
}
diff --git a/packages/glossary/tsconfig.json b/packages/glossary/tsconfig.json
index e2cd60109..60b27f4cf 100644
--- a/packages/glossary/tsconfig.json
+++ b/packages/glossary/tsconfig.json
@@ -2,6 +2,7 @@
"compilerOptions": {
"resolveJsonModule": true,
"allowJs": true,
- "types": ["*"]
+ "noEmit": true,
+ "types": ["node"]
}
}
diff --git a/packages/playground-examples/package.json b/packages/playground-examples/package.json
index df6ea1739..4de14f3d3 100644
--- a/packages/playground-examples/package.json
+++ b/packages/playground-examples/package.json
@@ -9,7 +9,7 @@
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
- "fs-extra": "^11.2.0",
+ "fs-extra": "^11.3.3",
"json5": "^2.2.3"
}
}
diff --git a/packages/playground-worker/package.json b/packages/playground-worker/package.json
index c5bdb62ab..d91678200 100644
--- a/packages/playground-worker/package.json
+++ b/packages/playground-worker/package.json
@@ -7,7 +7,7 @@
"build": "esbuild index.ts --outdir=../typescriptlang-org/static/js/playground-worker --format=esm --target=es2020 --bundle"
},
"dependencies": {
- "esbuild": "^0.17.8"
+ "esbuild": "^0.27.3"
},
"devDependencies": {
"typescript": "*"
diff --git a/packages/playground/package.json b/packages/playground/package.json
index e3a862f30..1387e40e5 100644
--- a/packages/playground/package.json
+++ b/packages/playground/package.json
@@ -17,14 +17,14 @@
"dependencies": {
"@typescript/playground-worker": "workspace:*",
"@typescript/sandbox": "workspace:*",
- "esbuild": "^0.17.8"
+ "esbuild": "^0.27.3"
},
"devDependencies": {
- "@types/jest": "^29.5.12",
- "@types/react": "^18.3.2",
- "jest": "^29.5.0",
+ "@types/jest": "^30.0.0",
+ "@types/react": "^18.3.28",
+ "jest": "^30.2.0",
"monaco-editor": "^0.32.1",
- "monaco-typescript": "^3.7.0",
+ "monaco-typescript": "^4.10.0",
"typescript": "*"
}
}
diff --git a/packages/playground/src/createConfigDropdown.ts b/packages/playground/src/createConfigDropdown.ts
index 11be14f64..f67f8e38a 100644
--- a/packages/playground/src/createConfigDropdown.ts
+++ b/packages/playground/src/createConfigDropdown.ts
@@ -106,7 +106,11 @@ export const createConfigDropdown = (sandbox: Sandbox, monaco: Monaco) => {
.forEach(categoryID => {
const categoryDiv = document.createElement("div")
const header = document.createElement("h4")
+ const headerId = "category-header-" + categoryID
+ header.id = headerId
const ol = document.createElement("ol")
+ ol.setAttribute("role", "group")
+ ol.setAttribute("aria-labelledby", headerId)
Object.keys(categoryMap[categoryID]).forEach(optID => {
const optSummary = categoryMap[categoryID][optID]
diff --git a/packages/sandbox/CHANGELOG.md b/packages/sandbox/CHANGELOG.md
index 1060f3e49..06ca2a55b 100644
--- a/packages/sandbox/CHANGELOG.md
+++ b/packages/sandbox/CHANGELOG.md
@@ -1,5 +1,24 @@
# @typescript/sandbox
+## 0.1.14
+
+### Patch Changes
+
+- [#3523](https://github.com/microsoft/TypeScript-Website/pull/3523) [`9953d5b`](https://github.com/microsoft/TypeScript-Website/commit/9953d5bf9168335e3ddad7b1752b3213f3f9a636) Thanks [@Josh-Cena](https://github.com/Josh-Cena)! - getInitialCode should not use URL hash without full prefix
+
+## 0.1.13
+
+### Patch Changes
+
+- [#3505](https://github.com/microsoft/TypeScript-Website/pull/3505) [`2072484`](https://github.com/microsoft/TypeScript-Website/commit/20724842b6eaf09f5c5d0ee40272c5569fe5c37d) Thanks [@DanielRosenwasser](https://github.com/DanielRosenwasser)! - Fix Ctrl+arrow keys in Firefox.
+
+## 0.1.12
+
+### Patch Changes
+
+- Updated dependencies [[`0daa298`](https://github.com/microsoft/TypeScript-Website/commit/0daa298f2f4526f8c66baff00b8df0290e37a4d4)]:
+ - @typescript/vfs@1.6.4
+
## 0.1.11
### Patch Changes
diff --git a/packages/sandbox/package.json b/packages/sandbox/package.json
index ee79a2a5e..1a0d64130 100644
--- a/packages/sandbox/package.json
+++ b/packages/sandbox/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript/sandbox",
- "version": "0.1.11",
+ "version": "0.1.14",
"license": "MIT",
"author": "TypeScript team",
"homepage": "https://github.com/microsoft/TypeScript-Website",
@@ -48,13 +48,13 @@
"lz-string": "^1.5.0"
},
"devDependencies": {
- "@rollup/plugin-commonjs": "^25.0.7",
- "@types/jest": "^29.5.12",
+ "@rollup/plugin-commonjs": "^29.0.0",
+ "@types/jest": "^30.0.0",
"dts-cli": "^2.0.5",
- "jest": "^29.5.0",
+ "jest": "^30.2.0",
"monaco-editor": "^0.32.1",
- "monaco-typescript": "^3.7.0",
- "ts-jest": "^29.0.5",
+ "monaco-typescript": "^4.10.0",
+ "ts-jest": "^29.4.6",
"typescript": "*"
}
}
diff --git a/packages/sandbox/src/getInitialCode.ts b/packages/sandbox/src/getInitialCode.ts
index 3e712c091..9190fdea2 100644
--- a/packages/sandbox/src/getInitialCode.ts
+++ b/packages/sandbox/src/getInitialCode.ts
@@ -7,13 +7,13 @@ import lzstring from "./vendor/lzstring.min"
*/
export const getInitialCode = (fallback: string, location: Location) => {
// Old school support
- if (location.hash.startsWith("#src")) {
+ if (location.hash.startsWith("#src=")) {
const code = location.hash.replace("#src=", "").trim()
return decodeURIComponent(code)
}
// New school support
- if (location.hash.startsWith("#code")) {
+ if (location.hash.startsWith("#code/")) {
const code = location.hash.replace("#code/", "").trim()
let userCode = lzstring.decompressFromEncodedURIComponent(code)
// Fallback incase there is an extra level of decoding:
diff --git a/packages/sandbox/src/index.ts b/packages/sandbox/src/index.ts
index b60c9ad51..0ac59d19c 100644
--- a/packages/sandbox/src/index.ts
+++ b/packages/sandbox/src/index.ts
@@ -77,7 +77,7 @@ const sharedEditorOptions: import("monaco-editor").editor.IEditorOptions = {
},
acceptSuggestionOnCommitCharacter: !isAndroid,
acceptSuggestionOnEnter: !isAndroid ? "on" : "off",
- accessibilitySupport: !isAndroid ? "on" : "off",
+ accessibilitySupport: !isAndroid ? "auto" : "off",
inlayHints: {
enabled: true,
},
diff --git a/packages/ts-twoslasher/CHANGELOG.md b/packages/ts-twoslasher/CHANGELOG.md
index 0aaa98f2a..8da7e06c3 100644
--- a/packages/ts-twoslasher/CHANGELOG.md
+++ b/packages/ts-twoslasher/CHANGELOG.md
@@ -1,5 +1,14 @@
# @typescript/twoslash
+## 3.2.12
+
+### Patch Changes
+
+- [#3509](https://github.com/microsoft/TypeScript-Website/pull/3509) [`0daa298`](https://github.com/microsoft/TypeScript-Website/commit/0daa298f2f4526f8c66baff00b8df0290e37a4d4) Thanks [@jakebailey](https://github.com/jakebailey)! - Bump dependencies
+
+- Updated dependencies [[`0daa298`](https://github.com/microsoft/TypeScript-Website/commit/0daa298f2f4526f8c66baff00b8df0290e37a4d4)]:
+ - @typescript/vfs@1.6.4
+
## 3.2.11
### Patch Changes
diff --git a/packages/ts-twoslasher/package.json b/packages/ts-twoslasher/package.json
index c9098c5a2..6bebc395b 100755
--- a/packages/ts-twoslasher/package.json
+++ b/packages/ts-twoslasher/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript/twoslash",
- "version": "3.2.11",
+ "version": "3.2.12",
"license": "MIT",
"author": "TypeScript team",
"homepage": "https://github.com/microsoft/TypeScript-Website",
@@ -28,16 +28,14 @@
"lint": "dts lint"
},
"devDependencies": {
- "@types/jest": "^29.5.12",
- "@types/prettier": "^2.7.3",
+ "@types/jest": "^30.0.0",
"dts-cli": "^2.0.5",
- "jest": "^29.5.0",
- "jest-file-snapshot": "^0.3.8",
- "markdown-magic": "^1.0.0",
- "preact": "^10.5.13",
- "prettier": "^2.3.2",
- "ts-jest": "^29.0.5",
- "tslib": "^2.6.2",
+ "jest": "^30.2.0",
+ "jest-file-snapshot": "^0.7.0",
+ "markdown-magic": "^4.8.0",
+ "preact": "^10.28.3",
+ "ts-jest": "^29.4.6",
+ "tslib": "^2.8.1",
"typescript": "*"
},
"jest": {
@@ -53,7 +51,7 @@
},
"dependencies": {
"@typescript/vfs": "workspace:*",
- "debug": "^4.1.1",
+ "debug": "^4.4.3",
"lz-string": "^1.5.0"
},
"peerDependencies": {
diff --git a/packages/tsconfig-reference/data/_types.ts b/packages/tsconfig-reference/data/_types.ts
index 1b10e7de3..270b6b8f0 100644
--- a/packages/tsconfig-reference/data/_types.ts
+++ b/packages/tsconfig-reference/data/_types.ts
@@ -30,6 +30,7 @@ export type CompilerOptionName =
| "project"
| "showConfig"
| "listFilesOnly"
+ | "ignoreConfig"
| "target"
| "module"
| "lib"
@@ -57,6 +58,7 @@ export type CompilerOptionName =
| "strictBindCallApply"
| "strictPropertyInitialization"
| "strictBuiltinIteratorReturn"
+ | "stableTypeOrdering"
| "noImplicitThis"
| "useUnknownInCatchVariables"
| "alwaysStrict"
diff --git a/packages/tsconfig-reference/package.json b/packages/tsconfig-reference/package.json
index e16ae25ff..cc54552f6 100644
--- a/packages/tsconfig-reference/package.json
+++ b/packages/tsconfig-reference/package.json
@@ -4,14 +4,14 @@
"license": "MIT",
"private": true,
"scripts": {
- "generate:json:tsconfig": "tsc --build && node --experimental-json-modules scripts/tsconfig/generateJSON",
- "generate:json:cli": "tsc --build && node --experimental-json-modules scripts/cli/generateJSON",
- "generate:json:schema": "tsc --build && node --experimental-json-modules scripts/schema/generateJSON",
- "generate:json:msbuild": "tsc --build && node --experimental-json-modules scripts/msbuild/generateJSON",
+ "generate:json:tsconfig": "tsc --build && node scripts/tsconfig/generateJSON",
+ "generate:json:cli": "tsc --build && node scripts/cli/generateJSON",
+ "generate:json:schema": "tsc --build && node scripts/schema/generateJSON",
+ "generate:json:msbuild": "tsc --build && node scripts/msbuild/generateJSON",
"generate:json": "pnpm generate:json:tsconfig && pnpm generate:json:cli && pnpm generate:json:schema && pnpm generate:json:msbuild",
- "generate:md:tsconfig": "tsc --build && node --experimental-json-modules scripts/tsconfig/generateMarkdown",
- "generate:md:cli": "tsc --build && node --experimental-json-modules scripts/cli/generateMarkdown",
- "generate:md:msbuild": "tsc --build && node --experimental-json-modules scripts/msbuild/generateMarkdown",
+ "generate:md:tsconfig": "tsc --build && node scripts/tsconfig/generateMarkdown",
+ "generate:md:cli": "tsc --build && node scripts/cli/generateMarkdown",
+ "generate:md:msbuild": "tsc --build && node scripts/msbuild/generateMarkdown",
"generate:md": "pnpm generate:md:tsconfig && pnpm generate:md:cli && pnpm generate:md:tsconfig",
"download": "node scripts/schema/downloadSchemaBase.js",
"bootstrap": "pnpm generate:json",
@@ -25,9 +25,9 @@
},
"devDependencies": {
"@types/json-schema": "^7.0.15",
- "ts-node": "*",
+ "ts-node": "^10.9.2",
"typescript": "*",
- "typescript-for-docs": "npm:typescript@5.9.3",
+ "typescript-for-docs": "npm:typescript@6.0.2",
"xml-js": "^1.6.11"
},
"type": "module"
diff --git a/packages/tsconfig-reference/scripts/schema/generateJSON.ts b/packages/tsconfig-reference/scripts/schema/generateJSON.ts
index 70aefb454..b66ce4f2f 100644
--- a/packages/tsconfig-reference/scripts/schema/generateJSON.ts
+++ b/packages/tsconfig-reference/scripts/schema/generateJSON.ts
@@ -63,6 +63,7 @@ const okToSkip = [
"out",
"references",
"typeAcquisition",
+ "stableTypeOrdering",
];
filteredOptions.forEach((option) => {
diff --git a/packages/tsconfig-reference/scripts/schema/result/schema.json b/packages/tsconfig-reference/scripts/schema/result/schema.json
index b8b907491..b61aa9157 100644
--- a/packages/tsconfig-reference/scripts/schema/result/schema.json
+++ b/packages/tsconfig-reference/scripts/schema/result/schema.json
@@ -589,6 +589,7 @@
"es2022",
"es2023",
"es2024",
+ "es2025",
"ESNext"
]
},
@@ -780,6 +781,7 @@
"es2022",
"es2023",
"es2024",
+ "es2025",
"ESNext",
"DOM",
"DOM.Iterable",
@@ -845,29 +847,38 @@
"es2024.regexp",
"es2024.sharedmemory",
"es2024.string",
- "ESNext.Array",
- "esnext.collection",
- "ESNext.Symbol",
+ "es2025.collection",
+ "es2025.float16",
+ "es2025.intl",
+ "es2025.iterator",
+ "es2025.promise",
+ "es2025.regexp",
"ESNext.AsyncIterable",
- "ESNext.Intl",
- "esnext.disposable",
+ "ESNext.Symbol",
"ESNext.BigInt",
- "ESNext.String",
- "ESNext.Promise",
"ESNext.WeakRef",
- "esnext.decorators",
"esnext.object",
"esnext.regexp",
- "esnext.iterator",
+ "ESNext.String",
"esnext.float16",
+ "esnext.iterator",
+ "ESNext.Promise",
+ "ESNext.Array",
+ "esnext.collection",
+ "esnext.date",
+ "esnext.decorators",
+ "esnext.disposable",
"esnext.error",
+ "ESNext.Intl",
"esnext.sharedmemory",
+ "esnext.temporal",
+ "esnext.typedarrays",
"decorators",
"decorators.legacy"
]
},
{
- "pattern": "^(?:[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]2015|[Ee][Ss]7|[Ee][Ss]2016|[Ee][Ss]2017|[Ee][Ss]2018|[Ee][Ss]2019|[Ee][Ss]2020|[Ee][Ss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ss][Nn][Ee][Xx][Tt]\\.[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Aa][Rr][Rr][Aa][Yy]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Dd][Aa][Tt][Ee]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Dd][Ee][Cc][Oo][Rr][Aa][Tt][Oo][Rr][Ss]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Dd][Ii][Ss][Pp][Oo][Ss][Aa][Bb][Ll][Ee]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Ee][Rr][Rr][Oo][Rr]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Ii][Nn][Tt][Ll]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Tt][Ee][Mm][Pp][Oo][Rr][Aa][Ll]|[Ee][Ss][Nn][Ee][Xx][Tt]\\.[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]|[Dd][Ee][Cc][Oo][Rr][Aa][Tt][Oo][Rr][Ss]|[Dd][Ee][Cc][Oo][Rr][Aa][Tt][Oo][Rr][Ss]\\.[Ll][Ee][Gg][Aa][Cc][Yy])$"
}
]
},
diff --git a/packages/tsconfig-reference/scripts/tsconfig/generateMarkdown.ts b/packages/tsconfig-reference/scripts/tsconfig/generateMarkdown.ts
index fd06599cf..a72b51173 100644
--- a/packages/tsconfig-reference/scripts/tsconfig/generateMarkdown.ts
+++ b/packages/tsconfig-reference/scripts/tsconfig/generateMarkdown.ts
@@ -67,12 +67,15 @@ assert.deepEqual(got, expected, `Expected to find everything in ${orderedCategor
const notCompilerOptions = ["Project_Files_0", "Watch_Options_999"];
const categoriesForCompilerOpts = orderedCategories.filter((c) => !notCompilerOptions.includes(c));
+const hiddenOptions = ["stableTypeOrdering"];
+
const compilerOptions = options.filter(
(o) =>
!typeAcquisitionCompilerOptNames.includes(o.name) &&
!watchOptionCompilerOptNames.includes(o.name) &&
!buildOptionCompilerOptNames.includes(o.name) &&
- !rootOptNames.includes(o.name)
+ !rootOptNames.includes(o.name) &&
+ !hiddenOptions.includes(o.name)
);
// The TSConfig Reference is a collection of sections which have options or
diff --git a/packages/typescript-vfs/CHANGELOG.md b/packages/typescript-vfs/CHANGELOG.md
index 44a0a6853..2db411d0f 100644
--- a/packages/typescript-vfs/CHANGELOG.md
+++ b/packages/typescript-vfs/CHANGELOG.md
@@ -1,5 +1,11 @@
# @typescript/vfs
+## 1.6.4
+
+### Patch Changes
+
+- [#3509](https://github.com/microsoft/TypeScript-Website/pull/3509) [`0daa298`](https://github.com/microsoft/TypeScript-Website/commit/0daa298f2f4526f8c66baff00b8df0290e37a4d4) Thanks [@jakebailey](https://github.com/jakebailey)! - Bump dependencies
+
## 1.6.3
### Patch Changes
diff --git a/packages/typescript-vfs/package.json b/packages/typescript-vfs/package.json
index fd05d40f1..59b4b769f 100755
--- a/packages/typescript-vfs/package.json
+++ b/packages/typescript-vfs/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript/vfs",
- "version": "1.6.3",
+ "version": "1.6.4",
"license": "MIT",
"author": "TypeScript team",
"homepage": "https://github.com/microsoft/TypeScript-Website",
@@ -22,7 +22,7 @@
"start": "dts watch",
"bootstrap": "pnpm build",
"build": "dts build && pnpm make-for-website && pnpm make-global",
- "make-for-website": "cpy src/index.ts ../sandbox/src/vendor --rename=typescript-vfs.ts",
+ "make-for-website": "cpy src/index.ts ../sandbox/src/vendor --flat --rename=typescript-vfs.ts",
"make-global": "node scripts/makeGlobals.js",
"test": "dts test",
"lint": "dts lint"
@@ -41,18 +41,18 @@
"typescript": false
},
"dependencies": {
- "debug": "^4.1.1"
+ "debug": "^4.4.3"
},
"devDependencies": {
- "@types/jest": "^29.5.12",
- "babel-jest": "^29.7.0",
- "cpy-cli": "^3.1.1",
+ "@types/jest": "^30.0.0",
+ "babel-jest": "^30.2.0",
+ "cpy-cli": "^7.0.0",
"dts-cli": "^2.0.5",
- "jest": "^29.5.0",
- "jest-environment-jsdom": "^29.5.0",
- "jest-watch-typeahead": "^2.2.2",
- "ts-jest": "^29.0.5",
- "tslib": "^2.6.2",
+ "jest": "^30.2.0",
+ "jest-environment-jsdom": "^30.2.0",
+ "jest-watch-typeahead": "^3.0.1",
+ "ts-jest": "^29.4.6",
+ "tslib": "^2.8.1",
"typescript": "*"
},
"peerDependencies": {
diff --git a/packages/typescript-vfs/test/index.test.ts b/packages/typescript-vfs/test/index.test.ts
index 9c2a1d8bd..0ba7ed6fd 100644
--- a/packages/typescript-vfs/test/index.test.ts
+++ b/packages/typescript-vfs/test/index.test.ts
@@ -135,7 +135,7 @@ it("creates a map from the CDN and stores it in local storage cache", async () =
libs.forEach(l => expect(map.get("/" + l)).toBeDefined())
- expect(store.setItem).toBeCalledTimes(libs.length)
+ expect(store.setItem).toHaveBeenCalledTimes(libs.length)
})
it("creates a map from the CDN and uses the existing local storage cache", async () => {
@@ -160,7 +160,7 @@ it("creates a map from the CDN and uses the existing local storage cache", async
libs.forEach(l => expect(map.get("/" + l)).toBeDefined())
// Should be one less fetch, and the first item would be from the cache instead
- expect(store.setItem).toBeCalledTimes(libs.length - 1)
+ expect(store.setItem).toHaveBeenCalledTimes(libs.length - 1)
expect(map.get("/" + libs[0])).toMatchInlineSnapshot(`"// From Cache"`)
})
diff --git a/packages/typescriptlang-org/gatsby-config.js b/packages/typescriptlang-org/gatsby-config.js
index 300c3aca2..e6b3cf3e5 100644
--- a/packages/typescriptlang-org/gatsby-config.js
+++ b/packages/typescriptlang-org/gatsby-config.js
@@ -49,9 +49,6 @@ module.exports = {
},
},
- // Support for downloading or pre-caching pages, needed for PWAs
- // "gatsby-plugin-offline",
-
// Creates TS types for queries during `gatsby dev`
{
resolve: "gatsby-plugin-typegen",
diff --git a/packages/typescriptlang-org/gatsby-node.js b/packages/typescriptlang-org/gatsby-node.js
index cc0c00616..8bdc232d6 100644
--- a/packages/typescriptlang-org/gatsby-node.js
+++ b/packages/typescriptlang-org/gatsby-node.js
@@ -19,6 +19,8 @@ config.onPostBootstrap = () => writeAllPathsToFixture();
// see: https://github.com/gatsbyjs/gatsby/issues/17661
config.onCreateWebpackConfig = ({ loaders, actions, plugins, stage }) => {
+ const isSSR = stage === `build-html` || stage === `develop-html`;
+
actions.setWebpackConfig({
module: {
rules: [
@@ -32,6 +34,10 @@ config.onCreateWebpackConfig = ({ loaders, actions, plugins, stage }) => {
pnpapi: "commonjs pnpapi",
fs: "commonjs fs",
module: "commonjs module",
+ // In SSR stages, use Node's native util module instead of the browser
+ // polyfill (util@0.12.5), which lacks TextEncoder and breaks react-dom
+ // server rendering on Node >= 19.
+ ...(isSSR ? { util: "commonjs util" } : {}),
},
resolve: {
fallback: {
diff --git a/packages/typescriptlang-org/gatsby-ssr.js b/packages/typescriptlang-org/gatsby-ssr.js
index 065df32d5..cabc24676 100644
--- a/packages/typescriptlang-org/gatsby-ssr.js
+++ b/packages/typescriptlang-org/gatsby-ssr.js
@@ -2,7 +2,7 @@
// is set up, to let react-intl do its work with RichText in
// a message: https://github.com/formatjs/react-intl/issues/1438#issuecomment-523153456
-global.DOMParser = require("xmldom").DOMParser
+global.DOMParser = require("@xmldom/xmldom").DOMParser
const React = require("react")
exports.wrapRootElement = ({ element }) => {
diff --git a/packages/typescriptlang-org/package.json b/packages/typescriptlang-org/package.json
index 358ecc8d1..5e09f4d12 100644
--- a/packages/typescriptlang-org/package.json
+++ b/packages/typescriptlang-org/package.json
@@ -18,61 +18,57 @@
"test": "pnpm tsc && jest"
},
"dependencies": {
- "@babel/core": "^7.24.5",
- "@formatjs/intl-relativetimeformat": "^4.5.15",
- "@types/react-helmet": "^5.0.15",
+ "@babel/core": "^7.29.0",
+ "@types/react-helmet": "^6.1.11",
"@typescript/playground": "workspace:*",
"@typescript/sandbox": "workspace:*",
"@typescript/twoslash": "workspace:*",
"@typescript/vfs": "workspace:*",
- "gatsby": "^5.13.5",
- "gatsby-link": "5.6.0",
- "gatsby-plugin-catch-links": "^5.6.0",
+ "gatsby": "^5.16.1",
+ "gatsby-link": "5.16.0",
+ "gatsby-plugin-catch-links": "^5.16.0",
"gatsby-plugin-client-side-redirect": "^1.1.0",
"gatsby-plugin-i18n": "^1.0.1",
- "gatsby-plugin-manifest": "^5.6.0",
- "gatsby-plugin-offline": "^6.6.0",
- "gatsby-plugin-react-helmet": "^6.6.0",
- "gatsby-plugin-sass": "^6.6.0",
- "gatsby-plugin-sharp": "^5.6.0",
- "gatsby-plugin-sitemap": "^6.6.0",
- "gatsby-react-router-scroll": "6.6.0",
- "gatsby-remark-autolink-headers": "^6.6.0",
- "gatsby-remark-copy-linked-files": "^6.6.0",
- "gatsby-remark-emojis": "^0.4.3",
- "gatsby-remark-images": "^7.6.0",
- "gatsby-remark-responsive-iframe": "^6.6.0",
- "gatsby-remark-shiki-twoslash": "^3.0.36",
- "gatsby-remark-smartypants": "^6.6.0",
- "gatsby-source-filesystem": "^5.6.0",
- "gatsby-transformer-remark": "^6.6.0",
+ "gatsby-plugin-manifest": "^5.16.0",
+ "gatsby-plugin-react-helmet": "^6.16.0",
+ "gatsby-plugin-sass": "^6.16.0",
+ "gatsby-plugin-sharp": "^5.16.0",
+ "gatsby-plugin-sitemap": "^6.16.0",
+ "gatsby-remark-autolink-headers": "^6.16.0",
+ "gatsby-remark-copy-linked-files": "^6.16.0",
+ "gatsby-remark-images": "^7.16.0",
+ "gatsby-remark-responsive-iframe": "^6.16.0",
+ "gatsby-remark-shiki-twoslash": "^3.0.38",
+ "gatsby-remark-smartypants": "^6.16.0",
+ "gatsby-source-filesystem": "^5.16.0",
+ "gatsby-transformer-remark": "^6.16.0",
"github-slugger": "^1.5.0",
- "jsdom": "^16.2.0",
+ "jsdom": "^28.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0",
- "react-intl": "^3.12.1",
- "sass": "^1.26.10",
+ "react-intl": "^7.1.14",
+ "sass": "^1.97.3",
"shiki-twoslash": "^3.1.2",
- "ts-debounce": "^2.2.0",
- "ts-node": "^10.9.1",
- "twoslash-cli": "^1.3.22",
+ "ts-debounce": "^4.0.0",
+ "ts-node": "^10.9.2",
+ "twoslash-cli": "^1.3.24",
"typescript": "*",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
- "@types/jest": "^29.5.12",
- "@types/react": "^18.3.2",
- "@types/react-dom": "^18.3.0",
+ "@types/jest": "^30.0.0",
+ "@types/react": "^18.3.28",
+ "@types/react-dom": "^18.3.7",
+ "@xmldom/xmldom": "^0.8.11",
"gatsby-plugin-typegen": "^3.1.0",
- "gatsby-plugin-typescript": "^5.6.0",
- "jest": "^29.5.0",
+ "gatsby-plugin-typescript": "^5.16.0",
+ "jest": "^30.2.0",
"monaco-editor": "^0.32.1",
- "node-polyfill-webpack-plugin": "^3.0.0",
- "semver": "^7.6.2",
- "ts-jest": "^29.0.5",
- "xmldom": "^0.5.0"
+ "node-polyfill-webpack-plugin": "^4.1.0",
+ "semver": "^7.7.4",
+ "ts-jest": "^29.4.6"
},
"jest": {
"preset": "ts-jest",
diff --git a/packages/typescriptlang-org/src/components/layout/Sidebar.scss b/packages/typescriptlang-org/src/components/layout/Sidebar.scss
index 0f1eaa478..24ac4b986 100644
--- a/packages/typescriptlang-org/src/components/layout/Sidebar.scss
+++ b/packages/typescriptlang-org/src/components/layout/Sidebar.scss
@@ -183,7 +183,7 @@ nav#sidebar {
bottom: 120px;
padding: 10px;
margin-bottom: env(safe-area-inset-bottom);
- background-color: #c4c4c4;
+ background-color: #808080;
border-radius: 6px;
z-index: $z-index-for-handbook-nav-button;
@@ -209,6 +209,7 @@ nav#sidebar {
z-index: $z-index-for-handbook-nav;
margin-left: -800px;
width: 90%;
+ visibility: hidden;
ul {
padding-bottom: 200px;
@@ -223,6 +224,7 @@ nav#sidebar {
&.show {
margin-left: 0px;
+ visibility: visible;
}
& > ul > li,
diff --git a/packages/typescriptlang-org/src/components/layout/Sidebar.tsx b/packages/typescriptlang-org/src/components/layout/Sidebar.tsx
index 3d8d830fe..59af224f8 100644
--- a/packages/typescriptlang-org/src/components/layout/Sidebar.tsx
+++ b/packages/typescriptlang-org/src/components/layout/Sidebar.tsx
@@ -44,17 +44,21 @@ const toggleNavigationSection: MouseEventHandler = (event) => {
export const SidebarToggleButton = () => {
const toggleClick = () => {
const navSidebar = document.getElementById("sidebar")
+ const toggleButton = document.getElementById("small-device-button-sidebar")
const isOpen = navSidebar?.classList.contains("show")
if (isOpen) {
navSidebar?.classList.remove("show")
+ navSidebar?.setAttribute("inert", "")
+ toggleButton?.focus()
} else {
navSidebar?.classList.add("show")
+ navSidebar?.removeAttribute("inert")
}
}
return (
-