From 133fcb9a1a2bf4c90fa25cebf7ffcb2ddce318e1 Mon Sep 17 00:00:00 2001 From: hl662 <50554904+hl662@users.noreply.github.com> Date: Fri, 19 Jun 2026 17:01:07 -0400 Subject: [PATCH 1/4] feat(api-extractor): upgrade bundled TypeScript to 6.0.x Bump the bundled compiler from 5.9.3 to 6.0.3. The 6.0 compiler produces byte-identical api-extractor output, so no golden snapshots changed. - pin typescript 5.9.3 -> 6.0.3 in apps/api-extractor - add 6.0.3 to common-versions allowed alternatives (keep 5.9.3, still required by the published @microsoft/api-extractor pulled in transitively) - retarget TypeScriptInternals source-pointer comments to the v6.0.3 tag - regenerate lockfiles / repo-state for the default and build-tests subspaces Internals validated against v6.0.3: getDiagnosticsProducingTypeChecker was removed but the existing getTypeChecker fallback handles it; all other shims unchanged. The TS1540 grammar diagnostic that broke #5793 does not appear in this repo's build-tests graph. While here (Boy Scout cleanup, motivated by the internals review): - remove the dead `getDiagnosticsProducingTypeChecker ?? getTypeChecker` branch in getGlobalVariableAnalyzer. That API was removed from the compiler in TypeScript 4.7 when the dual type-checker was unified, so the fallback has been dead since api-extractor bundled 4.7+; simplify to the public Program.getTypeChecker(). Behavior-preserving. - add TypeScriptInternals.test.ts, a regression test that pins the getTypeChecker -> getEmitResolver -> hasGlobalName internal chain (catches silent semantic drift on a future compiler bump, which the existence-only InternalError guards do not). Refs #5052, #5319. Supersedes #5793. --- apps/api-extractor/package.json | 2 +- .../src/analyzer/TypeScriptInternals.ts | 24 +++--- .../analyzer/test/TypeScriptInternals.test.ts | 77 +++++++++++++++++++ ...tractor-typescript-6_2026-06-19-15-31.json | 11 +++ .../build-tests-subspace/pnpm-lock.yaml | 18 ++--- .../build-tests-subspace/repo-state.json | 4 +- .../subspaces/default/common-versions.json | 3 +- .../config/subspaces/default/pnpm-lock.yaml | 19 +++-- .../config/subspaces/default/repo-state.json | 2 +- 9 files changed, 126 insertions(+), 34 deletions(-) create mode 100644 apps/api-extractor/src/analyzer/test/TypeScriptInternals.test.ts create mode 100644 common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index e6c8d4bee23..75aaf1bf4d0 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -74,7 +74,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.2.19", diff --git a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts index 88059f26e80..4d1f7dbccb7 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#L33515 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#L4732 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); } @@ -128,14 +128,10 @@ export class TypeScriptInternals { } public static getGlobalVariableAnalyzer(program: ts.Program): IGlobalVariableAnalyzer { - const anyProgram: any = program; - const typeCheckerInstance: any = - anyProgram.getDiagnosticsProducingTypeChecker ?? anyProgram.getTypeChecker; - - if (!typeCheckerInstance) { - throw new InternalError('Missing Program.getDiagnosticsProducingTypeChecker or Program.getTypeChecker'); - } - const typeChecker: any = typeCheckerInstance(); + // Compiler internals: `getEmitResolver` and `hasGlobalName` are accessed via `any` and + // guarded below at runtime. + // https://github.com/microsoft/TypeScript/blob/v6.0.3/src/compiler/checker.ts#L51221 + const typeChecker: any = program.getTypeChecker(); if (!typeChecker.getEmitResolver) { throw new InternalError('Missing TypeChecker.getEmitResolver'); } @@ -150,7 +146,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/apps/api-extractor/src/analyzer/test/TypeScriptInternals.test.ts b/apps/api-extractor/src/analyzer/test/TypeScriptInternals.test.ts new file mode 100644 index 00000000000..ed6ae95cbed --- /dev/null +++ b/apps/api-extractor/src/analyzer/test/TypeScriptInternals.test.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as ts from 'typescript'; + +import { type IGlobalVariableAnalyzer, TypeScriptInternals } from '../TypeScriptInternals'; + +/** + * Builds a minimal in-memory `ts.Program` whose global scope is populated from the bundled + * compiler's real `lib.*.d.ts` files, without needing on-disk fixtures. + */ +function createInMemoryProgram(sourceText: string): ts.Program { + const rootFileName: string = 'index.ts'; + const compilerOptions: ts.CompilerOptions = { + target: ts.ScriptTarget.ESNext, + // Load the standard globals: lib.es5 declares Array/Object, lib.es2015 adds Promise/Map. es5 is + // listed explicitly so the assertions don't depend on es2015's transitive reference to it. + lib: ['lib.es5.d.ts', 'lib.es2015.d.ts'], + noLib: false, + types: [] + }; + + // Start from a real CompilerHost so that lib file resolution/reads use the bundled compiler, + // then override only the root source file to keep the program self-contained. + const host: ts.CompilerHost = ts.createCompilerHost(compilerOptions); + const rootSourceFile: ts.SourceFile = ts.createSourceFile( + rootFileName, + sourceText, + ts.ScriptTarget.ESNext, + /*setParentNodes*/ true + ); + + const defaultGetSourceFile: ts.CompilerHost['getSourceFile'] = host.getSourceFile.bind(host); + const defaultFileExists: ts.CompilerHost['fileExists'] = host.fileExists.bind(host); + const defaultReadFile: ts.CompilerHost['readFile'] = host.readFile.bind(host); + + host.getSourceFile = (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) => { + if (fileName === rootFileName) { + return rootSourceFile; + } + return defaultGetSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile); + }; + host.fileExists = (fileName) => fileName === rootFileName || defaultFileExists(fileName); + host.readFile = (fileName) => (fileName === rootFileName ? sourceText : defaultReadFile(fileName)); + + const program: ts.Program = ts.createProgram([rootFileName], compilerOptions, host); + + // Self-validate the fixture: a clean program means the libs and root file resolved, so a future + // misconfiguration fails loudly here instead of silently emptying the global table. + expect(ts.getPreEmitDiagnostics(program)).toHaveLength(0); + + return program; +} + +describe(TypeScriptInternals.name, () => { + describe(TypeScriptInternals.getGlobalVariableAnalyzer.name, () => { + // Guards the getTypeChecker -> getEmitResolver -> hasGlobalName chain against *semantic* drift: + // the methods can survive a compiler bump but stop populating the global table (the InternalError + // guards in TypeScriptInternals only catch their outright removal). + it('reports ambient globals as global names', () => { + const program: ts.Program = createInMemoryProgram('export const value: number = 1;'); + const analyzer: IGlobalVariableAnalyzer = TypeScriptInternals.getGlobalVariableAnalyzer(program); + + expect(analyzer.hasGlobalName('Array')).toBe(true); + expect(analyzer.hasGlobalName('Object')).toBe(true); + expect(analyzer.hasGlobalName('Promise')).toBe(true); + }); + + it('does not report arbitrary identifiers as global names', () => { + const program: ts.Program = createInMemoryProgram('export const value: number = 1;'); + const analyzer: IGlobalVariableAnalyzer = TypeScriptInternals.getGlobalVariableAnalyzer(program); + + expect(analyzer.hasGlobalName('__this_is_definitely_not_a_global_name__')).toBe(false); + expect(analyzer.hasGlobalName('value')).toBe(false); + }); + }); +}); diff --git a/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json b/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json new file mode 100644 index 00000000000..e15dbdbee84 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Upgrade the bundled compiler engine to TypeScript 6.0.x", + "type": "minor" + } + ], + "packageName": "@microsoft/api-extractor", + "email": "hl662@users.noreply.github.com" +} diff --git a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml index 5da00173aac..b27148c37b1 100644 --- a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml +++ b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml @@ -911,7 +911,7 @@ packages: '@rushstack/heft-api-extractor-plugin@file:../../../heft-plugins/heft-api-extractor-plugin': resolution: {directory: ../../../heft-plugins/heft-api-extractor-plugin, type: directory} peerDependencies: - '@rushstack/heft': 1.2.18 + '@rushstack/heft': 1.2.19 '@rushstack/heft-config-file@file:../../../libraries/heft-config-file': resolution: {directory: ../../../libraries/heft-config-file, type: directory} @@ -920,7 +920,7 @@ packages: '@rushstack/heft-jest-plugin@file:../../../heft-plugins/heft-jest-plugin': resolution: {directory: ../../../heft-plugins/heft-jest-plugin, type: directory} peerDependencies: - '@rushstack/heft': ^1.2.18 + '@rushstack/heft': ^1.2.19 '@types/jest': ^30.0.0 jest-environment-jsdom: ^30.3.0 jest-environment-node: ^30.3.0 @@ -935,17 +935,17 @@ packages: '@rushstack/heft-lint-plugin@file:../../../heft-plugins/heft-lint-plugin': resolution: {directory: ../../../heft-plugins/heft-lint-plugin, type: directory} peerDependencies: - '@rushstack/heft': 1.2.18 + '@rushstack/heft': 1.2.19 '@rushstack/heft-node-rig@file:../../../rigs/heft-node-rig': resolution: {directory: ../../../rigs/heft-node-rig, type: directory} peerDependencies: - '@rushstack/heft': ^1.2.18 + '@rushstack/heft': ^1.2.19 '@rushstack/heft-typescript-plugin@file:../../../heft-plugins/heft-typescript-plugin': resolution: {directory: ../../../heft-plugins/heft-typescript-plugin, type: directory} peerDependencies: - '@rushstack/heft': 1.2.18 + '@rushstack/heft': 1.2.19 '@rushstack/heft@file:../../../apps/heft': resolution: {directory: ../../../apps/heft, type: directory} @@ -3533,8 +3533,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true @@ -4296,7 +4296,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' @@ -8127,7 +8127,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 93ccb468b44..02a6176ffca 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": "68f19a15bc2ad51338ac42af387887d9e67a2e54", + "pnpmShrinkwrapHash": "1521c576e354bce267d0a24c3f5693b88fab5024", "preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9", - "packageJsonInjectedDependenciesHash": "53d4f8e2a003af60173d4a21283b23fc14eac530" + "packageJsonInjectedDependenciesHash": "43b10e6f4b615d20c7bc39ef8e1916692c3b445b" } diff --git a/common/config/subspaces/default/common-versions.json b/common/config/subspaces/default/common-versions.json index 40fc6f8597a..b1a4490cb46 100644 --- a/common/config/subspaces/default/common-versions.json +++ b/common/config/subspaces/default/common-versions.json @@ -107,8 +107,9 @@ "~4.9.5", "5.8.2", + "5.9.3", // 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 ffc1682b243..aaeb1b07c0e 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -99,8 +99,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.2.19 @@ -4580,7 +4580,7 @@ importers: version: 1.2.19(@types/node@20.17.19) '@rushstack/heft-node-rig': specifier: 2.11.42 - version: 2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0) + version: 2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0) '@types/jest': specifier: 30.0.0 version: 30.0.0 @@ -18353,6 +18353,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} @@ -24633,7 +24638,7 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@rushstack/heft-jest-plugin@2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0)': + '@rushstack/heft-jest-plugin@2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0)': dependencies: '@jest/core': 30.3.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0)) '@jest/reporters': 30.3.0 @@ -24666,13 +24671,13 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@rushstack/heft-node-rig@2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)': + '@rushstack/heft-node-rig@2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)': dependencies: '@microsoft/api-extractor': 7.58.9(@types/node@20.17.19) '@rushstack/eslint-config': 4.6.4(eslint@9.37.0)(typescript@5.8.2) '@rushstack/heft': 1.2.19(@types/node@20.17.19) '@rushstack/heft-api-extractor-plugin': 1.3.19(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) - '@rushstack/heft-jest-plugin': 2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0) + '@rushstack/heft-jest-plugin': 2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0) '@rushstack/heft-lint-plugin': 1.2.19(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) '@rushstack/heft-typescript-plugin': 1.3.14(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) '@types/jest': 30.0.0 @@ -37509,6 +37514,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 38def97e85d..ef26cd3bb99 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": "c5b2dfbe3a23108c497986663aea20fa32e5b27c", + "pnpmShrinkwrapHash": "4898fd47ca887b9313931f1f22952ed508d68835", "preferredVersionsHash": "029c99bd6e65c5e1f25e2848340509811ff9753c" } From 9983d8b1d134328d1797af7e7f6af03ff313d620 Mon Sep 17 00:00:00 2001 From: hl662 <50554904+hl662@users.noreply.github.com> Date: Sat, 20 Jun 2026 11:33:40 -0400 Subject: [PATCH 2/4] fix(playwright-browser-tunnel): upgrade Playwright to 1.58.2 for TypeScript 6.0 compatibility The TypeScript 6.0 compiler now bundled by API Extractor reports the TS1540 grammar error for the legacy `module` namespace keyword, which playwright-core's protocol.d.ts used through 1.56.1. Playwright converted those declarations to `namespace` in 1.58 (microsoft/playwright#38558), so without this bump, running API Extractor over @rushstack/playwright-browser-tunnel fails the production build. Upgrade playwright, playwright-core, and @playwright/test to 1.58.2 across the playwright-browser-tunnel app and the playwright-local-browser-server VS Code extension. --- apps/playwright-browser-tunnel/package.json | 8 ++-- .../playwright-1-58_2026-06-19-21-30.json | 11 +++++ .../config/subspaces/default/pnpm-lock.yaml | 46 +++++++++---------- .../config/subspaces/default/repo-state.json | 2 +- .../package.json | 2 +- 5 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 common/changes/@rushstack/playwright-browser-tunnel/playwright-1-58_2026-06-19-21-30.json diff --git a/apps/playwright-browser-tunnel/package.json b/apps/playwright-browser-tunnel/package.json index c2b956d5362..8d85bd1f8eb 100644 --- a/apps/playwright-browser-tunnel/package.json +++ b/apps/playwright-browser-tunnel/package.json @@ -49,7 +49,7 @@ "@rushstack/ts-command-line": "workspace:*", "string-argv": "~0.3.1", "ws": "~8.20.0", - "playwright": "1.56.1" + "playwright": "1.58.2" }, "devDependencies": { "@rushstack/heft": "workspace:*", @@ -57,12 +57,12 @@ "local-node-rig": "workspace:*", "@types/semver": "7.7.1", "@types/ws": "8.5.5", - "playwright-core": "~1.56.1", - "@playwright/test": "~1.56.1", + "playwright-core": "~1.58.2", + "@playwright/test": "~1.58.2", "@types/node": "20.17.19" }, "peerDependencies": { - "playwright-core": "~1.56.1" + "playwright-core": "~1.58.2" }, "sideEffects": false } diff --git a/common/changes/@rushstack/playwright-browser-tunnel/playwright-1-58_2026-06-19-21-30.json b/common/changes/@rushstack/playwright-browser-tunnel/playwright-1-58_2026-06-19-21-30.json new file mode 100644 index 00000000000..444477d072f --- /dev/null +++ b/common/changes/@rushstack/playwright-browser-tunnel/playwright-1-58_2026-06-19-21-30.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@rushstack/playwright-browser-tunnel", + "comment": "Upgrade the Playwright dependencies from 1.56.1 to 1.58.2", + "type": "patch" + } + ], + "packageName": "@rushstack/playwright-browser-tunnel", + "email": "50554904+hl662@users.noreply.github.com" +} diff --git a/common/config/subspaces/default/pnpm-lock.yaml b/common/config/subspaces/default/pnpm-lock.yaml index aaeb1b07c0e..daf20fd13d9 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -320,8 +320,8 @@ importers: specifier: workspace:* version: link:../../libraries/ts-command-line playwright: - specifier: 1.56.1 - version: 1.56.1 + specifier: 1.58.2 + version: 1.58.2 string-argv: specifier: ~0.3.1 version: 0.3.2 @@ -330,8 +330,8 @@ importers: version: 8.20.0 devDependencies: '@playwright/test': - specifier: ~1.56.1 - version: 1.56.1 + specifier: ~1.58.2 + version: 1.58.2 '@rushstack/heft': specifier: workspace:* version: link:../heft @@ -351,8 +351,8 @@ importers: specifier: workspace:* version: link:../../rigs/local-node-rig playwright-core: - specifier: ~1.56.1 - version: 1.56.1 + specifier: ~1.58.2 + version: 1.58.2 ../../../apps/rundown: dependencies: @@ -4580,7 +4580,7 @@ importers: version: 1.2.19(@types/node@20.17.19) '@rushstack/heft-node-rig': specifier: 2.11.42 - version: 2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0) + version: 2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0) '@types/jest': specifier: 30.0.0 version: 30.0.0 @@ -5239,8 +5239,8 @@ importers: specifier: workspace:* version: link:../vscode-shared playwright-core: - specifier: ~1.56.1 - version: 1.56.1 + specifier: ~1.58.2 + version: 1.58.2 tslib: specifier: ~2.8.1 version: 2.8.1 @@ -8565,8 +8565,8 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@playwright/test@1.56.1': - resolution: {integrity: sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==} + '@playwright/test@1.58.2': + resolution: {integrity: sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==} engines: {node: '>=18'} hasBin: true @@ -16195,13 +16195,13 @@ packages: resolution: {integrity: sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==} engines: {node: '>=16.0.0'} - playwright-core@1.56.1: - resolution: {integrity: sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==} + playwright-core@1.58.2: + resolution: {integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==} engines: {node: '>=18'} hasBin: true - playwright@1.56.1: - resolution: {integrity: sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==} + playwright@1.58.2: + resolution: {integrity: sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==} engines: {node: '>=18'} hasBin: true @@ -23713,9 +23713,9 @@ snapshots: '@pkgr/core@0.2.9': {} - '@playwright/test@1.56.1': + '@playwright/test@1.58.2': dependencies: - playwright: 1.56.1 + playwright: 1.58.2 '@pmmmwh/react-refresh-webpack-plugin@0.5.17(@types/webpack@4.41.32)(react-refresh@0.11.0)(type-fest@0.21.3)(webpack-dev-server@5.2.3(@types/webpack@4.41.32)(webpack@4.47.0))(webpack-hot-middleware@2.26.1)(webpack@4.47.0)': dependencies: @@ -24638,7 +24638,7 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@rushstack/heft-jest-plugin@2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0)': + '@rushstack/heft-jest-plugin@2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0)': dependencies: '@jest/core': 30.3.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0)) '@jest/reporters': 30.3.0 @@ -24671,13 +24671,13 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@rushstack/heft-node-rig@2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)': + '@rushstack/heft-node-rig@2.11.42(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)': dependencies: '@microsoft/api-extractor': 7.58.9(@types/node@20.17.19) '@rushstack/eslint-config': 4.6.4(eslint@9.37.0)(typescript@5.8.2) '@rushstack/heft': 1.2.19(@types/node@20.17.19) '@rushstack/heft-api-extractor-plugin': 1.3.19(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) - '@rushstack/heft-jest-plugin': 2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0) + '@rushstack/heft-jest-plugin': 2.0.9(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/jest@30.0.0)(@types/node@20.17.19)(esbuild-register@3.6.0(esbuild@0.28.0))(jest-environment-jsdom@30.3.0)(jest-environment-node@30.3.0) '@rushstack/heft-lint-plugin': 1.2.19(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) '@rushstack/heft-typescript-plugin': 1.3.14(@rushstack/heft@1.2.19(@types/node@20.17.19))(@types/node@20.17.19) '@types/jest': 30.0.0 @@ -34931,11 +34931,11 @@ snapshots: pvutils: 1.1.5 tslib: 2.8.1 - playwright-core@1.56.1: {} + playwright-core@1.58.2: {} - playwright@1.56.1: + playwright@1.58.2: dependencies: - playwright-core: 1.56.1 + playwright-core: 1.58.2 optionalDependencies: fsevents: 2.3.2 diff --git a/common/config/subspaces/default/repo-state.json b/common/config/subspaces/default/repo-state.json index ef26cd3bb99..d74c1d3aaf4 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": "4898fd47ca887b9313931f1f22952ed508d68835", + "pnpmShrinkwrapHash": "d49b6a3312cda35e7cd61d2acf319454e2762acc", "preferredVersionsHash": "029c99bd6e65c5e1f25e2848340509811ff9753c" } diff --git a/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json index 4afa8c79323..6fc97583593 100644 --- a/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json @@ -99,7 +99,7 @@ "@rushstack/node-core-library": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/vscode-shared": "workspace:*", - "playwright-core": "~1.56.1", + "playwright-core": "~1.58.2", "tslib": "~2.8.1" }, "devDependencies": { From 5de3781b3901a28f43fc10e10d3e8a31945a6344 Mon Sep 17 00:00:00 2001 From: hl662 <50554904+hl662@users.noreply.github.com> Date: Sat, 20 Jun 2026 13:08:06 -0400 Subject: [PATCH 3/4] fix(rush-mcp-server): pin moduleResolution to node10 for API Extractor under TS 6.0 API Extractor analyzes each project with its own bundled TypeScript compiler, which this PR advances to 6.0. TypeScript 6.0 changes the default CommonJS moduleResolution from "node10" to "bundler", and "bundler" cannot resolve the types of @modelcontextprotocol/sdk's subpath exports (which lack a "types" condition) -- producing a TS2307 flood that fails the production build. Pin moduleResolution to "node10" -- the resolution this project already compiles under via the repo toolchain -- so API Extractor's analysis matches the build. No change to the published package. --- apps/rush-mcp-server/tsconfig.json | 9 ++++++++- .../mcp-server-moduleresolution_2026-06-19-22-15.json | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json diff --git a/apps/rush-mcp-server/tsconfig.json b/apps/rush-mcp-server/tsconfig.json index dac21d04081..9b804b19562 100644 --- a/apps/rush-mcp-server/tsconfig.json +++ b/apps/rush-mcp-server/tsconfig.json @@ -1,3 +1,10 @@ { - "extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json" + "extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json", + "compilerOptions": { + // API Extractor analyzes this project with its own bundled TypeScript compiler (6.0+), whose + // default CommonJS moduleResolution ("bundler") cannot resolve the types of + // @modelcontextprotocol/sdk's subpath exports (they lack a "types" condition). Pin "node10" -- + // the resolution this project already compiles under -- so the analysis matches the build. + "moduleResolution": "node10" + } } diff --git a/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json b/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json new file mode 100644 index 00000000000..51d49339deb --- /dev/null +++ b/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@rushstack/mcp-server", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/mcp-server", + "email": "50554904+hl662@users.noreply.github.com" +} From fa375dfcfbfd339bf852a2e00ec11f36a973683c Mon Sep 17 00:00:00 2001 From: hl662 <50554904+hl662@users.noreply.github.com> Date: Sun, 21 Jun 2026 12:19:03 -0400 Subject: [PATCH 4/4] fix(rush-mcp-server): use .js extensions for @modelcontextprotocol/sdk subpath imports The SDK's "exports" map ("./*") has no "types" condition and requires extensionful specifiers. Under TypeScript 6.0's new default `bundler` resolution -- which API Extractor's bundled 6.0 compiler now uses -- the extensionless subpath imports fail with TS2307. The extensionless value import in zodTypes also fails at runtime under Node (MODULE_NOT_FOUND), since Node won't extension-complete an "exports" target either. Add ".js" to the SDK subpath imports so they resolve under both Node's runtime resolution and the bundler analysis, and drop the transitional moduleResolution=node10 pin (deprecated in TS 6.0, removed in 7.0). Also add apps/api-extractor/UPGRADING.md (linked from the README and CHANGELOG) documenting the bundled-compiler moduleResolution default change for downstream consumers. --- apps/api-extractor/.npmignore | 1 + apps/api-extractor/README.md | 3 ++ apps/api-extractor/UPGRADING.md | 37 +++++++++++++++++++ .../pluginFramework/RushMcpPluginLoader.ts | 2 +- .../pluginFramework/RushMcpPluginSession.ts | 2 +- .../src/pluginFramework/zodTypes.ts | 2 +- apps/rush-mcp-server/src/tools/base.tool.ts | 6 +-- apps/rush-mcp-server/tsconfig.json | 9 +---- ...tractor-typescript-6_2026-06-19-15-31.json | 2 +- ...ver-moduleresolution_2026-06-19-22-15.json | 11 ------ ...erver-sdk-js-imports_2026-06-21-00-00.json | 11 ++++++ common/reviews/api/mcp-server.api.md | 2 +- 12 files changed, 61 insertions(+), 27 deletions(-) create mode 100644 apps/api-extractor/UPGRADING.md delete mode 100644 common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json create mode 100644 common/changes/@rushstack/mcp-server/mcp-server-sdk-js-imports_2026-06-21-00-00.json diff --git a/apps/api-extractor/.npmignore b/apps/api-extractor/.npmignore index 64ed79eb4bc..433b1738901 100644 --- a/apps/api-extractor/.npmignore +++ b/apps/api-extractor/.npmignore @@ -35,3 +35,4 @@ # DO NOT MODIFY ABOVE THIS LINE! Add any project-specific overrides below. # --------------------------------------------------------------------------- !/extends/*.json +!UPGRADING.md diff --git a/apps/api-extractor/README.md b/apps/api-extractor/README.md index 69c1846fc1d..cfc43b3bd2b 100644 --- a/apps/api-extractor/README.md +++ b/apps/api-extractor/README.md @@ -46,6 +46,9 @@ For more details and support resources, please visit: https://api-extractor.com/ - [CHANGELOG.md]( https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/CHANGELOG.md) - Find out what's new in the latest version +- [UPGRADING.md]( + https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/UPGRADING.md) - Instructions + for migrating existing projects to a newer version of API Extractor - [API Reference](https://api.rushstack.io/pages/api-extractor/) API Extractor is part of the [Rush Stack](https://rushstack.io/) family of projects. diff --git a/apps/api-extractor/UPGRADING.md b/apps/api-extractor/UPGRADING.md new file mode 100644 index 00000000000..3f52face6a4 --- /dev/null +++ b/apps/api-extractor/UPGRADING.md @@ -0,0 +1,37 @@ +# Upgrade notes for @microsoft/api-extractor + +### Upgrading past the bundled TypeScript 6.0 compiler engine + +API Extractor analyzes your project using its **own bundled** TypeScript compiler, not the +TypeScript version your project builds with. This release upgrades the bundled compiler to +TypeScript 6.0. + +TypeScript 6.0 changes the default `moduleResolution` for `module: "commonjs"` projects from +`node10` to `bundler` ([microsoft/TypeScript#62338](https://github.com/microsoft/TypeScript/pull/62338)). +If your project builds with TypeScript 5.x and does not set `moduleResolution` explicitly, API +Extractor's analysis may now resolve modules differently than your build — most visibly as +`TS2307` errors for dependencies that expose their typings only via `typesVersions`, or that +require extensionful import specifiers under an `exports` map. + +If you hit this, in order of preference: + +1. **Update the import or dependency.** Use extensionful specifiers + (`import ... from 'some-package/subpath.js'`), or upgrade the dependency to a version whose + `exports` map includes a `types` condition. This is the forward-compatible fix and also keeps + your project resolving correctly under TypeScript 7. + +2. **Pin `moduleResolution` for the analysis only.** Set it in `compiler.overrideTsconfig` in your + `api-extractor.json`, so it applies to API Extractor without affecting your build: + + ```json + "compiler": { + "overrideTsconfig": { + "extends": "./tsconfig.json", + "compilerOptions": { "moduleResolution": "node10" } + } + } + ``` + + > **Note:** `node10` is deprecated in TypeScript 6.0 and removed in TypeScript 7.0 + > ([microsoft/TypeScript#62200](https://github.com/microsoft/TypeScript/issues/62200)), so treat + > this as a transitional workaround rather than a long-term setting. diff --git a/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts b/apps/rush-mcp-server/src/pluginFramework/RushMcpPluginLoader.ts index 33603216342..1bfbfba7c10 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 aa46003a8cf..ad5ad9f7df1 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 dc9b4d67bdb..b1b89d34ce8 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/apps/rush-mcp-server/tsconfig.json b/apps/rush-mcp-server/tsconfig.json index 9b804b19562..dac21d04081 100644 --- a/apps/rush-mcp-server/tsconfig.json +++ b/apps/rush-mcp-server/tsconfig.json @@ -1,10 +1,3 @@ { - "extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json", - "compilerOptions": { - // API Extractor analyzes this project with its own bundled TypeScript compiler (6.0+), whose - // default CommonJS moduleResolution ("bundler") cannot resolve the types of - // @modelcontextprotocol/sdk's subpath exports (they lack a "types" condition). Pin "node10" -- - // the resolution this project already compiles under -- so the analysis matches the build. - "moduleResolution": "node10" - } + "extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json" } diff --git a/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json b/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json index e15dbdbee84..454348c2955 100644 --- a/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json +++ b/common/changes/@microsoft/api-extractor/api-extractor-typescript-6_2026-06-19-15-31.json @@ -2,7 +2,7 @@ "changes": [ { "packageName": "@microsoft/api-extractor", - "comment": "Upgrade the bundled compiler engine to TypeScript 6.0.x", + "comment": "Upgrade the bundled compiler engine to TypeScript 6.0.x. TypeScript 6.0 changes the default `moduleResolution` for CommonJS projects from `node10` to `bundler`, which can surface new module-resolution errors when API Extractor analyzes projects that relied on the previous default; see [UPGRADING.md](https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/UPGRADING.md) for migration guidance.", "type": "minor" } ], diff --git a/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json b/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json deleted file mode 100644 index 51d49339deb..00000000000 --- a/common/changes/@rushstack/mcp-server/mcp-server-moduleresolution_2026-06-19-22-15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "packageName": "@rushstack/mcp-server", - "comment": "", - "type": "none" - } - ], - "packageName": "@rushstack/mcp-server", - "email": "50554904+hl662@users.noreply.github.com" -} diff --git a/common/changes/@rushstack/mcp-server/mcp-server-sdk-js-imports_2026-06-21-00-00.json b/common/changes/@rushstack/mcp-server/mcp-server-sdk-js-imports_2026-06-21-00-00.json new file mode 100644 index 00000000000..aaf285194d1 --- /dev/null +++ b/common/changes/@rushstack/mcp-server/mcp-server-sdk-js-imports_2026-06-21-00-00.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@rushstack/mcp-server", + "comment": "Fix resolution of `@modelcontextprotocol/sdk` subpath imports by using explicit \".js\" extensions, which the package's \"exports\" map requires under both Node's runtime module resolution and TypeScript's bundler resolution", + "type": "patch" + } + ], + "packageName": "@rushstack/mcp-server", + "email": "50554904+hl662@users.noreply.github.com" +} 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)