diff --git a/.eslintrc.json b/.eslintrc.json
index 3ad6a748650..9b8f2c61094 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -487,6 +487,14 @@
{
"when": "hasBrowser",
"pattern": "vs/workbench/workbench.web.main"
+ },
+ {
+ "when": "hasBrowser",
+ "pattern": "vs/workbench/~"
+ },
+ {
+ "when": "hasBrowser",
+ "pattern": "vs/workbench/services/*/~"
}
]
},
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 8a0a39315bb..12e802e9c74 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -1,12 +1,14 @@
name: Basic checks
-on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
+on: workflow_dispatch
+
+# on:
+# push:
+# branches:
+# - main
+# pull_request:
+# branches:
+# - main
jobs:
main:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 84f92eef92b..d505e2b9129 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,7 +69,7 @@ jobs:
7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt
- name: Compile and Download
- run: DEBUG=pw:install yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
+ run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
@@ -145,7 +145,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000
- name: Compile and Download
- run: DEBUG=pw:install yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
+ run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
@@ -216,7 +216,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000
- name: Compile and Download
- run: DEBUG=pw:install yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
+ run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
@@ -289,7 +289,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000
- name: Download Playwright
- run: DEBUG=pw:install yarn playwright-install
+ run: yarn playwright-install
- name: Run Hygiene Checks
run: yarn gulp hygiene
diff --git a/.github/workflows/monaco-editor.yml b/.github/workflows/monaco-editor.yml
index d6bc1a55e3e..e52713a3e99 100644
--- a/.github/workflows/monaco-editor.yml
+++ b/.github/workflows/monaco-editor.yml
@@ -53,7 +53,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000
- name: Download Playwright
- run: DEBUG=pw:install yarn playwright-install
+ run: yarn playwright-install
- name: Run Monaco Editor Checks
run: yarn monaco-compile-check
diff --git a/.vscode/launch.json b/.vscode/launch.json
index b685af9c9be..ab98af7d3d2 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -29,7 +29,7 @@
"name": "Attach to Shared Process",
"timeout": 30000,
"port": 9222,
- "urlFilter": "*sharedProcess.html*",
+ "urlFilter": "*sharedProcess*.html*",
"presentation": {
"hidden": true
}
@@ -236,7 +236,7 @@
"VSCODE_SKIP_PRELAUNCH": "1"
},
"cleanUp": "wholeBrowser",
- "urlFilter": "*workbench.html*",
+ "urlFilter": "*workbench*.html*",
"runtimeArgs": [
"--inspect-brk=5875",
"--no-cached-data",
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 30bf48efe64..184042b4f2e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -6,6 +6,7 @@
".build": true,
".profile-oss": true,
"**/.DS_Store": true,
+ "cli/target": true,
"build/**/*.js": {
"when": "$(basename).ts"
}
@@ -86,6 +87,11 @@
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true
},
+ "[rust]": {
+ "editor.defaultFormatter": "rust-lang.rust-analyzer",
+ "editor.formatOnSave": true,
+ "editor.insertSpaces": true
+ },
"typescript.tsc.autoDetect": "off",
"testing.autoRun.mode": "rerun",
"conventionalCommits.scopes": [
diff --git a/build/azure-pipelines/common/installPlaywright.js b/build/azure-pipelines/common/installPlaywright.js
index af4bd5fb54c..dbc5835243f 100644
--- a/build/azure-pipelines/common/installPlaywright.js
+++ b/build/azure-pipelines/common/installPlaywright.js
@@ -3,10 +3,9 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const retry_1 = require("./retry");
+process.env.DEBUG = 'pw:install'; // enable logging for this (https://github.com/microsoft/playwright/issues/17394)
const { installDefaultBrowsersForNpmInstall } = require('playwright-core/lib/server');
async function install() {
- await (0, retry_1.retry)(() => installDefaultBrowsersForNpmInstall());
+ await installDefaultBrowsersForNpmInstall();
}
install();
diff --git a/build/azure-pipelines/common/installPlaywright.ts b/build/azure-pipelines/common/installPlaywright.ts
index 5d837a55413..742b6e0e399 100644
--- a/build/azure-pipelines/common/installPlaywright.ts
+++ b/build/azure-pipelines/common/installPlaywright.ts
@@ -3,11 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import { retry } from './retry';
+process.env.DEBUG='pw:install'; // enable logging for this (https://github.com/microsoft/playwright/issues/17394)
+
const { installDefaultBrowsersForNpmInstall } = require('playwright-core/lib/server');
async function install() {
- await retry(() => installDefaultBrowsersForNpmInstall());
+ await installDefaultBrowsersForNpmInstall();
}
install();
diff --git a/build/azure-pipelines/darwin/helper-plugin-entitlements.plist b/build/azure-pipelines/darwin/helper-plugin-entitlements.plist
new file mode 100644
index 00000000000..1cc1a152c74
--- /dev/null
+++ b/build/azure-pipelines/darwin/helper-plugin-entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+ com.apple.security.cs.allow-jit
+
+ com.apple.security.cs.allow-unsigned-executable-memory
+
+ com.apple.security.cs.allow-dyld-environment-variables
+
+ com.apple.security.cs.disable-library-validation
+
+
+
diff --git a/build/azure-pipelines/darwin/product-build-darwin-test.yml b/build/azure-pipelines/darwin/product-build-darwin-test.yml
index db9fd21edc5..29c7bf90925 100644
--- a/build/azure-pipelines/darwin/product-build-darwin-test.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin-test.yml
@@ -12,9 +12,7 @@ steps:
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- DEBUG=pw:install yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
+ yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
displayName: Download Electron and Playwright
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
diff --git a/build/azure-pipelines/linux/product-build-linux-client-test.yml b/build/azure-pipelines/linux/product-build-linux-client-test.yml
index 2dd36037338..36495873d96 100644
--- a/build/azure-pipelines/linux/product-build-linux-client-test.yml
+++ b/build/azure-pipelines/linux/product-build-linux-client-test.yml
@@ -12,9 +12,7 @@ steps:
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- DEBUG=pw:install yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
+ yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
displayName: Download Electron and Playwright
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml
index c7737600f38..b0631e607dc 100644
--- a/build/azure-pipelines/product-compile.yml
+++ b/build/azure-pipelines/product-compile.yml
@@ -94,11 +94,18 @@ steps:
- script: |
set -e
- yarn npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check
+ yarn npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ yarn --cwd build compile
+ ./.github/workflows/check-clean-git-state.sh
+ displayName: Check /build/ folder
+
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
diff --git a/build/azure-pipelines/win32/product-build-win32-test.yml b/build/azure-pipelines/win32/product-build-win32-test.yml
index b3196c537a4..9a17a88bca7 100644
--- a/build/azure-pipelines/win32/product-build-win32-test.yml
+++ b/build/azure-pipelines/win32/product-build-win32-test.yml
@@ -13,9 +13,7 @@ steps:
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { $env:DEBUG = "pw:install"; yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install" }
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
+ exec { yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install" }
displayName: Download Electron and Playwright
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
diff --git a/build/darwin/sign.js b/build/darwin/sign.js
index 8aabb83c0f9..ef6bef395e4 100644
--- a/build/darwin/sign.js
+++ b/build/darwin/sign.js
@@ -26,6 +26,7 @@ async function main() {
const helperAppBaseName = product.nameShort;
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
+ const pluginHelperAppName = helperAppBaseName + ' Helper (Plugin).app';
const infoPlistPath = path.resolve(appRoot, appName, 'Contents', 'Info.plist');
const defaultOpts = {
app: path.join(appRoot, appName),
@@ -45,7 +46,8 @@ async function main() {
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
ignore: (filePath) => {
return filePath.includes(gpuHelperAppName) ||
- filePath.includes(rendererHelperAppName);
+ filePath.includes(rendererHelperAppName) ||
+ filePath.includes(pluginHelperAppName);
}
};
const gpuHelperOpts = {
@@ -60,6 +62,12 @@ async function main() {
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
};
+ const pluginHelperOpts = {
+ ...defaultOpts,
+ app: path.join(appFrameworkPath, pluginHelperAppName),
+ entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
+ 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
+ };
// Only overwrite plist entries for x64 and arm64 builds,
// universal will get its copy from the x64 build.
if (arch !== 'universal') {
@@ -87,6 +95,7 @@ async function main() {
}
await codesign.signAsync(gpuHelperOpts);
await codesign.signAsync(rendererHelperOpts);
+ await codesign.signAsync(pluginHelperOpts);
await codesign.signAsync(appOpts);
}
if (require.main === module) {
diff --git a/build/darwin/sign.ts b/build/darwin/sign.ts
index 1de593fbdd4..7490d45eaed 100644
--- a/build/darwin/sign.ts
+++ b/build/darwin/sign.ts
@@ -29,6 +29,7 @@ async function main(): Promise {
const helperAppBaseName = product.nameShort;
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
+ const pluginHelperAppName = helperAppBaseName + ' Helper (Plugin).app';
const infoPlistPath = path.resolve(appRoot, appName, 'Contents', 'Info.plist');
const defaultOpts: codesign.SignOptions = {
@@ -50,7 +51,8 @@ async function main(): Promise {
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
ignore: (filePath: string) => {
return filePath.includes(gpuHelperAppName) ||
- filePath.includes(rendererHelperAppName);
+ filePath.includes(rendererHelperAppName) ||
+ filePath.includes(pluginHelperAppName);
}
};
@@ -68,6 +70,13 @@ async function main(): Promise {
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
};
+ const pluginHelperOpts: codesign.SignOptions = {
+ ...defaultOpts,
+ app: path.join(appFrameworkPath, pluginHelperAppName),
+ entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
+ 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
+ };
+
// Only overwrite plist entries for x64 and arm64 builds,
// universal will get its copy from the x64 build.
if (arch !== 'universal') {
@@ -96,6 +105,7 @@ async function main(): Promise {
await codesign.signAsync(gpuHelperOpts);
await codesign.signAsync(rendererHelperOpts);
+ await codesign.signAsync(pluginHelperOpts);
await codesign.signAsync(appOpts as any);
}
diff --git a/build/gulpfile.compile.js b/build/gulpfile.compile.js
index c3049784fe4..5b6ce2d70be 100644
--- a/build/gulpfile.compile.js
+++ b/build/gulpfile.compile.js
@@ -9,13 +9,15 @@ const gulp = require('gulp');
const util = require('./lib/util');
const task = require('./lib/task');
const compilation = require('./lib/compilation');
+const optimize = require('./lib/optimize');
// Full compile, including nls and inline sources in sourcemaps, for build
const compileBuildTask = task.define('compile-build',
task.series(
util.rimraf('out-build'),
util.buildWebNodePaths('out-build'),
- compilation.compileTask('src', 'out-build', true)
+ compilation.compileTask('src', 'out-build', true),
+ optimize.optimizeLoaderTask('out-build', 'out-build', true)
)
);
gulp.task(compileBuildTask);
diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js
index 8e7ff5e3af3..94724bb410d 100644
--- a/build/gulpfile.editor.js
+++ b/build/gulpfile.editor.js
@@ -7,7 +7,7 @@ const gulp = require('gulp');
const path = require('path');
const util = require('./lib/util');
const task = require('./lib/task');
-const common = require('./lib/optimize');
+const optimize = require('./lib/optimize');
const es = require('event-stream');
const File = require('vinyl');
const i18n = require('./lib/i18n');
@@ -86,26 +86,29 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
const compileEditorAMDTask = task.define('compile-editor-amd', compilation.compileTask('out-editor-src', 'out-editor-build', true));
-const optimizeEditorAMDTask = task.define('optimize-editor-amd', common.optimizeTask({
- src: 'out-editor-build',
- entryPoints: editorEntryPoints,
- resources: editorResources,
- loaderConfig: {
- paths: {
- 'vs': 'out-editor-build/vs',
- 'vs/css': 'out-editor-build/vs/css.build',
- 'vs/nls': 'out-editor-build/vs/nls.build',
- 'vscode': 'empty:'
+const optimizeEditorAMDTask = task.define('optimize-editor-amd', optimize.optimizeTask(
+ {
+ out: 'out-editor',
+ amd: {
+ src: 'out-editor-build',
+ entryPoints: editorEntryPoints,
+ resources: editorResources,
+ loaderConfig: {
+ paths: {
+ 'vs': 'out-editor-build/vs',
+ 'vs/css': 'out-editor-build/vs/css.build',
+ 'vs/nls': 'out-editor-build/vs/nls.build',
+ 'vscode': 'empty:'
+ }
+ },
+ header: BUNDLED_FILE_HEADER,
+ bundleInfo: true,
+ languages
}
- },
- bundleLoader: false,
- header: BUNDLED_FILE_HEADER,
- bundleInfo: true,
- out: 'out-editor',
- languages: languages
-}));
+ }
+));
-const minifyEditorAMDTask = task.define('minify-editor-amd', common.minifyTask('out-editor'));
+const minifyEditorAMDTask = task.define('minify-editor-amd', optimize.minifyTask('out-editor'));
const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () => {
standalone.createESMSourcesAndResources2({
diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js
index 1e3a9e4daa3..4023b3860e9 100644
--- a/build/gulpfile.extensions.js
+++ b/build/gulpfile.extensions.js
@@ -20,7 +20,6 @@ const root = path.dirname(__dirname);
const commit = util.getVersion(root);
const plumber = require('gulp-plumber');
const ext = require('./lib/extensions');
-const product = require('../product.json');
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index a07c55232de..980f647c854 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -10,7 +10,7 @@ const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
-const common = require('./lib/optimize');
+const optimize = require('./lib/optimize');
const product = require('../product.json');
const rename = require('gulp-rename');
const replace = require('gulp-replace');
@@ -58,15 +58,10 @@ const serverResources = [
'out-build/bootstrap-fork.js',
'out-build/bootstrap-amd.js',
'out-build/bootstrap-node.js',
- 'out-build/paths.js',
// Performance
'out-build/vs/base/common/performance.js',
- // main entry points
- 'out-build/server-cli.js',
- 'out-build/server-main.js',
-
// Watcher
'out-build/vs/platform/files/**/*.exe',
'out-build/vs/platform/files/**/*.md',
@@ -254,7 +249,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const date = new Date().toISOString();
const productJsonStream = gulp.src(['product.json'], { base: '.' })
- .pipe(json({ commit, date }));
+ .pipe(json({ commit, date, version }));
const license = gulp.src(['remote/LICENSE'], { base: 'remote', allowEmpty: true });
@@ -357,23 +352,42 @@ function tweakProductForServerWeb(product) {
['reh', 'reh-web'].forEach(type => {
const optimizeTask = task.define(`optimize-vscode-${type}`, task.series(
util.rimraf(`out-vscode-${type}`),
- common.optimizeTask({
- src: 'out-build',
- entryPoints: _.flatten(type === 'reh' ? serverEntryPoints : serverWithWebEntryPoints),
- otherSources: [],
- resources: type === 'reh' ? serverResources : serverWithWebResources,
- loaderConfig: common.loaderConfig(),
- out: `out-vscode-${type}`,
- inlineAmdImages: true,
- bundleInfo: undefined,
- fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product)
- })
+ optimize.optimizeTask(
+ {
+ out: `out-vscode-${type}`,
+ amd: {
+ src: 'out-build',
+ entryPoints: _.flatten(type === 'reh' ? serverEntryPoints : serverWithWebEntryPoints),
+ otherSources: [],
+ resources: type === 'reh' ? serverResources : serverWithWebResources,
+ loaderConfig: optimize.loaderConfig(),
+ inlineAmdImages: true,
+ bundleInfo: undefined,
+ fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product)
+ },
+ commonJS: {
+ src: 'out-build',
+ entryPoints: [
+ 'out-build/server-main.js',
+ 'out-build/server-cli.js'
+ ],
+ platform: 'node',
+ external: [
+ 'minimist',
+ // 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'
+ ]
+ }
+ }
+ )
));
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
optimizeTask,
util.rimraf(`out-vscode-${type}-min`),
- common.minifyTask(`out-vscode-${type}`, `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
+ optimize.minifyTask(`out-vscode-${type}`, `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
));
gulp.task(minifyTask);
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index d371e6f3c25..6947d1ee1ed 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -20,7 +20,7 @@ const _ = require('underscore');
const util = require('./lib/util');
const task = require('./lib/task');
const buildfile = require('../src/buildfile');
-const common = require('./lib/optimize');
+const optimize = require('./lib/optimize');
const root = path.dirname(__dirname);
const commit = util.getVersion(root);
const packageJson = require('../package.json');
@@ -52,8 +52,6 @@ const vscodeEntryPoints = _.flatten([
]);
const vscodeResources = [
- 'out-build/main.js',
- 'out-build/cli.js',
'out-build/bootstrap.js',
'out-build/bootstrap-fork.js',
'out-build/bootstrap-amd.js',
@@ -63,12 +61,9 @@ const vscodeResources = [
'!out-build/vs/code/browser/**/*.html',
'!out-build/vs/editor/standalone/**/*.svg',
'out-build/vs/base/common/performance.js',
- 'out-build/vs/base/common/stripComments.js',
- 'out-build/vs/base/node/languagePacks.js',
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
'out-build/vs/base/browser/ui/codicons/codicon/**',
'out-build/vs/base/parts/sandbox/electron-browser/preload.js',
- 'out-build/vs/platform/environment/node/userDataPath.js',
'out-build/vs/workbench/browser/media/*-theme.css',
'out-build/vs/workbench/contrib/debug/**/*.json',
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
@@ -81,23 +76,58 @@ const vscodeResources = [
'out-build/vs/workbench/contrib/tasks/**/*.json',
'out-build/vs/platform/files/**/*.exe',
'out-build/vs/platform/files/**/*.md',
- 'out-build/vs/code/electron-sandbox/workbench/**',
- 'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
- 'out-build/vs/code/electron-sandbox/issue/issueReporter.js',
- 'out-build/vs/code/electron-sandbox/processExplorer/processExplorer.js',
'!**/test/**'
];
+// Do not change the order of these files! They will
+// be inlined into the target window file in this order
+// and they depend on each other in this way.
+const windowBootstrapFiles = [
+ 'out-build/bootstrap.js',
+ 'out-build/vs/loader.js',
+ 'out-build/bootstrap-window.js'
+];
+
const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
util.rimraf('out-vscode'),
- common.optimizeTask({
- src: 'out-build',
- entryPoints: vscodeEntryPoints,
- resources: vscodeResources,
- loaderConfig: common.loaderConfig(),
- out: 'out-vscode',
- bundleInfo: undefined
- })
+ // Optimize: bundles source files automatically based on
+ // AMD and CommonJS import statements based on the passed
+ // in entry points. In addition, concat window related
+ // bootstrap files into a single file.
+ optimize.optimizeTask(
+ {
+ out: 'out-vscode',
+ amd: {
+ src: 'out-build',
+ entryPoints: vscodeEntryPoints,
+ resources: vscodeResources,
+ loaderConfig: optimize.loaderConfig(),
+ bundleInfo: undefined
+ },
+ commonJS: {
+ src: 'out-build',
+ entryPoints: [
+ 'out-build/main.js',
+ 'out-build/cli.js'
+ ],
+ platform: 'node',
+ external: [
+ 'electron',
+ 'minimist',
+ // 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'
+ ]
+ },
+ manual: [
+ { src: [...windowBootstrapFiles, 'out-build/vs/code/electron-sandbox/workbench/workbench.js'], out: 'vs/code/electron-sandbox/workbench/workbench.js' },
+ { src: [...windowBootstrapFiles, 'out-build/vs/code/electron-sandbox/issue/issueReporter.js'], out: 'vs/code/electron-sandbox/issue/issueReporter.js' },
+ { src: [...windowBootstrapFiles, 'out-build/vs/code/electron-sandbox/processExplorer/processExplorer.js'], out: 'vs/code/electron-sandbox/processExplorer/processExplorer.js' },
+ { src: [...windowBootstrapFiles, 'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js'], out: 'vs/code/electron-browser/sharedProcess/sharedProcess.js' }
+ ]
+ }
+ )
));
gulp.task(optimizeVSCodeTask);
@@ -105,7 +135,7 @@ const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${
const minifyVSCodeTask = task.define('minify-vscode', task.series(
optimizeVSCodeTask,
util.rimraf('out-vscode-min'),
- common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
+ optimize.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
));
gulp.task(minifyVSCodeTask);
@@ -211,7 +241,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
.pipe(json(packageJsonUpdates));
const date = new Date().toISOString();
- const productJsonUpdate = { commit, date, checksums };
+ const productJsonUpdate = { commit, date, checksums, version };
if (shouldSetupSettingsSearch()) {
productJsonUpdate.settingsSearchBuildId = getSettingsSearchBuildId(packageJson);
diff --git a/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js
index 8e92d7717ab..c5b09393728 100644
--- a/build/gulpfile.vscode.web.js
+++ b/build/gulpfile.vscode.web.js
@@ -10,7 +10,7 @@ const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
-const common = require('./lib/optimize');
+const optimize = require('./lib/optimize');
const product = require('../product.json');
const rename = require('gulp-rename');
const filter = require('gulp-filter');
@@ -153,24 +153,28 @@ exports.createVSCodeWebFileContentMapper = createVSCodeWebFileContentMapper;
const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
util.rimraf('out-vscode-web'),
- common.optimizeTask({
- src: 'out-build',
- entryPoints: _.flatten(vscodeWebEntryPoints),
- otherSources: [],
- resources: vscodeWebResources,
- loaderConfig: common.loaderConfig(),
- externalLoaderInfo: util.createExternalLoaderConfig(product.webEndpointUrl, commit, quality),
- out: 'out-vscode-web',
- inlineAmdImages: true,
- bundleInfo: undefined,
- fileContentMapper: createVSCodeWebFileContentMapper('.build/web/extensions', product)
- })
+ optimize.optimizeTask(
+ {
+ out: 'out-vscode-web',
+ amd: {
+ src: 'out-build',
+ entryPoints: _.flatten(vscodeWebEntryPoints),
+ otherSources: [],
+ resources: vscodeWebResources,
+ loaderConfig: optimize.loaderConfig(),
+ externalLoaderInfo: util.createExternalLoaderConfig(product.webEndpointUrl, commit, quality),
+ inlineAmdImages: true,
+ bundleInfo: undefined,
+ fileContentMapper: createVSCodeWebFileContentMapper('.build/web/extensions', product)
+ }
+ }
+ )
));
const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
optimizeVSCodeWebTask,
util.rimraf('out-vscode-web-min'),
- common.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
+ optimize.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
));
gulp.task(minifyVSCodeWebTask);
diff --git a/build/lib/optimize.js b/build/lib/optimize.js
index 8333afc7184..92e449a0cea 100644
--- a/build/lib/optimize.js
+++ b/build/lib/optimize.js
@@ -4,7 +4,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
-exports.minifyTask = exports.optimizeTask = exports.loaderConfig = void 0;
+exports.minifyTask = exports.optimizeTask = exports.optimizeLoaderTask = exports.loaderConfig = void 0;
const es = require("event-stream");
const gulp = require("gulp");
const concat = require("gulp-concat");
@@ -135,56 +135,94 @@ const DEFAULT_FILE_HEADER = [
' * Copyright (C) Microsoft Corporation. All rights reserved.',
' *--------------------------------------------------------*/'
].join('\n');
-function optimizeTask(opts) {
+function optimizeAMDTask(opts) {
const src = opts.src;
const entryPoints = opts.entryPoints;
const resources = opts.resources;
const loaderConfig = opts.loaderConfig;
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
- const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
- const out = opts.out;
const fileContentMapper = opts.fileContentMapper || ((contents, _path) => contents);
- return function () {
- const sourcemaps = require('gulp-sourcemaps');
- const bundlesStream = es.through(); // this stream will contain the bundled files
- const resourcesStream = es.through(); // this stream will contain the resources
- const bundleInfoStream = es.through(); // this stream will contain bundleInfo.json
- bundle.bundle(entryPoints, loaderConfig, function (err, result) {
- if (err || !result) {
- return bundlesStream.emit('error', JSON.stringify(err));
+ const sourcemaps = require('gulp-sourcemaps');
+ const bundlesStream = es.through(); // this stream will contain the bundled files
+ const resourcesStream = es.through(); // this stream will contain the resources
+ const bundleInfoStream = es.through(); // this stream will contain bundleInfo.json
+ bundle.bundle(entryPoints, loaderConfig, function (err, result) {
+ if (err || !result) {
+ return bundlesStream.emit('error', JSON.stringify(err));
+ }
+ toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
+ // Remove css inlined resources
+ const filteredResources = resources.slice();
+ result.cssInlinedResources.forEach(function (resource) {
+ if (process.env['VSCODE_BUILD_VERBOSE']) {
+ log('optimizer', 'excluding inlined: ' + resource);
}
- toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
- // Remove css inlined resources
- const filteredResources = resources.slice();
- result.cssInlinedResources.forEach(function (resource) {
- if (process.env['VSCODE_BUILD_VERBOSE']) {
- log('optimizer', 'excluding inlined: ' + resource);
- }
- filteredResources.push('!' + resource);
- });
- gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
- const bundleInfoArray = [];
- if (opts.bundleInfo) {
- bundleInfoArray.push(new VinylFile({
- path: 'bundleInfo.json',
- base: '.',
- contents: Buffer.from(JSON.stringify(result.bundleData, null, '\t'))
- }));
- }
- es.readArray(bundleInfoArray).pipe(bundleInfoStream);
+ filteredResources.push('!' + resource);
});
- const result = es.merge(loader(src, bundledFileHeader, bundleLoader, opts.externalLoaderInfo), bundlesStream, resourcesStream, bundleInfoStream);
- return result
- .pipe(sourcemaps.write('./', {
- sourceRoot: undefined,
- addComment: true,
- includeContent: true
- }))
- .pipe(opts.languages && opts.languages.length ? (0, i18n_1.processNlsFiles)({
- fileHeader: bundledFileHeader,
- languages: opts.languages
- }) : es.through())
- .pipe(gulp.dest(out));
+ gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
+ const bundleInfoArray = [];
+ if (opts.bundleInfo) {
+ bundleInfoArray.push(new VinylFile({
+ path: 'bundleInfo.json',
+ base: '.',
+ contents: Buffer.from(JSON.stringify(result.bundleData, null, '\t'))
+ }));
+ }
+ es.readArray(bundleInfoArray).pipe(bundleInfoStream);
+ });
+ const result = es.merge(loader(src, bundledFileHeader, false, opts.externalLoaderInfo), bundlesStream, resourcesStream, bundleInfoStream);
+ return result
+ .pipe(sourcemaps.write('./', {
+ sourceRoot: undefined,
+ addComment: true,
+ includeContent: true
+ }))
+ .pipe(opts.languages && opts.languages.length ? (0, i18n_1.processNlsFiles)({
+ fileHeader: bundledFileHeader,
+ languages: opts.languages
+ }) : es.through());
+}
+function optimizeCommonJSTask(opts) {
+ const esbuild = require('esbuild');
+ const src = opts.src;
+ const entryPoints = opts.entryPoints;
+ return gulp.src(entryPoints, { base: `${src}`, allowEmpty: true })
+ .pipe(es.map((f, cb) => {
+ esbuild.build({
+ entryPoints: [f.path],
+ bundle: true,
+ platform: opts.platform,
+ write: false,
+ external: opts.external
+ }).then(res => {
+ const jsFile = res.outputFiles[0];
+ f.contents = Buffer.from(jsFile.contents);
+ cb(undefined, f);
+ });
+ }));
+}
+function optimizeManualTask(options) {
+ const concatenations = options.map(opt => {
+ return gulp
+ .src(opt.src)
+ .pipe(concat(opt.out));
+ });
+ return es.merge(...concatenations);
+}
+function optimizeLoaderTask(src, out, bundleLoader, bundledFileHeader = '', externalLoaderInfo) {
+ return () => loader(src, bundledFileHeader, bundleLoader, externalLoaderInfo).pipe(gulp.dest(out));
+}
+exports.optimizeLoaderTask = optimizeLoaderTask;
+function optimizeTask(opts) {
+ return function () {
+ const optimizers = [optimizeAMDTask(opts.amd)];
+ if (opts.commonJS) {
+ optimizers.push(optimizeCommonJSTask(opts.commonJS));
+ }
+ if (opts.manual) {
+ optimizers.push(optimizeManualTask(opts.manual));
+ }
+ return es.merge(...optimizers).pipe(gulp.dest(opts.out));
};
}
exports.optimizeTask = optimizeTask;
diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts
index c7b1981a589..2e3943d79f9 100644
--- a/build/lib/optimize.ts
+++ b/build/lib/optimize.ts
@@ -153,7 +153,7 @@ function toBundleStream(src: string, bundledFileHeader: string, bundles: bundle.
}));
}
-export interface IOptimizeTaskOpts {
+export interface IOptimizeAMDTaskOpts {
/**
* The folder to read files from.
*/
@@ -184,11 +184,7 @@ export interface IOptimizeTaskOpts {
*/
bundleInfo: boolean;
/**
- * (out folder name)
- */
- out: string;
- /**
- * (out folder name)
+ * Language configuration.
*/
languages?: Language[];
/**
@@ -205,67 +201,164 @@ const DEFAULT_FILE_HEADER = [
' *--------------------------------------------------------*/'
].join('\n');
-export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream {
+function optimizeAMDTask(opts: IOptimizeAMDTaskOpts): NodeJS.ReadWriteStream {
const src = opts.src;
const entryPoints = opts.entryPoints;
const resources = opts.resources;
const loaderConfig = opts.loaderConfig;
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
- const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
- const out = opts.out;
const fileContentMapper = opts.fileContentMapper || ((contents: string, _path: string) => contents);
- return function () {
- const sourcemaps = require('gulp-sourcemaps') as typeof import('gulp-sourcemaps');
+ const sourcemaps = require('gulp-sourcemaps') as typeof import('gulp-sourcemaps');
- const bundlesStream = es.through(); // this stream will contain the bundled files
- const resourcesStream = es.through(); // this stream will contain the resources
- const bundleInfoStream = es.through(); // this stream will contain bundleInfo.json
+ const bundlesStream = es.through(); // this stream will contain the bundled files
+ const resourcesStream = es.through(); // this stream will contain the resources
+ const bundleInfoStream = es.through(); // this stream will contain bundleInfo.json
- bundle.bundle(entryPoints, loaderConfig, function (err, result) {
- if (err || !result) { return bundlesStream.emit('error', JSON.stringify(err)); }
+ bundle.bundle(entryPoints, loaderConfig, function (err, result) {
+ if (err || !result) { return bundlesStream.emit('error', JSON.stringify(err)); }
- toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
+ toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
- // Remove css inlined resources
- const filteredResources = resources.slice();
- result.cssInlinedResources.forEach(function (resource) {
- if (process.env['VSCODE_BUILD_VERBOSE']) {
- log('optimizer', 'excluding inlined: ' + resource);
- }
- filteredResources.push('!' + resource);
- });
- gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
-
- const bundleInfoArray: VinylFile[] = [];
- if (opts.bundleInfo) {
- bundleInfoArray.push(new VinylFile({
- path: 'bundleInfo.json',
- base: '.',
- contents: Buffer.from(JSON.stringify(result.bundleData, null, '\t'))
- }));
+ // Remove css inlined resources
+ const filteredResources = resources.slice();
+ result.cssInlinedResources.forEach(function (resource) {
+ if (process.env['VSCODE_BUILD_VERBOSE']) {
+ log('optimizer', 'excluding inlined: ' + resource);
}
- es.readArray(bundleInfoArray).pipe(bundleInfoStream);
+ filteredResources.push('!' + resource);
});
+ gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
- const result = es.merge(
- loader(src, bundledFileHeader, bundleLoader, opts.externalLoaderInfo),
- bundlesStream,
- resourcesStream,
- bundleInfoStream
- );
+ const bundleInfoArray: VinylFile[] = [];
+ if (opts.bundleInfo) {
+ bundleInfoArray.push(new VinylFile({
+ path: 'bundleInfo.json',
+ base: '.',
+ contents: Buffer.from(JSON.stringify(result.bundleData, null, '\t'))
+ }));
+ }
+ es.readArray(bundleInfoArray).pipe(bundleInfoStream);
+ });
- return result
- .pipe(sourcemaps.write('./', {
- sourceRoot: undefined,
- addComment: true,
- includeContent: true
- }))
- .pipe(opts.languages && opts.languages.length ? processNlsFiles({
- fileHeader: bundledFileHeader,
- languages: opts.languages
- }) : es.through())
- .pipe(gulp.dest(out));
+ const result = es.merge(
+ loader(src, bundledFileHeader, false, opts.externalLoaderInfo),
+ bundlesStream,
+ resourcesStream,
+ bundleInfoStream
+ );
+
+ return result
+ .pipe(sourcemaps.write('./', {
+ sourceRoot: undefined,
+ addComment: true,
+ includeContent: true
+ }))
+ .pipe(opts.languages && opts.languages.length ? processNlsFiles({
+ fileHeader: bundledFileHeader,
+ languages: opts.languages
+ }) : es.through());
+}
+
+export interface IOptimizeCommonJSTaskOpts {
+ /**
+ * The paths to consider for optimizing.
+ */
+ entryPoints: string[];
+ /**
+ * The folder to read files from.
+ */
+ src: string;
+ /**
+ * ESBuild `platform` option: https://esbuild.github.io/api/#platform
+ */
+ platform: 'browser' | 'node' | 'neutral';
+ /**
+ * ESBuild `external` option: https://esbuild.github.io/api/#external
+ */
+ external: string[];
+}
+
+function optimizeCommonJSTask(opts: IOptimizeCommonJSTaskOpts): NodeJS.ReadWriteStream {
+ const esbuild = require('esbuild') as typeof import('esbuild');
+
+ const src = opts.src;
+ const entryPoints = opts.entryPoints;
+
+ return gulp.src(entryPoints, { base: `${src}`, allowEmpty: true })
+ .pipe(es.map((f: any, cb) => {
+ esbuild.build({
+ entryPoints: [f.path],
+ bundle: true,
+ platform: opts.platform,
+ write: false,
+ external: opts.external
+ }).then(res => {
+ const jsFile = res.outputFiles[0];
+ f.contents = Buffer.from(jsFile.contents);
+
+ cb(undefined, f);
+ });
+ }));
+}
+
+export interface IOptimizeManualTaskOpts {
+ /**
+ * The paths to consider for concatenation. The entries
+ * will be concatenated in the order they are provided.
+ */
+ src: string[];
+ /**
+ * Destination target to concatenate the entryPoints into.
+ */
+ out: string;
+}
+
+function optimizeManualTask(options: IOptimizeManualTaskOpts[]): NodeJS.ReadWriteStream {
+ const concatenations = options.map(opt => {
+ return gulp
+ .src(opt.src)
+ .pipe(concat(opt.out));
+ });
+
+ return es.merge(...concatenations);
+}
+
+export function optimizeLoaderTask(src: string, out: string, bundleLoader: boolean, bundledFileHeader = '', externalLoaderInfo?: any): () => NodeJS.ReadWriteStream {
+ return () => loader(src, bundledFileHeader, bundleLoader, externalLoaderInfo).pipe(gulp.dest(out));
+}
+
+export interface IOptimizeTaskOpts {
+ /**
+ * Destination folder for the optimized files.
+ */
+ out: string;
+ /**
+ * Optimize AMD modules (using our AMD loader).
+ */
+ amd: IOptimizeAMDTaskOpts;
+ /**
+ * Optimize CommonJS modules (using esbuild).
+ */
+ commonJS?: IOptimizeCommonJSTaskOpts;
+ /**
+ * Optimize manually by concatenating files.
+ */
+ manual?: IOptimizeManualTaskOpts[];
+}
+
+export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream {
+ return function () {
+ const optimizers = [optimizeAMDTask(opts.amd)];
+ if (opts.commonJS) {
+ optimizers.push(optimizeCommonJSTask(opts.commonJS));
+ }
+
+ if (opts.manual) {
+ optimizers.push(optimizeManualTask(opts.manual));
+ }
+
+ return es.merge(...optimizers).pipe(gulp.dest(opts.out));
};
}
diff --git a/build/lib/util.ts b/build/lib/util.ts
index 038fb096d92..6fb799f2699 100644
--- a/build/lib/util.ts
+++ b/build/lib/util.ts
@@ -451,4 +451,3 @@ export function buildWebNodePaths(outDir: string) {
result.taskName = 'build-web-node-paths';
return result;
}
-
diff --git a/cli/src/constants.rs b/cli/src/constants.rs
index 533657abefc..a194f9ab9a1 100644
--- a/cli/src/constants.rs
+++ b/cli/src/constants.rs
@@ -12,6 +12,8 @@ pub const VSCODE_CLI_VERSION: Option<&'static str> = option_env!("VSCODE_CLI_VER
pub const VSCODE_CLI_ASSET_NAME: Option<&'static str> = option_env!("VSCODE_CLI_ASSET_NAME");
pub const VSCODE_CLI_AI_KEY: Option<&'static str> = option_env!("VSCODE_CLI_AI_KEY");
pub const VSCODE_CLI_AI_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_AI_ENDPOINT");
+pub const VSCODE_CLI_UPDATE_ENDPOINT: Option<&'static str> =
+ option_env!("VSCODE_CLI_UPDATE_ENDPOINT");
pub const TUNNEL_SERVICE_USER_AGENT_ENV_VAR: &str = "TUNNEL_SERVICE_USER_AGENT";
diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
index c37715c8a0b..e2513f6ab80 100644
--- a/cli/src/update_service.rs
+++ b/cli/src/update_service.rs
@@ -8,9 +8,12 @@ use std::path::Path;
use serde::Deserialize;
use crate::{
+ constants::VSCODE_CLI_UPDATE_ENDPOINT,
debug, log, options, spanf,
util::{
- errors::{AnyError, StatusError, UnsupportedPlatformError, WrappedError},
+ errors::{
+ AnyError, StatusError, UnsupportedPlatformError, UpdatesNotConfigured, WrappedError,
+ },
io::ReportCopyProgress,
},
};
@@ -54,11 +57,13 @@ impl UpdateService {
quality: options::Quality,
version: &str,
) -> Result {
+ let update_endpoint = VSCODE_CLI_UPDATE_ENDPOINT.ok_or(UpdatesNotConfigured())?;
let download_segment = target
.download_segment(platform)
.ok_or(UnsupportedPlatformError())?;
let download_url = format!(
- "https://update.code.visualstudio.com/api/versions/{}/{}/{}",
+ "{}/api/versions/{}/{}/{}",
+ update_endpoint,
version,
download_segment,
quality_download_segment(quality),
@@ -92,11 +97,13 @@ impl UpdateService {
target: TargetKind,
quality: options::Quality,
) -> Result {
+ let update_endpoint = VSCODE_CLI_UPDATE_ENDPOINT.ok_or(UpdatesNotConfigured())?;
let download_segment = target
.download_segment(platform)
.ok_or(UnsupportedPlatformError())?;
let download_url = format!(
- "https://update.code.visualstudio.com/api/latest/{}/{}",
+ "{}/api/latest/{}/{}",
+ update_endpoint,
download_segment,
quality_download_segment(quality),
);
@@ -127,13 +134,15 @@ impl UpdateService {
&self,
release: &Release,
) -> Result {
+ let update_endpoint = VSCODE_CLI_UPDATE_ENDPOINT.ok_or(UpdatesNotConfigured())?;
let download_segment = release
.target
.download_segment(release.platform)
.ok_or(UnsupportedPlatformError())?;
let download_url = format!(
- "https://update.code.visualstudio.com/commit:{}/{}/{}",
+ "{}/commit:{}/{}/{}",
+ update_endpoint,
release.commit,
download_segment,
quality_download_segment(release.quality),
diff --git a/cli/src/util/errors.rs b/cli/src/util/errors.rs
index 9c643446b6e..47f6a64e359 100644
--- a/cli/src/util/errors.rs
+++ b/cli/src/util/errors.rs
@@ -316,6 +316,14 @@ impl std::fmt::Display for ServerHasClosed {
}
}
+#[derive(Debug)]
+pub struct UpdatesNotConfigured();
+
+impl std::fmt::Display for UpdatesNotConfigured {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ write!(f, "Update service is not configured")
+ }
+}
#[derive(Debug)]
pub struct ServiceAlreadyRegistered();
@@ -408,7 +416,8 @@ makeAnyError!(
CannotForwardControlPort,
ServerHasClosed,
ServiceAlreadyRegistered,
- WindowsNeedsElevation
+ WindowsNeedsElevation,
+ UpdatesNotConfigured
);
impl From for AnyError {
diff --git a/extensions/cpp/language-configuration.json b/extensions/cpp/language-configuration.json
index 2bf73923d91..9a88814ff35 100644
--- a/extensions/cpp/language-configuration.json
+++ b/extensions/cpp/language-configuration.json
@@ -6,8 +6,7 @@
"brackets": [
["{", "}"],
["[", "]"],
- ["(", ")"],
- ["#if","#endif"],
+ ["(", ")"]
],
"autoClosingPairs": [
{ "open": "[", "close": "]" },
diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts
index 1419f3d8cac..1b002799be9 100644
--- a/extensions/git/src/commands.ts
+++ b/extensions/git/src/commands.ts
@@ -1148,21 +1148,38 @@ export class CommandCenter {
}
@command('git.acceptMerge')
- async acceptMerge(uri: Uri | unknown): Promise {
- if (!(uri instanceof Uri)) {
+ async acceptMerge(_uri: Uri | unknown): Promise {
+ const { activeTab } = window.tabGroups.activeTabGroup;
+ if (!activeTab) {
return;
}
+
+ if (!(activeTab.input instanceof TabInputTextMerge)) {
+ return;
+ }
+
+ const uri = activeTab.input.result;
+
const repository = this.model.getRepository(uri);
if (!repository) {
console.log(`FAILED to accept merge because uri ${uri.toString()} doesn't belong to any repository`);
return;
}
- const { activeTab } = window.tabGroups.activeTabGroup;
- if (!activeTab) {
+ const result = await commands.executeCommand('mergeEditor.acceptMerge') as { successful: boolean };
+ if (result.successful) {
+ await repository.add([uri]);
+ await commands.executeCommand('workbench.view.scm');
+ }
+
+ /*
+ if (!(uri instanceof Uri)) {
return;
}
+
+
+
// make sure to save the merged document
const doc = workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
if (!doc) {
@@ -1185,7 +1202,7 @@ export class CommandCenter {
if (didCloseTab) {
await repository.add([uri]);
await commands.executeCommand('workbench.view.scm');
- }
+ }*/
}
@command('git.runGitMerge')
diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts
index bfb61d4266c..e24306ff800 100644
--- a/extensions/git/src/statusbar.ts
+++ b/extensions/git/src/statusbar.ts
@@ -25,12 +25,12 @@ class CheckoutStatusBar {
get command(): Command | undefined {
const rebasing = !!this.repository.rebaseCommit;
const isBranchProtected = this.repository.isBranchProtected();
- const title = `${isBranchProtected ? '$(lock)' : '$(git-branch)'} ${this.repository.headLabel}${rebasing ? ` (${localize('rebasing', 'Rebasing')})` : ''}`;
+ const label = `${this.repository.headLabel}${rebasing ? ` (${localize('rebasing', 'Rebasing')})` : ''}`;
return {
command: 'git.checkout',
- tooltip: localize('checkout', "Checkout branch/tag..."),
- title,
+ tooltip: localize('checkout', "{0}, Checkout branch/tag...", label),
+ title: `${isBranchProtected ? '$(lock)' : '$(git-branch)'} ${label}`,
arguments: [this.repository.sourceControl]
};
}
diff --git a/extensions/github-authentication/src/experimentationService.ts b/extensions/github-authentication/src/experimentationService.ts
index e3297ddd50e..16923309b4e 100644
--- a/extensions/github-authentication/src/experimentationService.ts
+++ b/extensions/github-authentication/src/experimentationService.ts
@@ -18,14 +18,19 @@ export class ExperimentationTelemetry implements IExperimentationTelemetry {
switch (vscode.env.uriScheme) {
case 'vscode':
targetPopulation = TargetPopulation.Public;
+ break;
case 'vscode-insiders':
targetPopulation = TargetPopulation.Insiders;
+ break;
case 'vscode-exploration':
targetPopulation = TargetPopulation.Internal;
+ break;
case 'code-oss':
targetPopulation = TargetPopulation.Team;
+ break;
default:
targetPopulation = TargetPopulation.Public;
+ break;
}
const id = this.context.extension.id;
diff --git a/extensions/github/package.json b/extensions/github/package.json
index dd59ef3046d..1b21d4b52a1 100644
--- a/extensions/github/package.json
+++ b/extensions/github/package.json
@@ -77,13 +77,15 @@
"file/share": [
{
"command": "github.copyVscodeDevLinkFile",
- "when": "github.hasGitHubRepo"
+ "when": "github.hasGitHubRepo",
+ "group": "0_vscode@0"
}
],
"editor/context/share": [
{
"command": "github.copyVscodeDevLink",
- "when": "github.hasGitHubRepo && resourceScheme != untitled"
+ "when": "github.hasGitHubRepo && resourceScheme != untitled",
+ "group": "0_vscode@0"
}
]
},
diff --git a/extensions/image-preview/src/imagePreview/index.ts b/extensions/image-preview/src/imagePreview/index.ts
index 37dc18c4c0f..5c0d56933ba 100644
--- a/extensions/image-preview/src/imagePreview/index.ts
+++ b/extensions/image-preview/src/imagePreview/index.ts
@@ -119,6 +119,12 @@ class ImagePreview extends MediaPreview {
this.webviewEditor.webview.postMessage({ type: 'setActive', value: this.webviewEditor.active });
}
+ public override dispose(): void {
+ super.dispose();
+ this.sizeStatusBarEntry.hide(this);
+ this.zoomStatusBarEntry.hide(this);
+ }
+
public zoomIn() {
if (this.previewState === PreviewState.Active) {
this.webviewEditor.webview.postMessage({ type: 'zoomIn' });
diff --git a/extensions/image-preview/src/mediaPreview.ts b/extensions/image-preview/src/mediaPreview.ts
index 7c56c3fe6ae..424f197cc34 100644
--- a/extensions/image-preview/src/mediaPreview.ts
+++ b/extensions/image-preview/src/mediaPreview.ts
@@ -48,10 +48,8 @@ export abstract class MediaPreview extends Disposable {
}));
this._register(webviewEditor.onDidDispose(() => {
- if (this.previewState === PreviewState.Active) {
- this.binarySizeStatusBarEntry.hide(this);
- }
this.previewState = PreviewState.Disposed;
+ this.dispose();
}));
const watcher = this._register(vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(resource, '*')));
@@ -69,6 +67,11 @@ export abstract class MediaPreview extends Disposable {
}));
}
+ public override dispose() {
+ super.dispose();
+ this.binarySizeStatusBarEntry.hide(this);
+ }
+
protected updateBinarySize() {
vscode.workspace.fs.stat(this.resource).then(({ size }) => {
this._binarySize = size;
diff --git a/extensions/markdown-language-features/notebook/index.ts b/extensions/markdown-language-features/notebook/index.ts
index 05ebb019dec..5728903e212 100644
--- a/extensions/markdown-language-features/notebook/index.ts
+++ b/extensions/markdown-language-features/notebook/index.ts
@@ -8,21 +8,27 @@ import MarkdownIt from 'markdown-it';
import type * as MarkdownItToken from 'markdown-it/lib/token';
import type { ActivationFunction } from 'vscode-notebook-renderer';
-const allowedHtmlTags = Object.freeze([
- 'a',
+const allowedHtmlTags = Object.freeze(['a',
+ 'abbr',
'b',
+ 'bdo',
'blockquote',
'br',
- 'button',
'caption',
- 'center',
+ 'cite',
'code',
'col',
'colgroup',
+ 'dd',
+ 'del',
'details',
+ 'dfn',
'div',
+ 'dl',
+ 'dt',
'em',
- 'font',
+ 'figcaption',
+ 'figure',
'h1',
'h2',
'h3',
@@ -32,16 +38,23 @@ const allowedHtmlTags = Object.freeze([
'hr',
'i',
'img',
- 'input',
+ 'ins',
'kbd',
'label',
'li',
+ 'mark',
'ol',
'p',
'pre',
- 'select',
+ 'q',
+ 'rp',
+ 'rt',
+ 'ruby',
+ 'samp',
+ 'small',
'small',
'span',
+ 'strike',
'strong',
'sub',
'summary',
@@ -49,15 +62,17 @@ const allowedHtmlTags = Object.freeze([
'table',
'tbody',
'td',
- 'textarea',
'tfoot',
'th',
'thead',
+ 'time',
'tr',
'tt',
'u',
'ul',
+ 'var',
'video',
+ 'wbr',
]);
const allowedSvgTags = Object.freeze([
@@ -377,7 +392,7 @@ function slugify(text: string): string {
.toLowerCase()
.replace(/\s+/g, '-') // Replace whitespace with -
// allow-any-unicode-next-line
- .replace(/[\]\[\!\'\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known punctuators
+ .replace(/[\]\[\!\/\'\"\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known punctuators
.replace(/^\-+/, '') // Remove leading -
.replace(/\-+$/, '') // Remove trailing -
);
diff --git a/extensions/markdown-language-features/package.json b/extensions/markdown-language-features/package.json
index 43e55685b12..49c00bf6154 100644
--- a/extensions/markdown-language-features/package.json
+++ b/extensions/markdown-language-features/package.json
@@ -434,81 +434,63 @@
"experimental"
]
},
- "markdown.experimental.validate.enabled": {
+ "markdown.validate.enabled": {
"type": "boolean",
"scope": "resource",
- "description": "%configuration.markdown.experimental.validate.enabled.description%",
- "default": false,
- "tags": [
- "experimental"
- ]
+ "description": "%configuration.markdown.validate.enabled.description%",
+ "default": false
},
- "markdown.experimental.validate.referenceLinks.enabled": {
+ "markdown.validate.referenceLinks.enabled": {
"type": "string",
"scope": "resource",
- "markdownDescription": "%configuration.markdown.experimental.validate.referenceLinks.enabled.description%",
+ "markdownDescription": "%configuration.markdown.validate.referenceLinks.enabled.description%",
"default": "warning",
"enum": [
"ignore",
"warning",
"error"
- ],
- "tags": [
- "experimental"
]
},
- "markdown.experimental.validate.fragmentLinks.enabled": {
+ "markdown.validate.fragmentLinks.enabled": {
"type": "string",
"scope": "resource",
- "markdownDescription": "%configuration.markdown.experimental.validate.fragmentLinks.enabled.description%",
+ "markdownDescription": "%configuration.markdown.validate.fragmentLinks.enabled.description%",
"default": "warning",
"enum": [
"ignore",
"warning",
"error"
- ],
- "tags": [
- "experimental"
]
},
- "markdown.experimental.validate.fileLinks.enabled": {
+ "markdown.validate.fileLinks.enabled": {
"type": "string",
"scope": "resource",
- "markdownDescription": "%configuration.markdown.experimental.validate.fileLinks.enabled.description%",
+ "markdownDescription": "%configuration.markdown.validate.fileLinks.enabled.description%",
"default": "warning",
"enum": [
"ignore",
"warning",
"error"
- ],
- "tags": [
- "experimental"
]
},
- "markdown.experimental.validate.fileLinks.markdownFragmentLinks": {
+ "markdown.validate.fileLinks.markdownFragmentLinks": {
"type": "string",
"scope": "resource",
- "markdownDescription": "%configuration.markdown.experimental.validate.fileLinks.markdownFragmentLinks.description%",
+ "markdownDescription": "%configuration.markdown.validate.fileLinks.markdownFragmentLinks.description%",
"default": "ignore",
"enum": [
"ignore",
"warning",
"error"
- ],
- "tags": [
- "experimental"
]
},
- "markdown.experimental.validate.ignoreLinks": {
+ "markdown.validate.ignoredLinks": {
"type": "array",
"scope": "resource",
- "markdownDescription": "%configuration.markdown.experimental.validate.ignoreLinks.description%",
+ "markdownDescription": "%configuration.markdown.validate.ignoredLinks.description%",
"items": {
"type": "string"
- },
- "tags": [
- "experimental"
- ]
+ }
},
"markdown.experimental.updateLinksOnFileMove.enabled": {
"type": "string",
diff --git a/extensions/markdown-language-features/package.nls.json b/extensions/markdown-language-features/package.nls.json
index d4cea703cc2..3aae783308d 100644
--- a/extensions/markdown-language-features/package.nls.json
+++ b/extensions/markdown-language-features/package.nls.json
@@ -31,12 +31,12 @@
"configuration.markdown.suggest.paths.enabled.description": "Enable/disable path suggestions for markdown links",
"configuration.markdown.editor.drop.enabled": "Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#editor.dropIntoEditor.enabled#`.",
"configuration.markdown.editor.pasteLinks.enabled": "Enable/disable pasting files into a Markdown editor inserts Markdown links. Requires enabling `#editor.experimental.pasteActions.enabled#`.",
- "configuration.markdown.experimental.validate.enabled.description": "Enable/disable all error reporting in Markdown files.",
- "configuration.markdown.experimental.validate.referenceLinks.enabled.description": "Validate reference links in Markdown files, e.g. `[link][ref]`. Requires enabling `#markdown.experimental.validate.enabled#`.",
- "configuration.markdown.experimental.validate.fragmentLinks.enabled.description": "Validate fragment links to headers in the current Markdown file, e.g. `[link](#header)`. Requires enabling `#markdown.experimental.validate.enabled#`.",
- "configuration.markdown.experimental.validate.fileLinks.enabled.description": "Validate links to other files in Markdown files, e.g. `[link](/path/to/file.md)`. This checks that the target files exists. Requires enabling `#markdown.experimental.validate.enabled#`.",
- "configuration.markdown.experimental.validate.fileLinks.markdownFragmentLinks.description": "Validate the fragment part of links to headers in other files in Markdown files, e.g. `[link](/path/to/file.md#header)`. Inherits the setting value from `#markdown.experimental.validate.fragmentLinks.enabled#` by default.",
- "configuration.markdown.experimental.validate.ignoreLinks.description": "Configure links that should not be validated. For example `/about` would not validate the link `[about](/about)`, while the glob `/assets/**/*.svg` would let you skip validation for any link to `.svg` files under the `assets` directory.",
+ "configuration.markdown.validate.enabled.description": "Enable/disable all error reporting in Markdown files.",
+ "configuration.markdown.validate.referenceLinks.enabled.description": "Validate reference links in Markdown files, e.g. `[link][ref]`. Requires enabling `#markdown.validate.enabled#`.",
+ "configuration.markdown.validate.fragmentLinks.enabled.description": "Validate fragment links to headers in the current Markdown file, e.g. `[link](#header)`. Requires enabling `#markdown.validate.enabled#`.",
+ "configuration.markdown.validate.fileLinks.enabled.description": "Validate links to other files in Markdown files, e.g. `[link](/path/to/file.md)`. This checks that the target files exists. Requires enabling `#markdown.validate.enabled#`.",
+ "configuration.markdown.validate.fileLinks.markdownFragmentLinks.description": "Validate the fragment part of links to headers in other files in Markdown files, e.g. `[link](/path/to/file.md#header)`. Inherits the setting value from `#markdown.validate.fragmentLinks.enabled#` by default.",
+ "configuration.markdown.validate.ignoredLinks.description": "Configure links that should not be validated. For example adding `/about` would not validate the link `[about](/about)`, while the glob `/assets/**/*.svg` would let you skip validation for any link to `.svg` files under the `assets` directory.",
"configuration.markdown.experimental.updateLinksOnFileMove.enabled": "Try to update links in Markdown files when a file is renamed/moved in the workspace. Use `#markdown.experimental.updateLinksOnFileMove.externalFileGlobs#` to configure which files trigger link updates.",
"configuration.markdown.experimental.updateLinksOnFileMove.enabled.prompt": "Prompt on each file move.",
"configuration.markdown.experimental.updateLinksOnFileMove.enabled.always": "Always update links automatically.",
diff --git a/extensions/markdown-language-features/server/README.md b/extensions/markdown-language-features/server/README.md
index 49670fc800d..761baf37719 100644
--- a/extensions/markdown-language-features/server/README.md
+++ b/extensions/markdown-language-features/server/README.md
@@ -36,7 +36,7 @@ This server uses the [Markdown Language Service](https://github.com/microsoft/vs
- (experimental) Updating links when a file is moved / renamed. Uses a custom `markdown/getEditForFileRenames` message.
-- (experimental) [Pull diagnostics (validation)](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics) for links.
+- [Pull diagnostics (validation)](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics) for links.
## Client requirements
@@ -56,17 +56,16 @@ The server supports the following settings:
- `suggest`
- `paths`
- `enabled` — Enable/disable path suggestions.
- - `experimental`
- - `validate`
- - `enabled` — Enable/disable all validation.
- - `referenceLinks`
- - `enabled` — Enable/disable validation of reference links: `[text][ref]`
- - `fragmentLinks`
- - `enabled` — Enable/disable validation of links to fragments in the current files: `[text](#head)`
- - `fileLinks`
- - `enabled` — Enable/disable validation of links to file in the workspace.
- - `markdownFragmentLinks` — Enable/disable validation of links to headers in other Markdown files.
- - `ignoreLinks` — Array of glob patterns for files that should not be validated.
+ - `validate`
+ - `enabled` — Enable/disable all validation.
+ - `referenceLinks`
+ - `enabled` — Enable/disable validation of reference links: `[text][ref]`
+ - `fragmentLinks`
+ - `enabled` — Enable/disable validation of links to fragments in the current files: `[text](#head)`
+ - `fileLinks`
+ - `enabled` — Enable/disable validation of links to file in the workspace.
+ - `markdownFragmentLinks` — Enable/disable validation of links to headers in other Markdown files.
+ - `ignoredLinks` — Array of glob patterns for files that should not be validated.
### Custom requests
diff --git a/extensions/markdown-language-features/server/package.json b/extensions/markdown-language-features/server/package.json
index 2f153ddae9a..c38c618f05d 100644
--- a/extensions/markdown-language-features/server/package.json
+++ b/extensions/markdown-language-features/server/package.json
@@ -13,7 +13,7 @@
"vscode-languageserver": "^8.0.2",
"vscode-languageserver-textdocument": "^1.0.5",
"vscode-languageserver-types": "^3.17.1",
- "vscode-markdown-languageservice": "^0.1.0-alpha.6",
+ "vscode-markdown-languageservice": "^0.1.0-alpha.10",
"vscode-nls": "^5.0.1",
"vscode-uri": "^3.0.3"
},
diff --git a/extensions/markdown-language-features/server/src/config.ts b/extensions/markdown-language-features/server/src/config.ts
index 6f9d85fbf1d..5992258b0b6 100644
--- a/extensions/markdown-language-features/server/src/config.ts
+++ b/extensions/markdown-language-features/server/src/config.ts
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import { LsConfiguration } from 'vscode-markdown-languageservice/out/config';
+import { LsConfiguration } from 'vscode-markdown-languageservice';
export { LsConfiguration };
diff --git a/extensions/markdown-language-features/server/src/configuration.ts b/extensions/markdown-language-features/server/src/configuration.ts
index 5066b3110a6..69358261f82 100644
--- a/extensions/markdown-language-features/server/src/configuration.ts
+++ b/extensions/markdown-language-features/server/src/configuration.ts
@@ -16,21 +16,19 @@ interface Settings {
};
};
- readonly experimental: {
- readonly validate: {
- readonly enabled: true;
- readonly referenceLinks: {
- readonly enabled: ValidateEnabled;
- };
- readonly fragmentLinks: {
- readonly enabled: ValidateEnabled;
- };
- readonly fileLinks: {
- readonly enabled: ValidateEnabled;
- readonly markdownFragmentLinks: ValidateEnabled;
- };
- readonly ignoreLinks: readonly string[];
+ readonly validate: {
+ readonly enabled: true;
+ readonly referenceLinks: {
+ readonly enabled: ValidateEnabled;
};
+ readonly fragmentLinks: {
+ readonly enabled: ValidateEnabled;
+ };
+ readonly fileLinks: {
+ readonly enabled: ValidateEnabled;
+ readonly markdownFragmentLinks: ValidateEnabled;
+ };
+ readonly ignoredLinks: readonly string[];
};
};
}
@@ -56,4 +54,4 @@ export class ConfigurationManager extends Disposable {
public getSettings(): Settings | undefined {
return this._settings;
}
-}
\ No newline at end of file
+}
diff --git a/extensions/markdown-language-features/server/src/languageFeatures/diagnostics.ts b/extensions/markdown-language-features/server/src/languageFeatures/diagnostics.ts
index 092f337f949..d0f4d9c73af 100644
--- a/extensions/markdown-language-features/server/src/languageFeatures/diagnostics.ts
+++ b/extensions/markdown-language-features/server/src/languageFeatures/diagnostics.ts
@@ -5,10 +5,10 @@
import { Connection, FullDocumentDiagnosticReport, TextDocuments, UnchangedDocumentDiagnosticReport } from 'vscode-languageserver';
import * as md from 'vscode-markdown-languageservice';
-import { disposeAll } from 'vscode-markdown-languageservice/out/util/dispose';
import { Disposable } from 'vscode-notebook-renderer/events';
import { URI } from 'vscode-uri';
import { ConfigurationManager, ValidateEnabled } from '../configuration';
+import { disposeAll } from '../util/dispose';
const defaultDiagnosticOptions: md.DiagnosticOptions = {
validateFileLinks: md.DiagnosticLevel.ignore,
@@ -34,11 +34,11 @@ function getDiagnosticsOptions(config: ConfigurationManager): md.DiagnosticOptio
}
return {
- validateFileLinks: convertDiagnosticLevel(settings.markdown.experimental.validate.fileLinks.enabled),
- validateReferences: convertDiagnosticLevel(settings.markdown.experimental.validate.referenceLinks.enabled),
- validateFragmentLinks: convertDiagnosticLevel(settings.markdown.experimental.validate.fragmentLinks.enabled),
- validateMarkdownFileLinkFragments: convertDiagnosticLevel(settings.markdown.experimental.validate.fileLinks.markdownFragmentLinks),
- ignoreLinks: settings.markdown.experimental.validate.ignoreLinks,
+ validateFileLinks: convertDiagnosticLevel(settings.markdown.validate.fileLinks.enabled),
+ validateReferences: convertDiagnosticLevel(settings.markdown.validate.referenceLinks.enabled),
+ validateFragmentLinks: convertDiagnosticLevel(settings.markdown.validate.fragmentLinks.enabled),
+ validateMarkdownFileLinkFragments: convertDiagnosticLevel(settings.markdown.validate.fileLinks.markdownFragmentLinks),
+ ignoreLinks: settings.markdown.validate.ignoredLinks,
};
}
@@ -69,7 +69,7 @@ export function registerValidateSupport(
connection.languages.diagnostics.on(async (params, token): Promise => {
logger.log(md.LogLevel.Trace, 'Server: connection.languages.diagnostics.on', params.textDocument.uri);
- if (!config.getSettings()?.markdown.experimental.validate.enabled) {
+ if (!config.getSettings()?.markdown.validate.enabled) {
return emptyDiagnosticsResponse;
}
diff --git a/extensions/markdown-language-features/server/src/protocol.ts b/extensions/markdown-language-features/server/src/protocol.ts
index ab407b4afc5..e1dc9aee785 100644
--- a/extensions/markdown-language-features/server/src/protocol.ts
+++ b/extensions/markdown-language-features/server/src/protocol.ts
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import { RequestType } from 'vscode-languageserver';
+import { FileRename, RequestType } from 'vscode-languageserver';
import type * as lsp from 'vscode-languageserver-types';
import type * as md from 'vscode-markdown-languageservice';
@@ -22,7 +22,7 @@ export const findMarkdownFilesInWorkspace = new RequestType<{}, string[], any>('
//#region To server
export const getReferencesToFileInWorkspace = new RequestType<{ uri: string }, lsp.Location[], any>('markdown/getReferencesToFileInWorkspace');
-export const getEditForFileRenames = new RequestType, lsp.WorkspaceEdit, any>('markdown/getEditForFileRenames');
+export const getEditForFileRenames = new RequestType('markdown/getEditForFileRenames');
export const fs_watcher_onChange = new RequestType<{ id: number; uri: string; kind: 'create' | 'change' | 'delete' }, void, any>('markdown/fs/watcher/onChange');
diff --git a/extensions/markdown-language-features/server/src/server.ts b/extensions/markdown-language-features/server/src/server.ts
index a45607af422..95a088b439b 100644
--- a/extensions/markdown-language-features/server/src/server.ts
+++ b/extensions/markdown-language-features/server/src/server.ts
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import { CancellationToken, Connection, InitializeParams, InitializeResult, NotebookDocuments, TextDocuments } from 'vscode-languageserver';
+import { CancellationToken, Connection, InitializeParams, InitializeResult, NotebookDocuments, ResponseError, TextDocuments } from 'vscode-languageserver';
import { TextDocument } from 'vscode-languageserver-textdocument';
import * as lsp from 'vscode-languageserver-types';
import * as md from 'vscode-markdown-languageservice';
@@ -170,7 +170,16 @@ export async function startServer(connection: Connection, serverConfig: {
if (!document) {
return undefined;
}
- return mdLs!.prepareRename(document, params.position, token);
+
+ try {
+ return await mdLs!.prepareRename(document, params.position, token);
+ } catch (e) {
+ if (e instanceof md.RenameNotSupportedAtLocationError) {
+ throw new ResponseError(0, e.message);
+ } else {
+ throw e;
+ }
+ }
});
connection.onRenameRequest(async (params, token) => {
@@ -228,7 +237,15 @@ export async function startServer(connection: Connection, serverConfig: {
}));
connection.onRequest(protocol.getEditForFileRenames, (async (params, token: CancellationToken) => {
- return mdLs!.getRenameFilesInWorkspaceEdit(params.map(x => ({ oldUri: URI.parse(x.oldUri), newUri: URI.parse(x.newUri) })), token);
+ const result = await mdLs!.getRenameFilesInWorkspaceEdit(params.map(x => ({ oldUri: URI.parse(x.oldUri), newUri: URI.parse(x.newUri) })), token);
+ if (!result) {
+ return result;
+ }
+
+ return {
+ edit: result.edit,
+ participatingRenames: result.participatingRenames.map(rename => ({ oldUri: rename.oldUri.toString(), newUri: rename.newUri.toString() }))
+ };
}));
connection.onRequest(protocol.resolveLinkTarget, (async (params, token: CancellationToken) => {
diff --git a/extensions/markdown-language-features/server/yarn.lock b/extensions/markdown-language-features/server/yarn.lock
index 54f91c0a3bd..00347dd2bd8 100644
--- a/extensions/markdown-language-features/server/yarn.lock
+++ b/extensions/markdown-language-features/server/yarn.lock
@@ -42,10 +42,10 @@ vscode-languageserver@^8.0.2:
dependencies:
vscode-languageserver-protocol "3.17.2"
-vscode-markdown-languageservice@^0.1.0-alpha.6:
- version "0.1.0-alpha.6"
- resolved "https://registry.yarnpkg.com/vscode-markdown-languageservice/-/vscode-markdown-languageservice-0.1.0-alpha.6.tgz#cc82c608d816b7b73459e648bf29ed49946d5425"
- integrity sha512-EhWN8Y3HJTgI2XR39F0sHSRLMbTTKiMbQedf/d4SJupA1ks0kPQyQz/Ystp1Aua44Z/nNcYo4UNNFOOM0sxRPw==
+vscode-markdown-languageservice@^0.1.0-alpha.10:
+ version "0.1.0-alpha.10"
+ resolved "https://registry.yarnpkg.com/vscode-markdown-languageservice/-/vscode-markdown-languageservice-0.1.0-alpha.10.tgz#012dcf600b9d1a738cd7071f17627285342d17c7"
+ integrity sha512-GZTxGZp49BIf/k5plc5x+Bp70kmwaTdt523p+wifG9AQ0uKMSRcwmlKu8mOcJUd0ZvDR3ORI/Cze90Dy5HCM2A==
dependencies:
picomatch "^2.3.1"
vscode-languageserver-textdocument "^1.0.5"
diff --git a/extensions/markdown-language-features/src/client/protocol.ts b/extensions/markdown-language-features/src/client/protocol.ts
index 92ec2c0e80a..f906460fce9 100644
--- a/extensions/markdown-language-features/src/client/protocol.ts
+++ b/extensions/markdown-language-features/src/client/protocol.ts
@@ -5,7 +5,7 @@
import type Token = require('markdown-it/lib/token');
import * as vscode from 'vscode';
-import { RequestType } from 'vscode-languageclient';
+import { FileRename, RequestType } from 'vscode-languageclient';
import type * as lsp from 'vscode-languageserver-types';
import type * as md from 'vscode-markdown-languageservice';
@@ -30,7 +30,7 @@ export const findMarkdownFilesInWorkspace = new RequestType<{}, string[], any>('
//#region To server
export const getReferencesToFileInWorkspace = new RequestType<{ uri: string }, lsp.Location[], any>('markdown/getReferencesToFileInWorkspace');
-export const getEditForFileRenames = new RequestType, lsp.WorkspaceEdit, any>('markdown/getEditForFileRenames');
+export const getEditForFileRenames = new RequestType, { participatingRenames: readonly FileRename[]; edit: lsp.WorkspaceEdit }, any>('markdown/getEditForFileRenames');
export const fs_watcher_onChange = new RequestType<{ id: number; uri: string; kind: 'create' | 'change' | 'delete' }, void, any>('markdown/fs/watcher/onChange');
diff --git a/extensions/markdown-language-features/src/languageFeatures/copyPaste.ts b/extensions/markdown-language-features/src/languageFeatures/copyPaste.ts
index 5f6eb16b972..960d01b7a19 100644
--- a/extensions/markdown-language-features/src/languageFeatures/copyPaste.ts
+++ b/extensions/markdown-language-features/src/languageFeatures/copyPaste.ts
@@ -85,7 +85,7 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
const baseName = path.basename(file.name, ext);
for (let i = 0; ; ++i) {
const name = i === 0 ? baseName : `${baseName}-${i}`;
- const uri = vscode.Uri.joinPath(root, `${name}.${ext}`);
+ const uri = vscode.Uri.joinPath(root, `${name}${ext}`);
try {
await vscode.workspace.fs.stat(uri);
} catch {
diff --git a/extensions/markdown-language-features/src/languageFeatures/diagnostics.ts b/extensions/markdown-language-features/src/languageFeatures/diagnostics.ts
index 6ae36b84aaf..30c6b5be49c 100644
--- a/extensions/markdown-language-features/src/languageFeatures/diagnostics.ts
+++ b/extensions/markdown-language-features/src/languageFeatures/diagnostics.ts
@@ -33,7 +33,7 @@ class AddToIgnoreLinksQuickFixProvider implements vscode.CodeActionProvider {
const commandReg = commandManager.register({
id: AddToIgnoreLinksQuickFixProvider._addToIgnoreLinksCommandId,
execute(resource: vscode.Uri, path: string) {
- const settingId = 'experimental.validate.ignoreLinks';
+ const settingId = 'validate.ignoredLinks';
const config = vscode.workspace.getConfiguration('markdown', resource);
const paths = new Set(config.get(settingId, []));
paths.add(path);
diff --git a/extensions/markdown-language-features/src/languageFeatures/linkUpdater.ts b/extensions/markdown-language-features/src/languageFeatures/linkUpdater.ts
index f0209a60edc..cfe16893b39 100644
--- a/extensions/markdown-language-features/src/languageFeatures/linkUpdater.ts
+++ b/extensions/markdown-language-features/src/languageFeatures/linkUpdater.ts
@@ -69,18 +69,11 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
const renames = Array.from(this._pendingRenames);
this._pendingRenames.clear();
- const edit = new vscode.WorkspaceEdit();
- const resourcesBeingRenamed: vscode.Uri[] = [];
+ const result = await this.getEditsForFileRename(renames, noopToken);
- for (const { oldUri, newUri } of renames) {
- if (await this.withEditsForFileRename(edit, oldUri, newUri, noopToken)) {
- resourcesBeingRenamed.push(newUri);
- }
- }
-
- if (edit.size) {
- if (await this.confirmActionWithUser(resourcesBeingRenamed)) {
- await vscode.workspace.applyEdit(edit);
+ if (result && result.edit.size) {
+ if (await this.confirmActionWithUser(result.resourcesBeingRenamed)) {
+ await vscode.workspace.applyEdit(result.edit);
}
}
}
@@ -194,25 +187,25 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
return false;
}
- private async withEditsForFileRename(
- workspaceEdit: vscode.WorkspaceEdit,
- oldUri: vscode.Uri,
- newUri: vscode.Uri,
- token: vscode.CancellationToken,
- ): Promise {
- const edit = await this.client.getEditForFileRenames([{ oldUri: oldUri.toString(), newUri: newUri.toString() }], token);
- if (!edit.documentChanges?.length) {
- return false;
+ private async getEditsForFileRename(renames: readonly RenameAction[], token: vscode.CancellationToken): Promise<{ edit: vscode.WorkspaceEdit; resourcesBeingRenamed: vscode.Uri[] } | undefined> {
+ const result = await this.client.getEditForFileRenames(renames.map(rename => ({ oldUri: rename.oldUri.toString(), newUri: rename.newUri.toString() })), token);
+ if (!result?.edit.documentChanges?.length) {
+ return undefined;
}
- for (const change of edit.documentChanges as TextDocumentEdit[]) {
+ const workspaceEdit = new vscode.WorkspaceEdit();
+
+ for (const change of result.edit.documentChanges as TextDocumentEdit[]) {
const uri = vscode.Uri.parse(change.textDocument.uri);
for (const edit of change.edits) {
workspaceEdit.replace(uri, convertRange(edit.range), edit.newText);
}
}
- return true;
+ return {
+ edit: workspaceEdit,
+ resourcesBeingRenamed: result.participatingRenames.map(x => vscode.Uri.parse(x.newUri)),
+ };
}
private getConfirmMessage(start: string, resourcesToConfirm: readonly vscode.Uri[]): string {
diff --git a/extensions/merge-conflict/package.json b/extensions/merge-conflict/package.json
index d10085c4fc6..978341508f8 100644
--- a/extensions/merge-conflict/package.json
+++ b/extensions/merge-conflict/package.json
@@ -34,43 +34,50 @@
"category": "%command.category%",
"title": "%command.accept.all-current%",
"original": "Accept All Current",
- "command": "merge-conflict.accept.all-current"
+ "command": "merge-conflict.accept.all-current",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.all-incoming%",
"original": "Accept All Incoming",
- "command": "merge-conflict.accept.all-incoming"
+ "command": "merge-conflict.accept.all-incoming",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.all-both%",
"original": "Accept All Both",
- "command": "merge-conflict.accept.all-both"
+ "command": "merge-conflict.accept.all-both",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.current%",
"original": "Accept Current",
- "command": "merge-conflict.accept.current"
+ "command": "merge-conflict.accept.current",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.incoming%",
"original": "Accept Incoming",
- "command": "merge-conflict.accept.incoming"
+ "command": "merge-conflict.accept.incoming",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.selection%",
"original": "Accept Selection",
- "command": "merge-conflict.accept.selection"
+ "command": "merge-conflict.accept.selection",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
"title": "%command.accept.both%",
"original": "Accept Both",
- "command": "merge-conflict.accept.both"
+ "command": "merge-conflict.accept.both",
+ "enablement": "!isMergeEditor"
},
{
"category": "%command.category%",
@@ -92,7 +99,8 @@
"category": "%command.category%",
"title": "%command.compare%",
"original": "Compare Current Conflict",
- "command": "merge-conflict.compare"
+ "command": "merge-conflict.compare",
+ "enablement": "!isMergeEditor"
}
],
"menus": {
diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json
index c0ed6b05f13..64b10a008ae 100644
--- a/extensions/typescript-language-features/package.json
+++ b/extensions/typescript-language-features/package.json
@@ -39,7 +39,7 @@
"jsonc-parser": "^2.2.1",
"semver": "5.5.1",
"vscode-nls": "^5.1.0",
- "vscode-tas-client": "^0.1.47",
+ "vscode-tas-client": "^0.1.63",
"vscode-uri": "^3.0.3"
},
"devDependencies": {
diff --git a/extensions/typescript-language-features/src/experimentationService.ts b/extensions/typescript-language-features/src/experimentationService.ts
index cb566874433..f739872a824 100644
--- a/extensions/typescript-language-features/src/experimentationService.ts
+++ b/extensions/typescript-language-features/src/experimentationService.ts
@@ -35,14 +35,19 @@ export class ExperimentationService implements vscode.Disposable {
switch (vscode.env.uriScheme) {
case 'vscode':
targetPopulation = tas.TargetPopulation.Public;
+ break;
case 'vscode-insiders':
targetPopulation = tas.TargetPopulation.Insiders;
+ break;
case 'vscode-exploration':
targetPopulation = tas.TargetPopulation.Internal;
+ break;
case 'code-oss':
targetPopulation = tas.TargetPopulation.Team;
+ break;
default:
targetPopulation = tas.TargetPopulation.Public;
+ break;
}
const id = this._extensionContext.extension.id;
diff --git a/extensions/typescript-language-features/yarn.lock b/extensions/typescript-language-features/yarn.lock
index 81f56c011a9..08e22bf4c15 100644
--- a/extensions/typescript-language-features/yarn.lock
+++ b/extensions/typescript-language-features/yarn.lock
@@ -78,10 +78,10 @@ semver@5.5.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==
-tas-client@0.1.45:
- version "0.1.45"
- resolved "https://registry.yarnpkg.com/tas-client/-/tas-client-0.1.45.tgz#83bbf73f8458a0f527f9a389f7e1c37f63a64a76"
- integrity sha512-IG9UmCpDbDPK23UByQ27rLybkRZYEx2eC9EkieXdwPKKjZPD2zPwfQmyGnZrZet4FUt3yj0ytkwz+liR9Nz/nA==
+tas-client@0.1.58:
+ version "0.1.58"
+ resolved "https://registry.yarnpkg.com/tas-client/-/tas-client-0.1.58.tgz#67d66bf0e27df5276ebc751105e6ad47791c36d8"
+ integrity sha512-fOWii4wQXuo9Zl0oXgvjBzZWzKc5MmUR6XQWX93WU2c1SaP1plPo/zvXP8kpbZ9fvegFOHdapszYqMTRq/SRtg==
dependencies:
axios "^0.26.1"
@@ -90,12 +90,12 @@ vscode-nls@^5.1.0:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.1.0.tgz#443b301a7465d88c81c0f4e1914f9857f0dce1e4"
integrity sha512-37Ha44QrLFwR2IfSSYdOArzUvOyoWbOYTwQC+wS0NfqKjhW7s0WQ1lMy5oJXgSZy9sAiZS5ifELhbpXodeMR8w==
-vscode-tas-client@^0.1.47:
- version "0.1.47"
- resolved "https://registry.yarnpkg.com/vscode-tas-client/-/vscode-tas-client-0.1.47.tgz#d66795cbbaa231aba659b6c40d43927d73596375"
- integrity sha512-SlEPDi+0gwxor4ANzBtXwqROPQdQkClHeVJgnkvdDF5Xnl407htCsabTPAq4Di8muObORtLchqQS/k1ocaGDEg==
+vscode-tas-client@^0.1.63:
+ version "0.1.63"
+ resolved "https://registry.yarnpkg.com/vscode-tas-client/-/vscode-tas-client-0.1.63.tgz#df89e67e9bf7ecb46471a0fb8a4a522d2aafad65"
+ integrity sha512-TY5TPyibzi6rNmuUB7eRVqpzLzNfQYrrIl/0/F8ukrrbzOrKVvS31hM3urE+tbaVrnT+TMYXL16GhX57vEowhA==
dependencies:
- tas-client "0.1.45"
+ tas-client "0.1.58"
vscode-uri@^3.0.3:
version "3.0.3"
diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.api.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.api.test.ts
index e447db1326c..51b82032c77 100644
--- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.api.test.ts
+++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.api.test.ts
@@ -251,44 +251,6 @@ const apiTestContentProvider: vscode.NotebookContentProvider = {
});
});
-(vscode.env.uiKind === vscode.UIKind.Web ? suite.skip : suite)('statusbar', () => {
- const emitter = new vscode.EventEmitter();
- const onDidCallProvide = emitter.event;
- const suiteDisposables: vscode.Disposable[] = [];
- suiteTeardown(async function () {
- assertNoRpc();
-
- await revertAllDirty();
- await closeAllEditors();
-
- disposeAll(suiteDisposables);
- suiteDisposables.length = 0;
- });
-
- suiteSetup(() => {
- suiteDisposables.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider('notebookCoreTest', {
- async provideCellStatusBarItems(cell: vscode.NotebookCell, _token: vscode.CancellationToken): Promise {
- emitter.fire(cell);
- return [];
- }
- }));
-
- suiteDisposables.push(vscode.workspace.registerNotebookContentProvider('notebookCoreTest', apiTestContentProvider));
- });
-
- test('provideCellStatusBarItems called on metadata change', async function () {
- const provideCalled = asPromise(onDidCallProvide);
- const notebook = await openRandomNotebookDocument();
- await vscode.window.showNotebookDocument(notebook);
- await provideCalled;
-
- const edit = new vscode.WorkspaceEdit();
- edit.set(notebook.uri, [vscode.NotebookEdit.updateCellMetadata(0, { inputCollapsed: true })]);
- await vscode.workspace.applyEdit(edit);
- await provideCalled;
- });
-});
-
suite('Notebook & LiveShare', function () {
const suiteDisposables: vscode.Disposable[] = [];
diff --git a/package.json b/package.json
index 7a71f462808..9957d764a7f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.72.0",
- "distro": "97c54ace90a9ab3cea766c76da997942f2ae4e8d",
+ "distro": "d9fc5ec0abd44d6d2eab4ad5c0cf4ca9c4e839e1",
"author": {
"name": "Microsoft Corporation"
},
@@ -86,19 +86,19 @@
"vscode-proxy-agent": "^0.12.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "7.0.1",
- "xterm": "5.0.0",
- "xterm-addon-canvas": "0.2.0",
- "xterm-addon-search": "0.10.0",
- "xterm-addon-serialize": "0.8.0",
- "xterm-addon-unicode11": "0.4.0",
- "xterm-addon-webgl": "0.13.0",
- "xterm-headless": "5.0.0",
+ "xterm": "5.1.0-beta.1",
+ "xterm-addon-canvas": "0.3.0-beta.1",
+ "xterm-addon-search": "0.11.0-beta.1",
+ "xterm-addon-serialize": "0.9.0-beta.1",
+ "xterm-addon-unicode11": "0.5.0-beta.1",
+ "xterm-addon-webgl": "0.14.0-beta.2",
+ "xterm-headless": "5.1.0-beta.1",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"devDependencies": {
"7zip": "0.0.6",
- "@playwright/test": "1.24.2",
+ "@playwright/test": "1.26.0",
"@swc/cli": "0.1.57",
"@swc/core": "1.2.245",
"@types/cookie": "^0.3.3",
@@ -206,7 +206,7 @@
"ts-loader": "^9.2.7",
"ts-node": "^10.9.1",
"tsec": "0.1.4",
- "typescript": "^4.9.0-dev.20220916",
+ "typescript": "^4.9.0-dev.20220921",
"typescript-formatter": "7.1.0",
"underscore": "^1.12.1",
"util": "^0.12.4",
diff --git a/remote/package.json b/remote/package.json
index 6a15f54d756..c6d2d2547ad 100644
--- a/remote/package.json
+++ b/remote/package.json
@@ -24,13 +24,13 @@
"vscode-proxy-agent": "^0.12.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "7.0.1",
- "xterm": "5.0.0",
- "xterm-addon-canvas": "0.2.0",
- "xterm-addon-search": "0.10.0",
- "xterm-addon-serialize": "0.8.0",
- "xterm-addon-unicode11": "0.4.0",
- "xterm-addon-webgl": "0.13.0",
- "xterm-headless": "5.0.0",
+ "xterm": "5.1.0-beta.1",
+ "xterm-addon-canvas": "0.3.0-beta.1",
+ "xterm-addon-search": "0.11.0-beta.1",
+ "xterm-addon-serialize": "0.9.0-beta.1",
+ "xterm-addon-unicode11": "0.5.0-beta.1",
+ "xterm-addon-webgl": "0.14.0-beta.2",
+ "xterm-headless": "5.1.0-beta.1",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
diff --git a/remote/web/package.json b/remote/web/package.json
index 0d38acec84a..d7e6c49c66f 100644
--- a/remote/web/package.json
+++ b/remote/web/package.json
@@ -11,10 +11,10 @@
"tas-client-umd": "0.1.6",
"vscode-oniguruma": "1.6.1",
"vscode-textmate": "7.0.1",
- "xterm": "5.0.0",
- "xterm-addon-canvas": "0.2.0",
- "xterm-addon-search": "0.10.0",
- "xterm-addon-unicode11": "0.4.0",
- "xterm-addon-webgl": "0.13.0"
+ "xterm": "5.1.0-beta.1",
+ "xterm-addon-canvas": "0.3.0-beta.1",
+ "xterm-addon-search": "0.11.0-beta.1",
+ "xterm-addon-unicode11": "0.5.0-beta.1",
+ "xterm-addon-webgl": "0.14.0-beta.2"
}
}
diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock
index 6252456eb40..c9a0cd1bacf 100644
--- a/remote/web/yarn.lock
+++ b/remote/web/yarn.lock
@@ -68,27 +68,27 @@ vscode-textmate@7.0.1:
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79"
integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw==
-xterm-addon-canvas@0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0.tgz#ba0080d4071f172f94e8c0b5e6151dd7e386f1a1"
- integrity sha512-b4tMT05US9Rlqv6R0XZTHsfq8MRKzwxITwpvckuod/l4lokcCokHPbgpYAytOgrzqkzWjYI+Ol8en6cMGf8ncg==
+xterm-addon-canvas@0.3.0-beta.1:
+ version "0.3.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.1.tgz#17a65f5da65416b01d620ddef6247ff5013ffc15"
+ integrity sha512-34PKhrkvK1RtlOOmni4i5GUIyoFKGMph8fWFvA2d52IDTKmX9YoLzZfU73D/sUAx+/GKobCE8sr14CuBZctgNw==
-xterm-addon-search@0.10.0:
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0.tgz#b6a5e859c0bfd83ad534233f93376640c0e0c652"
- integrity sha512-l+kjDxNDQbkniU5OUo9BHknxUEPZGM0OFpVpc2sMmrb97S0FKJVJO4wAZPJvSGVJ8ZEG6KuDyzXluvnb08t71Q==
+xterm-addon-search@0.11.0-beta.1:
+ version "0.11.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.1.tgz#fe7178d70246cde73550447c5524672575467499"
+ integrity sha512-fKj8KnnhH1nC4oZpKsgnhtgxkTctoa9kGLMpTJjsNzFu0VvXvLGIRezTPI75UEIQdEdaxcwB7/aKelQTO+72LA==
-xterm-addon-unicode11@0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0.tgz#59a4abbb591befb69ca0c5f7c3f9fa9c1c05353e"
- integrity sha512-HkUwR4gc8MKVFy2Ux8zUnjqARYpfl7dJ9na3TwRbAUbF4JlCv707m4Z07WVaDMIRUZsfZ+5LgSi+Ss7PfZqNcw==
+xterm-addon-unicode11@0.5.0-beta.1:
+ version "0.5.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.1.tgz#8a9e9356018e082318abbe2be1f9599fcc6b46a2"
+ integrity sha512-uAErX4gwhW6N524stLG6oZR3yBGgPnFmZ2Tv4vyYy7tcgDuHRoc22xYSCDgO1ohz1FLlOm8JGXRjXliwO9ic3A==
-xterm-addon-webgl@0.13.0:
- version "0.13.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0.tgz#b1d42ec454390ad8595aa8c8dde714b98a5eb896"
- integrity sha512-xL4qBQWUHjFR620/8VHCtrTMVQsnZaAtd1IxFoiKPhC63wKp6b+73a45s97lb34yeo57PoqZhE9Jq5pB++ksPQ==
+xterm-addon-webgl@0.14.0-beta.2:
+ version "0.14.0-beta.2"
+ resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.2.tgz#832c31b52b78fb67a65bbd23c9fb850caceb43ae"
+ integrity sha512-1ccbkJiUZ5ojnoAEJsbdV0jMZaYSnZ02wfV8yBU243u6TTgvCzZ7nq5BR9bT+5K/ESFWiekobfybxHwuYnylmQ==
-xterm@5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0.tgz#0af50509b33d0dc62fde7a4ec17750b8e453cc5c"
- integrity sha512-tmVsKzZovAYNDIaUinfz+VDclraQpPUnAME+JawosgWRMphInDded/PuY0xmU5dOhyeYZsI0nz5yd8dPYsdLTA==
+xterm@5.1.0-beta.1:
+ version "5.1.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.1.tgz#a6617c6887066d166632d1e69b6eb83a179d8b63"
+ integrity sha512-ml7bqjO23bh4yu7qXKogXtCy4SbDTV21rfDXUvLPPaxrlQus6NoN1byy1eFH4ONWpv5ZHGeItRdQ/X00et9Pcw==
diff --git a/remote/yarn.lock b/remote/yarn.lock
index 5fc10a11df4..7b384ed44b9 100644
--- a/remote/yarn.lock
+++ b/remote/yarn.lock
@@ -788,40 +788,40 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
-xterm-addon-canvas@0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0.tgz#ba0080d4071f172f94e8c0b5e6151dd7e386f1a1"
- integrity sha512-b4tMT05US9Rlqv6R0XZTHsfq8MRKzwxITwpvckuod/l4lokcCokHPbgpYAytOgrzqkzWjYI+Ol8en6cMGf8ncg==
+xterm-addon-canvas@0.3.0-beta.1:
+ version "0.3.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.1.tgz#17a65f5da65416b01d620ddef6247ff5013ffc15"
+ integrity sha512-34PKhrkvK1RtlOOmni4i5GUIyoFKGMph8fWFvA2d52IDTKmX9YoLzZfU73D/sUAx+/GKobCE8sr14CuBZctgNw==
-xterm-addon-search@0.10.0:
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0.tgz#b6a5e859c0bfd83ad534233f93376640c0e0c652"
- integrity sha512-l+kjDxNDQbkniU5OUo9BHknxUEPZGM0OFpVpc2sMmrb97S0FKJVJO4wAZPJvSGVJ8ZEG6KuDyzXluvnb08t71Q==
+xterm-addon-search@0.11.0-beta.1:
+ version "0.11.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.1.tgz#fe7178d70246cde73550447c5524672575467499"
+ integrity sha512-fKj8KnnhH1nC4oZpKsgnhtgxkTctoa9kGLMpTJjsNzFu0VvXvLGIRezTPI75UEIQdEdaxcwB7/aKelQTO+72LA==
-xterm-addon-serialize@0.8.0:
- version "0.8.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.8.0.tgz#715b510b91cc8e0d32844ca2a7de4d0fb5d49d9d"
- integrity sha512-8N4RBaxM4TwlZRFXYz+xJwHUeFRXscRIM9O3wq26T0DrG7lM9JprSq1F4IGO1I5Et/CqXjiBFD50KwqkRKF0/w==
+xterm-addon-serialize@0.9.0-beta.1:
+ version "0.9.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0-beta.1.tgz#44a8047ec85abe4db232acc58c53355dd314bf6d"
+ integrity sha512-jVkpU5GC728ko0k190o+M1xubMkhRolKj18160rxlZhd0Sm/1yHUtFneC9pYSsLypynd3Te5LnZnHfEgVmka4g==
-xterm-addon-unicode11@0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0.tgz#59a4abbb591befb69ca0c5f7c3f9fa9c1c05353e"
- integrity sha512-HkUwR4gc8MKVFy2Ux8zUnjqARYpfl7dJ9na3TwRbAUbF4JlCv707m4Z07WVaDMIRUZsfZ+5LgSi+Ss7PfZqNcw==
+xterm-addon-unicode11@0.5.0-beta.1:
+ version "0.5.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.1.tgz#8a9e9356018e082318abbe2be1f9599fcc6b46a2"
+ integrity sha512-uAErX4gwhW6N524stLG6oZR3yBGgPnFmZ2Tv4vyYy7tcgDuHRoc22xYSCDgO1ohz1FLlOm8JGXRjXliwO9ic3A==
-xterm-addon-webgl@0.13.0:
- version "0.13.0"
- resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0.tgz#b1d42ec454390ad8595aa8c8dde714b98a5eb896"
- integrity sha512-xL4qBQWUHjFR620/8VHCtrTMVQsnZaAtd1IxFoiKPhC63wKp6b+73a45s97lb34yeo57PoqZhE9Jq5pB++ksPQ==
+xterm-addon-webgl@0.14.0-beta.2:
+ version "0.14.0-beta.2"
+ resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.2.tgz#832c31b52b78fb67a65bbd23c9fb850caceb43ae"
+ integrity sha512-1ccbkJiUZ5ojnoAEJsbdV0jMZaYSnZ02wfV8yBU243u6TTgvCzZ7nq5BR9bT+5K/ESFWiekobfybxHwuYnylmQ==
-xterm-headless@5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.0.0.tgz#6426e85aec24f1bdfd322fe4e5159e0113f059d4"
- integrity sha512-d+3C883Tz5zNCcapJSUpZVO8lplKhjJZtvuL4oIMTE74BX/3UsK7zUQgp5c6KS5Vv4FjFSb3XQA+n2Cx9Znq+w==
+xterm-headless@5.1.0-beta.1:
+ version "5.1.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.1.0-beta.1.tgz#badec2e97e47aa44267a4de2c1b42b4d23ad49a2"
+ integrity sha512-V3G7l4pN6/HW//vKXryOCdDXVKdrQTQmtHEqkZ8waD68cJdeMdIoGYJuzavd5rHpxCqm/KR5O8ztI41jridong==
-xterm@5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.0.0.tgz#0af50509b33d0dc62fde7a4ec17750b8e453cc5c"
- integrity sha512-tmVsKzZovAYNDIaUinfz+VDclraQpPUnAME+JawosgWRMphInDded/PuY0xmU5dOhyeYZsI0nz5yd8dPYsdLTA==
+xterm@5.1.0-beta.1:
+ version "5.1.0-beta.1"
+ resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.1.tgz#a6617c6887066d166632d1e69b6eb83a179d8b63"
+ integrity sha512-ml7bqjO23bh4yu7qXKogXtCy4SbDTV21rfDXUvLPPaxrlQus6NoN1byy1eFH4ONWpv5ZHGeItRdQ/X00et9Pcw==
yallist@^4.0.0:
version "4.0.0"
diff --git a/src/bootstrap-amd.js b/src/bootstrap-amd.js
index 31e27ea7ed7..88747c29aaf 100644
--- a/src/bootstrap-amd.js
+++ b/src/bootstrap-amd.js
@@ -6,6 +6,11 @@
//@ts-check
'use strict';
+// Store the node.js require function in a variable
+// before loading our AMD loader to avoid issues
+// when this file is bundled with other files.
+const nodeRequire = require;
+
const loader = require('./vs/loader');
const bootstrap = require('./bootstrap');
const performance = require('./vs/base/common/performance');
@@ -17,7 +22,7 @@ const nlsConfig = bootstrap.setupNLS();
loader.config({
baseUrl: bootstrap.fileUriFromPath(__dirname, { isWindows: process.platform === 'win32' }),
catchError: true,
- nodeRequire: require,
+ nodeRequire,
'vs/nls': nlsConfig,
amdModulesPattern: /^vs\//,
recordStats: true
diff --git a/src/buildfile.js b/src/buildfile.js
index b63d85617c3..24654c77abe 100644
--- a/src/buildfile.js
+++ b/src/buildfile.js
@@ -35,7 +35,6 @@ exports.base = [
exclude: ['vs/nls'],
prepend: [
{ path: 'vs/loader.js' },
- { path: 'vs/nls.js', amdModuleId: 'vs/nls' },
{ path: 'vs/base/worker/workerMain.js' }
],
dest: 'vs/base/worker/workerMain.js'
diff --git a/src/main.js b/src/main.js
index 884120e01b0..f7e6e49a967 100644
--- a/src/main.js
+++ b/src/main.js
@@ -34,7 +34,7 @@ bootstrap.enableASARSupport();
// Set userData path before app 'ready' event
const args = parseCLIArgs();
-const userDataPath = getUserDataPath(args);
+const userDataPath = getUserDataPath(args, product.nameShort ?? 'code-oss-dev');
app.setPath('userData', userDataPath);
// Resolve code cache path
diff --git a/src/server-main.js b/src/server-main.js
index 4e806323689..27ecbaed0d6 100644
--- a/src/server-main.js
+++ b/src/server-main.js
@@ -188,14 +188,10 @@ function sanitizeStringArg(val) {
* @throws
*/
async function parsePort(host, strPort) {
- let specificPort;
if (strPort) {
let range;
if (strPort.match(/^\d+$/)) {
- specificPort = parseInt(strPort, 10);
- if (specificPort === 0) {
- return specificPort;
- }
+ return parseInt(strPort, 10);
} else if (range = parseRange(strPort)) {
const port = await findFreePort(host, range.start, range.end);
if (port !== undefined) {
diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts
index 51566489870..beb9436ac70 100644
--- a/src/vs/base/browser/dom.ts
+++ b/src/vs/base/browser/dom.ts
@@ -1363,6 +1363,77 @@ const defaultSafeProtocols = [
Schemas.command,
];
+/**
+ * List of safe, non-input html tags.
+ */
+export const basicMarkupHtmlTags = Object.freeze([
+ 'a',
+ 'abbr',
+ 'b',
+ 'bdo',
+ 'blockquote',
+ 'br',
+ 'caption',
+ 'cite',
+ 'code',
+ 'col',
+ 'colgroup',
+ 'dd',
+ 'del',
+ 'details',
+ 'dfn',
+ 'div',
+ 'dl',
+ 'dt',
+ 'em',
+ 'figcaption',
+ 'figure',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'hr',
+ 'i',
+ 'img',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'li',
+ 'mark',
+ 'ol',
+ 'p',
+ 'pre',
+ 'q',
+ 'rp',
+ 'rt',
+ 'ruby',
+ 'samp',
+ 'small',
+ 'small',
+ 'span',
+ 'strike',
+ 'strong',
+ 'sub',
+ 'summary',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'time',
+ 'tr',
+ 'tt',
+ 'u',
+ 'ul',
+ 'var',
+ 'video',
+ 'wbr',
+]);
+
/**
* Sanitizes the given `value` and reset the given `node` with it.
*/
diff --git a/src/vs/base/browser/markdownRenderer.ts b/src/vs/base/browser/markdownRenderer.ts
index 063d60b9792..ccc1d8d7752 100644
--- a/src/vs/base/browser/markdownRenderer.ts
+++ b/src/vs/base/browser/markdownRenderer.ts
@@ -358,6 +358,26 @@ function sanitizeRenderedMarkdown(
}
}
+export const allowedMarkdownAttr = [
+ 'align',
+ 'alt',
+ 'class',
+ 'controls',
+ 'data-code',
+ 'data-href',
+ 'height',
+ 'href',
+ 'loop',
+ 'muted',
+ 'playsinline',
+ 'poster',
+ 'src',
+ 'style',
+ 'target',
+ 'title',
+ 'width',
+];
+
function getSanitizerOptions(options: { readonly isTrusted?: boolean }): { config: dompurify.Config; allowedSchemes: string[] } {
const allowedSchemes = [
Schemas.http,
@@ -380,8 +400,8 @@ function getSanitizerOptions(options: { readonly isTrusted?: boolean }): { confi
// Since we have our own sanitize function for marked, it's possible we missed some tag so let dompurify make sure.
// HTML tags that can result from markdown are from reading https://spec.commonmark.org/0.29/
// HTML table tags that can result from markdown are from https://github.github.com/gfm/#tables-extension-
- ALLOWED_TAGS: ['ul', 'li', 'p', 'b', 'i', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span'],
- ALLOWED_ATTR: ['href', 'data-href', 'target', 'title', 'src', 'alt', 'class', 'style', 'data-code', 'width', 'height', 'align'],
+ ALLOWED_TAGS: [...DOM.basicMarkupHtmlTags],
+ ALLOWED_ATTR: allowedMarkdownAttr,
ALLOW_UNKNOWN_PROTOCOLS: true,
},
allowedSchemes
diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts
index 7e9f2aecba6..577ea7879dc 100644
--- a/src/vs/base/browser/ui/list/listView.ts
+++ b/src/vs/base/browser/ui/list/listView.ts
@@ -22,6 +22,7 @@ import { IListDragAndDrop, IListDragEvent, IListGestureEvent, IListMouseEvent, I
import { RangeMap, shift } from 'vs/base/browser/ui/list/rangeMap';
import { IRow, RowCache } from 'vs/base/browser/ui/list/rowCache';
import { IObservableValue } from 'vs/base/common/observableValue';
+import { BugIndicatingError } from 'vs/base/common/errors';
interface IItem {
readonly id: string;
@@ -1356,26 +1357,26 @@ export class ListView implements ISpliceable, IDisposable {
const size = item.size;
- if (!this.setRowHeight && item.row) {
- const newSize = item.row.domNode.offsetHeight;
- item.size = newSize;
+ if (item.row) {
+ item.row.domNode.style.height = '';
+ item.size = item.row.domNode.offsetHeight;
item.lastDynamicHeightWidth = this.renderWidth;
- return newSize - size;
+ return item.size - size;
}
const row = this.cache.alloc(item.templateId);
-
row.domNode.style.height = '';
this.rowsContainer.appendChild(row.domNode);
const renderer = this.renderers.get(item.templateId);
- if (renderer) {
- renderer.renderElement(item.element, index, row.templateData, undefined);
- renderer.disposeElement?.(item.element, index, row.templateData, undefined);
+ if (!renderer) {
+ throw new BugIndicatingError('Missing renderer for templateId: ' + item.templateId);
}
+ renderer.renderElement(item.element, index, row.templateData, undefined);
item.size = row.domNode.offsetHeight;
+ renderer.disposeElement?.(item.element, index, row.templateData, undefined);
this.virtualDelegate.setDynamicHeight?.(item.element, item.size);
diff --git a/src/vs/base/browser/ui/table/table.css b/src/vs/base/browser/ui/table/table.css
index 89edc6f0ffe..087f9d3ebf9 100644
--- a/src/vs/base/browser/ui/table/table.css
+++ b/src/vs/base/browser/ui/table/table.css
@@ -10,6 +10,7 @@
height: 100%;
width: 100%;
white-space: nowrap;
+ overflow: hidden;
}
.monaco-table > .monaco-split-view2 {
diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts
index 30e5c974f3d..13db4add519 100644
--- a/src/vs/base/common/actions.ts
+++ b/src/vs/base/common/actions.ts
@@ -193,7 +193,7 @@ export class ActionRunner extends Disposable implements IActionRunner {
}
}
-export class Separator extends Action {
+export class Separator implements IAction {
/**
* Joins all non-empty lists of actions with separators.
@@ -215,12 +215,14 @@ export class Separator extends Action {
static readonly ID = 'vs.actions.separator';
- constructor(label?: string) {
- super(Separator.ID, label, label ? 'separator text' : 'separator');
+ readonly id: string = Separator.ID;
- this.checked = false;
- this.enabled = false;
- }
+ readonly label: string = '';
+ readonly tooltip: string = '';
+ readonly class: string = '';
+ readonly enabled: boolean = false;
+ readonly checked: boolean = false;
+ async run() { }
}
export class SubmenuAction implements IAction {
diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts
index e8d7a30dfc4..89abcbaaf20 100644
--- a/src/vs/base/common/event.ts
+++ b/src/vs/base/common/event.ts
@@ -938,9 +938,11 @@ export class PauseableEmitter extends Emitter {
if (this._mergeFn) {
// use the merge function to create a single composite
// event. make a copy in case firing pauses this emitter
- const events = Array.from(this._eventQueue);
- this._eventQueue.clear();
- super.fire(this._mergeFn(events));
+ if (this._eventQueue.size > 0) {
+ const events = Array.from(this._eventQueue);
+ this._eventQueue.clear();
+ super.fire(this._mergeFn(events));
+ }
} else {
// no merging, fire each event individually and test
diff --git a/src/vs/base/common/observableImpl/utils.ts b/src/vs/base/common/observableImpl/utils.ts
index 2c11ff5eb5a..f78d35a9683 100644
--- a/src/vs/base/common/observableImpl/utils.ts
+++ b/src/vs/base/common/observableImpl/utils.ts
@@ -51,13 +51,23 @@ export function waitForState(observable: IObservable, pr
export function waitForState(observable: IObservable, predicate: (state: T) => boolean): Promise;
export function waitForState(observable: IObservable, predicate: (state: T) => boolean): Promise {
return new Promise(resolve => {
+ let didRun = false;
+ let shouldDispose = false;
const d = autorun('waitForState', reader => {
const currentState = observable.read(reader);
if (predicate(currentState)) {
- d.dispose();
+ if (!didRun) {
+ shouldDispose = true;
+ } else {
+ d.dispose();
+ }
resolve(currentState);
}
});
+ didRun = true;
+ if (shouldDispose) {
+ d.dispose();
+ }
});
}
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1620aa3bd2c..e07695c9363 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -70,6 +70,7 @@ export interface IProductConfiguration {
readonly extensionsGallery?: {
readonly serviceUrl: string;
+ readonly searchUrl?: string;
readonly itemUrl: string;
readonly publisherUrl: string;
readonly resourceUrlTemplate: string;
diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts
index 97bd9b3b055..f66058f8b1f 100644
--- a/src/vs/base/common/strings.ts
+++ b/src/vs/base/common/strings.ts
@@ -600,6 +600,16 @@ export function getCharContainingOffset(str: string, offset: number): [number, n
return [startOffset, endOffset];
}
+export function charCount(str: string): number {
+ const iterator = new GraphemeIterator(str);
+ let length = 0;
+ while (!iterator.eol()) {
+ length++;
+ iterator.nextGraphemeLength();
+ }
+ return length;
+}
+
let CONTAINS_RTL: RegExp | undefined = undefined;
function makeContainsRtl() {
diff --git a/src/vs/base/test/common/event.test.ts b/src/vs/base/test/common/event.test.ts
index 39d878bce5d..79816c693e2 100644
--- a/src/vs/base/test/common/event.test.ts
+++ b/src/vs/base/test/common/event.test.ts
@@ -623,6 +623,17 @@ suite('PausableEmitter', function () {
assert.deepStrictEqual(data, [1, 1, 2, 2, 3, 3]);
});
+
+ test('empty pause with merge', function () {
+ const data: number[] = [];
+ const emitter = new PauseableEmitter({ merge: a => a[0] });
+ emitter.event(e => data.push(1));
+
+ emitter.pause();
+ emitter.resume();
+ assert.deepStrictEqual(data, []);
+ });
+
});
suite('Event utils - ensureNoDisposablesAreLeakedInTestSuite', function () {
diff --git a/src/vs/code/browser/workbench/workbench-dev.html b/src/vs/code/browser/workbench/workbench-dev.html
index 7fdc35e0862..be6d30bfb98 100644
--- a/src/vs/code/browser/workbench/workbench-dev.html
+++ b/src/vs/code/browser/workbench/workbench-dev.html
@@ -28,6 +28,7 @@
+
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
index cad7de3f9ed..9f34c85cc2d 100644
--- a/src/vs/code/browser/workbench/workbench.ts
+++ b/src/vs/code/browser/workbench/workbench.ts
@@ -14,9 +14,13 @@ import { URI, UriComponents } from 'vs/base/common/uri';
import { request } from 'vs/base/parts/request/browser/request';
import product from 'vs/platform/product/common/product';
import { isFolderToOpen, isWorkspaceToOpen } from 'vs/platform/window/common/window';
-import { create, ICredentialsProvider, IURLCallbackProvider, IWorkbenchConstructionOptions, IWorkspace, IWorkspaceProvider } from 'vs/workbench/workbench.web.main';
+import { create } from 'vs/workbench/workbench.web.main';
import { posix } from 'vs/base/common/path';
import { ltrim } from 'vs/base/common/strings';
+import type { ICredentialsProvider } from 'vs/platform/credentials/common/credentials';
+import type { IURLCallbackProvider } from 'vs/workbench/services/url/browser/urlService';
+import type { IWorkbenchConstructionOptions } from 'vs/workbench/browser/web.api';
+import type { IWorkspace, IWorkspaceProvider } from 'vs/workbench/services/host/browser/browserHostService';
interface ICredential {
service: string;
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcess-dev.html b/src/vs/code/electron-browser/sharedProcess/sharedProcess-dev.html
new file mode 100644
index 00000000000..4bd9c876659
--- /dev/null
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcess-dev.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+ Shared Process
+
+
+
+
+
+
+
+
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcess.html b/src/vs/code/electron-browser/sharedProcess/sharedProcess.html
index 07fd9bd0478..d1b5812fa76 100644
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcess.html
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcess.html
@@ -1,22 +1,15 @@
+
+
+
+
-
-
-
-
-
-
- Shared Process
-
-
-
-
-
-
-
-
-
+
+ Shared Process
+
+
+
diff --git a/src/vs/code/electron-sandbox/issue/issueReporter-dev.html b/src/vs/code/electron-sandbox/issue/issueReporter-dev.html
new file mode 100644
index 00000000000..847f987ecc8
--- /dev/null
+++ b/src/vs/code/electron-sandbox/issue/issueReporter-dev.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/vs/code/electron-sandbox/issue/issueReporter.html b/src/vs/code/electron-sandbox/issue/issueReporter.html
index 3a0cb4be742..2f76d13ff86 100644
--- a/src/vs/code/electron-sandbox/issue/issueReporter.html
+++ b/src/vs/code/electron-sandbox/issue/issueReporter.html
@@ -10,14 +10,10 @@
}
+
-
-
-
-
-
-
+