From c5f9b59d0c5da745ef4ba2d60901db0ddcab3e0f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 20 Nov 2026 10:27:07 -0800 Subject: [PATCH 1/3] Drop redundant links contribution import monaco-editor-core's editor.main already registers the links contribution through editor.all. Importing the contribution from monaco-editor pulls in that package's separate copy of the editor core, so the registration lands in an editor instance the playground never uses while adding hundreds of duplicate modules to the bundle. --- packages/playground-v2/src/global.d.ts | 1 - packages/playground-v2/src/main.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/playground-v2/src/global.d.ts b/packages/playground-v2/src/global.d.ts index e4fb1ae047a1..530394c3c503 100644 --- a/packages/playground-v2/src/global.d.ts +++ b/packages/playground-v2/src/global.d.ts @@ -3,7 +3,6 @@ declare module "*.json" { const value: any export default value } -declare module "monaco-editor/editor/contrib/links/browser/links.js" declare module "monaco-editor-core/esm/vs/base/browser/touch.js" { export const EventType: { Change: string; Tap: string } diff --git a/packages/playground-v2/src/main.ts b/packages/playground-v2/src/main.ts index f7b31df12421..2069c85371a4 100644 --- a/packages/playground-v2/src/main.ts +++ b/packages/playground-v2/src/main.ts @@ -15,7 +15,6 @@ import { loadLegacyCompilerVersions, publishedNativeCompilerSelection, } from "./compiler-versions" -import "monaco-editor/editor/contrib/links/browser/links.js" import LZString from "lz-string" import "reflect-metadata" import { From 8c8a1db7d7f780090f8b98394433bd40cd73ee77 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 20 Nov 2026 10:27:31 -0800 Subject: [PATCH 2/3] Use monaco-editor as the only Monaco package monaco-editor ships its own copy of the editor core, so depending on both monaco-editor and monaco-editor-core bundles the core twice and requires keeping two sets of patches in sync. The playground only needs monaco-editor's Monarch definitions for TypeScript and JavaScript; everything else can come from monaco-editor's editor entry, minus the built-in language services, which would compete with the tsgo LSP. The LSP client declares monaco-editor-core as a peer, which pnpm would otherwise install alongside monaco-editor even though nothing uses it. --- .pnpmfile.cjs | 10 ++ package.json | 1 - packages/playground-v2/package.json | 1 - packages/playground-v2/scripts/build.mjs | 28 ++++++ .../playground-v2/src/editor-touch-scroll.ts | 2 +- packages/playground-v2/src/global.d.ts | 2 +- packages/playground-v2/tsconfig.json | 5 +- patches/monaco-editor-core@0.56.0.patch | 92 ------------------- patches/monaco-editor@0.56.0.patch | 85 +++++++++++++++++ pnpm-lock.yaml | 29 ++---- 10 files changed, 136 insertions(+), 119 deletions(-) create mode 100644 .pnpmfile.cjs delete mode 100644 patches/monaco-editor-core@0.56.0.patch diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs new file mode 100644 index 000000000000..b08d9d8c2299 --- /dev/null +++ b/.pnpmfile.cjs @@ -0,0 +1,10 @@ +module.exports = { + hooks: { + readPackage(pkg) { + if (pkg.name === "@vscode/monaco-lsp-client") { + delete pkg.peerDependencies?.["monaco-editor-core"] + } + return pkg + }, + }, +} diff --git a/package.json b/package.json index cc19a1dc5416..f475ce713d0f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "patchedDependencies": { "@vscode/monaco-lsp-client@0.1.0": "patches/@vscode__monaco-lsp-client@0.1.0.patch", "gatsby-remark-shiki-twoslash@3.0.38": "patches/gatsby-remark-shiki-twoslash@3.0.38.patch", - "monaco-editor-core@0.56.0": "patches/monaco-editor-core@0.56.0.patch", "coi-serviceworker@0.1.7": "patches/coi-serviceworker@0.1.7.patch", "monaco-editor@0.56.0": "patches/monaco-editor@0.56.0.patch" }, diff --git a/packages/playground-v2/package.json b/packages/playground-v2/package.json index 280ae51905c2..03c795304d4d 100644 --- a/packages/playground-v2/package.json +++ b/packages/playground-v2/package.json @@ -17,7 +17,6 @@ "jsonc-parser": "^3.3.1", "lz-string": "^1.5.0", "monaco-editor": "0.56.0", - "monaco-editor-core": "0.56.0", "reflect-metadata": "^0.2.2", "semver": "7.7.4", "vscode-json-languageservice": "^5.7.2", diff --git a/packages/playground-v2/scripts/build.mjs b/packages/playground-v2/scripts/build.mjs index 33dae9adbcc5..f9eb7f2e35b2 100644 --- a/packages/playground-v2/scripts/build.mjs +++ b/packages/playground-v2/scripts/build.mjs @@ -16,6 +16,7 @@ const serve = process.argv.includes("--serve") const playgroundBase = serve ? "/" : process.env.PLAYGROUND_BASE ?? playgroundPath const editorWorker = fileURLToPath(import.meta.resolve("monaco-editor/editor/editor.worker")) +const monacoEditorMain = fileURLToPath(import.meta.resolve("monaco-editor/editor/editor.main.js")) const coiServiceWorker = fileURLToPath(import.meta.resolve("coi-serviceworker/coi-serviceworker.min.js")) const indexHtml = (await readFile(resolve(packageDirectory, "src/index.html"), "utf8")).replaceAll( @@ -30,6 +31,26 @@ await Promise.all([ cp(coiServiceWorker, resolve(outputDirectory, "coi-serviceworker.min.js")), ]) +// monaco-editor-core resolves to monaco-editor's editor entry without its +// built-in language registrations, which would compete with the tsgo LSP. +const monacoEditorCorePlugin = { + name: "monaco-editor-core", + setup(build) { + build.onResolve({ filter: /^monaco-editor-core$/ }, () => ({ + path: monacoEditorMain, + namespace: "monaco-editor-core", + })) + build.onLoad({ filter: /.*/, namespace: "monaco-editor-core" }, async () => ({ + contents: (await readFile(monacoEditorMain, "utf8")) + .split("\n") + .filter(line => !/\/languages\/|monaco-lsp-client|\bas (lsp|css|html|json|typescript) \}/.test(line)) + .join("\n"), + loader: "js", + resolveDir: dirname(monacoEditorMain), + })) + }, +} + const buildContext = await context({ absWorkingDir: packageDirectory, bundle: true, @@ -51,6 +72,7 @@ const buildContext = await context({ outdir: outputDirectory, metafile: true, platform: "browser", + plugins: [monacoEditorCorePlugin], sourcemap: true, target: ["es2022"], }) @@ -69,6 +91,12 @@ if (serve) { /node_modules\/(?:@typescript\/)?typescript(?:-wasip1-wasm)?\//.test(path) ) if (compilerInputs.length) throw new Error(`Compiler implementation was bundled: ${compilerInputs.join(", ")}`) + const monacoBuiltinInputs = Object.keys(result.metafile.inputs).filter(path => + /monaco-editor\/esm\/(?:vs\/languages\/features|external\/monaco-lsp-client)\//.test(path) + ) + if (monacoBuiltinInputs.length) { + throw new Error(`Monaco built-in language services were bundled: ${monacoBuiltinInputs.join(", ")}`) + } await buildContext.dispose() await rm(websitePlayDirectory, { force: true, recursive: true }) await cp(outputDirectory, websiteStaticDirectory, { recursive: true }) diff --git a/packages/playground-v2/src/editor-touch-scroll.ts b/packages/playground-v2/src/editor-touch-scroll.ts index 348f1a276588..efd84be5e7fc 100644 --- a/packages/playground-v2/src/editor-touch-scroll.ts +++ b/packages/playground-v2/src/editor-touch-scroll.ts @@ -1,5 +1,5 @@ import type * as monaco from "monaco-editor-core" -import { EventType } from "monaco-editor-core/esm/vs/base/browser/touch.js" +import { EventType } from "monaco-editor/base/browser/touch.js" export function configureEditorTouchScroll(editor: monaco.editor.IStandaloneCodeEditor, mobileLayout: MediaQueryList) { const element = editor.getDomNode() diff --git a/packages/playground-v2/src/global.d.ts b/packages/playground-v2/src/global.d.ts index 530394c3c503..2619df4ad542 100644 --- a/packages/playground-v2/src/global.d.ts +++ b/packages/playground-v2/src/global.d.ts @@ -4,7 +4,7 @@ declare module "*.json" { export default value } -declare module "monaco-editor-core/esm/vs/base/browser/touch.js" { +declare module "monaco-editor/base/browser/touch.js" { export const EventType: { Change: string; Tap: string } } diff --git a/packages/playground-v2/tsconfig.json b/packages/playground-v2/tsconfig.json index 0c00ec6d4998..61f1cbbf44ec 100644 --- a/packages/playground-v2/tsconfig.json +++ b/packages/playground-v2/tsconfig.json @@ -6,7 +6,10 @@ "lib": ["DOM", "ES2022"], "strict": true, "noEmit": true, - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "monaco-editor-core": ["./node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts"] + } }, "include": ["src"], "exclude": ["src/**/*.test.ts"] diff --git a/patches/monaco-editor-core@0.56.0.patch b/patches/monaco-editor-core@0.56.0.patch deleted file mode 100644 index 9f8594ef4741..000000000000 --- a/patches/monaco-editor-core@0.56.0.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/esm/vs/base/browser/domSanitize.js b/esm/vs/base/browser/domSanitize.js ---- a/esm/vs/base/browser/domSanitize.js -+++ b/esm/vs/base/browser/domSanitize.js -@@ -5,7 +5,7 @@ - import { Schemas } from '../common/network.js'; - import { reset } from './dom.js'; - // eslint-disable-next-line no-restricted-imports --import dompurify from './dompurify/dompurify.js'; -+import dompurify from 'dompurify'; - /** - * List of safe, non-input html tags. - */ -diff --git a/esm/vs/base/browser/touch.js b/esm/vs/base/browser/touch.js ---- a/esm/vs/base/browser/touch.js -+++ b/esm/vs/base/browser/touch.js -@@ -43,7 +43,4 @@ export class Gesture extends Disposable { - static addTarget(element) { -- if (!Gesture.isTouchDevice()) { -- return Disposable.None; -- } - if (!Gesture.INSTANCE) { - Gesture.INSTANCE = markAsSingleton(new Gesture()); - } -@@ -53,7 +50,4 @@ export class Gesture extends Disposable { - static ignoreTarget(element) { -- if (!Gesture.isTouchDevice()) { -- return Disposable.None; -- } - if (!Gesture.INSTANCE) { - Gesture.INSTANCE = markAsSingleton(new Gesture()); - } -@@ -90,11 +84,12 @@ export class Gesture extends Disposable { - id: touch.identifier, - initialTarget: touch.target, - initialTimeStamp: timestamp, -+ // Store viewport coordinates so page scrolling does not alter gestures. -- initialPageX: touch.pageX, -- initialPageY: touch.pageY, -+ initialPageX: touch.clientX, -+ initialPageY: touch.clientY, - rollingTimestamps: [timestamp], -- rollingPageX: [touch.pageX], -- rollingPageY: [touch.pageY] -+ rollingPageX: [touch.clientX], -+ rollingPageY: [touch.clientY] - }; - const evt = this.newGestureEvent(EventType.Start, touch.target); - evt.pageX = touch.pageX; -@@ -120,8 +115,8 @@ export class Gesture extends Disposable { - && Math.abs(data.initialPageX - data.rollingPageX.at(-1)) < 30 - && Math.abs(data.initialPageY - data.rollingPageY.at(-1)) < 30) { - const evt = this.newGestureEvent(EventType.Tap, data.initialTarget); -- evt.pageX = data.rollingPageX.at(-1); -- evt.pageY = data.rollingPageY.at(-1); -+ evt.pageX = data.rollingPageX.at(-1) + targetWindow.scrollX; -+ evt.pageY = data.rollingPageY.at(-1) + targetWindow.scrollY; - this.dispatchEvent(evt); - } - else if (holdTime >= Gesture.HOLD_DELAY -@@ -129,8 +124,8 @@ export class Gesture extends Disposable { - && Math.abs(data.initialPageX - data.rollingPageX.at(-1)) < 30 - && Math.abs(data.initialPageY - data.rollingPageY.at(-1)) < 30) { - const evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget); -- evt.pageX = data.rollingPageX.at(-1); -- evt.pageY = data.rollingPageY.at(-1); -+ evt.pageX = data.rollingPageX.at(-1) + targetWindow.scrollX; -+ evt.pageY = data.rollingPageY.at(-1) + targetWindow.scrollY; - this.dispatchEvent(evt); - } - else if (activeTouchCount === 1) { -@@ -243,8 +238,8 @@ export class Gesture extends Disposable { - } - const data = this.activeTouches[touch.identifier]; - const evt = this.newGestureEvent(EventType.Change, data.initialTarget); -- evt.translationX = touch.pageX - data.rollingPageX.at(-1); -- evt.translationY = touch.pageY - data.rollingPageY.at(-1); -+ evt.translationX = touch.clientX - data.rollingPageX.at(-1); -+ evt.translationY = touch.clientY - data.rollingPageY.at(-1); - evt.pageX = touch.pageX; - evt.pageY = touch.pageY; - this.dispatchEvent(evt); -@@ -256,8 +251,8 @@ export class Gesture extends Disposable { - data.rollingPageY.shift(); - data.rollingTimestamps.shift(); - } -- data.rollingPageX.push(touch.pageX); -- data.rollingPageY.push(touch.pageY); -+ data.rollingPageX.push(touch.clientX); -+ data.rollingPageY.push(touch.clientY); - data.rollingTimestamps.push(timestamp); - } - if (this.dispatched) { diff --git a/patches/monaco-editor@0.56.0.patch b/patches/monaco-editor@0.56.0.patch index 6ff5629732e5..23acb176f187 100644 --- a/patches/monaco-editor@0.56.0.patch +++ b/patches/monaco-editor@0.56.0.patch @@ -1,4 +1,5 @@ diff --git a/esm/vs/base/browser/domSanitize.js b/esm/vs/base/browser/domSanitize.js +index 95061a20c8ecd48ff3ca732dbb1848cd213f7965..4bbb061da3fc2115cfc1917759b1660959dd308f 100644 --- a/esm/vs/base/browser/domSanitize.js +++ b/esm/vs/base/browser/domSanitize.js @@ -1,6 +1,6 @@ @@ -9,3 +10,87 @@ diff --git a/esm/vs/base/browser/domSanitize.js b/esm/vs/base/browser/domSanitiz /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. +diff --git a/esm/vs/base/browser/touch.js b/esm/vs/base/browser/touch.js +index 0bc8accfabad3c860ee2a705418b42254ab9a03b..15fbb29e5e441ca257e3e5aef389a8b8742d1ca3 100644 +--- a/esm/vs/base/browser/touch.js ++++ b/esm/vs/base/browser/touch.js +@@ -42,9 +42,6 @@ class Gesture extends Disposable { + }, { window: mainWindow, disposables: this._store })); + } + static addTarget(element) { +- if (!Gesture.isTouchDevice()) { +- return Disposable.None; +- } + if (!Gesture.INSTANCE) { + Gesture.INSTANCE = markAsSingleton(new Gesture()); + } +@@ -52,9 +49,6 @@ class Gesture extends Disposable { + return toDisposable(remove); + } + static ignoreTarget(element) { +- if (!Gesture.isTouchDevice()) { +- return Disposable.None; +- } + if (!Gesture.INSTANCE) { + Gesture.INSTANCE = markAsSingleton(new Gesture()); + } +@@ -88,11 +82,12 @@ class Gesture extends Disposable { + id: touch.identifier, + initialTarget: touch.target, + initialTimeStamp: timestamp, +- initialPageX: touch.pageX, +- initialPageY: touch.pageY, ++ // Store viewport coordinates so page scrolling does not alter gestures. ++ initialPageX: touch.clientX, ++ initialPageY: touch.clientY, + rollingTimestamps: [timestamp], +- rollingPageX: [touch.pageX], +- rollingPageY: [touch.pageY] ++ rollingPageX: [touch.clientX], ++ rollingPageY: [touch.clientY] + }; + const evt = this.newGestureEvent(EventType.Start, touch.target); + evt.pageX = touch.pageX; +@@ -119,16 +114,16 @@ class Gesture extends Disposable { + && Math.abs(data.initialPageX - data.rollingPageX.at(-1)) < 30 + && Math.abs(data.initialPageY - data.rollingPageY.at(-1)) < 30) { + const evt = this.newGestureEvent(EventType.Tap, data.initialTarget); +- evt.pageX = data.rollingPageX.at(-1); +- evt.pageY = data.rollingPageY.at(-1); ++ evt.pageX = data.rollingPageX.at(-1) + targetWindow.scrollX; ++ evt.pageY = data.rollingPageY.at(-1) + targetWindow.scrollY; + this.dispatchEvent(evt); + } + else if (holdTime >= Gesture.HOLD_DELAY + && Math.abs(data.initialPageX - data.rollingPageX.at(-1)) < 30 + && Math.abs(data.initialPageY - data.rollingPageY.at(-1)) < 30) { + const evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget); +- evt.pageX = data.rollingPageX.at(-1); +- evt.pageY = data.rollingPageY.at(-1); ++ evt.pageX = data.rollingPageX.at(-1) + targetWindow.scrollX; ++ evt.pageY = data.rollingPageY.at(-1) + targetWindow.scrollY; + this.dispatchEvent(evt); + } + else if (activeTouchCount === 1) { +@@ -244,8 +239,8 @@ class Gesture extends Disposable { + } + const data = this.activeTouches[touch.identifier]; + const evt = this.newGestureEvent(EventType.Change, data.initialTarget); +- evt.translationX = touch.pageX - data.rollingPageX.at(-1); +- evt.translationY = touch.pageY - data.rollingPageY.at(-1); ++ evt.translationX = touch.clientX - data.rollingPageX.at(-1); ++ evt.translationY = touch.clientY - data.rollingPageY.at(-1); + evt.pageX = touch.pageX; + evt.pageY = touch.pageY; + this.dispatchEvent(evt); +@@ -255,8 +250,8 @@ class Gesture extends Disposable { + data.rollingPageY.shift(); + data.rollingTimestamps.shift(); + } +- data.rollingPageX.push(touch.pageX); +- data.rollingPageY.push(touch.pageY); ++ data.rollingPageX.push(touch.clientX); ++ data.rollingPageY.push(touch.clientY); + data.rollingTimestamps.push(timestamp); + } + if (this.dispatched) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a98b560d4e37..b60fc6b19180 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,8 @@ overrides: immutable@<3.8.4: ^3.8.4 dompurify@<3.4.18: ^3.4.18 +pnpmfileChecksum: sha256-kUrQCLTfwBk470XILvr459peb+h+rsrphOT6NIQnJs0= + patchedDependencies: '@vscode/monaco-lsp-client@0.1.0': hash: 2adc8bf0b3596826d330832fc1ca5385179508eab8541c404f94c460b01115a0 @@ -34,11 +36,8 @@ patchedDependencies: gatsby-remark-shiki-twoslash@3.0.38: hash: 5584d3c994349e1a6796ab8e22811fc912fad257e9ad818930836c458ab23640 path: patches/gatsby-remark-shiki-twoslash@3.0.38.patch - monaco-editor-core@0.56.0: - hash: 7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7 - path: patches/monaco-editor-core@0.56.0.patch monaco-editor@0.56.0: - hash: f2016b76fa8202ad749085be423d52abc12840f715b652ae50903f7e26a30b6b + hash: dc5217366a1b239838919f71f26d3a70c8277bdd3a8185b919fef095530b67f4 path: patches/monaco-editor@0.56.0.patch importers: @@ -210,7 +209,7 @@ importers: version: 5.3.0 '@vscode/monaco-lsp-client': specifier: github:microsoft/monaco-editor#13f0c872dcf352815cc28d92dfff496c9839ea5c&path:/monaco-lsp-client - version: https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c#path:/monaco-lsp-client(patch_hash=2adc8bf0b3596826d330832fc1ca5385179508eab8541c404f94c460b01115a0)(monaco-editor-core@0.56.0(patch_hash=7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7))(ws@8.23.0) + version: https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c#path:/monaco-lsp-client(patch_hash=2adc8bf0b3596826d330832fc1ca5385179508eab8541c404f94c460b01115a0)(ws@8.23.0) coi-serviceworker: specifier: ^0.1.7 version: 0.1.7(patch_hash=714b4adc6ff6ecd02825ea3646eae7d2f84ef6ea33d2023e8e03d1d236243e2f) @@ -225,10 +224,7 @@ importers: version: 1.5.0 monaco-editor: specifier: 0.56.0 - version: 0.56.0(patch_hash=f2016b76fa8202ad749085be423d52abc12840f715b652ae50903f7e26a30b6b) - monaco-editor-core: - specifier: 0.56.0 - version: 0.56.0(patch_hash=7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7) + version: 0.56.0(patch_hash=dc5217366a1b239838919f71f26d3a70c8277bdd3a8185b919fef095530b67f4) reflect-metadata: specifier: ^0.2.2 version: 0.2.2 @@ -3147,8 +3143,6 @@ packages: '@vscode/monaco-lsp-client@https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c#path:/monaco-lsp-client': resolution: {path: /monaco-lsp-client, tarball: https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c} version: 0.1.0 - peerDependencies: - monaco-editor-core: '*' '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -7223,9 +7217,6 @@ packages: moment@2.31.0: resolution: {integrity: sha512-0acOTfMiWOheYS4eoWb80yYMb/JLvVv9SHbs2PehaDzfUG0Bw855SKyk0IKTnPGa5+U2bmi3W68l1+sGLX/pvw==} - monaco-editor-core@0.56.0: - resolution: {integrity: sha512-zuY3UTjedTxWnEUDs84Us/6tvYH9mG89fkHMpzXuvrqTdyWgybn536GR/TG6XNyG5N5heYICRMxT1ox5hZ7rxQ==} - monaco-editor@0.32.1: resolution: {integrity: sha512-LUt2wsUvQmEi2tfTOK+tjAPvt7eQ+K5C4rZPr6SeuyzjAuAHrIvlUloTcOiGjZW3fn3a/jFQCONrEJbNOaCqbA==} @@ -12922,12 +12913,11 @@ snapshots: '@vscode/l10n@0.0.18': {} - '@vscode/monaco-lsp-client@https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c#path:/monaco-lsp-client(patch_hash=2adc8bf0b3596826d330832fc1ca5385179508eab8541c404f94c460b01115a0)(monaco-editor-core@0.56.0(patch_hash=7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7))(ws@8.23.0)': + '@vscode/monaco-lsp-client@https://codeload.github.com/microsoft/monaco-editor/tar.gz/13f0c872dcf352815cc28d92dfff496c9839ea5c#path:/monaco-lsp-client(patch_hash=2adc8bf0b3596826d330832fc1ca5385179508eab8541c404f94c460b01115a0)(ws@8.23.0)': dependencies: '@hediet/json-rpc': 0.5.0 '@hediet/json-rpc-browser': 0.5.1 '@hediet/json-rpc-websocket': 0.5.1(ws@8.23.0) - monaco-editor-core: 0.56.0(patch_hash=7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7) transitivePeerDependencies: - ws @@ -18646,14 +18636,9 @@ snapshots: moment@2.31.0: {} - monaco-editor-core@0.56.0(patch_hash=7aaaaeeffb89ac7ceead19dc1485eebbe3b2a22f83d507194096fbff9b2549f7): - dependencies: - dompurify: 3.4.18 - marked: 14.0.0 - monaco-editor@0.32.1: {} - monaco-editor@0.56.0(patch_hash=f2016b76fa8202ad749085be423d52abc12840f715b652ae50903f7e26a30b6b): + monaco-editor@0.56.0(patch_hash=dc5217366a1b239838919f71f26d3a70c8277bdd3a8185b919fef095530b67f4): dependencies: dompurify: 3.4.18 marked: 14.0.0 From 44e1c18ca64b47424550345cd112fb734ab45717 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:07:57 -0800 Subject: [PATCH 3/3] Drop the LSP client's core peer with an override A pnpm override can remove the LSP client's monaco-editor-core peer dependency directly, which avoids keeping a pnpmfile hook and its lockfile checksum. --- .pnpmfile.cjs | 10 ---------- package.json | 3 ++- pnpm-lock.yaml | 3 +-- 3 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 .pnpmfile.cjs diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs deleted file mode 100644 index b08d9d8c2299..000000000000 --- a/.pnpmfile.cjs +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - hooks: { - readPackage(pkg) { - if (pkg.name === "@vscode/monaco-lsp-client") { - delete pkg.peerDependencies?.["monaco-editor-core"] - } - return pkg - }, - }, -} diff --git a/package.json b/package.json index f475ce713d0f..c5af64b2edfc 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "path-to-regexp@0.1.12": "0.1.13", "lodash@<4.18.1": "^4.18.1", "immutable@<3.8.4": "^3.8.4", - "dompurify@<3.4.18": "^3.4.18" + "dompurify@<3.4.18": "^3.4.18", + "@vscode/monaco-lsp-client>monaco-editor-core": "-" }, "patchedDependencies": { "@vscode/monaco-lsp-client@0.1.0": "patches/@vscode__monaco-lsp-client@0.1.0.patch", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b60fc6b19180..bd0ed1d7be47 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,8 +23,7 @@ overrides: lodash@<4.18.1: ^4.18.1 immutable@<3.8.4: ^3.8.4 dompurify@<3.4.18: ^3.4.18 - -pnpmfileChecksum: sha256-kUrQCLTfwBk470XILvr459peb+h+rsrphOT6NIQnJs0= + '@vscode/monaco-lsp-client>monaco-editor-core': '-' patchedDependencies: '@vscode/monaco-lsp-client@0.1.0':