From 5bd755a9cc9e384374782d93cd525b89f0dc17e1 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Fri, 4 Mar 2022 09:47:45 +0100 Subject: [PATCH] fix(1.65): update patches (#1001) --- patches/binary-name.patch | 12 ++++++------ patches/custom-gallery.patch | 10 +++++----- patches/use-github-pat.patch | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/patches/binary-name.patch b/patches/binary-name.patch index 4323202..c952ac3 100644 --- a/patches/binary-name.patch +++ b/patches/binary-name.patch @@ -1,8 +1,8 @@ diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js -index df089a6..7aeb54b 100644 +index 2f5a931..ac3d7e6 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js -@@ -286,7 +286,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op +@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' })); } else if (platform === 'darwin') { const shortcut = gulp.src('resources/darwin/bin/code.sh') @@ -12,19 +12,19 @@ index df089a6..7aeb54b 100644 all = es.merge(all, shortcut); } diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts -index bd4dc01..02cbbc2 100644 +index 3bd0c57..d921c60 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts -@@ -355,7 +355,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain +@@ -353,7 +353,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain } - private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> { + private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> { - const target = resolve(this.environmentMainService.appRoot, 'bin', 'code'); + const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName); const source = `/usr/local/bin/${this.productService.applicationName}`; // Ensure source exists -@@ -565,7 +565,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain +@@ -563,7 +563,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain // macOS if (this.environmentMainService.isBuilt) { diff --git a/patches/custom-gallery.patch b/patches/custom-gallery.patch index 7acb5cb..90a5514 100644 --- a/patches/custom-gallery.patch +++ b/patches/custom-gallery.patch @@ -1,8 +1,8 @@ diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts -index 657b9c9..9b9b12e 100644 +index 1edc76f..4c0bf98 100644 --- a/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts -@@ -70,6 +70,7 @@ export interface IProductConfiguration { +@@ -69,6 +69,7 @@ export interface IProductConfiguration { readonly extensionsGallery?: { readonly serviceUrl: string; @@ -11,7 +11,7 @@ index 657b9c9..9b9b12e 100644 readonly resourceUrlTemplate: string; readonly controlUrl: string; diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts -index 5e38d35..12bb161 100644 +index e22b33e..98cec93 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -4,11 +4,12 @@ @@ -30,7 +30,7 @@ index 5e38d35..12bb161 100644 * @deprecated You MUST use `IProductService` if possible. @@ -34,6 +35,32 @@ else if (typeof require?.__$__nodeRequire === 'function') { product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath); - const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; }; + const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string }; + // Merge user-customized product.json + try { @@ -61,7 +61,7 @@ index 5e38d35..12bb161 100644 // Running out of sources if (env['VSCODE_DEV']) { Object.assign(product, { -@@ -43,6 +70,19 @@ else if (typeof require?.__$__nodeRequire === 'function') { +@@ -44,6 +71,19 @@ else if (typeof require?.__$__nodeRequire === 'function') { }); } diff --git a/patches/use-github-pat.patch b/patches/use-github-pat.patch index 5e84cac..4d93c0c 100644 --- a/patches/use-github-pat.patch +++ b/patches/use-github-pat.patch @@ -1,5 +1,5 @@ diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts -index 3002e937c81..9674d8d2089 100644 +index 92313d0..a69da37 100644 --- a/extensions/github-authentication/src/githubServer.ts +++ b/extensions/github-authentication/src/githubServer.ts @@ -3,41 +3,13 @@ @@ -66,7 +66,7 @@ index 3002e937c81..9674d8d2089 100644 - private _onDidManuallyProvideToken = new vscode.EventEmitter(); - - private _pendingStates = new Map(); -- private _codeExchangePromises = new Map, cancel: vscode.EventEmitter }>(); +- private _codeExchangePromises = new Map; cancel: vscode.EventEmitter }>(); - private _statusBarCommandId = `${this.type}.provide-manually`; - private _disposable: vscode.Disposable; - private _uriHandler = new UriEventHandler(this._logger); @@ -344,7 +344,7 @@ index 3002e937c81..9674d8d2089 100644 - this._uriHandler.handleUri(vscode.Uri.parse(uri.trim())); - } - - public getUserInfo(token: string): Promise<{ id: string, accountName: string }> { + public getUserInfo(token: string): Promise<{ id: string; accountName: string }> { return getUserInfo(token, this.getServerUri('/user'), this._logger); } @@ -368,7 +368,7 @@ index 3002e937c81..9674d8d2089 100644 - }); - - if (result.ok) { -- const json: { student: boolean, faculty: boolean } = await result.json(); +- const json: { student: boolean; faculty: boolean } = await result.json(); - - /* __GDPR__ - "session" : {