From d654bec6e170ebb69fd4f170187871b13390217a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 00:17:55 +0200 Subject: [PATCH 1/6] fix: squash fixup commits... --- ...-classes-and-make-some-methods-acces.patch | 13 ++++++---- ...t-some-classes-and-make-some-methods.patch | 26 ------------------- 2 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 vscode-paches/0049-fixup-feat-export-some-classes-and-make-some-methods.patch diff --git a/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch b/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch index 434e610c..f2cabe9b 100644 --- a/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch +++ b/vscode-paches/0021-feat-export-some-classes-and-make-some-methods-acces.patch @@ -16,7 +16,7 @@ Subject: [PATCH] feat: export some classes and make some methods accessible .../extensions/browser/extensionUrlHandler.ts | 2 +- .../extensions/browser/webWorkerExtensionHost.ts | 2 +- .../extensions/common/abstractExtensionService.ts | 10 +++++----- - .../services/issue/browser/issueTroubleshoot.ts | 4 ++-- + .../services/issue/browser/issueTroubleshoot.ts | 6 +++--- .../services/keybinding/browser/keybindingService.ts | 2 +- .../languageStatus/common/languageStatusService.ts | 2 +- .../services/localization/browser/localeService.ts | 2 +- @@ -27,7 +27,7 @@ Subject: [PATCH] feat: export some classes and make some methods accessible .../terminal/common/embedderTerminalService.ts | 2 +- .../userDataProfile/common/remoteUserDataProfiles.ts | 2 +- .../services/userDataSync/common/userDataSyncUtil.ts | 2 +- - 23 files changed, 39 insertions(+), 39 deletions(-) + 23 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.ts b/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.ts index fdefc170db0..1d3bc4affc5 100644 @@ -300,18 +300,21 @@ index 4b2a585afc3..70b20e8fd08 100644 public readonly toAdd: IExtension[], public readonly toRemove: string[] | IExtension[] diff --git a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts -index 86f84f2af22..c6ac789265b 100644 +index 86f84f2af22..089333e2c9f 100644 --- a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts +++ b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts -@@ -30,7 +30,7 @@ import { URI } from 'vs/base/common/uri'; +@@ -30,9 +30,9 @@ import { URI } from 'vs/base/common/uri'; import { RemoteNameContext } from 'vs/workbench/common/contextkeys'; import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; -const ITroubleshootIssueService = createDecorator('ITroubleshootIssueService'); +export const ITroubleshootIssueService = createDecorator('ITroubleshootIssueService'); - interface ITroubleshootIssueService { +-interface ITroubleshootIssueService { ++export interface ITroubleshootIssueService { _serviceBrand: undefined; + isActive(): boolean; + start(): Promise; @@ -72,7 +72,7 @@ class TroubleShootState { ) { } } diff --git a/vscode-paches/0049-fixup-feat-export-some-classes-and-make-some-methods.patch b/vscode-paches/0049-fixup-feat-export-some-classes-and-make-some-methods.patch deleted file mode 100644 index c9f3be07..00000000 --- a/vscode-paches/0049-fixup-feat-export-some-classes-and-make-some-methods.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= -Date: Tue, 9 Apr 2024 18:46:45 +0200 -Subject: [PATCH] fixup! feat: export some classes and make some methods - accessible - ---- - src/vs/workbench/services/issue/browser/issueTroubleshoot.ts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts -index c6ac789265b..089333e2c9f 100644 ---- a/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts -+++ b/src/vs/workbench/services/issue/browser/issueTroubleshoot.ts -@@ -32,7 +32,7 @@ import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; - - export const ITroubleshootIssueService = createDecorator('ITroubleshootIssueService'); - --interface ITroubleshootIssueService { -+export interface ITroubleshootIssueService { - _serviceBrand: undefined; - isActive(): boolean; - start(): Promise; --- -2.34.1 - From 8ff7f65e07721e630a22e62d81af9036a2407d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 00:18:10 +0200 Subject: [PATCH 2/6] fix: fix welcome image on windows --- ...fix-replace-CJS-require-by-FileAccess.toModuleConten.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode-paches/0039-fix-replace-CJS-require-by-FileAccess.toModuleConten.patch b/vscode-paches/0039-fix-replace-CJS-require-by-FileAccess.toModuleConten.patch index ad07ca1a..1b2716f7 100644 --- a/vscode-paches/0039-fix-replace-CJS-require-by-FileAccess.toModuleConten.patch +++ b/vscode-paches/0039-fix-replace-CJS-require-by-FileAccess.toModuleConten.patch @@ -10,7 +10,7 @@ to make it work in ESM context 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts -index 869f44526b4..296ac140860 100644 +index 869f44526b4..c2149139c66 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts @@ -17,6 +17,7 @@ import { IFileService } from 'vs/platform/files/common/files'; @@ -42,7 +42,7 @@ index 869f44526b4..296ac140860 100644 const transformUri = (src: string, base: URI) => { - const path = joinPath(base, src); -+ const path = FileAccess.asBrowserUri(joinPath(base, src).fsPath.slice(1) as AppResourcePath); ++ const path = FileAccess.asBrowserUri(joinPath(base, src).path.slice(1) as AppResourcePath); return asWebviewUri(path).toString(true); }; From 9d8b6e461dc00f2d60327f4c162775052df7ff66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 00:19:17 +0200 Subject: [PATCH 3/6] fix: import proper contribution --- src/service-override/localization.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service-override/localization.ts b/src/service-override/localization.ts index 7622c46f..75636fb3 100644 --- a/src/service-override/localization.ts +++ b/src/service-override/localization.ts @@ -9,7 +9,7 @@ import { localize, localizeWithPath } from 'vs/nls' import { Language, language } from 'vs/base/common/platform' import { URI } from 'vs/base/common/uri' import { getBuiltInExtensionTranslationsUris, setAvailableLocales } from '../l10n' -import 'vs/workbench/contrib/localization/common/localization.contribution' +import 'vs/workbench/contrib/localization/browser/localization.contribution' interface AvailableLanguage { locale: string From 4e8f401047efbc193940ed79a7a3c82781af74cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 00:20:20 +0200 Subject: [PATCH 4/6] cleanup(demo): remove useless node options --- demo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/package.json b/demo/package.json index 82b91eb7..4ca28a3c 100644 --- a/demo/package.json +++ b/demo/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "clean": "tsc -b -c", - "start": "NODE_OPTIONS=--experimental-import-meta-resolve vite --config vite.config.ts", + "start": "vite --config vite.config.ts", "start:debug": "vite --config vite.config.ts --debug --force", "lint": "eslint '{src/**/*.ts,rollup/*.ts,*.ts}'", "typecheck": "tsc --noEmit", From 70a7e86ff2673d59f1926a7c59ceac2ef1b1f0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 00:32:31 +0200 Subject: [PATCH 5/6] chore(demo): clean package-lock --- demo/package-lock.json | 12 ++---------- demo/package.json | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/demo/package-lock.json b/demo/package-lock.json index 79148735..986ce6f6 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -1081,19 +1081,11 @@ } }, "../dist/service-override-localization": { + "name": "@codingame/monaco-vscode-localization-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "@xterm/addon-canvas": "0.7.0-beta.12", - "@xterm/addon-image": "0.8.0-beta.12", - "@xterm/addon-search": "0.15.0-beta.12", - "@xterm/addon-serialize": "0.13.0-beta.12", - "@xterm/addon-unicode11": "0.8.0-beta.12", - "@xterm/addon-webgl": "0.18.0-beta.12", - "@xterm/xterm": "5.5.0-beta.12", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", - "vscode-oniguruma": "1.7.0", - "vscode-textmate": "9.0.0" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, "../dist/service-override-log": { diff --git a/demo/package.json b/demo/package.json index 4ca28a3c..d15250f0 100644 --- a/demo/package.json +++ b/demo/package.json @@ -98,6 +98,7 @@ "@codingame/monaco-vscode-layout-service-override": "file:../dist/service-override-layout", "@codingame/monaco-vscode-less-default-extension": "file:../dist/default-extension-less", "@codingame/monaco-vscode-lifecycle-service-override": "file:../dist/service-override-lifecycle", + "@codingame/monaco-vscode-localization-service-override": "file:../dist/service-override-localization", "@codingame/monaco-vscode-log-default-extension": "file:../dist/default-extension-log", "@codingame/monaco-vscode-log-service-override": "file:../dist/service-override-log", "@codingame/monaco-vscode-lua-default-extension": "file:../dist/default-extension-lua", @@ -180,7 +181,6 @@ "@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust", "@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml", "@codingame/monaco-vscode-yaml-default-extension": "file:../dist/default-extension-yaml", - "@codingame/monaco-vscode-localization-service-override": "file:../dist/service-override-localization", "ansi-colors": "^4.1.3", "dockerode": "^4.0.2", "express": "^4.19.2", From 87a8fa6e987ae8a01240a01ff20d21f7e4434866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Apr 2024 11:15:58 +0200 Subject: [PATCH 6/6] fix: export missing interfaces --- src/service-override/localization.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service-override/localization.ts b/src/service-override/localization.ts index 75636fb3..0d74a240 100644 --- a/src/service-override/localization.ts +++ b/src/service-override/localization.ts @@ -11,12 +11,12 @@ import { URI } from 'vs/base/common/uri' import { getBuiltInExtensionTranslationsUris, setAvailableLocales } from '../l10n' import 'vs/workbench/contrib/localization/browser/localization.contribution' -interface AvailableLanguage { +export interface AvailableLanguage { locale: string languageName?: string } -interface LocalizationOptions { +export interface LocalizationOptions { setLocale (id: string): Promise clearLocale(): Promise availableLanguages: AvailableLanguage[]