Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vscode 1.92.1 and fix language packs #479

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"config": {
"vscode": {
"version": "1.92.0",
"ref": "1.92.0",
"commit": "b1c0a14de1414fcdaa400695b4db1c0799bc3124"
"version": "1.92.1",
"ref": "1.92.1",
"commit": "eaa41d57266683296de7d118f574d0c2652e1fc4"
},
"monaco": {
"ref": "v0.50.0",
Expand Down
11 changes: 6 additions & 5 deletions rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function isCallPure (file: string, functionName: string, node: recast.types.name
}

const nlsKeys: [moduleId: string, keys: string[]][] = []
let nlsIndex = -1
let nlsIndex = 0

function transformVSCodeCode (id: string, code: string) {
const translationPath = nodePath.relative(id.startsWith(OVERRIDE_PATH) ? OVERRIDE_PATH : VSCODE_SRC_DIR, id)
Expand Down Expand Up @@ -224,13 +224,13 @@ function transformVSCodeCode (id: string, code: string) {
throw new Error('Unable to extract translation key')
}

if (!moduleNlsKeys.includes(localizationKey)) {
moduleNlsKeys.push(localizationKey)
nlsIndex++
let moduleNlsIndex = moduleNlsKeys.indexOf(localizationKey)
if (moduleNlsIndex === -1) {
moduleNlsIndex = moduleNlsKeys.push(localizationKey) - 1
}
path.replace(recast.types.builders.callExpression(
path.node.callee,
[recast.types.builders.numericLiteral(nlsIndex), ...path.node.arguments.slice(1)]
[recast.types.builders.numericLiteral(nlsIndex + moduleNlsIndex), ...path.node.arguments.slice(1)]
))
transformed = true
} else if (node.callee.type === 'MemberExpression') {
Expand Down Expand Up @@ -318,6 +318,7 @@ function transformVSCodeCode (id: string, code: string) {

if (moduleNlsKeys.length > 0) {
nlsKeys.push([translationPath, moduleNlsKeys])
nlsIndex += moduleNlsKeys.length
}

return patchedCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index e5fa674ea82..c3e8d26f3da 100644
});
}
diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
index 8870ddf4cc6..6bc4e3293c6 100644
index e1efba3e802..8f87777ca82 100644
--- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts
+++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
@@ -492,11 +492,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
@@ -488,11 +488,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
return;
}

Expand All @@ -40,7 +40,7 @@ index 8870ddf4cc6..6bc4e3293c6 100644
if (e.data.channel === 'webview-ready') {
if (this._messagePort) {
return;
@@ -551,11 +546,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
@@ -547,11 +542,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
return endpoint;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] fix: use asBrowserUri to get iframe src
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
index 6bc4e3293c6..b7a9e51144f 100644
index 8f87777ca82..27e43963b86 100644
--- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts
+++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
@@ -448,7 +448,8 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
@@ -444,7 +444,8 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1754872
const fileName = isFirefox ? 'index-no-csp.html' : 'index.html';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] feat: add some parameter to webview iframes
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
index b7a9e51144f..be42aaaeff3 100644
index 27e43963b86..c1df248c2da 100644
--- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts
+++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts
@@ -11,7 +11,7 @@ import { streamToBuffer, VSBufferReadableStream } from 'vs/base/common/buffer';
Expand All @@ -20,7 +20,7 @@ index b7a9e51144f..be42aaaeff3 100644
import { URI } from 'vs/base/common/uri';
import { generateUuid } from 'vs/base/common/uuid';
import { localize } from 'vs/nls';
@@ -441,6 +441,9 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
@@ -437,6 +437,9 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
params.purpose = options.purpose;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Subject: [PATCH] fix: rollback typescript as the last version breaks the
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 7b51678c85a..999105643e3 100644
index 70ca212fe5e..893de369e19 100644
--- a/package.json
+++ b/package.json
@@ -208,7 +208,7 @@
Expand Down