Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpod-io/openvscode-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 565a39750d0900f7aed85c5cea2cae6f8be0a455
Choose a base ref
..
head repository: gitpod-io/openvscode-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 872c97066253237c78f81d3155cf4fd99f575937
Choose a head ref
Showing with 1,755 additions and 808 deletions.
  1. +2 −2 build/azure-pipelines/cli/prepare.js
  2. +1 −1 build/azure-pipelines/cli/prepare.ts
  3. +2 −1 build/gulpfile.reh.js
  4. +2 −1 build/gulpfile.vscode.js
  5. +1 −4 extensions/github-authentication/package.json
  6. +5 −2 extensions/github/package.json
  7. +1 −0 extensions/github/src/extension.ts
  8. +80 −0 extensions/github/src/importExportProfiles.ts
  9. +2 −1 extensions/github/tsconfig.json
  10. +1 −3 extensions/microsoft-authentication/package.json
  11. +2 −2 package.json
  12. +7 −0 src/bootstrap-amd.js
  13. +9 −0 src/bootstrap-window.js
  14. +13 −8 src/main.js
  15. +1 −0 src/tsconfig.monaco.json
  16. +8 −1 src/typings/require.d.ts
  17. +30 −0 src/typings/vscode-globals-modules.d.ts
  18. +22 −0 src/typings/vscode-globals-product.d.ts
  19. +9 −0 src/vs/base/browser/fastDomNode.ts
  20. +2 −2 src/vs/base/browser/ui/list/listView.ts
  21. +1 −1 src/vs/base/browser/ui/list/listWidget.ts
  22. +1 −1 src/vs/base/browser/ui/table/tableWidget.ts
  23. +1 −1 src/vs/base/browser/ui/tree/abstractTree.ts
  24. +1 −0 src/vs/base/common/arrays.ts
  25. +1 −1 src/vs/base/common/performance.js
  26. +3 −0 src/vs/base/common/platform.ts
  27. +4 −1 src/vs/base/common/product.ts
  28. +3 −3 src/vs/base/common/sequence.ts
  29. +4 −4 src/vs/base/parts/ipc/node/ipc.net.ts
  30. +2 −1 src/vs/code/node/cli.ts
  31. +2 −0 src/vs/editor/browser/config/domFontInfo.ts
  32. +3 −0 src/vs/editor/browser/config/fontMeasurements.ts
  33. +12 −4 src/vs/editor/browser/view/domLineBreaksComputer.ts
  34. +20 −3 src/vs/editor/browser/widget/codeEditorWidget.ts
  35. +97 −0 src/vs/editor/common/config/editorOptions.ts
  36. +25 −7 src/vs/editor/common/config/fontInfo.ts
  37. +3 −4 src/vs/editor/common/cursor/cursor.ts
  38. +3 −0 src/vs/editor/common/cursorCommon.ts
  39. +1 −1 src/vs/editor/common/modelLineProjectionData.ts
  40. +89 −86 src/vs/editor/common/standalone/standaloneEnums.ts
  41. +14 −11 src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts
  42. +5 −2 src/vs/editor/common/viewModel/viewModelImpl.ts
  43. +10 −5 src/vs/editor/common/viewModel/viewModelLines.ts
  44. +2 −2 src/vs/editor/contrib/suggest/browser/suggestModel.ts
  45. +21 −4 src/vs/editor/standalone/browser/standaloneServices.ts
  46. +2 −1 src/vs/editor/test/browser/config/testConfiguration.ts
  47. +6 −3 src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts
  48. +1 −1 src/vs/editor/test/common/model/bracketPairColorizer/combineTextEditInfos.test.ts
  49. +19 −8 src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts
  50. +69 −58 src/vs/editor/test/node/diffing/diffing.test.ts
  51. +1 −0 src/vs/editor/test/node/diffing/fixtures/penalize-fragmentation/1.txt
  52. +2 −0 src/vs/editor/test/node/diffing/fixtures/penalize-fragmentation/2.txt
  53. +52 −0 src/vs/editor/test/node/diffing/fixtures/penalize-fragmentation/experimental.expected.diff.json
  54. +24 −0 src/vs/editor/test/node/diffing/fixtures/penalize-fragmentation/experimental.human.diff.json
  55. +24 −0 src/vs/editor/test/node/diffing/fixtures/penalize-fragmentation/smart.expected.diff.json
  56. +108 −86 src/vs/monaco.d.ts
  57. +2 −2 src/vs/platform/environment/test/node/nativeModules.test.ts
  58. +5 −3 src/vs/platform/externalServices/common/marketplace.ts
  59. +5 −11 src/vs/platform/product/common/product.ts
  60. +2 −1 src/vs/platform/remoteTunnel/electron-browser/remoteTunnelService.ts
  61. +2 −1 src/vs/platform/telemetry/common/telemetryUtils.ts
  62. +23 −7 src/vs/platform/userDataSync/common/abstractSynchronizer.ts
  63. +22 −4 src/vs/platform/userDataSync/test/common/synchronizer.test.ts
  64. +2 −1 src/vs/platform/userDataSync/test/common/userDataSyncClient.ts
  65. +1 −1 src/vs/server/node/remoteExtensionHostAgentServer.ts
  66. +1 −0 src/vs/workbench/api/browser/extensionHost.contribution.ts
  67. +52 −0 src/vs/workbench/api/browser/mainThreadProfilContentHandlers.ts
  68. +6 −0 src/vs/workbench/api/common/extHost.api.impl.ts
  69. +12 −0 src/vs/workbench/api/common/extHost.protocol.ts
  70. +63 −0 src/vs/workbench/api/common/extHostProfileContentHandler.ts
  71. +1 −1 src/vs/workbench/api/node/extHostExtensionService.ts
  72. +2 −2 src/vs/workbench/api/node/extensionHostProcess.ts
  73. +1 −1 src/vs/workbench/api/node/proxyResolver.ts
  74. +6 −0 src/vs/workbench/browser/parts/notifications/media/notificationsList.css
  75. +6 −21 src/vs/workbench/browser/parts/notifications/notificationsList.ts
  76. +2 −2 src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts
  77. +1 −1 src/vs/workbench/contrib/extensions/browser/extensionEditor.ts
  78. +8 −85 src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.ts
  79. +3 −1 src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.ts
  80. +2 −2 src/vs/workbench/contrib/mergeEditor/test/browser/model.test.ts
  81. +63 −29 src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts
  82. +4 −8 src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.ts
  83. +9 −6 src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts
  84. +11 −14 src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
  85. +1 −1 src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts
  86. +4 −4 src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts
  87. +8 −3 src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts
  88. +1 −2 src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts
  89. +1 −2 src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.ts
  90. +15 −16 src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.ts
  91. +1 −0 src/vs/workbench/contrib/notebook/common/notebookCommon.ts
  92. +28 −2 src/vs/workbench/contrib/notebook/test/browser/contrib/find.test.ts
  93. +1 −1 src/vs/workbench/contrib/notebook/test/browser/testNotebookEditor.ts
  94. +1 −1 src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts
  95. +1 −1 src/vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution.ts
  96. +33 −49 src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts
  97. +2 −1 src/vs/workbench/contrib/terminal/browser/terminalView.ts
  98. +1 −1 src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts
  99. +1 −1 src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
  100. +2 −0 src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css
  101. +1 −1 src/vs/workbench/contrib/welcomeGettingStarted/common/media/sideBySide.svg
  102. +1 −1 src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
  103. +7 −0 src/vs/workbench/services/authentication/browser/authenticationService.ts
  104. +1 −0 src/vs/workbench/services/extensions/common/extensionsApiProposals.ts
  105. +39 −36 src/vs/workbench/services/userDataProfile/browser/extensionsResource.ts
  106. +27 −21 src/vs/workbench/services/userDataProfile/browser/globalStateResource.ts
  107. +3 −2 src/vs/workbench/services/userDataProfile/browser/keybindingsResource.ts
  108. +3 −2 src/vs/workbench/services/userDataProfile/browser/settingsResource.ts
  109. +3 −2 src/vs/workbench/services/userDataProfile/browser/snippetsResource.ts
  110. +3 −2 src/vs/workbench/services/userDataProfile/browser/tasksResource.ts
  111. +310 −118 src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts
  112. +20 −5 src/vs/workbench/services/userDataProfile/common/userDataProfile.ts
  113. +5 −2 src/vs/workbench/services/views/browser/viewDescriptorService.ts
  114. +43 −0 src/vs/workbench/services/views/test/browser/viewDescriptorService.test.ts
  115. +19 −0 src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts
  116. +7 −0 test/unit/electron/renderer.js
  117. +9 −0 test/unit/node/index.js
4 changes: 2 additions & 2 deletions build/azure-pipelines/cli/prepare.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/azure-pipelines/cli/prepare.ts
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ const setLauncherEnvironmentVars = () => {
['VSCODE_CLI_NAME_LONG', product.nameLong],
['VSCODE_CLI_QUALITYLESS_PRODUCT_NAME', product.nameLong.replace(/ - [a-z]+$/i, '')],
['VSCODE_CLI_APPLICATION_NAME', product.applicationName],
['VSCODE_CLI_EDITOR_WEB_URL', product.editorWebUrl],
['VSCODE_CLI_EDITOR_WEB_URL', product.tunnelApplicationConfig?.editorWebUrl],
['VSCODE_CLI_COMMIT', commit],
[
'VSCODE_CLI_WIN32_APP_IDS',
3 changes: 2 additions & 1 deletion build/gulpfile.reh.js
Original file line number Diff line number Diff line change
@@ -378,7 +378,8 @@ function tweakProductForServerWeb(product) {
// TODO: we cannot inline `product.json` because
// it is being changed during build time at a later
// point in time (such as `checksums`)
'../product.json'
'../product.json',
'../package.json'
]
}
}
3 changes: 2 additions & 1 deletion build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
@@ -119,7 +119,8 @@ const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
// TODO: we cannot inline `product.json` because
// it is being changed during build time at a later
// point in time (such as `checksums`)
'../product.json'
'../product.json',
'../package.json',
]
},
manual: [
5 changes: 1 addition & 4 deletions extensions/github-authentication/package.json
Original file line number Diff line number Diff line change
@@ -17,10 +17,7 @@
"ui",
"workspace"
],
"activationEvents": [
"onAuthenticationRequest:github",
"onAuthenticationRequest:github-enterprise"
],
"activationEvents": [],
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
7 changes: 5 additions & 2 deletions extensions/github/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,9 @@
"Other"
],
"activationEvents": [
"*"
"*",
"onProfile",
"onProfile:github"
],
"extensionDependencies": [
"vscode.git-base"
@@ -27,7 +29,8 @@
},
"enabledApiProposals": [
"contribShareMenu",
"contribEditSessions"
"contribEditSessions",
"profileContentHandlers"
],
"contributes": {
"commands": [
1 change: 1 addition & 0 deletions extensions/github/src/extension.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import { DisposableStore, repositoryHasGitHubRemote } from './util';
import { GithubPushErrorHandler } from './pushErrorHandler';
import { GitBaseExtension } from './typings/git-base';
import { GithubRemoteSourcePublisher } from './remoteSourcePublisher';
import './importExportProfiles';

export function activate(context: ExtensionContext): void {
context.subscriptions.push(initializeGitBaseExtension());
80 changes: 80 additions & 0 deletions extensions/github/src/importExportProfiles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Octokit } from '@octokit/rest';
import * as vscode from 'vscode';
import { httpsOverHttp } from 'tunnel';
import { Agent, globalAgent } from 'https';
import { basename } from 'path';
import { URL } from 'url';

class GitHubGistProfileContentHandler implements vscode.ProfileContentHandler {

readonly name = vscode.l10n.t('GitHub');

private _octokit: Promise<Octokit> | undefined;
private getOctokit(): Promise<Octokit> {
if (!this._octokit) {
this._octokit = (async () => {
const session = await vscode.authentication.getSession('github', ['gist', 'user:email'], { createIfNone: true });
const token = session.accessToken;
const agent = this.getAgent();

const { Octokit } = await import('@octokit/rest');

return new Octokit({
request: { agent },
userAgent: 'GitHub VSCode',
auth: `token ${token}`
});
})();
}
return this._octokit;
}

private getAgent(url: string | undefined = process.env.HTTPS_PROXY): Agent {
if (!url) {
return globalAgent;
}
try {
const { hostname, port, username, password } = new URL(url);
const auth = username && password && `${username}:${password}`;
return httpsOverHttp({ proxy: { host: hostname, port, proxyAuth: auth } });
} catch (e) {
vscode.window.showErrorMessage(`HTTPS_PROXY environment variable ignored: ${e.message}`);
return globalAgent;
}
}

async saveProfile(name: string, content: string): Promise<vscode.Uri | null> {
const octokit = await this.getOctokit();
const result = await octokit.gists.create({
public: true,
files: {
[name]: {
content
}
}
});
return result.data.html_url ? vscode.Uri.parse(result.data.html_url) : null;
}

async readProfile(uri: vscode.Uri): Promise<string | null> {
const gist_id = basename(uri.path);
const octokit = await this.getOctokit();
try {
const gist = await octokit.gists.get({ gist_id });
if (gist.data.files) {
return gist.data.files[Object.keys(gist.data.files)[0]]?.content ?? null;
}
} catch (error) {
// ignore
}
return null;
}

}

vscode.window.registerProfileContentHandler('github', new GitHubGistProfileContentHandler());
3 changes: 2 additions & 1 deletion extensions/github/tsconfig.json
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
},
"include": [
"src/**/*",
"../../src/vscode-dts/vscode.d.ts"
"../../src/vscode-dts/vscode.d.ts",
"../../src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts",
]
}
4 changes: 1 addition & 3 deletions extensions/microsoft-authentication/package.json
Original file line number Diff line number Diff line change
@@ -12,9 +12,7 @@
"categories": [
"Other"
],
"activationEvents": [
"onAuthenticationRequest:microsoft"
],
"activationEvents": [],
"enabledApiProposals": [
"telemetryLogger",
"idToken"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.74.0",
"distro": "22b60ce5f0f5a4db5d17091721f4d84891aec3b8",
"distro": "94196ce4591edf8ca6d713299f61b3f2e92c50f0",
"author": {
"name": "Microsoft Corporation"
},
@@ -239,4 +239,4 @@
"elliptic": "^6.5.3",
"nwmatcher": "^1.4.4"
}
}
}
7 changes: 7 additions & 0 deletions src/bootstrap-amd.js
Original file line number Diff line number Diff line change
@@ -11,6 +11,13 @@
// when this file is bundled with other files.
const nodeRequire = require;

// VSCODE_GLOBALS: node_modules
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target, mod) => nodeRequire(String(mod)) });

// VSCODE_GLOBALS: package/product.json
globalThis._VSCODE_PRODUCT_JSON = require('../product.json');
globalThis._VSCODE_PACKAGE_JSON = require('../package.json');

const loader = require('./vs/loader');
const bootstrap = require('./bootstrap');
const performance = require('./vs/base/common/performance');
9 changes: 9 additions & 0 deletions src/bootstrap-window.js
Original file line number Diff line number Diff line change
@@ -112,6 +112,15 @@

window['MonacoEnvironment'] = {};

// VSCODE_GLOBALS: node_modules
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target, mod) => (require.__$__nodeRequire ?? require)(String(mod)) });

if (!safeProcess.sandboxed) {
// VSCODE_GLOBALS: package/product.json
globalThis._VSCODE_PRODUCT_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json');
globalThis._VSCODE_PACKAGE_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/package.json');
}

const loaderConfig = {
baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32', scheme: 'vscode-file', fallbackAuthority: 'vscode-app' })}/out`,
'vs/nls': nlsConfig,
21 changes: 13 additions & 8 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -318,6 +318,7 @@ function getArgvConfigPath() {
dataFolderName = `${dataFolderName}-dev`;
}

// @ts-ignore
return path.join(os.homedir(), dataFolderName, 'argv.json');
}

@@ -566,17 +567,21 @@ async function resolveNlsConfiguration() {
// valid after we have received the app ready event. This is why the
// code is here.

// The ternary and ts-ignore can both be removed once Electron
// officially adopts the getPreferredSystemLanguages API.
// Ref https://github.com/microsoft/vscode/issues/159813
// and https://github.com/electron/electron/pull/36035
/**
* @type string
*/
// @ts-ignore API not yet available in the official Electron
let appLocale = ((product.quality === 'insider' || product.quality === 'exploration') && app?.getPreferredSystemLanguages()?.length) ?
// @ts-ignore API not yet available in the official Electron
app.getPreferredSystemLanguages()[0] : app.getLocale();
let appLocale = app.getLocale();

// This if statement can be simplified once
// VS Code moves to Electron 22.
// Ref https://github.com/microsoft/vscode/issues/159813
// and https://github.com/electron/electron/pull/36035
if ((product.quality === 'insider' || product.quality === 'exploration')
&& 'getPreferredSystemLanguages' in app
&& typeof app.getPreferredSystemLanguages === 'function'
&& app.getPreferredSystemLanguages().length) {
appLocale = app.getPreferredSystemLanguages()[0];
}
if (!appLocale) {
nlsConfiguration = { locale: 'en', availableLanguages: {} };
} else {
1 change: 1 addition & 0 deletions src/tsconfig.monaco.json
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
"include": [
"typings/require.d.ts",
"typings/thenable.d.ts",
"typings/vscode-globals-product.d.ts",
"vs/loader.d.ts",
"vs/monaco.d.ts",
"vs/editor/*",
9 changes: 8 additions & 1 deletion src/typings/require.d.ts
Original file line number Diff line number Diff line change
@@ -45,10 +45,17 @@ interface NodeRequire {
* @deprecated use `FileAccess.asFileUri()` for node.js contexts or `FileAccess.asBrowserUri` for browser contexts.
*/
toUrl(path: string): string;

/**
* @deprecated MUST not be used anymore
*
* With the move from AMD to ESM we cannot use this anymore. There will be NO MORE node require like this.
*/
__$__nodeRequire<T>(moduleName: string): T;

(dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
config(data: any): any;
onError: Function;
__$__nodeRequire<T>(moduleName: string): T;
getStats?(): ReadonlyArray<LoaderEvent>;
hasDependencyCycle?(): boolean;
define(amdModuleId: string, dependencies: string[], callback: (...args: any[]) => any): any;
30 changes: 30 additions & 0 deletions src/typings/vscode-globals-modules.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

// AMD2ESM mirgation relevant

declare global {

/**
* @deprecated node modules that are in used in a context that
* shouldn't have access to node_modules (node-free renderer or
* shared process)
*/
var _VSCODE_NODE_MODULES: {
crypto: typeof import('crypto');
zlib: typeof import('zlib');
net: typeof import('net');
os: typeof import('os');
module: typeof import('module');
['native-watchdog']: typeof import('native-watchdog')
perf_hooks: typeof import('perf_hooks');

['vsda']: any
['vscode-encrypt']: any
}
}

// fake export to make global work
export { }
Loading