From 4f02af01177bbd2782067d21280b3f028c78ab08 Mon Sep 17 00:00:00 2001 From: jameshanford Date: Wed, 21 Oct 2026 22:15:49 +1000 Subject: [PATCH 1/3] [api-extractor] Upgrade bundled TypeScript to 6.0.3 --- apps/api-extractor/package.json | 2 +- .../src/analyzer/TypeScriptInternals.ts | 12 ++++----- .../ts-6_2026-10-21-12-14-47.json | 10 +++++++ .../build-tests-subspace/pnpm-lock.yaml | 8 +++--- .../build-tests-subspace/repo-state.json | 4 +-- .../subspaces/default/common-versions.json | 2 +- .../config/subspaces/default/pnpm-lock.yaml | 27 ++++++++++++------- .../config/subspaces/default/repo-state.json | 2 +- 8 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 common/changes/@microsoft/api-extractor/ts-6_2026-10-21-12-14-47.json diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index 727242e5309..6dcd59482bb 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -78,7 +78,7 @@ "resolve": "~1.22.1", "semver": "~7.7.4", "source-map": "~0.6.1", - "typescript": "5.9.3" + "typescript": "6.0.3" }, "devDependencies": { "@rushstack/heft": "1.3.3", diff --git a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts index 88059f26e80..7906e8df542 100644 --- a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts +++ b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts @@ -17,7 +17,7 @@ export interface IGlobalVariableAnalyzer { export class TypeScriptInternals { public static getImmediateAliasedSymbol(symbol: ts.Symbol, typeChecker: ts.TypeChecker): ts.Symbol { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v5.9.3/src/compiler/checker.ts + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/checker.ts return (typeChecker as any).getImmediateAliasedSymbol(symbol); } @@ -61,7 +61,7 @@ export class TypeScriptInternals { */ public static getJSDocCommentRanges(node: ts.Node, text: string): ts.CommentRange[] | undefined { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v5.9.3/src/compiler/utilities.ts#L2710 + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/utilities.ts#L2763 return (ts as any).getJSDocCommentRanges.apply(this, arguments); } @@ -73,7 +73,7 @@ export class TypeScriptInternals { node: ts.Identifier | ts.StringLiteralLike | ts.NumericLiteral ): string { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v5.9.3/src/compiler/utilities.ts#L5368 + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/utilities.ts#L5439 return (ts as any).getTextOfIdentifierOrLiteral(node); } @@ -89,7 +89,7 @@ export class TypeScriptInternals { mode: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined ): ts.ResolvedModuleFull | undefined { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v5.9.3/src/compiler/types.ts#L5064 + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/types.ts#L5056 const result: ts.ResolvedModuleWithFailedLookupLocations | undefined = (program as any).getResolvedModule( sourceFile, moduleNameText, @@ -107,7 +107,7 @@ export class TypeScriptInternals { compilerOptions: ts.CompilerOptions ): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v5.9.3/src/compiler/program.ts#L932 + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/program.ts#L932 return ts.getModeForUsageLocation?.(file, usage, compilerOptions); } @@ -150,7 +150,7 @@ export class TypeScriptInternals { * Returns whether a variable is declared with the const keyword */ public static isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { - // Compiler internal: https://github.com/microsoft/TypeScript/blob/71286e3d49c10e0e99faac360a6bbd40f12db7b6/src/compiler/utilities.ts#L925 + // Compiler internal: https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/utilities.ts#L2677 return (ts as any).isVarConst(node); } } diff --git a/common/changes/@microsoft/api-extractor/ts-6_2026-10-21-12-14-47.json b/common/changes/@microsoft/api-extractor/ts-6_2026-10-21-12-14-47.json new file mode 100644 index 00000000000..8fece359d7f --- /dev/null +++ b/common/changes/@microsoft/api-extractor/ts-6_2026-10-21-12-14-47.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Upgrade the bundled compiler engine to TypeScript 6.0.3", + "type": "minor" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file diff --git a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml index e48386e7e5f..e299d72a126 100644 --- a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml +++ b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml @@ -3588,8 +3588,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + typescript@6.0.3: + resolution: {integrity: sha1-kCUdwAeRbpcnhsuU100VsYVXfSE=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typescript/-/typescript-6.0.3.tgz} engines: {node: '>=14.17'} hasBin: true @@ -4351,7 +4351,7 @@ snapshots: resolve: 1.22.11 semver: 7.7.4 source-map: 0.6.1 - typescript: 5.9.3 + typescript: 6.0.3 transitivePeerDependencies: - '@types/node' @@ -8203,7 +8203,7 @@ snapshots: typescript@5.8.3: {} - typescript@5.9.3: {} + typescript@6.0.3: {} unbox-primitive@1.1.0: dependencies: diff --git a/common/config/subspaces/build-tests-subspace/repo-state.json b/common/config/subspaces/build-tests-subspace/repo-state.json index c55410af062..8ab32eb876d 100644 --- a/common/config/subspaces/build-tests-subspace/repo-state.json +++ b/common/config/subspaces/build-tests-subspace/repo-state.json @@ -1,6 +1,6 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "77334f3044ae8f350cc38031dc8902c5fef466df", + "pnpmShrinkwrapHash": "517586379117f21706ed44488ff0813f77a1cde4", "preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9", - "packageJsonInjectedDependenciesHash": "dcb9a4c88f5e9d450f7afb9a4b686850ce152453" + "packageJsonInjectedDependenciesHash": "f91103d8175484315a07766c30c725d132567cb7" } diff --git a/common/config/subspaces/default/common-versions.json b/common/config/subspaces/default/common-versions.json index 40fc6f8597a..d337fc5d548 100644 --- a/common/config/subspaces/default/common-versions.json +++ b/common/config/subspaces/default/common-versions.json @@ -108,7 +108,7 @@ "5.8.2", // API Extractor bundles a specific TypeScript version because it calls internal APIs - "5.9.3" + "6.0.3" ], "source-map": [ "~0.6.1" // API Extractor is using an older version of source-map because newer versions are async diff --git a/common/config/subspaces/default/pnpm-lock.yaml b/common/config/subspaces/default/pnpm-lock.yaml index 8fcb6ae40f7..ce6b61990cb 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -98,8 +98,8 @@ importers: specifier: ~0.6.1 version: 0.6.1 typescript: - specifier: 5.9.3 - version: 5.9.3 + specifier: 6.0.3 + version: 6.0.3 devDependencies: '@rushstack/heft': specifier: 1.3.3 @@ -10279,7 +10279,7 @@ packages: libc: [glibc] '@swc/core-linux-arm64-musl@1.7.10': - resolution: {integrity: sha1-vJgIuyS6Ek++l3KQGadFvV6IWas=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.10.tgz} + resolution: {integrity: sha512-PUi50bkNqnBL3Z/Zq6jSfwgN9A/taA6u2Zou0tjDJi7oVdpjdr7SxNgCGzMJ/nNg5D/IQn1opM1jktMvpsPAuQ==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.10.tgz} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -17509,7 +17509,7 @@ packages: hasBin: true sass-embedded-android-arm64@1.85.1: - resolution: {integrity: sha1-HKnF4G6hqOz3T/f76mcXBs/lAyA=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.85.1.tgz} + resolution: {integrity: sha512-27oRheqNA3SJM2hAxpVbs7mCKUwKPWmEEhyiNFpBINb5ELVLg+Ck5RsGg+SJmo130ul5YX0vinmVB5uPWc8X5w==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [arm64] os: [android] @@ -17527,7 +17527,7 @@ packages: os: [android] sass-embedded-android-riscv64@1.85.1: - resolution: {integrity: sha1-sgJKrrdUVAEb0qOujuTKwnO15xE=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.85.1.tgz} + resolution: {integrity: sha512-IP6OijpJ8Mqo7XqCe0LsuZVbAxEFVboa0kXqqR5K55LebEplsTIA2GnmRyMay3Yr/2FVGsZbCb6Wlgkw23eCiA==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [riscv64] os: [android] @@ -17545,7 +17545,7 @@ packages: os: [darwin] sass-embedded-darwin-x64@1.85.1: - resolution: {integrity: sha1-FH7PSb8tGC295s7zN6WKBbepOrE=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.85.1.tgz} + resolution: {integrity: sha512-J4UFHUiyI9Z+mwYMwz11Ky9TYr3hY1fCxeQddjNGL/+ovldtb0yAIHvoVM0BGprQDm5JqhtUk8KyJ3RMJqpaAA==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [x64] os: [darwin] @@ -17557,7 +17557,7 @@ packages: os: [linux] sass-embedded-linux-arm@1.85.1: - resolution: {integrity: sha1-iZy6lLc+sRn2Q0aInkZt4xtvXTw=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.85.1.tgz} + resolution: {integrity: sha512-X0fDh95nNSw1wfRlnkE4oscoEA5Au4nnk785s9jghPFkTBg+A+5uB6trCjf0fM22+Iw6kiP4YYmDdw3BqxAKLQ==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] @@ -17581,13 +17581,13 @@ packages: os: [linux] sass-embedded-linux-musl-ia32@1.85.1: - resolution: {integrity: sha1-BwYJr9mc0Pnq5yGGyfSi0M32lE0=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.85.1.tgz} + resolution: {integrity: sha512-N1093T84zQJor1yyIAdYScB5eAuQarGK1tKgZ4uTnxVlgA7Xi1lXV8Eh7ox9sDqKCaWkVQ3MjqU26vYRBeRWyw==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [ia32] os: [linux] sass-embedded-linux-musl-riscv64@1.85.1: - resolution: {integrity: sha1-D0JkvkAnfXzBgUnJ4PA68JVi5vc=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.85.1.tgz} + resolution: {integrity: sha512-WRsZS/7qlfYXsa93FBpSruieuURIu7ySfFhzYfF1IbKrNAGwmbduutkHZh2ddm5/vQMvQ0Rdosgv+CslaQHMcw==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.85.1.tgz} engines: {node: '>=14.0.0'} cpu: [riscv64] os: [linux] @@ -18669,7 +18669,12 @@ packages: hasBin: true typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + resolution: {integrity: sha1-W09Z4VMQqxeiFvXWz1PuR27eZw8=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typescript/-/typescript-5.9.3.tgz} + engines: {node: '>=14.17'} + hasBin: true + + typescript@6.0.3: + resolution: {integrity: sha1-kCUdwAeRbpcnhsuU100VsYVXfSE=, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typescript/-/typescript-6.0.3.tgz} engines: {node: '>=14.17'} hasBin: true @@ -37853,6 +37858,8 @@ snapshots: typescript@5.9.3: {} + typescript@6.0.3: {} + uc.micro@2.1.0: {} ufo@1.6.3: {} diff --git a/common/config/subspaces/default/repo-state.json b/common/config/subspaces/default/repo-state.json index 5694a332b30..3395d0c9953 100644 --- a/common/config/subspaces/default/repo-state.json +++ b/common/config/subspaces/default/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "5ed0eabdfff6ff042769698020ac33348d56a95b", + "pnpmShrinkwrapHash": "b07ed464dc8949da7ba2c10d1ac2a97f291c842f", "preferredVersionsHash": "029c99bd6e65c5e1f25e2848340509811ff9753c" } From 5fb61651c3f0a928c5a8abbc5cc919be51c119f6 Mon Sep 17 00:00:00 2001 From: jameshanford Date: Thu, 22 Oct 2026 01:09:34 +1000 Subject: [PATCH 2/3] fix mcp sdk types module resolution --- .../src/pluginFramework/RushMcpPluginLoader.ts | 2 +- .../src/pluginFramework/RushMcpPluginSession.ts | 2 +- apps/rush-mcp-server/src/pluginFramework/zodTypes.ts | 2 +- apps/rush-mcp-server/src/tools/base.tool.ts | 6 +++--- .../mcp-server/ts-6_2026-10-21-15-08-56.json | 10 ++++++++++ common/reviews/api/mcp-server.api.md | 2 +- 6 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json diff --git a/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts b/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts index e0599ad3bb2..c882db3ab38 100644 --- a/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts +++ b/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts @@ -3,7 +3,7 @@ import * as path from 'node:path'; -import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; +import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { FileSystem, Import, JsonFile, type JsonObject, JsonSchema } from '@rushstack/node-core-library'; import { Autoinstaller } from '@rushstack/rush-sdk/lib/logic/Autoinstaller'; diff --git a/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginSession.ts b/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginSession.ts index 0599f96a82d..16a8dd017f6 100644 --- a/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginSession.ts +++ b/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginSession.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import * as zod from 'zod'; -import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; +import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import type { IRushMcpTool } from './IRushMcpTool'; import type { zodModule } from './zodTypes'; diff --git a/apps/rush-mcp-server/src/pluginFramework/zodTypes.ts b/apps/rush-mcp-server/src/pluginFramework/zodTypes.ts index 80dbfa01a51..5eeff785d24 100644 --- a/apps/rush-mcp-server/src/pluginFramework/zodTypes.ts +++ b/apps/rush-mcp-server/src/pluginFramework/zodTypes.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import type * as zod from 'zod'; -import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types'; +import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js'; export type { zod as zodModule }; export { CallToolResultSchema }; diff --git a/apps/rush-mcp-server/src/tools/base.tool.ts b/apps/rush-mcp-server/src/tools/base.tool.ts index b491af3975d..bd08c22a1c6 100644 --- a/apps/rush-mcp-server/src/tools/base.tool.ts +++ b/apps/rush-mcp-server/src/tools/base.tool.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; -import type { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol'; +import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; +import type { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol.js'; import type { CallToolResultSchema, ServerNotification, ServerRequest -} from '@modelcontextprotocol/sdk/types'; +} from '@modelcontextprotocol/sdk/types.js'; import type { z, ZodRawShape, ZodTypeAny } from 'zod'; export type CallToolResult = z.infer; diff --git a/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json b/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json new file mode 100644 index 00000000000..1e20c474dee --- /dev/null +++ b/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/mcp-server", + "comment": "Fix MCP SDK imports to support modern TypeScript module resolution.", + "type": "patch" + } + ], + "packageName": "@rushstack/mcp-server" +} \ No newline at end of file diff --git a/common/reviews/api/mcp-server.api.md b/common/reviews/api/mcp-server.api.md index 5903120d31a..7a4d0205f9f 100644 --- a/common/reviews/api/mcp-server.api.md +++ b/common/reviews/api/mcp-server.api.md @@ -4,7 +4,7 @@ ```ts -import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types'; +import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js'; import type * as zodModule from 'zod'; // @public (undocumented) From 99815fcdf1320f56757519ef5700436d0a1b3fbc Mon Sep 17 00:00:00 2001 From: James Hanford Date: Thu, 22 Oct 2026 08:52:00 +1000 Subject: [PATCH 3/3] Update common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json Co-authored-by: Ian Clanton-Thuon --- .../@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json b/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json index 1e20c474dee..827fb92cfee 100644 --- a/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json +++ b/common/changes/@rushstack/mcp-server/ts-6_2026-10-21-15-08-56.json @@ -2,8 +2,8 @@ "changes": [ { "packageName": "@rushstack/mcp-server", - "comment": "Fix MCP SDK imports to support modern TypeScript module resolution.", - "type": "patch" + "comment": "", + "type": "none" } ], "packageName": "@rushstack/mcp-server"