Explorar o código

fix: update patch [skip ci]

Baptiste Augrain %!s(int64=2) %!d(string=hai) anos
pai
achega
79fe5639f3
Modificáronse 4 ficheiros con 51 adicións e 47 borrados
  1. 1 1
      insider.json
  2. 44 41
      patches/use-github-pat.patch
  3. 4 3
      product.json
  4. 2 2
      version.sh

+ 1 - 1
insider.json

@@ -1,4 +1,4 @@
 {
   "tag": "1.73.0",
-  "commit": "3e4e3518165e78181d2275e7745a8a59cea32e18"
+  "commit": "9d3fbb3d9a50055be0a8c6d721625d02c9de492d"
 }

+ 44 - 41
patches/use-github-pat.patch

@@ -1,22 +1,18 @@
 diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
-index 94ce542..d83e3c3 100644
+index 42e4354..cd6f27e 100644
 --- a/extensions/github-authentication/src/githubServer.ts
 +++ b/extensions/github-authentication/src/githubServer.ts
-@@ -5,7 +5,4 @@
- 
--import * as nls from 'vscode-nls';
- import * as vscode from 'vscode';
+@@ -7,4 +7,2 @@ import * as vscode from 'vscode';
  import fetch, { Response } from 'node-fetch';
 -import { v4 as uuid } from 'uuid';
 -import { PromiseAdapter, promiseFromEvent } from './common/utils';
  import { ExperimentationTelemetry } from './experimentationService';
-@@ -13,14 +10,5 @@ import { AuthProviderType } from './github';
+@@ -12,13 +10,4 @@ import { AuthProviderType } from './github';
  import { Log } from './common/logger';
 -import { isSupportedEnvironment } from './common/env';
 -import { LoopbackAuthServer } from './authServer';
 -import path = require('path');
- 
--const localize = nls.loadMessageBundle();
+-
 -const CLIENT_ID = '01ab8ac9400c4e429b23';
 -const GITHUB_TOKEN_URL = 'https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token';
  const NETWORK_ERROR = 'network error';
@@ -25,7 +21,7 @@ index 94ce542..d83e3c3 100644
 -const REDIRECT_URL_INSIDERS = 'https://insiders.vscode.dev/redirect';
 -
  class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
-@@ -44,9 +32,2 @@ export interface IGitHubServer extends vscode.Disposable {
+@@ -42,9 +31,2 @@ export interface IGitHubServer extends vscode.Disposable {
  
 -interface IGitHubDeviceCodeResponse {
 -	device_code: string;
@@ -35,12 +31,12 @@ index 94ce542..d83e3c3 100644
 -}
 -
  async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
-@@ -57,3 +38,3 @@ async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Pro
+@@ -55,3 +37,3 @@ async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Pro
  				Authorization: `token ${token}`,
 -				'User-Agent': 'Visual-Studio-Code'
 +				'User-Agent': 'VSCodium'
  			}
-@@ -77,7 +58,4 @@ export class GitHubServer implements IGitHubServer {
+@@ -75,7 +57,4 @@ export class GitHubServer implements IGitHubServer {
  
 -	private _pendingNonces = new Map<string, string[]>();
 -	private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
@@ -48,11 +44,11 @@ index 94ce542..d83e3c3 100644
  	private static _uriHandler: UriEventHandler | undefined;
 -	private _redirectEndpoint: string | undefined;
  
-@@ -85,2 +63,3 @@ export class GitHubServer implements IGitHubServer {
+@@ -83,2 +62,3 @@ export class GitHubServer implements IGitHubServer {
  		public readonly type: AuthProviderType,
 +		// @ts-ignore
  		private readonly _supportDeviceCodeFlow: boolean,
-@@ -104,41 +83,2 @@ export class GitHubServer implements IGitHubServer {
+@@ -102,41 +82,2 @@ export class GitHubServer implements IGitHubServer {
  
 -	private async getRedirectEndpoint(): Promise<string> {
 -		if (this._redirectEndpoint) {
@@ -94,27 +90,27 @@ index 94ce542..d83e3c3 100644
 -	}
 -
  	dispose() {
-@@ -158,58 +98,8 @@ export class GitHubServer implements IGitHubServer {
+@@ -156,58 +97,8 @@ export class GitHubServer implements IGitHubServer {
  		let userCancelled: boolean | undefined;
--		const yes = localize('yes', "Yes");
--		const no = localize('no', "No");
+-		const yes = vscode.l10n.t('Yes');
+-		const no = vscode.l10n.t('No');
 -		const promptToContinue = async () => {
 -			if (userCancelled === undefined) {
 -				// We haven't had a failure yet so wait to prompt
 -				return;
 -			}
 -			const message = userCancelled
--				? localize('userCancelledMessage', "Having trouble logging in? Would you like to try a different way?")
--				: localize('otherReasonMessage', "You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?");
+-				? vscode.l10n.t('Having trouble logging in? Would you like to try a different way?')
+-				: vscode.l10n.t('otherReasonMessage', 'You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?');
 -			const result = await vscode.window.showWarningMessage(message, yes, no);
 -			if (result !== yes) {
 -				throw new Error('Cancelled');
 -			}
 -		};
- 
+-
 -		const nonce = uuid();
 -		const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate?nonce=${encodeURIComponent(nonce)}`));
--
+ 
 -		const supported = isSupportedEnvironment(callbackUri);
 -		if (supported) {
 -			try {
@@ -158,13 +154,17 @@ index 94ce542..d83e3c3 100644
 +			this._logger.error(e);
 +			userCancelled = e.message ?? e === 'User Cancelled';
  		}
-@@ -219,131 +109,5 @@ export class GitHubServer implements IGitHubServer {
+@@ -217,136 +108,2 @@ export class GitHubServer implements IGitHubServer {
  
 -	private async doLoginWithoutLocalServer(scopes: string, nonce: string, callbackUri: vscode.Uri): Promise<string> {
 -		this._logger.info(`Trying without local server... (${scopes})`);
 -		return await vscode.window.withProgress<string>({
 -			location: vscode.ProgressLocation.Notification,
--			title: localize('signingIn', 'Signing in to {0}...', this.baseUri.authority),
+-			title: vscode.l10n.t({
+-				message: 'Signing in to {0}...',
+-				args: [this.baseUri.authority],
+-				comment: ['The {0} will be a url, e.g. github.com']
+-			}),
 -			cancellable: true
 -		}, async (_, token) => {
 -			const existingNonces = this._pendingNonces.get(scopes) || [];
@@ -209,7 +209,11 @@ index 94ce542..d83e3c3 100644
 -		this._logger.info(`Trying with local server... (${scopes})`);
 -		return await vscode.window.withProgress<string>({
 -			location: vscode.ProgressLocation.Notification,
--			title: localize('signingInAnotherWay', "Signing in to {0}...", this.baseUri.authority),
+-			title: vscode.l10n.t({
+-				message: 'Signing in to {0}...',
+-				args: [this.baseUri.authority],
+-				comment: ['The {0} will be a url, e.g. github.com']
+-			}),
 -			cancellable: true
 -		}, async (_, token) => {
 -			const redirectUri = await this.getRedirectEndpoint();
@@ -266,15 +270,15 @@ index 94ce542..d83e3c3 100644
 -
 -		const json = await result.json() as IGitHubDeviceCodeResponse;
 -
--
+-		const button = vscode.l10n.t('Copy & Continue to GitHub');
 -		const modalResult = await vscode.window.showInformationMessage(
--			localize('code.title', "Your Code: {0}", json.user_code),
+-			vscode.l10n.t({ message: 'Your Code: {0}', args: [json.user_code], comment: ['The {0} will be a code, e.g. 123-456'] }),
 -			{
 -				modal: true,
--				detail: localize('code.detail', "To finish authenticating, navigate to GitHub and paste in the above one-time code.")
--			}, 'Copy & Continue to GitHub');
+-				detail: vscode.l10n.t('To finish authenticating, navigate to GitHub and paste in the above one-time code.')
+-			}, button);
 -
--		if (modalResult !== 'Copy & Continue to GitHub') {
+-		if (modalResult !== button) {
 -			throw new Error('User Cancelled');
 -		}
 -
@@ -287,11 +291,7 @@ index 94ce542..d83e3c3 100644
 -	}
 -
  	private async doLoginWithPat(scopes: string): Promise<string> {
- 		this._logger.info(`Trying to retrieve PAT... (${scopes})`);
--		const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
-+		const token = await vscode.window.showInputBox({ prompt: `GitHub Personal Access Token (${scopes})`, ignoreFocusOut: true });
- 		if (!token) { throw new Error('User Cancelled'); }
-@@ -368,121 +132,2 @@ export class GitHubServer implements IGitHubServer {
+@@ -374,124 +131,2 @@ export class GitHubServer implements IGitHubServer {
  
 -	private async waitForDeviceCodeAccessToken(
 -		json: IGitHubDeviceCodeResponse,
@@ -299,11 +299,14 @@ index 94ce542..d83e3c3 100644
 -		return await vscode.window.withProgress<string>({
 -			location: vscode.ProgressLocation.Notification,
 -			cancellable: true,
--			title: localize(
--				'progress',
--				"Open [{0}]({0}) in a new tab and paste your one-time code: {1}",
--				json.verification_uri,
--				json.user_code)
+-			title: vscode.l10n.t({
+-				message: 'Open [{0}]({0}) in a new tab and paste your one-time code: {1}',
+-				args: [json.verification_uri, json.user_code],
+-				comment: [
+-					'The [{0}]({0}) will be a url and the {1} will be a code, e.g. 123-456',
+-					'{Locked="[{0}]({0})"}'
+-				]
+-			})
 -		}, async (_, token) => {
 -			const refreshTokenUri = this.baseUri.with({
 -				path: '/login/oauth/access_token',
@@ -414,7 +417,7 @@ index 94ce542..d83e3c3 100644
 -
  	private getServerUri(path: string = '') {
 diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
-index bee1974..0f57882 100644
+index ce2a3e8..2a5cf60 100644
 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 @@ -306,3 +306,3 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
@@ -423,10 +426,10 @@ index bee1974..0f57882 100644
 +		if (!menus.length) {
  			const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
 diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
-index 69cb0d2..920d6c6 100644
+index d5e2b75..a996eb7 100644
 --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
 +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
-@@ -275,12 +275,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
+@@ -279,12 +279,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
  		}
 -
 -		if (!this._authenticationProviders.size) {

+ 4 - 3
product.json

@@ -136,7 +136,8 @@
       "telemetry"
     ],
     "ms-vscode.remote-server": [
-      "resolvers"
+      "resolvers",
+      "tunnels"
     ],
     "ms-vscode.remote-explorer": [
       "contribViewsRemote",
@@ -200,7 +201,6 @@
     ],
     "ms-toolsai.jupyter": [
       "notebookControllerKind",
-      "notebookDebugOptions",
       "notebookDeprecated",
       "notebookMessaging",
       "notebookMime",
@@ -208,7 +208,8 @@
       "portsAttributes",
       "quickPickSortByLabel",
       "notebookKernelSource",
-      "interactiveWindow"
+      "interactiveWindow",
+      "notebookControllerAffinityHidden"
     ],
     "dbaeumer.vscode-eslint": [
       "notebookCellExecutionState",

+ 2 - 2
version.sh

@@ -3,11 +3,11 @@
 if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
 
     if type -t "sha1sum" > /dev/null 2>&1; then
-      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION}" | sha1sum | cut -d' ' -f1 )
+      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
     else
       npm install -g checksum
 
-      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION}" | checksum )
+      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
     fi
 
     echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""