diff --git a/.devcontainer/README.md b/.devcontainer/README.md
index 9050664fcee..47d682f8a8e 100644
--- a/.devcontainer/README.md
+++ b/.devcontainer/README.md
@@ -1,6 +1,6 @@
# Code - OSS Development Container
-[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode)
+[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode)
This repository includes configuration for a development container for working with Code - OSS in a local container or using [GitHub Codespaces](https://github.com/features/codespaces).
@@ -8,21 +8,21 @@ This repository includes configuration for a development container for working w
## Quick start - local
-If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. Clicking these links will cause VS Code to automatically install the Remote - Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
+If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.)
-2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**.
+2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build with **9 GB of RAM** being recommended. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**.
> **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar.
-3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension.
+3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension.
- 
+ 
- > **Note:** The Remote - Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
+ > **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
-4. Press Ctrl/Cmd + Shift + P or F1 and select **Remote-Containers: Clone Repository in Container Volume...**.
+4. Press Ctrl/Cmd + Shift + P or F1 and select **Dev Containers: Clone Repository in Container Volume...**.
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem.
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 3e40ce61f95..63b61fb7a10 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -6,9 +6,18 @@
"overrideCommand": false,
"runArgs": [ "--init", "--security-opt", "seccomp=unconfined", "--shm-size=1g"],
- "settings": {
- "resmon.show.battery": false,
- "resmon.show.cpufreq": false
+ // VS Code extensions and settings
+ "customizations": {
+ "vscode": {
+ "settings": {
+ "resmon.show.battery": false,
+ "resmon.show.cpufreq": false
+ },
+ "extensions": [
+ "dbaeumer.vscode-eslint",
+ "mutantdino.resourcemonitor"
+ ]
+ }
},
// noVNC, VNC
@@ -24,17 +33,12 @@
}
},
- "extensions": [
- "dbaeumer.vscode-eslint",
- "mutantdino.resourcemonitor"
- ],
-
// Optionally loads a cached yarn install for the repo
"postCreateCommand": ".devcontainer/cache/restore-diff.sh",
"remoteUser": "node",
"hostRequirements": {
- "memory": "8gb"
+ "memory": "9gb"
}
}
diff --git a/.eslintignore b/.eslintignore
index 1c49d5b8846..af5f9a4940b 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -6,6 +6,7 @@
**/extensions/css-language-features/server/test/pathCompletionFixtures/**
**/extensions/html-language-features/server/lib/jquery.d.ts
**/extensions/html-language-features/server/src/test/pathCompletionFixtures/**
+**/extensions/ipynb/notebook-out/**
**/extensions/markdown-language-features/media/**
**/extensions/markdown-language-features/notebook-out/**
**/extensions/markdown-math/notebook-out/**
@@ -25,10 +26,7 @@
**/src/typings/**/*.d.ts
**/src/vs/*/**/*.d.ts
**/src/vs/base/test/common/filters.perf.data.js
-**/src/vs/css.build.js
-**/src/vs/css.js
**/src/vs/loader.js
-**/src/vs/nls.build.js
-**/src/vs/nls.js
**/test/unit/assert.js
+**/test/automation/out/**
**/typings/**
diff --git a/build/lib/eslint/code-import-patterns.ts b/.eslintplugin/code-import-patterns.ts
similarity index 98%
rename from build/lib/eslint/code-import-patterns.ts
rename to .eslintplugin/code-import-patterns.ts
index 72b63a45b35..c9a24c849d7 100644
--- a/build/lib/eslint/code-import-patterns.ts
+++ b/.eslintplugin/code-import-patterns.ts
@@ -6,10 +6,10 @@
import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as path from 'path';
-import * as minimatch from 'minimatch';
+import minimatch from 'minimatch';
import { createImportRuleListener } from './utils';
-const REPO_ROOT = path.normalize(path.join(__dirname, '../../../'));
+const REPO_ROOT = path.normalize(path.join(__dirname, '../'));
interface ConditionalPattern {
when?: 'hasBrowser' | 'hasNode' | 'test';
diff --git a/build/lib/eslint/code-layering.ts b/.eslintplugin/code-layering.ts
similarity index 100%
rename from build/lib/eslint/code-layering.ts
rename to .eslintplugin/code-layering.ts
diff --git a/build/lib/eslint/code-no-look-behind-regex.ts b/.eslintplugin/code-no-look-behind-regex.ts
similarity index 99%
rename from build/lib/eslint/code-no-look-behind-regex.ts
rename to .eslintplugin/code-no-look-behind-regex.ts
index ef3959e39c6..800b59b6479 100644
--- a/build/lib/eslint/code-no-look-behind-regex.ts
+++ b/.eslintplugin/code-no-look-behind-regex.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as ESTree from 'estree';
diff --git a/build/lib/eslint/code-no-nls-in-standalone-editor.ts b/.eslintplugin/code-no-nls-in-standalone-editor.ts
similarity index 100%
rename from build/lib/eslint/code-no-nls-in-standalone-editor.ts
rename to .eslintplugin/code-no-nls-in-standalone-editor.ts
diff --git a/build/lib/eslint/code-no-standalone-editor.ts b/.eslintplugin/code-no-standalone-editor.ts
similarity index 100%
rename from build/lib/eslint/code-no-standalone-editor.ts
rename to .eslintplugin/code-no-standalone-editor.ts
diff --git a/build/lib/eslint/code-no-test-only.ts b/.eslintplugin/code-no-test-only.ts
similarity index 100%
rename from build/lib/eslint/code-no-test-only.ts
rename to .eslintplugin/code-no-test-only.ts
diff --git a/build/lib/eslint/code-no-unexternalized-strings.ts b/.eslintplugin/code-no-unexternalized-strings.ts
similarity index 98%
rename from build/lib/eslint/code-no-unexternalized-strings.ts
rename to .eslintplugin/code-no-unexternalized-strings.ts
index 056a99868ea..d0c30527f7c 100644
--- a/build/lib/eslint/code-no-unexternalized-strings.ts
+++ b/.eslintplugin/code-no-unexternalized-strings.ts
@@ -51,7 +51,7 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
key = keyNode.value;
} else if (keyNode.type === AST_NODE_TYPES.ObjectExpression) {
- for (let property of keyNode.properties) {
+ for (const property of keyNode.properties) {
if (property.type === AST_NODE_TYPES.Property && !property.computed) {
if (property.key.type === AST_NODE_TYPES.Identifier && property.key.name === 'key') {
if (isStringLiteral(property.value)) {
@@ -97,7 +97,7 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
// (2)
// report all invalid NLS keys
if (!key.match(NoUnexternalizedStrings._rNlsKeys)) {
- for (let value of values) {
+ for (const value of values) {
context.report({ loc: value.call.loc, messageId: 'badKey', data: { key } });
}
}
diff --git a/build/lib/eslint/code-no-unused-expressions.ts b/.eslintplugin/code-no-unused-expressions.ts
similarity index 99%
rename from build/lib/eslint/code-no-unused-expressions.ts
rename to .eslintplugin/code-no-unused-expressions.ts
index f5f0728836e..450365de2c6 100644
--- a/build/lib/eslint/code-no-unused-expressions.ts
+++ b/.eslintplugin/code-no-unused-expressions.ts
@@ -11,8 +11,6 @@
* @author Michael Ficarra
*/
-'use strict';
-
import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as ESTree from 'estree';
diff --git a/build/lib/eslint/code-translation-remind.ts b/.eslintplugin/code-translation-remind.ts
similarity index 100%
rename from build/lib/eslint/code-translation-remind.ts
rename to .eslintplugin/code-translation-remind.ts
diff --git a/.eslintplugin/index.js b/.eslintplugin/index.js
new file mode 100644
index 00000000000..9f45316837a
--- /dev/null
+++ b/.eslintplugin/index.js
@@ -0,0 +1,12 @@
+const glob = require('glob');
+const path = require('path');
+
+require('ts-node').register({ experimentalResolver: true, transpileOnly: true });
+
+// Re-export all .ts files as rules
+const rules = {};
+glob.sync(`${__dirname}/*.ts`).forEach((file) => {
+ rules[path.basename(file, '.ts')] = require(file);
+});
+
+exports.rules = rules;
diff --git a/.eslintplugin/tsconfig.json b/.eslintplugin/tsconfig.json
new file mode 100644
index 00000000000..0da715fd036
--- /dev/null
+++ b/.eslintplugin/tsconfig.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "target": "es2020",
+ "lib": [
+ "ES2020"
+ ],
+ "module": "commonjs",
+ "esModuleInterop": true,
+ "alwaysStrict": true,
+ "allowJs": true,
+ "strict": true,
+ "exactOptionalPropertyTypes": false,
+ "useUnknownInCatchVariables": false,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "newLine": "lf",
+ "noEmit": true
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.js"
+ ],
+ "exclude": [
+ "node_modules/**"
+ ]
+}
diff --git a/build/lib/eslint/utils.ts b/.eslintplugin/utils.ts
similarity index 100%
rename from build/lib/eslint/utils.ts
rename to .eslintplugin/utils.ts
diff --git a/build/lib/eslint/vscode-dts-cancellation.ts b/.eslintplugin/vscode-dts-cancellation.ts
similarity index 94%
rename from build/lib/eslint/vscode-dts-cancellation.ts
rename to .eslintplugin/vscode-dts-cancellation.ts
index 66f184214b9..6e253a898ca 100644
--- a/build/lib/eslint/vscode-dts-cancellation.ts
+++ b/.eslintplugin/vscode-dts-cancellation.ts
@@ -20,7 +20,7 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
['TSInterfaceDeclaration[id.name=/.+Provider/] TSMethodSignature[key.name=/^(provide|resolve).+/]']: (node: any) => {
let found = false;
- for (let param of (node).params) {
+ for (const param of (node).params) {
if (param.type === AST_NODE_TYPES.Identifier) {
found = found || param.name === 'token';
}
diff --git a/build/lib/eslint/vscode-dts-create-func.ts b/.eslintplugin/vscode-dts-create-func.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-create-func.ts
rename to .eslintplugin/vscode-dts-create-func.ts
diff --git a/build/lib/eslint/vscode-dts-event-naming.ts b/.eslintplugin/vscode-dts-event-naming.ts
similarity index 96%
rename from build/lib/eslint/vscode-dts-event-naming.ts
rename to .eslintplugin/vscode-dts-event-naming.ts
index 956ba346087..5e767c6e257 100644
--- a/build/lib/eslint/vscode-dts-event-naming.ts
+++ b/.eslintplugin/vscode-dts-event-naming.ts
@@ -88,11 +88,10 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {
if (def.type === AST_NODE_TYPES.Identifier) {
return def;
- } else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.Property) && def.key.type === AST_NODE_TYPES.Identifier) {
+ } else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.PropertyDefinition) && def.key.type === AST_NODE_TYPES.Identifier) {
return def.key;
}
return this.getIdent(def.parent);
}
};
-
diff --git a/build/lib/eslint/vscode-dts-interface-naming.ts b/.eslintplugin/vscode-dts-interface-naming.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-interface-naming.ts
rename to .eslintplugin/vscode-dts-interface-naming.ts
diff --git a/build/lib/eslint/vscode-dts-literal-or-types.ts b/.eslintplugin/vscode-dts-literal-or-types.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-literal-or-types.ts
rename to .eslintplugin/vscode-dts-literal-or-types.ts
diff --git a/build/lib/eslint/vscode-dts-provider-naming.ts b/.eslintplugin/vscode-dts-provider-naming.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-provider-naming.ts
rename to .eslintplugin/vscode-dts-provider-naming.ts
diff --git a/build/lib/eslint/vscode-dts-region-comments.ts b/.eslintplugin/vscode-dts-region-comments.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-region-comments.ts
rename to .eslintplugin/vscode-dts-region-comments.ts
diff --git a/build/lib/eslint/vscode-dts-use-thenable.ts b/.eslintplugin/vscode-dts-use-thenable.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-use-thenable.ts
rename to .eslintplugin/vscode-dts-use-thenable.ts
diff --git a/build/lib/eslint/vscode-dts-vscode-in-comments.ts b/.eslintplugin/vscode-dts-vscode-in-comments.ts
similarity index 100%
rename from build/lib/eslint/vscode-dts-vscode-in-comments.ts
rename to .eslintplugin/vscode-dts-vscode-in-comments.ts
diff --git a/.eslintrc.json b/.eslintrc.json
index da169cdcc0c..9b8f2c61094 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -8,12 +8,19 @@
"plugins": [
"@typescript-eslint",
"jsdoc",
- "header"
+ "header",
+ "local"
],
"rules": {
"constructor-super": "warn",
"curly": "warn",
"eqeqeq": "warn",
+ "prefer-const": [
+ "warn",
+ {
+ "destructuring": "all"
+ }
+ ],
"no-buffer-constructor": "warn",
"no-caller": "warn",
"no-case-declarations": "warn",
@@ -55,17 +62,17 @@
]
}
],
- "code-no-unused-expressions": [
+ "local/code-no-unused-expressions": [
"warn",
{
"allowTernary": true
}
],
- "code-translation-remind": "warn",
- "code-no-nls-in-standalone-editor": "warn",
- "code-no-standalone-editor": "warn",
- "code-no-unexternalized-strings": "warn",
- "code-layering": [
+ "local/code-translation-remind": "warn",
+ "local/code-no-nls-in-standalone-editor": "warn",
+ "local/code-no-standalone-editor": "warn",
+ "local/code-no-unexternalized-strings": "warn",
+ "local/code-layering": [
"warn",
{
"common": [],
@@ -116,8 +123,8 @@
"**/*.test.ts"
],
"rules": {
- "code-no-test-only": "error",
- "code-no-unexternalized-strings": "off"
+ "local/code-no-test-only": "error",
+ "local/code-no-unexternalized-strings": "off"
}
},
{
@@ -126,14 +133,14 @@
"**/vscode.proposed.*.d.ts"
],
"rules": {
- "vscode-dts-create-func": "warn",
- "vscode-dts-literal-or-types": "warn",
- "vscode-dts-interface-naming": "warn",
- "vscode-dts-cancellation": "warn",
- "vscode-dts-use-thenable": "warn",
- "vscode-dts-region-comments": "warn",
- "vscode-dts-vscode-in-comments": "warn",
- "vscode-dts-provider-naming": [
+ "local/vscode-dts-create-func": "warn",
+ "local/vscode-dts-literal-or-types": "warn",
+ "local/vscode-dts-interface-naming": "warn",
+ "local/vscode-dts-cancellation": "warn",
+ "local/vscode-dts-use-thenable": "warn",
+ "local/vscode-dts-region-comments": "warn",
+ "local/vscode-dts-vscode-in-comments": "warn",
+ "local/vscode-dts-provider-naming": [
"warn",
{
"allowed": [
@@ -148,7 +155,7 @@
]
}
],
- "vscode-dts-event-naming": [
+ "local/vscode-dts-event-naming": [
"warn",
{
"allowed": [
@@ -194,8 +201,8 @@
"src/**/*.ts"
],
"rules": {
- "code-no-look-behind-regex": "warn",
- "code-import-patterns": [
+ "local/code-no-look-behind-regex": "warn",
+ "local/code-import-patterns": [
"warn",
{
// imports that are allowed in all files of layers:
@@ -214,13 +221,11 @@
// - electron-main
"when": "hasNode",
"allow": [
- "@microsoft/applicationinsights-web",
"@parcel/watcher",
"@vscode/sqlite3",
"@vscode/vscode-languagedetection",
"@vscode/ripgrep",
"@vscode/iconv-lite-umd",
- "applicationinsights",
"assert",
"child_process",
"console",
@@ -255,6 +260,7 @@
"windows-process-tree",
"worker_threads",
"xterm",
+ "xterm-addon-canvas",
"xterm-addon-search",
"xterm-addon-serialize",
"xterm-addon-unicode11",
@@ -269,6 +275,7 @@
// imports that are allowed in all /test/ files
"when": "test",
"allow": [
+ "vs/css.build",
"assert",
"sinon",
"sinon-test"
@@ -323,7 +330,9 @@
"vs/base/~",
"vs/base/parts/*/~",
"vs/platform/*/~",
- "tas-client-umd" // node module allowed even in /common/
+ "tas-client-umd", // node module allowed even in /common/
+ "@microsoft/1ds-core-js",// node module allowed even in /common/
+ "@microsoft/1ds-post-js" // node module allowed even in /common/
]
},
{
@@ -437,8 +446,7 @@
}, // TODO@layers
"tas-client-umd", // node module allowed even in /common/
"vscode-textmate", // node module allowed even in /common/
- "@vscode/vscode-languagedetection", // node module allowed even in /common/
- "@microsoft/applicationinsights-web" // node module allowed even in /common/
+ "@vscode/vscode-languagedetection" // node module allowed even in /common/
]
},
{
@@ -479,6 +487,14 @@
{
"when": "hasBrowser",
"pattern": "vs/workbench/workbench.web.main"
+ },
+ {
+ "when": "hasBrowser",
+ "pattern": "vs/workbench/~"
+ },
+ {
+ "when": "hasBrowser",
+ "pattern": "vs/workbench/services/*/~"
}
]
},
@@ -529,7 +545,7 @@
]
},
{
- "target": "src/vs/workbench/{workbench.sandbox.main.ts,workbench.desktop.sandbox.main.ts}",
+ "target": "src/vs/workbench/workbench.desktop.main.ts",
"layer": "electron-sandbox",
"restrictions": [
"vs/base/*/~",
@@ -542,26 +558,7 @@
"vs/workbench/api/~",
"vs/workbench/services/*/~",
"vs/workbench/contrib/*/~",
- "vs/workbench/workbench.common.main",
- "vs/workbench/workbench.sandbox.main"
- ]
- },
- {
- "target": "src/vs/workbench/workbench.desktop.main.ts",
- "layer": "electron-browser",
- "restrictions": [
- "vs/base/*/~",
- "vs/base/parts/*/~",
- "vs/platform/*/~",
- "vs/editor/~",
- "vs/editor/contrib/*/~",
- "vs/editor/editor.all",
- "vs/workbench/~",
- "vs/workbench/api/~",
- "vs/workbench/services/*/~",
- "vs/workbench/contrib/*/~",
- "vs/workbench/workbench.common.main",
- "vs/workbench/workbench.sandbox.main"
+ "vs/workbench/workbench.common.main"
]
},
{
@@ -569,7 +566,7 @@
"restrictions": []
},
{
- "target": "src/vs/{css.d.ts,monaco.d.ts,nls.d.ts,nls.mock.ts}",
+ "target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.ts,nls.build.ts,nls.mock.ts}",
"restrictions": []
},
{
@@ -588,7 +585,7 @@
"test/**/*.ts"
],
"rules": {
- "code-import-patterns": [
+ "local/code-import-patterns": [
"warn",
{
"target": "test/smoke/**",
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 8a44ce8c7ac..ce9e17c1c96 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -13,10 +13,10 @@ Does this issue occur when all extensions are disabled?: Yes/No
-- VS Code Version:
-- OS Version:
+- VS Code Version:
+- OS Version:
Steps to Reproduce:
-1.
-2.
+1.
+2.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 51e7f366043..35dab07012c 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -3,3 +3,6 @@ contact_links:
- name: Question
url: https://stackoverflow.com/questions/tagged/visual-studio-code
about: Please ask and answer questions here.
+ - name: Extension Development
+ url: https://github.com/microsoft/vscode-discussions/discussions/5
+ about: Please use this for extension development questions and ideas.
diff --git a/.github/classifier.json b/.github/classifier.json
index 5b5625f6e93..ca0e4f86467 100644
--- a/.github/classifier.json
+++ b/.github/classifier.json
@@ -1,6 +1,6 @@
{
- "$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/master/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json",
- "vacation": ["RMacfarlane", "eamodio"],
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/stable/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json",
+ "vacation": [],
"assignees": {
"nameToOverrideAccuracyOf": {"accuracy": 0.8}
},
@@ -18,12 +18,12 @@
"callhierarchy": {"assign": ["jrieken"]},
"code-lens": {"assign": ["jrieken"]},
"color-palette": {"assign": []},
- "comments": {"assign": ["rebornix"]},
+ "comments": {"assign": ["alexr00"]},
"config": {"assign": ["sandy081"]},
"context-keys": {"assign": []},
"css-less-scss": {"assign": ["aeschli"]},
"custom-editors": {"assign": ["mjbvz"]},
- "debug": {"assign": ["weinand"]},
+ "debug": {"assign": ["roblourens"]},
"dialogs": {"assign": ["sbatten"]},
"diff-editor": {"assign": ["alexdima"]},
"dropdown": {"assign": []},
@@ -58,6 +58,7 @@
"editor-scrollbar": {"assign": ["alexdima"]},
"editor-symbols": {"assign": ["jrieken"]},
"editor-synced-region": {"assign": ["aeschli"]},
+ "editor-sticky-scroll": {"assign": ["jrieken"]},
"editor-textbuffer": {"assign": ["alexdima", "rebornix"]},
"editor-theming": {"assign": ["alexdima"]},
"editor-wordnav": {"assign": ["alexdima"]},
@@ -85,7 +86,7 @@
"html": {"assign": ["aeschli"]},
"i18n": {"assign": []},
"icon-brand": {"assign": []},
- "icons-product": {"assign": ["misolori"]},
+ "icons-product": {"assign": ["daviddossett"]},
"inlay-hints": {"assign": ["jrieken", "hediet"]},
"inline-completions": {"assign": ["hediet"]},
"install-update": {"assign": []},
@@ -132,7 +133,7 @@
"rename": {"assign": ["jrieken"]},
"scm": {"assign": ["lszomoru"]},
"screencast-mode": {"assign": ["lszomoru"]},
- "search": {"assign": ["roblourens"]},
+ "search": {"assign": ["roblourens", "andreamah"]},
"search-editor": {"assign": ["roblourens"]},
"search-replace": {"assign": ["sandy081"]},
"semantic-tokens": {"assign": ["alexdima", "aeschli"]},
@@ -145,7 +146,7 @@
"snippets": {"assign": ["jrieken"]},
"splitview": {"assign": ["joaomoreno"]},
"suggest": {"assign": ["jrieken"]},
- "tasks": {"assign": ["alexr00"], "accuracy": 0.85},
+ "tasks": {"assign": ["meganrogge"], "accuracy": 0.85},
"telemetry": {"assign": []},
"themes": {"assign": ["aeschli"]},
"timeline": {"assign": ["lramos15"]},
@@ -158,7 +159,7 @@
"undo-redo": {"assign": ["alexdima"]},
"unit-test": {"assign": []},
"uri": {"assign": ["jrieken"]},
- "ux": {"assign": ["misolori"]},
+ "ux": {"assign": ["daviddossett"]},
"variable-resolving": {"assign": []},
"vscode-build": {"assign": []},
"web": {"assign": []},
diff --git a/.github/commands.json b/.github/commands.json
index 68a50baae95..5ade58ab38a 100644
--- a/.github/commands.json
+++ b/.github/commands.json
@@ -11,34 +11,51 @@
"action": "updateLabels",
"addLabel": "*question"
},
+ {
+ "type": "comment",
+ "name": "dev-question",
+ "allowUsers": [
+ "cleidigh",
+ "usernamehw",
+ "gjsjohnmurray",
+ "IllusionMH"
+ ],
+ "action": "updateLabels",
+ "addLabel": "*dev-question"
+ },
{
"type": "label",
"name": "*question",
"action": "close",
+ "reason": "not_planned",
"comment": "We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on [StackOverflow](https://aka.ms/vscodestackoverflow), where the community has already answered thousands of similar questions. You may find their [guide on asking a new question](https://aka.ms/vscodestackoverflowquestion) helpful if your question has not already been asked. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
},
{
"type": "label",
"name": "*dev-question",
"action": "close",
- "comment": "We have a great developer community [over on slack](https://aka.ms/vscode-dev-community) where extension authors help each other. This is a great place for you to ask questions and find support.\n\nHappy Coding!"
+ "reason": "not_planned",
+ "comment": "We have a great extension developer community over on [GitHub discussions](https://github.com/microsoft/vscode-discussions/discussions) and [Slack](https://aka.ms/vscode-dev-community) where extension authors help each other. This is a great place for you to ask questions and find support.\n\nHappy Coding!"
},
{
"type": "label",
"name": "*extension-candidate",
"action": "close",
+ "reason": "not_planned",
"comment": "We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the [VS Code Marketplace](https://aka.ms/vscodemarketplace). Just in case, in a few simple steps you can get started [writing your own extension](https://aka.ms/vscodewritingextensions). See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
},
{
"type": "label",
"name": "*not-reproducible",
"action": "close",
+ "reason": "not_planned",
"comment": "We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) might help you with that.\n\nHappy Coding!"
},
{
"type": "label",
"name": "*out-of-scope",
"action": "close",
+ "reason": "not_planned",
"comment": "We closed this issue because we [don't plan to address it](https://aka.ms/vscode-out-of-scope) in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.\n\nIf you wonder what we are up to, please see our [roadmap](https://aka.ms/vscoderoadmap) and [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nThanks for your understanding, and happy coding!"
},
{
@@ -57,29 +74,16 @@
"type": "label",
"name": "*caused-by-extension",
"action": "close",
- "comment": "This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the [marketplace](https://aka.ms/vscodemarketplace) for VS Code. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
+ "reason": "not_planned",
+ "comment": "This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the [marketplace](https://aka.ms/vscodemarketplace) for VS Code. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting). If you don't know which extension is causing the problem, you can run `Help: Start extension bisect` from the command palette (F1) to help identify the problem extension.\n\nHappy Coding!"
},
{
"type": "label",
"name": "*as-designed",
"action": "close",
+ "reason": "not_planned",
"comment": "The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
},
- {
- "type": "label",
- "name": "notebook",
- "regex": "notebook.*",
- "assign": [
- "rebornix"
- ]
- },
- {
- "type": "label",
- "name": "notebook-triage",
- "regex": "notebook.*",
- "action": "updateLabels",
- "addLabel": "notebook-triage"
- },
{
"type": "label",
"name": "L10N",
@@ -104,6 +108,7 @@
"type": "label",
"name": "*duplicate",
"action": "close",
+ "reason": "not_planned",
"comment": "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for [similar existing issues](${duplicateQuery}). See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
},
{
@@ -154,7 +159,7 @@
"IllusionMH"
],
"action": "updateLabels",
- "addLabel": "~needs more info"
+ "addLabel": "~info-needed"
},
{
"type": "comment",
@@ -165,14 +170,14 @@
"gjsjohnmurray",
"IllusionMH"
],
- "addLabel": "needs more info",
+ "addLabel": "info-needed",
"comment": "Thanks for creating this issue regarding performance! Please follow this guide to help us diagnose performance issues: https://github.com/microsoft/vscode/wiki/Performance-Issues \n\nHappy Coding!"
},
{
"type": "comment",
"name": "jsDebugLogs",
"action": "updateLabels",
- "addLabel": "needs more info",
+ "addLabel": "info-needed",
"comment": "Please collect trace logs using the following instructions:\n\n> If you're able to, add `\"trace\": true` to your `launch.json` and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.\n>\n> â ī¸ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com"
},
{
@@ -185,22 +190,23 @@
"IllusionMH"
],
"action": "close",
+ "reason": "completed",
"addLabel": "unreleased"
},
{
"type": "label",
- "name": "~needs more info",
+ "name": "~info-needed",
"action": "updateLabels",
- "addLabel": "needs more info",
- "removeLabel": "~needs more info",
+ "addLabel": "info-needed",
+ "removeLabel": "~info-needed",
"comment": "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting guidelines](https://aka.ms/vscodeissuereporting). Please take the time to review these and update the issue.\n\nHappy Coding!"
},
{
"type": "label",
- "name": "~needs version info",
+ "name": "~version-info-needed",
"action": "updateLabels",
- "addLabel": "needs more info",
- "removeLabel": "~needs version info",
+ "addLabel": "info-needed",
+ "removeLabel": "~version-info-needed",
"comment": "Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our [issue reporting guidelines](https://aka.ms/vscodeissuereporting). Please take the time to review these and update the issue.\n\nHappy Coding!"
},
{
@@ -222,6 +228,7 @@
"type": "label",
"name": "*off-topic",
"action": "close",
+ "reason": "not_planned",
"comment": "Thanks for creating this issue. We think this issue is unactionable or unrelated to the goals of this project. Please follow our [issue reporting guidelines](https://aka.ms/vscodeissuereporting).\n\nHappy Coding!"
},
{
@@ -234,6 +241,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the Python extension. Please file the issue to the [Python extension repository](https://github.com/microsoft/vscode-python). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -247,6 +255,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the Jupyter extension. Please file the issue to the [Jupyter extension repository](https://github.com/microsoft/vscode-jupyter). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -260,6 +269,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the C extension. Please file the issue to the [C extension repository](https://github.com/microsoft/vscode-cpptools). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -273,6 +283,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the C++ extension. Please file the issue to the [C++ extension repository](https://github.com/microsoft/vscode-cpptools). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -286,6 +297,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the C++ extension. Please file the issue to the [C++ extension repository](https://github.com/microsoft/vscode-cpptools). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -299,6 +311,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the TypeScript language service. Please file the issue to the [TypeScript repository](https://github.com/microsoft/TypeScript/). Make sure to check their [contributing guidelines](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -312,6 +325,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the TypeScript/JavaScript language service. Please file the issue to the [TypeScript repository](https://github.com/microsoft/TypeScript/). Make sure to check their [contributing guidelines](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -325,6 +339,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the C# extension. Please file the issue to the [C# extension repository](https://github.com/OmniSharp/omnisharp-vscode.git). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -351,6 +366,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the PowerShell extension. Please file the issue to the [PowerShell extension repository](https://github.com/PowerShell/vscode-powershell). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -364,6 +380,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the LiveShare extension. Please file the issue to the [LiveShare repository](https://github.com/MicrosoftDocs/live-share). Make sure to check their [contributing guidelines](https://github.com/MicrosoftDocs/live-share/blob/master/CONTRIBUTING.md) and provide relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -377,6 +394,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the Docker extension. Please file the issue to the [Docker extension repository](https://github.com/microsoft/vscode-docker). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -390,6 +408,7 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the Java extension. Please file the issue to the [Java extension repository](https://github.com/redhat-developer/vscode-java). Make sure to check their [troubleshooting instructions](https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting) and provide relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
@@ -403,9 +422,24 @@
"IllusionMH"
],
"action": "close",
+ "reason": "not_planned",
"addLabel": "*caused-by-extension",
"comment": "It looks like this is caused by the Java Debugger extension. Please file the issue to the [Java Debugger repository](https://github.com/microsoft/vscode-java-debug). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
},
+ {
+ "type": "comment",
+ "name": "extCodespaces",
+ "allowUsers": [
+ "cleidigh",
+ "usernamehw",
+ "gjsjohnmurray",
+ "IllusionMH"
+ ],
+ "action": "close",
+ "reason": "not_planned",
+ "addLabel": "*caused-by-extension",
+ "comment": "It looks like this is caused by the Codespaces extension. Please file the issue in the [Codespaces Discussion Forum](http://aka.ms/ghcs-feedback). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!"
+ },
{
"type": "comment",
"name": "gifPlease",
@@ -416,7 +450,7 @@
"IllusionMH"
],
"action": "comment",
- "addLabel": "needs more info",
+ "addLabel": "info-needed",
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette).\n\nHappy coding!"
},
{
@@ -439,6 +473,15 @@
"type": "label",
"name": "*workspace-trust-docs",
"action": "close",
+ "reason": "not_planned",
"comment": "This issue appears to be the result of the new workspace trust feature shipped in June 2021. This security-focused feature has major impact on the functionality of VS Code. Due to the volume of issues, we ask that you take some time to review our [comprehensive documentation](https://aka.ms/vscode-workspace-trust) on the feature. If your issue is still not resolved, please let us know."
+ },
+ {
+ "type": "label",
+ "name": "~verification-steps-needed",
+ "action": "updateLabels",
+ "addLabel": "verification-steps-needed",
+ "removeLabel": "~verification-steps-needed",
+ "comment": "Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue."
}
]
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..5ace4600a1f
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 19314029215..5335e645320 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -5,5 +5,3 @@
* Ensure that the code is up-to-date with the `main` branch.
* Include a description of the proposed changes and how to test them.
-->
-
-This PR fixes #
diff --git a/.github/workflows/bad-tag.yml b/.github/workflows/bad-tag.yml
index e996639dfbd..ba4e0524ccc 100644
--- a/.github/workflows/bad-tag.yml
+++ b/.github/workflows/bad-tag.yml
@@ -8,7 +8,7 @@ jobs:
if: github.event.ref == '1.999.0'
steps:
- name: Checkout Actions
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: "microsoft/vscode-github-triage-actions"
ref: stable
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 0d94b83350a..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:
@@ -22,8 +24,6 @@ jobs:
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
- name: Setup Build Environment
run: |
- sudo apt-get update
- sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
@@ -41,8 +41,7 @@ jobs:
uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -62,10 +61,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000
- name: Compile and Download
- 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
+ run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64"
- name: Run Unit Tests
id: electron-unit-tests
@@ -97,8 +93,7 @@ jobs:
uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -117,9 +112,6 @@ jobs:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: yarn --frozen-lockfile --network-timeout 180000
- - name: Download Playwright
- run: yarn playwright-install
-
- name: Run Hygiene Checks
run: yarn gulp hygiene
@@ -163,8 +155,7 @@ jobs:
uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a9317a9e382..fbc0876623d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,7 +36,7 @@ jobs:
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node_modules archive
id: cacheNodeModules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ".build/node_modules_cache"
key: "${{ runner.os }}-cacheNodeModulesArchive-${{ steps.nodeModulesCacheKey.outputs.value }}"
@@ -49,7 +49,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -122,18 +122,17 @@ jobs:
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node modules
id: cacheNodeModules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -194,18 +193,17 @@ jobs:
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node modules
id: cacheNodeModules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesMacOS-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -268,18 +266,17 @@ jobs:
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node modules
id: cacheNodeModules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: "**/node_modules"
- key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
- restore-keys: ${{ runner.os }}-cacheNodeModules21-
+ key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 6c5d2999898..f64aa7df15c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -24,14 +24,14 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: javascript
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v1
+ uses: github/codeql-action/autobuild@v2
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -45,4 +45,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/deep-classifier-runner.yml b/.github/workflows/deep-classifier-runner.yml
index bae2eeb1967..a966318ddef 100644
--- a/.github/workflows/deep-classifier-runner.yml
+++ b/.github/workflows/deep-classifier-runner.yml
@@ -46,7 +46,7 @@ jobs:
uses: ./actions/classifier-deep/apply/apply-labels
with:
configPath: classifier
- allowLabels: "needs more info|new release|error-telemetry|*english-please|translation-required"
+ allowLabels: "info-needed|new release|error-telemetry|*english-please|translation-required"
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
manifestDbConnectionString: ${{secrets.MANIFEST_DB_CONNECTION_STRING}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
diff --git a/.github/workflows/devcontainer-cache.yml b/.github/workflows/devcontainer-cache.yml
index db9b3fa7866..b1b4c53b77b 100644
--- a/.github/workflows/devcontainer-cache.yml
+++ b/.github/workflows/devcontainer-cache.yml
@@ -23,7 +23,7 @@ jobs:
- name: Azure CLI login
id: az_login
- uses: azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a
+ uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
with:
creds: ${{ secrets.AZ_ACR_CREDS }}
diff --git a/.github/workflows/english-please.yml b/.github/workflows/english-please.yml
index da8ca03ddd8..2f24b039125 100644
--- a/.github/workflows/english-please.yml
+++ b/.github/workflows/english-please.yml
@@ -24,6 +24,6 @@ jobs:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
cognitiveServicesAPIKey: ${{secrets.AZURE_TEXT_TRANSLATOR_KEY}}
nonEnglishLabel: "*english-please"
- needsMoreInfoLabel: "needs more info"
+ needsMoreInfoLabel: "info-needed"
translatorRequestedLabelPrefix: "translation-required-"
translatorRequestedLabelColor: "c29cff"
diff --git a/.github/workflows/monaco-editor.yml b/.github/workflows/monaco-editor.yml
index e52713a3e99..ba7c85809f5 100644
--- a/.github/workflows/monaco-editor.yml
+++ b/.github/workflows/monaco-editor.yml
@@ -29,7 +29,7 @@ jobs:
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node modules
id: cacheNodeModules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -40,7 +40,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
diff --git a/.github/workflows/needs-more-info-closer.yml b/.github/workflows/needs-more-info-closer.yml
index 5e1f5b5c548..65805be0d51 100644
--- a/.github/workflows/needs-more-info-closer.yml
+++ b/.github/workflows/needs-more-info-closer.yml
@@ -1,4 +1,4 @@
-name: Needs More Info Closer
+name: info-needed Closer
on:
schedule:
- cron: 20 11 * * * # 4:20am Redmond
@@ -17,12 +17,12 @@ jobs:
ref: stable
- name: Install Actions
run: npm install --production --prefix ./actions
- - name: Run Needs More Info Closer
+ - name: Run info-needed Closer
uses: ./actions/needs-more-info-closer
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
- label: needs more info
+ label: info-needed
closeDays: 7
additionalTeam: "cleidigh|usernamehw|gjsjohnmurray|IllusionMH"
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
diff --git a/.github/workflows/no-yarn-lock-changes.yml b/.github/workflows/no-yarn-lock-changes.yml
index ebd735bf7e5..300a98ad998 100644
--- a/.github/workflows/no-yarn-lock-changes.yml
+++ b/.github/workflows/no-yarn-lock-changes.yml
@@ -18,8 +18,9 @@ jobs:
run: |
echo "user: ${{ github.event.pull_request.user.login }}"
echo "role: ${{ fromJson(steps.get_permissions.outputs.data).permission }}"
+ echo "is dependabot: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}"
echo "should_run: ${{ !contains(fromJson('["admin", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) }}"
- echo "::set-output name=should_run::${{ !contains(fromJson('["admin", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) }}"
+ echo "::set-output name=should_run::${{ !contains(fromJson('["admin", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) && github.event.pull_request.user.login != 'dependabot[bot]' }}"
- name: Get file changes
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
if: ${{ steps.control.outputs.should_run == 'true' }}
diff --git a/.github/workflows/on-label.yml b/.github/workflows/on-label.yml
index 25f7a67c7a1..9771860d437 100644
--- a/.github/workflows/on-label.yml
+++ b/.github/workflows/on-label.yml
@@ -71,7 +71,8 @@ jobs:
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
uses: ./actions/test-plan-item-validator
with:
- appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
+ token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
+ refLabel: on-testplan
label: testplan-item
invalidLabel: invalid-testplan-item
comment: Invalid test plan item. See errors below and the [test plan item spec](https://github.com/microsoft/vscode/wiki/Writing-Test-Plan-Items) for more information. This comment will go away when the issues are resolved.
@@ -85,6 +86,6 @@ jobs:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
cognitiveServicesAPIKey: ${{secrets.AZURE_TEXT_TRANSLATOR_KEY}}
nonEnglishLabel: "*english-please"
- needsMoreInfoLabel: "needs more info"
+ needsMoreInfoLabel: "info-needed"
translatorRequestedLabelPrefix: "translation-required-"
translatorRequestedLabelColor: "c29cff"
diff --git a/.github/workflows/on-open.yml b/.github/workflows/on-open.yml
index af70c86caa0..8fef95d9e83 100644
--- a/.github/workflows/on-open.yml
+++ b/.github/workflows/on-open.yml
@@ -59,6 +59,16 @@ jobs:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
cognitiveServicesAPIKey: ${{secrets.AZURE_TEXT_TRANSLATOR_KEY}}
nonEnglishLabel: "*english-please"
- needsMoreInfoLabel: "needs more info"
+ needsMoreInfoLabel: "info-needed"
translatorRequestedLabelPrefix: "translation-required-"
translatorRequestedLabelColor: "c29cff"
+ # source of truth in ./test-plan-item-validator.yml
+ - name: Run Test Plan Item Validator
+ uses: ./actions/test-plan-item-validator
+ with:
+ token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
+ refLabel: on-testplan
+ label: testplan-item
+ invalidLabel: invalid-testplan-item
+ comment: Invalid test plan item. See errors below and the [test plan item spec](https://github.com/microsoft/vscode/wiki/Writing-Test-Plan-Items) for more information. This comment will go away when the issues are resolved.
+
diff --git a/.github/workflows/pr-chat.yml b/.github/workflows/pr-chat.yml
index 13803fda778..0acad98dc13 100644
--- a/.github/workflows/pr-chat.yml
+++ b/.github/workflows/pr-chat.yml
@@ -9,7 +9,7 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout Actions
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: "microsoft/vscode-github-triage-actions"
ref: stable
@@ -21,5 +21,6 @@ jobs:
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
slack_token: ${{ secrets.SLACK_TOKEN }}
+ slack_user_token: ${{ secrets.SLACK_USER_TOKEN }}
slack_bot_name: "VSCodeBot"
notification_channel: codereview
diff --git a/.github/workflows/rich-navigation.yml b/.github/workflows/rich-navigation.yml
index da11ba22759..dd92342ef3a 100644
--- a/.github/workflows/rich-navigation.yml
+++ b/.github/workflows/rich-navigation.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
id: caching-stage
name: Cache VS Code dependencies
with:
diff --git a/.github/workflows/telemetry.yml b/.github/workflows/telemetry.yml
new file mode 100644
index 00000000000..83e511eeb94
--- /dev/null
+++ b/.github/workflows/telemetry.yml
@@ -0,0 +1,17 @@
+name: 'Telemetry'
+on:
+ pull_request:
+jobs:
+ check-metdata:
+ name: 'Check metadata'
+ runs-on: 'ubuntu-latest'
+
+ steps:
+ - uses: 'actions/checkout@v3'
+
+ - uses: 'actions/setup-node@v3'
+ with:
+ node-version: 'lts/*'
+
+ - name: 'Run vscode-telemetry-extractor'
+ run: 'npx --package=@vscode/telemetry-extractor --yes vscode-telemetry-extractor -s .'
diff --git a/.github/workflows/test-plan-item-validator.yml b/.github/workflows/test-plan-item-validator.yml
index 82bd093e039..d3b9284f9ae 100644
--- a/.github/workflows/test-plan-item-validator.yml
+++ b/.github/workflows/test-plan-item-validator.yml
@@ -3,7 +3,7 @@ on:
issues:
types: [edited]
-# also edit in ./on-label.yml
+# also edit in ./on-label.yml and ./on-open.yml
jobs:
main:
runs-on: ubuntu-latest
@@ -22,7 +22,8 @@ jobs:
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
uses: ./actions/test-plan-item-validator
with:
+ token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
+ refLabel: on-testplan
label: testplan-item
- appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
invalidLabel: invalid-testplan-item
comment: Invalid test plan item. See errors below and the [test plan item spec](https://github.com/microsoft/vscode/wiki/Writing-Test-Plan-Items) for more information. This comment will go away when the issues are resolved.
diff --git a/.gitignore b/.gitignore
index 738d6793fa9..c338e141c8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ yarn-error.log
vscode.lsif
vscode.db
/.profile-oss
+/cli/target
diff --git a/.mailmap b/.mailmap
index d4542abf73c..4834393cff7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,6 +1,4 @@
-Eric Amodio Eric Amodio
-Eric Amodio Eric Amodio
Daniel Imms Daniel Imms
-Tanha Kabir Tanha Kabir
Raymond Zhao
Tyler Leonhardt Tyler Leonhardt
+JoÃŖo Moreno JoÃŖo Moreno
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000000..0cf077e6b4c
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+16.14
diff --git a/.vscode/cglicenses.schema.json b/.vscode/cglicenses.schema.json
index 8c0ee740102..8131a35217a 100644
--- a/.vscode/cglicenses.schema.json
+++ b/.vscode/cglicenses.schema.json
@@ -55,6 +55,31 @@
}
}
}
+ },
+ {
+ "type": "object",
+ "required": [
+ "name",
+ "fullLicenseTextUri"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the dependency"
+ },
+ "fullLicenseTextUri": {
+ "type": "string",
+ "description": "The URI to the license text of this repository",
+ "format": "uri"
+ },
+ "prependLicenseText": {
+ "type": "array",
+ "description": "A piece of text to prepend to the auto-detected license text of the dependency",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
}
]
}
diff --git a/.vscode/cgmanifest.schema.json b/.vscode/cgmanifest.schema.json
deleted file mode 100644
index 2e719b02396..00000000000
--- a/.vscode/cgmanifest.schema.json
+++ /dev/null
@@ -1,142 +0,0 @@
-{
- "type": "object",
- "properties": {
- "registrations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "component": {
- "oneOf": [
- {
- "type": "object",
- "required": [
- "type",
- "git"
- ],
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "git"
- ]
- },
- "git": {
- "type": "object",
- "required": [
- "name",
- "repositoryUrl",
- "commitHash"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "repositoryUrl": {
- "type": "string"
- },
- "commitHash": {
- "type": "string"
- }
- }
- }
- }
- },
- {
- "type": "object",
- "required": [
- "type",
- "npm"
- ],
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "npm"
- ]
- },
- "npm": {
- "type": "object",
- "required": [
- "name",
- "version"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "version": {
- "type": "string"
- }
- }
- }
- }
- },
- {
- "type": "object",
- "required": [
- "type",
- "other"
- ],
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "other"
- ]
- },
- "other": {
- "type": "object",
- "required": [
- "name",
- "downloadUrl",
- "version"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "downloadUrl": {
- "type": "string"
- },
- "version": {
- "type": "string"
- }
- }
- }
- }
- }
- ]
- },
- "repositoryUrl": {
- "type": "string",
- "description": "The git url of the component"
- },
- "version": {
- "type": "string",
- "description": "The version of the component"
- },
- "license": {
- "type": "string",
- "description": "The name of the license"
- },
- "developmentDependency": {
- "type": "boolean",
- "description": "This component is inlined in the vscode repo and **is not shipped**."
- },
- "isOnlyProductionDependency": {
- "type": "boolean",
- "description": "This component is shipped and **is not inlined in the vscode repo**."
- },
- "licenseDetail": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "The license text"
- }
- }
- }
- }
- }
-}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index dd295c02db4..3bf8c67198f 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -16,11 +16,7 @@
"request": "attach",
"restart": true,
"name": "Attach to Extension Host",
- // set to a large number: if there is an issue we're debugging that keeps
- // the extension host from coming up, or the renderer is paused/crashes
- // before it happens, developers will get an annoying alert, e.g. #126826.
- // This can be set to 0 in 1.59.
- "timeout": 999999999,
+ "timeout": 0,
"port": 5870,
"outFiles": [
"${workspaceFolder}/out/**/*.js",
@@ -28,12 +24,12 @@
]
},
{
- "type": "pwa-chrome",
+ "type": "chrome",
"request": "attach",
"name": "Attach to Shared Process",
"timeout": 30000,
"port": 9222,
- "urlFilter": "*sharedProcess.html*",
+ "urlFilter": "*sharedProcess*.html*",
"presentation": {
"hidden": true
}
@@ -71,6 +67,7 @@
"name": "Attach to Main Process",
"timeout": 30000,
"port": 5875,
+ "continueOnAttach": true,
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
@@ -96,6 +93,23 @@
"order": 6
}
},
+ {
+ "type": "extensionHost",
+ "request": "launch",
+ "name": "VS Code Configuration Editing Tests",
+ "runtimeExecutable": "${execPath}",
+ "args": [
+ "--extensionDevelopmentPath=${workspaceFolder}/extensions/configuration-editing",
+ "--extensionTestsPath=${workspaceFolder}/extensions/configuration-editing/out/test"
+ ],
+ "outFiles": [
+ "${workspaceFolder}/out/**/*.js"
+ ],
+ "presentation": {
+ "group": "5_tests",
+ "order": 6
+ }
+ },
{
"type": "extensionHost",
"request": "launch",
@@ -189,25 +203,7 @@
}
},
{
- "type": "extensionHost",
- "request": "launch",
- "name": "VS Code Custom Editor Tests",
- "runtimeExecutable": "${execPath}",
- "args": [
- "${workspaceFolder}/extensions/vscode-custom-editor-tests/test-workspace",
- "--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode-custom-editor-tests",
- "--extensionTestsPath=${workspaceFolder}/extensions/vscode-custom-editor-tests/out/test"
- ],
- "outFiles": [
- "${workspaceFolder}/out/**/*.js"
- ],
- "presentation": {
- "group": "5_tests",
- "order": 6
- }
- },
- {
- "type": "pwa-chrome",
+ "type": "chrome",
"request": "attach",
"name": "Attach to VS Code",
"browserAttachLocation": "workspace",
@@ -221,7 +217,7 @@
"perScriptSourcemaps": "yes"
},
{
- "type": "pwa-chrome",
+ "type": "chrome",
"request": "launch",
"name": "Launch VS Code Internal",
"windows": {
@@ -234,16 +230,17 @@
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
},
"port": 9222,
- "timeout": 20000,
+ "timeout": 0,
"env": {
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
"VSCODE_SKIP_PRELAUNCH": "1"
},
"cleanUp": "wholeBrowser",
- "urlFilter": "*workbench.html*",
+ "urlFilter": "*workbench*.html*",
"runtimeArgs": [
- "--inspect=5875",
+ "--inspect-brk=5875",
"--no-cached-data",
+ "--crash-reporter-directory=${workspaceFolder}/.profile-oss/crashes",
// for general runtime freezes: https://github.com/microsoft/vscode/issues/127861#issuecomment-904144910
"--disable-features=CalculateNativeWinOcclusion",
],
@@ -262,7 +259,7 @@
}
},
{
- "type": "pwa-node",
+ "type": "node",
"request": "launch",
"name": "VS Code Server (Web)",
"runtimeExecutable": "${workspaceFolder}/scripts/code-server.sh",
@@ -278,7 +275,7 @@
}
},
{
- "type": "pwa-node",
+ "type": "node",
"request": "launch",
"name": "Main Process",
"attachSimplePort": 5875,
@@ -299,7 +296,7 @@
}
},
{
- "type": "pwa-chrome",
+ "type": "chrome",
"request": "launch",
"outFiles": [],
"perScriptSourcemaps": "yes",
@@ -312,7 +309,7 @@
}
},
{
- "type": "pwa-msedge",
+ "type": "msedge",
"request": "launch",
"outFiles": [],
"perScriptSourcemaps": "yes",
@@ -325,6 +322,33 @@
"order": 3
}
},
+ {
+ "type": "chrome",
+ "request": "launch",
+ "outFiles": [],
+ "perScriptSourcemaps": "yes",
+ "name": "VS Code Web (Chrome)",
+ "url": "http://localhost:8080",
+ "preLaunchTask": "Run code web",
+ "presentation": {
+ "group": "0_vscode",
+ "order": 3
+ }
+ },
+ {
+ "type": "msedge",
+ "request": "launch",
+ "outFiles": [],
+ "perScriptSourcemaps": "yes",
+ "name": "VS Code Web (Edge)",
+ "url": "http://localhost:8080",
+ "pauseForSourceMap": false,
+ "preLaunchTask": "Run code web",
+ "presentation": {
+ "group": "0_vscode",
+ "order": 3
+ }
+ },
{
"type": "node",
"request": "launch",
@@ -407,7 +431,7 @@
}
},
{
- "type": "pwa-node",
+ "type": "node",
"request": "launch",
"name": "Run Unit Tests",
"program": "${workspaceFolder}/test/unit/electron/index.js",
@@ -437,7 +461,7 @@
}
},
{
- "type": "pwa-node",
+ "type": "node",
"request": "launch",
"name": "Run Unit Tests For Current File",
"program": "${workspaceFolder}/test/unit/electron/index.js",
@@ -472,10 +496,9 @@
"type": "node",
"request": "launch",
"name": "Launch Smoke Test",
- "program": "${workspaceFolder}/test/smoke/out/main.js",
+ "program": "${workspaceFolder}/test/smoke/test/index.js",
"cwd": "${workspaceFolder}/test/smoke",
"timeout": 240000,
- "port": 9999,
"args": [
"-l",
"${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron"
@@ -516,9 +539,10 @@
}
},
{
- "name": "Search and Renderer processes",
+ "name": "Search, Renderer, and Main processes",
"configurations": [
"Launch VS Code Internal",
+ "Attach to Main Process",
"Attach to Search Process"
],
"presentation": {
@@ -527,9 +551,10 @@
}
},
{
- "name": "Renderer and Extension Host processes",
+ "name": "Renderer, Extension Host, and Main processes",
"configurations": [
"Launch VS Code Internal",
+ "Attach to Main Process",
"Attach to Extension Host"
],
"presentation": {
@@ -560,10 +585,11 @@
}
},
{
- "name": "Launch VS Code",
+ "name": "Renderer and Main processes",
"stopAll": true,
"configurations": [
"Launch VS Code Internal",
+ "Attach to Main Process"
],
"preLaunchTask": "Ensure Prelaunch Dependencies"
},
diff --git a/.vscode/notebooks/api.github-issues b/.vscode/notebooks/api.github-issues
index 1b3790c8cc9..9bf483dbbcc 100644
--- a/.vscode/notebooks/api.github-issues
+++ b/.vscode/notebooks/api.github-issues
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"May 2022\""
+ "value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"October 2022\""
},
{
"kind": 1,
diff --git a/.vscode/notebooks/endgame.github-issues b/.vscode/notebooks/endgame.github-issues
index 48195c79000..82e9dbfbb8b 100644
--- a/.vscode/notebooks/endgame.github-issues
+++ b/.vscode/notebooks/endgame.github-issues
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-remotehub repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-unpkg\r\n\r\n$MILESTONE=milestone:\"May 2022\""
+ "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\r\n\r\n$MILESTONE=milestone:\"October 2022\""
},
{
"kind": 1,
@@ -32,7 +32,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS -$MILESTONE is:issue is:closed label:bug label:insiders-released -label:verified -label:*duplicate -label:*as-designed -label:z-author-verified -label:on-testplan"
+ "value": "$REPOS -$MILESTONE is:issue is:closed reason:completed label:bug label:insiders-released -label:verified -label:*duplicate -label:*as-designed -label:z-author-verified -label:on-testplan"
},
{
"kind": 1,
@@ -42,7 +42,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS -$MILESTONE is:issue is:closed label:feature-request label:insiders-released -label:on-testplan -label:verified -label:*duplicate"
+ "value": "$REPOS -$MILESTONE is:issue is:closed reason:completed label:feature-request label:insiders-released -label:on-testplan -label:verified -label:*duplicate"
},
{
"kind": 1,
@@ -62,7 +62,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
+ "value": "$REPOS $MILESTONE is:issue is:closed reason:completed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
},
{
"kind": 1,
@@ -97,7 +97,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE is:issue is:closed label:verification-needed -label:verified"
+ "value": "$REPOS $MILESTONE is:issue is:closed reason:completed label:verification-needed -label:verified"
},
{
"kind": 1,
@@ -112,7 +112,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified -label:unreleased"
+ "value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified -label:unreleased"
},
{
"kind": 1,
@@ -122,7 +122,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified label:unreleased"
+ "value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified label:unreleased"
},
{
"kind": 1,
diff --git a/.vscode/notebooks/inbox.github-issues b/.vscode/notebooks/inbox.github-issues
index ad451a6f91a..10d7fd63e54 100644
--- a/.vscode/notebooks/inbox.github-issues
+++ b/.vscode/notebooks/inbox.github-issues
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$inbox -label:\"needs more info\" sort:created-desc"
+ "value": "$inbox -label:\"info-needed\" sort:created-desc"
},
{
"kind": 2,
diff --git a/.vscode/notebooks/my-endgame.github-issues b/.vscode/notebooks/my-endgame.github-issues
index 4ce504b017f..3bfee2f4e4c 100644
--- a/.vscode/notebooks/my-endgame.github-issues
+++ b/.vscode/notebooks/my-endgame.github-issues
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remotehub repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal\n\n$MILESTONE=milestone:\"May 2022\"\n\n$MINE=assignee:@me"
+ "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\r\n\r\n$MILESTONE=milestone:\"October 2022\"\r\n\r\n$MINE=assignee:@me"
},
{
"kind": 1,
@@ -42,7 +42,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
+ "value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
},
{
"kind": 1,
@@ -62,7 +62,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request label:verification-needed -label:verified"
+ "value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request label:verification-needed -label:verified"
},
{
"kind": 1,
@@ -87,7 +87,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE -$MINE is:issue is:closed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed"
+ "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed -label:verification-steps-needed -label:unreleased"
},
{
"kind": 1,
@@ -147,7 +147,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE -$MINE is:issue is:closed author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:needs-triage -label:verification-found"
+ "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:triage-needed -label:verification-found"
},
{
"kind": 1,
@@ -157,7 +157,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE -$MINE is:issue is:closed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:dynamicwebpaige -author:eamodio -author:egamma -author:fiveisprime -author:greazer -author:gregvanl -author:hediet -author:IanMatthewHuff -author:isidorn -author:ItalyPaleAle -author:JacksonKearl -author:joaomoreno -author:joyceerhl -author:jrieken -author:karrtikr-author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:ornellaalt -author:orta -author:rchiodo -author:rebornix -author:roblourens -author:rzhao271 -author:sana-ajani -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:kimadeline -author:amunger"
+ "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:IanMatthewHuff -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:karrtikr -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger"
},
{
"kind": 1,
@@ -167,7 +167,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$REPOS $MILESTONE -$MINE is:issue is:closed -author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found"
+ "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found"
},
{
"kind": 1,
@@ -177,6 +177,6 @@
{
"kind": 2,
"language": "github-issues",
- "value": "repo:microsoft/vscode $MILESTONE $MINE is:issue is:closed label:feature-request -label:on-release-notes"
+ "value": "repo:microsoft/vscode $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:on-release-notes"
}
]
\ No newline at end of file
diff --git a/.vscode/notebooks/my-work.github-issues b/.vscode/notebooks/my-work.github-issues
index 143697b0c4e..69d50e05965 100644
--- a/.vscode/notebooks/my-work.github-issues
+++ b/.vscode/notebooks/my-work.github-issues
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce\n\n// current milestone name\n$milestone=milestone:\"May 2022\""
+ "value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\n\n// current milestone name\n$milestone=milestone:\"October 2022\""
},
{
"kind": 1,
@@ -92,7 +92,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos assignee:@me is:open type:issue -label:bug -label:\"needs more info\" -label:feature-request -label:under-discussion -label:debt -label:plan-item -label:upstream -label:polish -label:testplan-item -label:error-telemetry"
+ "value": "$repos assignee:@me is:open type:issue -label:bug -label:\"info-needed\" -label:feature-request -label:under-discussion -label:debt -label:plan-item -label:upstream -label:polish -label:testplan-item -label:error-telemetry"
},
{
"kind": 1,
@@ -102,7 +102,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "repo:microsoft/vscode assignee:@me is:open type:issue -label:\"needs more info\" -label:api -label:api-finalization -label:api-proposal -label:authentication -label:bisect-ext -label:bracket-pair-colorization -label:bracket-pair-guides -label:breadcrumbs -label:callhierarchy -label:chrome-devtools -label:code-lens -label:color-palette -label:comments -label:config -label:context-keys -label:css-less-scss -label:custom-editors -label:debug -label:debug-disassembly -label:dialogs -label:diff-editor -label:dropdown -label:editor -label:editor-autoclosing -label:editor-autoindent -label:editor-bracket-matching -label:editor-clipboard -label:editor-code-actions -label:editor-color-picker -label:editor-columnselect -label:editor-commands -label:editor-comments -label:editor-contrib -label:editor-core -label:editor-drag-and-drop -label:editor-error-widget -label:editor-find -label:editor-folding -label:editor-highlight -label:editor-hover -label:editor-indent-detection -label:editor-indent-guides -label:editor-input -label:editor-input-IME -label:editor-insets -label:editor-minimap -label:editor-multicursor -label:editor-parameter-hints -label:editor-render-whitespace -label:editor-rendering -label:editor-RTL -label:editor-scrollbar -label:editor-symbols -label:editor-synced-region -label:editor-textbuffer -label:editor-theming -label:editor-wordnav -label:editor-wrapping -label:emmet -label:engineering -label:error-list -label:extension-host -label:extension-recommendations -label:extensions -label:extensions-development -label:file-decorations -label:file-encoding -label:file-explorer -label:file-glob -label:file-io -label:file-watcher -label:font-rendering -label:formatting -label:getting-started -label:ghost-text -label:git -label:github -label:gpu -label:grammar -label:grid-view -label:html -label:i18n -label:icon-brand -label:icons-product -label:image-preview -label:inlay-hints -label:inline-completions -label:install-update -label:intellisense-config -label:interactive-window -label:ipc -label:issue-bot -label:issue-reporter -label:javascript -label:json -label:keybindings -label:keybindings-editor -label:keyboard-layout -label:L10N -label:label-provider -label:languages-basic -label:languages-diagnostics -label:languages-guessing -label:layout -label:lcd-text-rendering -label:list -label:live-server -label:log -label:markdown -label:marketplace -label:menus -label:merge-conflict -label:network -label:notebook -label:notebook-api -label:notebook-celltoolbar -label:notebook-diff -label:notebook-dnd -label:notebook-folding -label:notebook-globaltoolbar -label:notebook-ipynb -label:notebook-kernel -label:notebook-keybinding -label:notebook-layout -label:notebook-markdown -label:notebook-minimap -label:notebook-multiselect -label:notebook-output -label:notebook-perf -label:notebook-statusbar -label:open-editors -label:opener -label:outline -label:output -label:perf -label:perf-bloat -label:perf-startup -label:php -label:portable-mode -label:proxy -label:quick-open -label:quick-pick -label:references-viewlet -label:release-notes -label:remote -label:remote-connection -label:remote-explorer -label:remotehub -label:rename -label:sandbox -label:sash -label:scm -label:screencast-mode -label:search -label:search-api -label:search-editor -label:search-replace -label:semantic-tokens -label:settings-editor -label:settings-sync -label:settings-sync-server -label:shared-process -label:simple-file-dialog -label:smart-select -label:snap -label:snippets -label:splitview -label:suggest -label:sync-error-handling -label:table -label:tasks -label:telemetry -label:terminal -label:terminal-conpty -label:terminal-editors -label:terminal-external -label:terminal-links -label:terminal-local-echo -label:terminal-profiles -label:terminal-reconnection -label:terminal-rendering -label:terminal-tabs -label:terminal-winpty -label:testing -label:themes -label:timeline -label:timeline-git -label:titlebar -label:tokenization -label:touch/pointer -label:trackpad/scroll -label:tree-views -label:tree-widget -label:typehierarchy -label:typescript -label:undo-redo -label:uri -label:ux -label:variable-resolving -label:VIM -label:virtual-workspaces -label:vscode-build -label:vscode-website -label:web -label:webview -label:webview-views -label:workbench-actions -label:workbench-cli -label:workbench-diagnostics -label:workbench-dnd -label:workbench-editor-grid -label:workbench-editor-groups -label:workbench-editor-resolver -label:workbench-editors -label:workbench-electron -label:workbench-feedback -label:workbench-history -label:workbench-hot-exit -label:workbench-hover -label:workbench-launch -label:workbench-link -label:workbench-multiroot -label:workbench-notifications -label:workbench-os-integration -label:workbench-rapid-render -label:workbench-run-as-admin -label:workbench-state -label:workbench-status -label:workbench-tabs -label:workbench-touchbar -label:workbench-untitled-editors -label:workbench-views -label:workbench-welcome -label:workbench-window -label:workbench-zen -label:workspace-edit -label:workspace-symbols -label:workspace-trust -label:zoom"
+ "value": "repo:microsoft/vscode assignee:@me is:open type:issue -label:\"info-needed\" -label:api -label:api-finalization -label:api-proposal -label:authentication -label:bisect-ext -label:bracket-pair-colorization -label:bracket-pair-guides -label:breadcrumbs -label:callhierarchy -label:chrome-devtools -label:code-lens -label:color-palette -label:comments -label:config -label:context-keys -label:css-less-scss -label:custom-editors -label:debug -label:debug-disassembly -label:dialogs -label:diff-editor -label:dropdown -label:editor -label:editor-autoclosing -label:editor-autoindent -label:editor-bracket-matching -label:editor-clipboard -label:editor-code-actions -label:editor-color-picker -label:editor-columnselect -label:editor-commands -label:editor-comments -label:editor-contrib -label:editor-core -label:editor-drag-and-drop -label:editor-error-widget -label:editor-find -label:editor-folding -label:editor-highlight -label:editor-hover -label:editor-indent-detection -label:editor-indent-guides -label:editor-input -label:editor-input-IME -label:editor-insets -label:editor-minimap -label:editor-multicursor -label:editor-parameter-hints -label:editor-render-whitespace -label:editor-rendering -label:editor-RTL -label:editor-scrollbar -label:editor-symbols -label:editor-synced-region -label:editor-textbuffer -label:editor-theming -label:editor-wordnav -label:editor-wrapping -label:emmet -label:engineering -label:error-list -label:extension-host -label:extension-recommendations -label:extensions -label:extensions-development -label:file-decorations -label:file-encoding -label:file-explorer -label:file-glob -label:file-io -label:file-watcher -label:font-rendering -label:formatting -label:getting-started -label:ghost-text -label:git -label:github -label:gpu -label:grammar -label:grid-view -label:html -label:i18n -label:icon-brand -label:icons-product -label:image-preview -label:inlay-hints -label:inline-completions -label:install-update -label:intellisense-config -label:interactive-window -label:ipc -label:issue-bot -label:issue-reporter -label:javascript -label:json -label:keybindings -label:keybindings-editor -label:keyboard-layout -label:L10N -label:label-provider -label:languages-basic -label:languages-diagnostics -label:languages-guessing -label:layout -label:lcd-text-rendering -label:list -label:live-server -label:log -label:markdown -label:marketplace -label:menus -label:merge-conflict -label:network -label:notebook -label:notebook-api -label:notebook-celltoolbar -label:notebook-diff -label:notebook-dnd -label:notebook-folding -label:notebook-globaltoolbar -label:notebook-ipynb -label:notebook-kernel -label:notebook-keybinding -label:notebook-layout -label:notebook-markdown -label:notebook-minimap -label:notebook-multiselect -label:notebook-output -label:notebook-perf -label:notebook-statusbar -label:open-editors -label:opener -label:outline -label:output -label:perf -label:perf-bloat -label:perf-startup -label:php -label:portable-mode -label:proxy -label:quick-open -label:quick-pick -label:references-viewlet -label:release-notes -label:remote -label:remote-connection -label:remote-explorer -label:remotehub -label:rename -label:sandbox -label:sash -label:scm -label:screencast-mode -label:search -label:search-api -label:search-editor -label:search-replace -label:semantic-tokens -label:settings-editor -label:settings-sync -label:settings-sync-server -label:shared-process -label:simple-file-dialog -label:smart-select -label:snap -label:snippets -label:splitview -label:suggest -label:sync-error-handling -label:table -label:tasks -label:telemetry -label:terminal -label:terminal-conpty -label:terminal-editors -label:terminal-external -label:terminal-links -label:terminal-local-echo -label:terminal-profiles -label:terminal-reconnection -label:terminal-rendering -label:terminal-tabs -label:terminal-winpty -label:testing -label:themes -label:timeline -label:timeline-git -label:titlebar -label:tokenization -label:touch/pointer -label:trackpad/scroll -label:tree-views -label:tree-widget -label:typehierarchy -label:typescript -label:undo-redo -label:uri -label:ux -label:variable-resolving -label:VIM -label:virtual-workspaces -label:vscode-build -label:vscode-website -label:web -label:webview -label:webview-views -label:workbench-actions -label:workbench-cli -label:workbench-diagnostics -label:workbench-dnd -label:workbench-editor-grid -label:workbench-editor-groups -label:workbench-editor-resolver -label:workbench-editors -label:workbench-electron -label:workbench-feedback -label:workbench-history -label:workbench-hot-exit -label:workbench-hover -label:workbench-launch -label:workbench-link -label:workbench-multiroot -label:workbench-notifications -label:workbench-os-integration -label:workbench-rapid-render -label:workbench-run-as-admin -label:workbench-state -label:workbench-status -label:workbench-tabs -label:workbench-touchbar -label:workbench-untitled-editors -label:workbench-views -label:workbench-welcome -label:workbench-window -label:workbench-zen -label:workspace-edit -label:workspace-symbols -label:workspace-trust -label:zoom"
},
{
"kind": 1,
@@ -112,7 +112,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos assignee:@me is:open label:\"needs more info\""
+ "value": "$repos assignee:@me is:open label:\"info-needed\""
},
{
"kind": 1,
diff --git a/.vscode/notebooks/verification.github-issues b/.vscode/notebooks/verification.github-issues
index 7015a401be5..5c6354a4e72 100644
--- a/.vscode/notebooks/verification.github-issues
+++ b/.vscode/notebooks/verification.github-issues
@@ -2,7 +2,7 @@
{
"kind": 1,
"language": "markdown",
- "value": "### Bug Verification Queries\n\nBefore shipping we want to verify _all_ bugs. That means when a bug is fixed we check that the fix actually works. It's always best to start with bugs that you have filed and the proceed with bugs that have been filed from users outside the development team. "
+ "value": "### Bug Verification Queries\r\n\r\nBefore shipping we want to verify _all_ bugs. That means when a bug is fixed we check that the fix actually works. It's always best to start with bugs that you have filed and the proceed with bugs that have been filed from users outside the development team. "
},
{
"kind": 1,
@@ -12,7 +12,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-jupyter repo:microsoft/vscode-python\n$milestone=milestone:\"May 2022\""
+ "value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n\n$milestone=milestone:\"May 2022\""
},
{
"kind": 1,
@@ -22,7 +22,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate author:@me"
+ "value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate author:@me"
},
{
"kind": 1,
@@ -32,7 +32,7 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate -author:@me -assignee:@me label:bug -label:verified -author:@me -author:aeschli -author:alexdima -author:alexr00 -author:bpasero -author:chrisdias -author:chrmarti -author:connor4312 -author:dbaeumer -author:deepak1556 -author:eamodio -author:egamma -author:gregvanl -author:isidorn -author:JacksonKearl -author:joaomoreno -author:jrieken -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:RMacfarlane -author:roblourens -author:sana-ajani -author:sandy081 -author:sbatten -author:Tyriar -author:weinand -author:rzhao271 -author:kieferrm -author:TylerLeonhardt -author:bamurtaugh -author:hediet -author:joyceerhl -author:rchiodo -author:IanMatthewHuff"
+ "value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate -author:@me -assignee:@me label:bug -label:verified -author:@me -author:aeschli -author:alexdima -author:alexr00 -author:bpasero -author:chrisdias -author:chrmarti -author:connor4312 -author:dbaeumer -author:deepak1556 -author:eamodio -author:egamma -author:gregvanl -author:isidorn -author:JacksonKearl -author:joaomoreno -author:jrieken -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:RMacfarlane -author:roblourens -author:sana-ajani -author:sandy081 -author:sbatten -author:Tyriar -author:weinand -author:rzhao271 -author:kieferrm -author:TylerLeonhardt -author:bamurtaugh -author:hediet -author:joyceerhl -author:rchiodo -author:IanMatthewHuff"
},
{
"kind": 1,
@@ -42,6 +42,6 @@
{
"kind": 2,
"language": "github-issues",
- "value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate"
+ "value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate"
}
]
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e698d02574e..eea3f45f764 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"
}
@@ -41,11 +42,6 @@
}
}
],
- "eslint.options": {
- "rulePaths": [
- "./build/lib/eslint"
- ]
- },
"typescript.tsdk": "node_modules/typescript/lib",
"npm.exclude": "**/extensions/**",
"npm.packageManager": "yarn",
@@ -57,7 +53,7 @@
"fileMatch": [
"cgmanifest.json"
],
- "url": "./.vscode/cgmanifest.schema.json"
+ "url": "https://json.schemastore.org/component-detection-manifest.json",
},
{
"fileMatch": [
@@ -69,10 +65,13 @@
"git.ignoreLimitWarning": true,
"git.branchProtection": [
"main",
+ "distro",
"release/*"
],
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
"git.branchRandomName.enable": true,
+ "git.pullBeforeCheckout": true,
+ "git.mergeEditor": true,
"remote.extensionKind": {
"msjsdiag.debugger-for-chrome": "workspace"
},
@@ -89,6 +88,13 @@
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true
},
+ "[rust]": {
+ "editor.defaultFormatter": "rust-lang.rust-analyzer",
+ "editor.formatOnSave": true,
+ },
+ "rust-analyzer.linkedProjects": [
+ "cli/Cargo.toml"
+ ],
"typescript.tsc.autoDetect": "off",
"testing.autoRun.mode": "rerun",
"conventionalCommits.scopes": [
@@ -101,11 +107,7 @@
"git",
"sash"
],
- "editor.quickSuggestions": {
- "other": "inline",
- "comments": "inline",
- "strings": "inline"
- },
"githubPullRequests.assignCreated": "${user}",
- "githubPullRequests.defaultMergeMethod": "squash"
+ "githubPullRequests.defaultMergeMethod": "squash",
+ "application.experimental.rendererProfiling": true
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 885f825cc2e..59b1893c293 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -203,6 +203,28 @@
"reveal": "never"
}
},
+ {
+ "type": "shell",
+ "command": "./scripts/code-web.sh",
+ "windows": {
+ "command": ".\\scripts\\code-web.bat"
+ },
+ "args": ["--port", "8080", "--browser", "none"],
+ "label": "Run code web",
+ "isBackground": true,
+ "problemMatcher": {
+ "pattern": {
+ "regexp": ""
+ },
+ "background": {
+ "beginsPattern": ".*node .*",
+ "endsPattern": "Listening on .*"
+ }
+ },
+ "presentation": {
+ "reveal": "never"
+ }
+ },
{
"type": "npm",
"script": "eslint",
diff --git a/.yarnrc b/.yarnrc
index 78ab1d5e2b7..f5edf10bc83 100644
--- a/.yarnrc
+++ b/.yarnrc
@@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
-target "17.4.6"
+target "19.0.17"
runtime "electron"
build_from_source "true"
diff --git a/README.md b/README.md
index ba8f7224ff7..0c7c6236c42 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,7 @@ please see the document [How to Contribute](https://github.com/microsoft/vscode/
* [Request a new feature](CONTRIBUTING.md)
* Upvote [popular feature requests](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
* [File an issue](https://github.com/microsoft/vscode/issues)
+* Connect with the extension author community on [GitHub Discussions](https://github.com/microsoft/vscode-discussions/discussions) or [Slack](https://aka.ms/vscode-dev-community)
* Follow [@code](https://twitter.com/code) and let us know what you think!
See our [wiki](https://github.com/microsoft/vscode/wiki/Feedback-Channels) for a description of each of these channels and information on some other available community-driven channels.
@@ -57,10 +58,10 @@ VS Code includes a set of built-in extensions located in the [extensions](extens
## Development Container
-This repository includes a Visual Studio Code Remote - Containers / GitHub Codespaces development container.
+This repository includes a Visual Studio Code Dev Containers / GitHub Codespaces development container.
-- For [Remote - Containers](https://aka.ms/vscode-remote/download/containers), use the **Remote-Containers: Clone Repository in Container Volume...** command which creates a Docker volume for better disk I/O on macOS and Windows.
- - If you already have VS Code and Docker installed, you can also click [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. This will cause VS Code to automatically install the Remote - Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
+- For [Dev Containers](https://aka.ms/vscode-remote/download/containers), use the **Dev Containers: Clone Repository in Container Volume...** command which creates a Docker volume for better disk I/O on macOS and Windows.
+ - If you already have VS Code and Docker installed, you can also click [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. This will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
- For Codespaces, install the [GitHub Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension in VS Code, and use the **Codespaces: Create New Codespace** command.
Docker / the Codespace should have at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. See the [development container README](.devcontainer/README.md) for more information.
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
index 0fca6a19272..a48785b38fa 100644
--- a/ThirdPartyNotices.txt
+++ b/ThirdPartyNotices.txt
@@ -1,83 +1,66 @@
-microsoft-vscode
+NOTICES
-THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
-Do Not Translate or Localize
-
-This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
-
-1. atom/language-clojure version 0.22.8 (https://github.com/atom/language-clojure)
-2. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script)
-3. atom/language-css version 0.45.0 (https://github.com/atom/language-css)
-4. atom/language-java version 0.32.1 (https://github.com/atom/language-java)
-5. atom/language-sass version 0.62.1 (https://github.com/atom/language-sass)
-6. atom/language-shellscript version 0.28.2 (https://github.com/atom/language-shellscript)
-7. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml)
-8. better-go-syntax version 1.0.0 (https://github.com/jeff-hykin/better-go-syntax/ )
-9. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes)
-10. daaain/Handlebars version 1.8.0 (https://github.com/daaain/Handlebars)
-11. dart-lang/dart-syntax-highlight (https://github.com/dart-lang/dart-syntax-highlight)
-12. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle)
-13. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped)
-14. demyte/language-cshtml version 0.3.0 (https://github.com/demyte/language-cshtml)
-15. Document Object Model version 4.0.0 (https://www.w3.org/DOM/)
-16. dompurify version 2.3.1 (https://github.com/cure53/DOMPurify)
-17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage)
-18. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation)
-19. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle)
-20. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
-21. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
-22. Ikuyadeu/vscode-R version 2.3.8 (https://github.com/Ikuyadeu/vscode-R)
-23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
-24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
-25. James-Yu/LaTeX-Workshop version 8.19.1 (https://github.com/James-Yu/LaTeX-Workshop)
-26. jeff-hykin/cpp-textmate-grammar version 1.12.11 (https://github.com/jeff-hykin/cpp-textmate-grammar)
-27. jeff-hykin/cpp-textmate-grammar version 1.15.6 (https://github.com/jeff-hykin/cpp-textmate-grammar)
-28. jlelong/vscode-latex-basics version 1.3.0 (https://github.com/jlelong/vscode-latex-basics)
-29. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
-30. JuliaEditorSupport/atom-language-julia version 0.22.1 (https://github.com/JuliaEditorSupport/atom-language-julia)
-31. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
-32. language-docker (https://github.com/moby/moby)
-33. language-less version 0.34.2 (https://github.com/atom/language-less)
-34. language-php version 0.48.1 (https://github.com/atom/language-php)
-35. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython)
-36. marked version 4.0.16 (https://github.com/markedjs/marked)
-37. mdn-data version 1.1.12 (https://github.com/mdn/data)
-38. microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/microsoft/TypeScript-TmLanguage)
-39. microsoft/vscode-JSON.tmLanguage (https://github.com/microsoft/vscode-JSON.tmLanguage)
-40. microsoft/vscode-markdown-tm-grammar version 1.0.0 (https://github.com/microsoft/vscode-markdown-tm-grammar)
-41. microsoft/vscode-mssql version 1.10.1 (https://github.com/microsoft/vscode-mssql)
-42. mmims/language-batchfile version 0.7.6 (https://github.com/mmims/language-batchfile)
-43. NVIDIA/cuda-cpp-grammar (https://github.com/NVIDIA/cuda-cpp-grammar)
-44. PowerShell/EditorSyntax version 1.0.0 (https://github.com/PowerShell/EditorSyntax)
-45. rust-syntax version 0.5.0 (https://github.com/dustypomerleau/rust-syntax)
-46. semver version 5.5.0 (https://github.com/npm/node-semver)
-47. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
-48. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
-49. sumneko/lua.tmbundle version 1.0.0 (https://github.com/sumneko/lua.tmbundle)
-50. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
-51. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
-52. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
-53. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
-54. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
-55. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
-56. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
-57. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
-58. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
-59. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
-60. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
-61. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
-62. trond-snekvik/vscode-rst version 1.5.1 (https://github.com/trond-snekvik/vscode-rst)
-63. TypeScript-TmLanguage version 0.1.8 (https://github.com/microsoft/TypeScript-TmLanguage)
-64. TypeScript-TmLanguage version 1.0.0 (https://github.com/microsoft/TypeScript-TmLanguage)
-65. Unicode version 12.0.0 (https://home.unicode.org/)
-66. vscode-codicons version 0.0.14 (https://github.com/microsoft/vscode-codicons)
-67. vscode-logfile-highlighter version 2.11.0 (https://github.com/emilast/vscode-logfile-highlighter)
-68. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
-69. Web Background Synchronization (https://github.com/WICG/background-sync)
+This repository incorporates material as listed below or described in the code.
-%% atom/language-clojure NOTICES AND INFORMATION BEGIN HERE
-=========================================
+
+---------------------------------------------------------
+
+@iktakahiro/markdown-it-katex 4.0.2 - MIT
+https://github.com/mjbvz/markdown-it-katex
+
+The MIT License (MIT)
+
+Copyright (c) 2016 Waylon Flinn
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+---
+
+The MIT License (MIT)
+
+Copyright (c) 2018 Takahiro Ethan Ikeuchi @iktakahiro
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-clojure 0.22.8 - MIT
+https://github.com/atom/language-clojure
+
Copyright (c) 2014 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
@@ -125,11 +108,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF atom/language-clojure NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-coffee-script 0.49.3 - MIT
+https://github.com/atom/language-coffee-script
-%% atom/language-coffee-script NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -180,11 +165,13 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF atom/language-coffee-script NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-css 0.45.1 - GitHub License
+https://github.com/atom/language-css
-%% atom/language-css NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) 2014 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
@@ -216,11 +203,13 @@ Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
-=========================================
-END OF atom/language-css NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-java 0.32.1 - MIT
+https://github.com/atom/language-java
-%% atom/language-java NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -253,11 +242,13 @@ Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
-=========================================
-END OF atom/language-java NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-sass 0.62.1 - MIT
+https://github.com/atom/language-sass
-%% atom/language-sass NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -306,11 +297,13 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF atom/language-sass NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-shellscript 0.28.2 - MIT
+https://github.com/atom/language-shellscript
-%% atom/language-shellscript NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -343,11 +336,13 @@ Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
-=========================================
-END OF atom/language-shellscript NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+atom/language-xml 0.35.2 - MIT
+https://github.com/atom/language-xml
-%% atom/language-xml NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -380,11 +375,13 @@ Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
-=========================================
-END OF atom/language-xml NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+better-go-syntax 1.0.0 - MIT
+https://github.com/jeff-hykin/better-go-syntax/
-%% better-go-syntax NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2019 Jeff Hykin
@@ -406,11 +403,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF better-go-syntax NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Colorsublime-Themes 0.1.0
+https://github.com/Colorsublime/Colorsublime-Themes
-%% Colorsublime-Themes NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) 2015 Colorsublime.com
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -430,11 +429,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF Colorsublime-Themes NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+daaain/Handlebars 1.8.0 - MIT
+https://github.com/daaain/Handlebars
-%% daaain/Handlebars NOTICES AND INFORMATION BEGIN HERE
-=========================================
-- Credits
Adapted from the great sublime-text-handlebars package by Nicholas Westlake.
@@ -452,11 +453,13 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF daaain/Handlebars NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+dart-lang/dart-syntax-highlight 0.0.0 - BSD
+https://github.com/dart-lang/dart-syntax-highlight
-%% dart-lang/dart-syntax-highlight NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright 2020, the Dart project authors.
Redistribution and use in source and binary forms, with or without
@@ -484,11 +487,13 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-=========================================
-END OF dart-lang/dart-syntax-highlight NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+davidrios/pug-tmbundle 0.0.0 - MIT
+https://github.com/davidrios/pug-tmbundle
-%% davidrios/pug-tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2016 David Rios
@@ -509,11 +514,13 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF davidrios/pug-tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+definitelytyped - MIT
+https://github.com/DefinitelyTyped/DefinitelyTyped
-%% definitelytyped NOTICES AND INFORMATION BEGIN HERE
-=========================================
This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.
@@ -522,38 +529,13 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF definitelytyped NOTICES AND INFORMATION
+---------------------------------------------------------
-%% demyte/language-cshtml NOTICES AND INFORMATION BEGIN HERE
-=========================================
-The MIT License (MIT)
+---------------------------------------------------------
-Copyright (c) 2014 James Summerton
+Document Object Model 4.0.0 - W3C License
+https://www.w3.org/DOM/
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF demyte/language-cshtml NOTICES AND INFORMATION
-
-%% Document Object Model NOTICES AND INFORMATION BEGIN HERE
-=========================================
W3C License
This work is being provided by the copyright holders under the following license.
By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
@@ -570,11 +552,13 @@ FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT W
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission.
Title to copyright in this work will at all times remain with copyright holders.
-=========================================
-END OF Document Object Model NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+dompurify 2.3.1 - Apache 2.0
+https://github.com/cure53/DOMPurify
-%% dompurify NOTICES AND INFORMATION BEGIN HERE
-=========================================
DOMPurify
Copyright 2015 Mario Heiderich
@@ -952,11 +936,13 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible
With Secondary Licenses", as defined by
the Mozilla Public License, v. 2.0.
-=========================================
-END OF dompurify NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+dotnet/csharp-tmLanguage 0.1.0 - MIT
+https://github.com/dotnet/csharp-tmLanguage
-%% dotnet/csharp-tmLanguage NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2016 .NET Foundation
@@ -978,11 +964,42 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF dotnet/csharp-tmLanguage NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+dotnet/razor-tooling 1.0.0 - MIT
+https://github.com/dotnet/razor-tooling
+
+MIT License
+
+Copyright (c) .NET Foundation and Contributors
+All Rights Reserved
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+expand-abbreviation 0.5.8 - MIT
+https://github.com/emmetio/expand-abbreviation
-%% expand-abbreviation NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2017 Emmet.io
@@ -1004,11 +1021,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF expand-abbreviation NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+fadeevab/make.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/fadeevab/make.tmbundle
-%% fadeevab/make.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-make.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -1022,11 +1041,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF fadeevab/make.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+freebroccolo/atom-language-swift 0.0.0 - MIT
+https://github.com/freebroccolo/atom-language-swift
-%% freebroccolo/atom-language-swift NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 Darin Morrison
@@ -1047,11 +1068,13 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF freebroccolo/atom-language-swift NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+HTML 5.1 W3C Working Draft 08 October 2015 - W3C Document License
+http://www.w3.org/TR/2015/WD-html51-20151008/
-%% HTML 5.1 W3C Working Draft NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright Š 2015 W3CŽ (MIT, ERCIM, Keio, Beihang). This software or document includes material copied
from or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.)
@@ -1065,11 +1088,13 @@ DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents
without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.
-=========================================
-END OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Ikuyadeu/vscode-R 2.3.8 - MIT
+https://github.com/Ikuyadeu/vscode-R
-%% Ikuyadeu/vscode-R NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2022 REditorSupport
@@ -1091,11 +1116,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF Ikuyadeu/vscode-R NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Ionic documentation 1.2.4 - Apache2
+https://github.com/ionic-team/ionic-site
-%% Ionic documentation NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright Drifty Co. http://drifty.com/.
Apache License
@@ -1153,11 +1180,13 @@ If the Work includes a "NOTICE" text file as part of its distribution, then any
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-=========================================
-END OF Ionic documentation NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+ionide/ionide-fsgrammar 0.0.0 - MIT
+https://github.com/ionide/ionide-fsgrammar
-%% ionide/ionide-fsgrammar NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2015 Krzysztof Cieslak
@@ -1179,11 +1208,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF ionide/ionide-fsgrammar NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+James-Yu/LaTeX-Workshop 8.19.1 - MIT
+https://github.com/James-Yu/LaTeX-Workshop
-%% James-Yu/LaTeX-Workshop NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2016 James Yu
@@ -1205,11 +1236,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF James-Yu/LaTeX-Workshop NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+jeff-hykin/better-c-syntax 1.13.2 - MIT
+https://github.com/jeff-hykin/better-c-syntax
-%% jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2019 Jeff Hykin
@@ -1231,11 +1264,97 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+jeff-hykin/better-cpp-syntax 1.15.23 - MIT
+https://github.com/jeff-hykin/better-cpp-syntax
+
+MIT License
+
+Copyright (c) 2019 Jeff Hykin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+jeff-hykin/better-objc-syntax 0.2.0 - MIT
+https://github.com/jeff-hykin/better-objc-syntax
+
+MIT License
+
+Copyright (c) 2019 Jeff Hykin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+jeff-hykin/better-objcpp-syntax 0.1.0 - MIT
+https://github.com/jeff-hykin/better-objcpp-syntax
+
+MIT License
+
+Copyright (c) 2019 Jeff Hykin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+jlelong/vscode-latex-basics 1.4.0 - MIT
+https://github.com/jlelong/vscode-latex-basics
-%% jlelong/vscode-latex-basics NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) vscode-latex-basics authors
If not otherwise specified (see below), files in this repository fall under the MIT License
@@ -1254,11 +1373,13 @@ included in VSCode and falls under the license described in markdown-latex-combi
The file syntaxes/cpp-grammar-bailout.tmLanguage.json is generated from https://github.com/jeff-hykin/better-cpp-syntax
and falls under the license described in cpp-bailout-license.txt.
-=========================================
-END OF jlelong/vscode-latex-basics NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+js-beautify 1.6.8 - MIT
+https://github.com/beautify-web/js-beautify
-%% js-beautify NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
@@ -1268,11 +1389,13 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF js-beautify NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+JuliaEditorSupport/atom-language-julia 0.22.1 - MIT
+https://github.com/JuliaEditorSupport/atom-language-julia
-%% JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION BEGIN HERE
-=========================================
The atom-language-julia package is licensed under the MIT "Expat" License:
> Copyright (c) 2015
@@ -1295,11 +1418,13 @@ The atom-language-julia package is licensed under the MIT "Expat" License:
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Jxck/assert 1.0.0 - MIT
+https://github.com/Jxck/assert
-%% Jxck/assert NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2011 Jxck
@@ -1323,11 +1448,13 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF Jxck/assert NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+language-docker 0.0.0 - Apache2
+https://github.com/moby/moby
-%% language-docker NOTICES AND INFORMATION BEGIN HERE
-=========================================
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
@@ -1518,11 +1645,13 @@ Apache License
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-=========================================
-END OF language-docker NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+language-less 0.34.2 - MIT
+https://github.com/atom/language-less
-%% language-less NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -1570,11 +1699,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF language-less NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+language-php 0.48.1 - MIT
+https://github.com/atom/language-php
-%% language-php NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
@@ -1607,11 +1738,13 @@ Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
-=========================================
-END OF language-php NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+MagicStack/MagicPython 1.1.1 - MIT
+https://github.com/MagicStack/MagicPython
-%% MagicStack/MagicPython NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License
Copyright (c) 2015-present MagicStack Inc. http://magic.io
@@ -1633,11 +1766,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF MagicStack/MagicPython NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+marked 4.1.0 - MIT
+https://github.com/markedjs/marked
-%% marked NOTICES AND INFORMATION BEGIN HERE
-=========================================
information
## Contribution License Agreement
@@ -1682,11 +1817,13 @@ Redistribution and use in source and binary forms, with or without modification,
* Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
-=========================================
-END OF marked NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+mdn-data 1.1.12 - MPL
+https://github.com/mdn/data
-%% mdn-data NOTICES AND INFORMATION BEGIN HERE
-=========================================
Mozilla Public License Version 2.0
Copyright (c) 2018 Mozilla Corporation
@@ -2063,11 +2200,13 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-=========================================
-END OF mdn-data NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+microsoft/TypeScript-TmLanguage 0.0.1 - MIT
+https://github.com/microsoft/TypeScript-TmLanguage
-%% microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) Microsoft Corporation
All rights reserved.
@@ -2090,11 +2229,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+microsoft/vscode-JSON.tmLanguage 0.0.0 - MIT
+https://github.com/microsoft/vscode-JSON.tmLanguage
-%% microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION BEGIN HERE
-=========================================
vscode-JSON.tmLanguage
Copyright (c) Microsoft Corporation
@@ -2114,11 +2255,13 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+microsoft/vscode-markdown-tm-grammar 1.0.0 - MIT
+https://github.com/microsoft/vscode-markdown-tm-grammar
-%% microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) Microsoft 2018
@@ -2140,11 +2283,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+microsoft/vscode-mssql 1.16.0 - MIT
+https://github.com/microsoft/vscode-mssql
-%% microsoft/vscode-mssql NOTICES AND INFORMATION BEGIN HERE
-=========================================
------------------------------------------ START OF LICENSE -----------------------------------------
vscode-mssql
Copyright (c) Microsoft Corporation
@@ -2155,11 +2300,13 @@ Copyright (c) 2016 Microsoft
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------- END OF LICENSE -----------------------------------------
-=========================================
-END OF microsoft/vscode-mssql NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+mmims/language-batchfile 0.7.6 - MIT
+https://github.com/mmims/language-batchfile
-%% mmims/language-batchfile NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2021 Michael Mims
@@ -2181,11 +2328,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF mmims/language-batchfile NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+NVIDIA/cuda-cpp-grammar 0.0.0 - MIT
+https://github.com/NVIDIA/cuda-cpp-grammar
-%% NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright 2021 NVIDIA Corporation
@@ -2195,11 +2344,13 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+PowerShell/EditorSyntax 1.0.0 - MIT
+https://github.com/PowerShell/EditorSyntax
-%% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) Microsoft Corporation
All rights reserved.
@@ -2223,11 +2374,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF PowerShell/EditorSyntax NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+rust-syntax 0.5.0 - MIT
+https://github.com/dustypomerleau/rust-syntax
-%% rust-syntax NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2020 Dustin Pomerleau
@@ -2249,11 +2402,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF rust-syntax NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+semver 5.5.0 - The ISC License
+https://github.com/npm/node-semver
-%% semver NOTICES AND INFORMATION BEGIN HERE
-=========================================
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
@@ -2269,11 +2424,13 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-=========================================
-END OF semver NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+seti-ui 0.1.0
+https://github.com/jesseweed/seti-ui
-%% seti-ui NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) 2014 Jesse Weed
Permission is hereby granted, free of charge, to any person obtaining
@@ -2294,11 +2451,13 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF seti-ui NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+shaders-tmLanguage 0.1.0 - MIT
+https://github.com/tgjones/shaders-tmLanguage
-%% shaders-tmLanguage NOTICES AND INFORMATION BEGIN HERE
-=========================================
MIT License
Copyright (c) 2017 Tim Jones
@@ -2320,11 +2479,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF shaders-tmLanguage NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+sumneko/lua.tmbundle 1.0.0 - TextMate Bundle License
+https://github.com/sumneko/lua.tmbundle
-%% sumneko/lua.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) sumneko-lua.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2338,11 +2499,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF sumneko/lua.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/asp.vb.net.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/asp.vb.net.tmbundle
-%% textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-asp.vb.net.tmbundle project authors
If not otherwise specified (see below), files in this folder fall under the following license:
@@ -2356,11 +2519,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/c.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/c.tmbundle
-%% textmate/c.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-c.tmbundle authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2374,11 +2539,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/c.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/diff.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/diff.tmbundle
-%% textmate/diff.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-diff.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2392,11 +2559,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/diff.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/git.tmbundle 0.0.0 - MIT
+https://github.com/textmate/git.tmbundle
-%% textmate/git.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2008 Tim Harper
@@ -2419,11 +2588,13 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF textmate/git.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/groovy.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/groovy.tmbundle
-%% textmate/groovy.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-groovy.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2437,11 +2608,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/groovy.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/html.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/html.tmbundle
-%% textmate/html.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-html.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2455,11 +2628,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/html.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/ini.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/ini.tmbundle
-%% textmate/ini.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-ini.tmbundle project authors
If not otherwise specified (see below), files in this folder fall under the following license:
@@ -2473,11 +2648,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/ini.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/javascript.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/javascript.tmbundle
-%% textmate/javascript.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-javascript.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2491,11 +2668,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/javascript.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/markdown.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/markdown.tmbundle
-%% textmate/markdown.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) markdown.tmbundle authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2509,11 +2688,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/markdown.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/perl.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/perl.tmbundle
-%% textmate/perl.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-perl.tmbundle project authors
If not otherwise specified (see below), files in this repository fall under the following license:
@@ -2527,11 +2708,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/perl.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/ruby.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/ruby.tmbundle
-%% textmate/ruby.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) textmate-ruby.tmbundle project authors
If not otherwise specified (see below), files in this folder fall under the following license:
@@ -2545,11 +2728,13 @@ An exception is made for files in readable text which contain their own license
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
to the base-name name of the original file, and an extension of txt, html, or similar. For example
"tidy" is accompanied by "tidy-license.txt".
-=========================================
-END OF textmate/ruby.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+textmate/yaml.tmbundle 0.0.0 - TextMate Bundle License
+https://github.com/textmate/yaml.tmbundle
-%% textmate/yaml.tmbundle NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) 2015 FichteFoll
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -2568,11 +2753,13 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF textmate/yaml.tmbundle NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+trond-snekvik/vscode-rst 1.5.1 - MIT
+https://github.com/trond-snekvik/vscode-rst
-%% trond-snekvik/vscode-rst NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright 2021 Trond Snekvik
@@ -2582,11 +2769,14 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF trond-snekvik/vscode-rst NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+TypeScript-TmLanguage 0.1.8 - MIT
+TypeScript-TmLanguage 1.0.0 - MIT
+https://github.com/microsoft/TypeScript-TmLanguage
-%% TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE
-=========================================
Copyright (c) Microsoft Corporation
All rights reserved.
@@ -2609,11 +2799,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-=========================================
-END OF TypeScript-TmLanguage NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Unicode 12.0.0 - UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+https://home.unicode.org/
-%% Unicode NOTICES AND INFORMATION BEGIN HERE
-=========================================
Unicode Data Files include all data files under the directories
https://www.unicode.org/Public/, https://www.unicode.org/reports/,
https://cldr.unicode.org, https://github.com/unicode-org/icu, and
@@ -2669,11 +2861,13 @@ Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
-=========================================
-END OF Unicode NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+vscode-codicons 0.0.14 - MIT and Creative Commons Attribution 4.0
+https://github.com/microsoft/vscode-codicons
-%% vscode-codicons NOTICES AND INFORMATION BEGIN HERE
-=========================================
Attribution 4.0 International
=======================================================================
@@ -3069,11 +3263,13 @@ the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
-=========================================
-END OF vscode-codicons NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+vscode-logfile-highlighter 2.15.0 - MIT
+https://github.com/emilast/vscode-logfile-highlighter
-%% vscode-logfile-highlighter NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2015 emilast
@@ -3095,11 +3291,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-=========================================
-END OF vscode-logfile-highlighter NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+vscode-swift 0.0.1 - MIT
+https://github.com/owensd/vscode-swift
-%% vscode-swift NOTICES AND INFORMATION BEGIN HERE
-=========================================
The MIT License (MIT)
Copyright (c) 2015 David Owens II
@@ -3120,11 +3318,41 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF vscode-swift NOTICES AND INFORMATION
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+vscode-win32-app-container-tokens
+https://github.com/microsoft/vscode-win32-app-container-tokens
+
+MIT License
+
+Copyright (c) Microsoft Corporation.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+Web Background Synchronization - Apache2
+https://github.com/WICG/background-sync
-%% Web Background Synchronization NOTICES AND INFORMATION BEGIN HERE
-=========================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -3326,5 +3554,4 @@ Apache License
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-=========================================
-END OF Web Background Synchronization NOTICES AND INFORMATION
\ No newline at end of file
+---------------------------------------------------------
\ No newline at end of file
diff --git a/build/.cachesalt b/build/.cachesalt
index 30d07f23725..4f9c24c0470 100644
--- a/build/.cachesalt
+++ b/build/.cachesalt
@@ -1 +1 @@
-2022-05-10T08:20:50.162Z
+2022-08-01T11:24:47.411Z
diff --git a/build/.moduleignore b/build/.moduleignore
index a2e1b715e1b..1a1461b2330 100644
--- a/build/.moduleignore
+++ b/build/.moduleignore
@@ -48,6 +48,11 @@ native-watchdog/build/**
native-watchdog/src/**
!native-watchdog/build/Release/*.node
+node-vsce-sign/**
+!node-vsce-sign/src/main.js
+!node-vsce-sign/package.json
+!node-vsce-sign/bin/**
+
spdlog/binding.gyp
spdlog/build/**
spdlog/deps/**
@@ -122,10 +127,6 @@ vscode-windows-ca-certs/**/*
node-addon-api/**/*
prebuild-install/**/*
-@microsoft/applicationinsights*/**
-@microsoft/dynamicproto-js/**
-!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js
-
# other node modules
**/docs/**
diff --git a/build/.webignore b/build/.webignore
index f55882ba9d4..1a5b3ee2c10 100644
--- a/build/.webignore
+++ b/build/.webignore
@@ -20,6 +20,9 @@ vscode-textmate/webpack.config.js
xterm/src/**
+xterm-addon-canvas/src/**
+xterm-addon-canvas/out/**
+
xterm-addon-search/src/**
xterm-addon-search/out/**
xterm-addon-search/fixtures/**
@@ -33,6 +36,3 @@ xterm-addon-webgl/out/**
# This makes sure the model is included in the package
!@vscode/vscode-languagedetection/model/**
-@microsoft/applicationinsights*/**
-@microsoft/dynamicproto-js/**
-!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js
\ No newline at end of file
diff --git a/build/azure-pipelines/cli/cli-compile-and-publish.yml b/build/azure-pipelines/cli/cli-compile-and-publish.yml
new file mode 100644
index 00000000000..4c152a2481b
--- /dev/null
+++ b/build/azure-pipelines/cli/cli-compile-and-publish.yml
@@ -0,0 +1,45 @@
+parameters:
+ - name: VSCODE_CLI_TARGET
+ type: string
+ - name: VSCODE_CLI_ARTIFACT
+ type: string
+ - name: VSCODE_CLI_ENV
+ type: object
+ default: {}
+
+steps:
+ - script: cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
+ displayName: Compile ${{ parameters.VSCODE_CLI_TARGET }}
+ workingDirectory: $(Build.SourcesDirectory)/cli
+ env:
+ CARGO_NET_GIT_FETCH_WITH_CLI: true
+ ${{ each pair in parameters.VSCODE_CLI_ENV }}:
+ ${{ pair.key }}: ${{ pair.value }}
+
+ - ${{ if or(contains(parameters.VSCODE_CLI_TARGET, '-windows-'), contains(parameters.VSCODE_CLI_TARGET, '-darwin')) }}:
+ - task: ArchiveFiles@2
+ inputs:
+ ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
+ rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe
+ ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
+ rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
+ includeRootFolder: false
+ archiveType: zip
+ archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
+
+ - publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
+ artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
+ displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
+
+ - ${{ else }}:
+ - task: ArchiveFiles@2
+ inputs:
+ rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
+ includeRootFolder: false
+ archiveType: tar
+ tarCompression: gz
+ archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
+
+ - publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
+ artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
+ displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
diff --git a/build/azure-pipelines/cli/cli-darwin-sign.yml b/build/azure-pipelines/cli/cli-darwin-sign.yml
new file mode 100644
index 00000000000..b8f9e965133
--- /dev/null
+++ b/build/azure-pipelines/cli/cli-darwin-sign.yml
@@ -0,0 +1,40 @@
+parameters:
+ - name: VSCODE_CLI_ARTIFACTS
+ type: object
+ default: []
+
+steps:
+ - task: UseDotNet@2
+ inputs:
+ version: 2.x
+
+ - task: EsrpClientTool@1
+ displayName: Download ESRPClient
+
+ - ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download ${{ target }}
+ inputs:
+ artifact: ${{ target }}
+ path: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}
+
+ - script: |
+ set -e
+ node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-sign $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/pkg "*.zip"
+ displayName: Codesign
+
+ - script: |
+ set -e
+ node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-notarize $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/pkg "*.zip"
+ displayName: Notarize
+
+ - ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
+ - script: |
+ set -e
+ ASSET_ID=$(echo "${{ target }}" | sed "s/unsigned_//")
+ mv $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/${{ target }}.zip $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$ASSET_ID.zip
+ echo "##vso[task.setvariable variable=ASSET_ID]$ASSET_ID"
+ displayName: Set asset id variable
+
+ - publish: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$(ASSET_ID).zip
+ artifact: $(ASSET_ID)
diff --git a/build/azure-pipelines/cli/cli-win32-sign.yml b/build/azure-pipelines/cli/cli-win32-sign.yml
new file mode 100644
index 00000000000..26e303c2842
--- /dev/null
+++ b/build/azure-pipelines/cli/cli-win32-sign.yml
@@ -0,0 +1,65 @@
+parameters:
+ - name: VSCODE_CLI_ARTIFACTS
+ type: object
+ default: []
+
+steps:
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "ESRP-PKI,esrp-aad-username,esrp-aad-password"
+
+ - task: UseDotNet@2
+ displayName: "Use .NET"
+ inputs:
+ version: 3.x
+
+ - task: EsrpClientTool@1
+ displayName: "Use ESRP client"
+
+ - ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download artifacts
+ inputs:
+ artifact: ${{ target }}
+ path: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}
+
+ - task: ExtractFiles@1
+ inputs:
+ archiveFilePatterns: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/*.zip
+ destinationFolder: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $EsrpClientTool = (gci -directory -filter EsrpClientTool_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
+ $EsrpCliZip = (gci -recurse -filter esrpcli.*.zip $EsrpClientTool | Select-Object -last 1).FullName
+ mkdir -p $(Agent.TempDirectory)\esrpcli
+ Expand-Archive -Path $EsrpCliZip -DestinationPath $(Agent.TempDirectory)\esrpcli
+ $EsrpCliDllPath = (gci -recurse -filter esrpcli.dll $(Agent.TempDirectory)\esrpcli | Select-Object -last 1).FullName
+ echo "##vso[task.setvariable variable=EsrpCliDllPath]$EsrpCliDllPath"
+ displayName: Find ESRP CLI
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/sign "*.exe" }
+ displayName: "Code sign"
+
+ - ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
+ - powershell: |
+ $ASSET_ID = "${{ target }}".replace("unsigned_", "");
+ echo "##vso[task.setvariable variable=ASSET_ID]$ASSET_ID"
+ displayName: Set asset id variable
+
+ - task: ArchiveFiles@2
+ inputs:
+ rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}/code.exe
+ includeRootFolder: false
+ archiveType: zip
+ archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
+
+ - publish: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
+ artifact: $(ASSET_ID)
diff --git a/build/azure-pipelines/cli/install-rust-posix.yml b/build/azure-pipelines/cli/install-rust-posix.yml
new file mode 100644
index 00000000000..e32a8eedadf
--- /dev/null
+++ b/build/azure-pipelines/cli/install-rust-posix.yml
@@ -0,0 +1,37 @@
+parameters:
+ - name: channel
+ type: string
+ default: stable
+ - name: targets
+ default: []
+ type: object
+
+# Todo: use 1ES pipeline once extension is installed in ADO
+
+steps:
+ - script: |
+ set -e
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain $RUSTUP_TOOLCHAIN
+ echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
+ env:
+ RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
+ displayName: "Install Rust"
+
+ - script: |
+ set -e
+ rustup default $RUSTUP_TOOLCHAIN
+ rustup update $RUSTUP_TOOLCHAIN
+ env:
+ RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
+ displayName: "Set Rust version"
+
+ - ${{ each target in parameters.targets }}:
+ - script: rustup target add ${{ target }}
+ displayName: "Adding Rust target '${{ target }}'"
+
+ - script: |
+ set -e
+ rustc --version
+ cargo --version
+ rustup --version
+ displayName: "Check Rust versions"
diff --git a/build/azure-pipelines/cli/install-rust-win32.yml b/build/azure-pipelines/cli/install-rust-win32.yml
new file mode 100644
index 00000000000..a1a250dcfbf
--- /dev/null
+++ b/build/azure-pipelines/cli/install-rust-win32.yml
@@ -0,0 +1,38 @@
+parameters:
+ - name: channel
+ type: string
+ default: stable
+ - name: targets
+ default: []
+ type: object
+
+# Todo: use 1ES pipeline once extension is installed in ADO
+
+steps:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
+ exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
+ echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
+ env:
+ RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
+ displayName: "Install Rust"
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ exec { rustup default $RUSTUP_TOOLCHAIN }
+ exec { rustup update $RUSTUP_TOOLCHAIN }
+ env:
+ RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
+ displayName: "Set Rust version"
+
+ - ${{ each target in parameters.targets }}:
+ - script: rustup target add ${{ target }}
+ displayName: "Adding Rust target '${{ target }}'"
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ exec { rustc --version }
+ exec { cargo --version }
+ exec { rustup --version }
+ displayName: "Check Rust versions"
diff --git a/build/azure-pipelines/cli/prepare.js b/build/azure-pipelines/cli/prepare.js
new file mode 100644
index 00000000000..b0cb2e6152a
--- /dev/null
+++ b/build/azure-pipelines/cli/prepare.js
@@ -0,0 +1,66 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ * 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 getVersion_1 = require("../../lib/getVersion");
+const fs = require("fs");
+const path = require("path");
+const packageJson = require("../../../package.json");
+const root = path.dirname(path.dirname(path.dirname(__dirname)));
+const readJSON = (path) => JSON.parse(fs.readFileSync(path, 'utf8'));
+let productJsonPath;
+const isOSS = process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY;
+if (isOSS) {
+ productJsonPath = path.join(root, 'product.json');
+}
+else {
+ productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY, 'product.json');
+}
+console.log('Loading product.json from', productJsonPath);
+const product = readJSON(productJsonPath);
+const allProductsAndQualities = isOSS ? [product] : fs.readdirSync(path.join(root, 'quality'))
+ .map(quality => ({ quality, json: readJSON(path.join(root, 'quality', quality, 'product.json')) }));
+const commit = (0, getVersion_1.getVersion)(root);
+const makeQualityMap = (m) => {
+ const output = {};
+ for (const { quality, json } of allProductsAndQualities) {
+ output[quality] = m(json, quality);
+ }
+ return output;
+};
+/**
+ * Sets build environment variables for the CLI for current contextual info.
+ */
+const setLauncherEnvironmentVars = () => {
+ const vars = new Map([
+ ['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
+ ['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
+ ['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
+ ['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
+ ['VSCODE_CLI_VERSION', packageJson.version],
+ ['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
+ ['VSCODE_CLI_QUALITY', product.quality],
+ ['VSCODE_CLI_COMMIT', commit],
+ [
+ 'VSCODE_CLI_WIN32_APP_IDS',
+ !isOSS && JSON.stringify(makeQualityMap(json => Object.entries(json)
+ .filter(([key]) => /^win32.*AppId$/.test(key))
+ .map(([, value]) => String(value).replace(/[{}]/g, '')))),
+ ],
+ [
+ 'VSCODE_CLI_QUALITY_DOWNLOAD_URIS',
+ !isOSS && JSON.stringify(makeQualityMap(json => json.downloadUrl)),
+ ],
+ ]);
+ console.log(JSON.stringify([...vars].reduce((obj, kv) => ({ ...obj, [kv[0]]: kv[1] }), {})));
+ for (const [key, value] of vars) {
+ if (value) {
+ console.log(`##vso[task.setvariable variable=${key}]${value}`);
+ }
+ }
+};
+if (require.main === module) {
+ setLauncherEnvironmentVars();
+}
diff --git a/build/azure-pipelines/cli/prepare.ts b/build/azure-pipelines/cli/prepare.ts
new file mode 100644
index 00000000000..53f33d08568
--- /dev/null
+++ b/build/azure-pipelines/cli/prepare.ts
@@ -0,0 +1,75 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { getVersion } from '../../lib/getVersion';
+import * as fs from 'fs';
+import * as path from 'path';
+import * as packageJson from '../../../package.json';
+
+const root = path.dirname(path.dirname(path.dirname(__dirname)));
+const readJSON = (path: string) => JSON.parse(fs.readFileSync(path, 'utf8'));
+
+let productJsonPath: string;
+const isOSS = process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY;
+if (isOSS) {
+ productJsonPath = path.join(root, 'product.json');
+} else {
+ productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY!, 'product.json');
+}
+
+
+console.log('Loading product.json from', productJsonPath);
+const product = readJSON(productJsonPath);
+const allProductsAndQualities = isOSS ? [product] : fs.readdirSync(path.join(root, 'quality'))
+ .map(quality => ({ quality, json: readJSON(path.join(root, 'quality', quality, 'product.json')) }));
+const commit = getVersion(root);
+
+const makeQualityMap = (m: (productJson: any, quality: string) => T): Record => {
+ const output: Record = {};
+ for (const { quality, json } of allProductsAndQualities) {
+ output[quality] = m(json, quality);
+ }
+ return output;
+};
+
+/**
+ * Sets build environment variables for the CLI for current contextual info.
+ */
+const setLauncherEnvironmentVars = () => {
+ const vars = new Map([
+ ['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
+ ['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
+ ['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
+ ['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
+ ['VSCODE_CLI_VERSION', packageJson.version],
+ ['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
+ ['VSCODE_CLI_QUALITY', product.quality],
+ ['VSCODE_CLI_COMMIT', commit],
+ [
+ 'VSCODE_CLI_WIN32_APP_IDS',
+ !isOSS && JSON.stringify(
+ makeQualityMap(json => Object.entries(json)
+ .filter(([key]) => /^win32.*AppId$/.test(key))
+ .map(([, value]) => String(value).replace(/[{}]/g, ''))),
+ ),
+ ],
+ [
+ 'VSCODE_CLI_QUALITY_DOWNLOAD_URIS',
+ !isOSS && JSON.stringify(makeQualityMap(json => json.downloadUrl)),
+ ],
+ ]);
+
+ console.log(JSON.stringify([...vars].reduce((obj, kv) => ({...obj, [kv[0]]: kv[1]}), {})));
+
+ for (const [key, value] of vars) {
+ if (value) {
+ console.log(`##vso[task.setvariable variable=${key}]${value}`);
+ }
+ }
+};
+
+if (require.main === module) {
+ setLauncherEnvironmentVars();
+}
diff --git a/build/azure-pipelines/cli/test.yml b/build/azure-pipelines/cli/test.yml
new file mode 100644
index 00000000000..70eb714c1d9
--- /dev/null
+++ b/build/azure-pipelines/cli/test.yml
@@ -0,0 +1,21 @@
+parameters:
+ - name: VSCODE_CLI_TARGETS
+ default: []
+ type: object
+ - name: VSCODE_CLI_RUST_CHANNEL
+ type: string
+ default: stable
+
+steps:
+ - template: ./install-rust-posix.yml
+ parameters:
+ targets: []
+ channel: ${{ parameters.VSCODE_CLI_RUST_CHANNEL }}
+
+ - script: rustup component add clippy && cargo clippy -- -D warnings
+ workingDirectory: cli
+ displayName: Clippy lint
+
+ - script: cargo test
+ workingDirectory: cli
+ displayName: Run unit tests
diff --git a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js
new file mode 100644
index 00000000000..abc90f6ed2c
--- /dev/null
+++ b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js
@@ -0,0 +1,15 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ * 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 fs = require("fs");
+const path = require("path");
+const crypto = require("crypto");
+const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../../product.json'), 'utf8'));
+const shasum = crypto.createHash('sha1');
+for (const ext of productjson.builtInExtensions) {
+ shasum.update(`${ext.name}@${ext.version}`);
+}
+process.stdout.write(shasum.digest('hex'));
diff --git a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts
new file mode 100644
index 00000000000..f0554361607
--- /dev/null
+++ b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts
@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as fs from 'fs';
+import * as path from 'path';
+import * as crypto from 'crypto';
+
+const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../../product.json'), 'utf8'));
+const shasum = crypto.createHash('sha1');
+
+for (const ext of productjson.builtInExtensions) {
+ shasum.update(`${ext.name}@${ext.version}`);
+}
+
+process.stdout.write(shasum.digest('hex'));
diff --git a/build/azure-pipelines/common/computeNodeModulesCacheKey.js b/build/azure-pipelines/common/computeNodeModulesCacheKey.js
index d15ceb6ef08..6cfa9323e71 100644
--- a/build/azure-pipelines/common/computeNodeModulesCacheKey.js
+++ b/build/azure-pipelines/common/computeNodeModulesCacheKey.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const path = require("path");
@@ -14,7 +14,7 @@ shasum.update(fs.readFileSync(path.join(ROOT, 'build/.cachesalt')));
shasum.update(fs.readFileSync(path.join(ROOT, '.yarnrc')));
shasum.update(fs.readFileSync(path.join(ROOT, 'remote/.yarnrc')));
// Add `package.json` and `yarn.lock` files
-for (let dir of dirs) {
+for (const dir of dirs) {
const packageJsonPath = path.join(ROOT, dir, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
const relevantPackageJsonSections = {
diff --git a/build/azure-pipelines/common/computeNodeModulesCacheKey.ts b/build/azure-pipelines/common/computeNodeModulesCacheKey.ts
index 2eed5fe7adb..751f928da9f 100644
--- a/build/azure-pipelines/common/computeNodeModulesCacheKey.ts
+++ b/build/azure-pipelines/common/computeNodeModulesCacheKey.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as fs from 'fs';
import * as path from 'path';
import * as crypto from 'crypto';
@@ -19,7 +17,7 @@ shasum.update(fs.readFileSync(path.join(ROOT, '.yarnrc')));
shasum.update(fs.readFileSync(path.join(ROOT, 'remote/.yarnrc')));
// Add `package.json` and `yarn.lock` files
-for (let dir of dirs) {
+for (const dir of dirs) {
const packageJsonPath = path.join(ROOT, dir, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
const relevantPackageJsonSections = {
diff --git a/build/azure-pipelines/common/createAsset.js b/build/azure-pipelines/common/createAsset.js
index 57207e25cfe..10f1503f666 100644
--- a/build/azure-pipelines/common/createAsset.js
+++ b/build/azure-pipelines/common/createAsset.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const crypto = require("crypto");
@@ -43,6 +43,8 @@ function getPlatform(product, os, arch, type) {
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
return arch === 'ia32' ? 'server-win32-web' : `server-win32-${arch}-web`;
+ case 'cli':
+ return `cli-win32-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -52,6 +54,8 @@ function getPlatform(product, os, arch, type) {
return `server-alpine-${arch}`;
case 'web':
return `server-alpine-${arch}-web`;
+ case 'cli':
+ return `cli-alpine-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -74,6 +78,8 @@ function getPlatform(product, os, arch, type) {
return `linux-deb-${arch}`;
case 'rpm-package':
return `linux-rpm-${arch}`;
+ case 'cli':
+ return `cli-linux-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -94,6 +100,8 @@ function getPlatform(product, os, arch, type) {
return 'server-darwin-web';
}
return `server-darwin-${arch}-web`;
+ case 'cli':
+ return `cli-darwin-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -150,11 +158,6 @@ async function main() {
const blobServiceClient = new storage_blob_1.BlobServiceClient(`https://vscode.blob.core.windows.net`, credential, storagePipelineOptions);
const containerClient = blobServiceClient.getContainerClient(quality);
const blobClient = containerClient.getBlockBlobClient(blobName);
- const blobExists = await blobClient.exists();
- if (blobExists) {
- console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
- return;
- }
const blobOptions = {
blobHTTPHeaders: {
blobContentType: mime.lookup(filePath),
@@ -162,29 +165,42 @@ async function main() {
blobCacheControl: 'max-age=31536000, public'
}
};
- const uploadPromises = [
- (0, retry_1.retry)(async () => {
+ const uploadPromises = [];
+ if (await blobClient.exists()) {
+ console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
+ }
+ else {
+ uploadPromises.push((0, retry_1.retry)(async () => {
await blobClient.uploadFile(filePath, blobOptions);
console.log('Blob successfully uploaded to Azure storage.');
- })
- ];
+ }));
+ }
const shouldUploadToMooncake = /true/i.test(process.env['VSCODE_PUBLISH_TO_MOONCAKE'] ?? 'true');
if (shouldUploadToMooncake) {
const mooncakeCredential = new identity_1.ClientSecretCredential(process.env['AZURE_MOONCAKE_TENANT_ID'], process.env['AZURE_MOONCAKE_CLIENT_ID'], process.env['AZURE_MOONCAKE_CLIENT_SECRET']);
const mooncakeBlobServiceClient = new storage_blob_1.BlobServiceClient(`https://vscode.blob.core.chinacloudapi.cn`, mooncakeCredential, storagePipelineOptions);
const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
- uploadPromises.push((0, retry_1.retry)(async () => {
- await mooncakeBlobClient.uploadFile(filePath, blobOptions);
- console.log('Blob successfully uploaded to Mooncake Azure storage.');
- }));
- console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
+ if (await mooncakeBlobClient.exists()) {
+ console.log(`Mooncake Blob ${quality}, ${blobName} already exists, not publishing again.`);
+ }
+ else {
+ uploadPromises.push((0, retry_1.retry)(async () => {
+ await mooncakeBlobClient.uploadFile(filePath, blobOptions);
+ console.log('Blob successfully uploaded to Mooncake Azure storage.');
+ }));
+ }
+ if (uploadPromises.length) {
+ console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
+ }
}
else {
- console.log('Uploading blobs to Azure storage...');
+ if (uploadPromises.length) {
+ console.log('Uploading blobs to Azure storage...');
+ }
}
await Promise.all(uploadPromises);
- console.log('All blobs successfully uploaded.');
+ console.log(uploadPromises.length ? 'All blobs successfully uploaded.' : 'No blobs to upload.');
const assetUrl = `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`;
const blobPath = new URL(assetUrl).pathname;
const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
diff --git a/build/azure-pipelines/common/createAsset.ts b/build/azure-pipelines/common/createAsset.ts
index 769b50e079d..139338dd24b 100644
--- a/build/azure-pipelines/common/createAsset.ts
+++ b/build/azure-pipelines/common/createAsset.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as fs from 'fs';
import { Readable } from 'stream';
import * as crypto from 'crypto';
@@ -58,6 +56,8 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
return arch === 'ia32' ? 'server-win32-web' : `server-win32-${arch}-web`;
+ case 'cli':
+ return `cli-win32-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -67,6 +67,8 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
return `server-alpine-${arch}`;
case 'web':
return `server-alpine-${arch}-web`;
+ case 'cli':
+ return `cli-alpine-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -89,6 +91,8 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
return `linux-deb-${arch}`;
case 'rpm-package':
return `linux-rpm-${arch}`;
+ case 'cli':
+ return `cli-linux-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -109,6 +113,8 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
return 'server-darwin-web';
}
return `server-darwin-${arch}-web`;
+ case 'cli':
+ return `cli-darwin-${arch}`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -180,12 +186,6 @@ async function main(): Promise {
const blobServiceClient = new BlobServiceClient(`https://vscode.blob.core.windows.net`, credential, storagePipelineOptions);
const containerClient = blobServiceClient.getContainerClient(quality);
const blobClient = containerClient.getBlockBlobClient(blobName);
- const blobExists = await blobClient.exists();
-
- if (blobExists) {
- console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
- return;
- }
const blobOptions: BlockBlobParallelUploadOptions = {
blobHTTPHeaders: {
@@ -195,12 +195,15 @@ async function main(): Promise {
}
};
- const uploadPromises: Promise[] = [
- retry(async () => {
+ const uploadPromises: Promise[] = [];
+ if (await blobClient.exists()) {
+ console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
+ } else {
+ uploadPromises.push(retry(async () => {
await blobClient.uploadFile(filePath, blobOptions);
console.log('Blob successfully uploaded to Azure storage.');
- })
- ];
+ }));
+ }
const shouldUploadToMooncake = /true/i.test(process.env['VSCODE_PUBLISH_TO_MOONCAKE'] ?? 'true');
@@ -210,18 +213,27 @@ async function main(): Promise {
const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
- uploadPromises.push(retry(async () => {
- await mooncakeBlobClient.uploadFile(filePath, blobOptions);
- console.log('Blob successfully uploaded to Mooncake Azure storage.');
- }));
+ if (await mooncakeBlobClient.exists()) {
+ console.log(`Mooncake Blob ${quality}, ${blobName} already exists, not publishing again.`);
+ } else {
+ uploadPromises.push(retry(async () => {
+ await mooncakeBlobClient.uploadFile(filePath, blobOptions);
+ console.log('Blob successfully uploaded to Mooncake Azure storage.');
+ }));
+ }
- console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
+ if (uploadPromises.length) {
+ console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
+ }
} else {
- console.log('Uploading blobs to Azure storage...');
+ if (uploadPromises.length) {
+ console.log('Uploading blobs to Azure storage...');
+ }
}
await Promise.all(uploadPromises);
- console.log('All blobs successfully uploaded.');
+
+ console.log(uploadPromises.length ? 'All blobs successfully uploaded.' : 'No blobs to upload.');
const assetUrl = `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`;
const blobPath = new URL(assetUrl).pathname;
diff --git a/build/azure-pipelines/common/createBuild.js b/build/azure-pipelines/common/createBuild.js
index 57bb87fedcf..afff1f111b3 100644
--- a/build/azure-pipelines/common/createBuild.js
+++ b/build/azure-pipelines/common/createBuild.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const identity_1 = require("@azure/identity");
const cosmos_1 = require("@azure/cosmos");
diff --git a/build/azure-pipelines/common/createBuild.ts b/build/azure-pipelines/common/createBuild.ts
index 8b1db94c412..512f3610116 100644
--- a/build/azure-pipelines/common/createBuild.ts
+++ b/build/azure-pipelines/common/createBuild.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import { ClientSecretCredential } from '@azure/identity';
import { CosmosClient } from '@azure/cosmos';
import { retry } from './retry';
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/common/listNodeModules.js b/build/azure-pipelines/common/listNodeModules.js
index 540569c79b5..644aa83d552 100644
--- a/build/azure-pipelines/common/listNodeModules.js
+++ b/build/azure-pipelines/common/listNodeModules.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const path = require("path");
diff --git a/build/azure-pipelines/common/listNodeModules.ts b/build/azure-pipelines/common/listNodeModules.ts
index 2ed6294477a..aca461f8b5f 100644
--- a/build/azure-pipelines/common/listNodeModules.ts
+++ b/build/azure-pipelines/common/listNodeModules.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as fs from 'fs';
import * as path from 'path';
diff --git a/build/azure-pipelines/common/releaseBuild.js b/build/azure-pipelines/common/releaseBuild.js
index 26dacf4d731..eba9b2dc8b7 100644
--- a/build/azure-pipelines/common/releaseBuild.js
+++ b/build/azure-pipelines/common/releaseBuild.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const identity_1 = require("@azure/identity");
const cosmos_1 = require("@azure/cosmos");
@@ -28,22 +28,25 @@ async function getConfig(client, quality) {
}
return res.resources[0];
}
-async function main() {
+async function main(force) {
const commit = process.env['VSCODE_DISTRO_COMMIT'] || getEnv('BUILD_SOURCEVERSION');
const quality = getEnv('VSCODE_QUALITY');
const aadCredentials = new identity_1.ClientSecretCredential(process.env['AZURE_TENANT_ID'], process.env['AZURE_CLIENT_ID'], process.env['AZURE_CLIENT_SECRET']);
const client = new cosmos_1.CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT'], aadCredentials });
- const config = await getConfig(client, quality);
- console.log('Quality config:', config);
- if (config.frozen) {
- console.log(`Skipping release because quality ${quality} is frozen.`);
- return;
+ if (!force) {
+ const config = await getConfig(client, quality);
+ console.log('Quality config:', config);
+ if (config.frozen) {
+ console.log(`Skipping release because quality ${quality} is frozen.`);
+ return;
+ }
}
console.log(`Releasing build ${commit}...`);
const scripts = client.database('builds').container(quality).scripts;
await (0, retry_1.retry)(() => scripts.storedProcedure('releaseBuild').execute('', [commit]));
}
-main().then(() => {
+const [, , force] = process.argv;
+main(force === 'true').then(() => {
console.log('Build successfully released');
process.exit(0);
}, err => {
diff --git a/build/azure-pipelines/common/releaseBuild.ts b/build/azure-pipelines/common/releaseBuild.ts
index 064ac639e60..68476cc2952 100644
--- a/build/azure-pipelines/common/releaseBuild.ts
+++ b/build/azure-pipelines/common/releaseBuild.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import { ClientSecretCredential } from '@azure/identity';
import { CosmosClient } from '@azure/cosmos';
import { retry } from './retry';
@@ -43,19 +41,22 @@ async function getConfig(client: CosmosClient, quality: string): Promise
return res.resources[0] as Config;
}
-async function main(): Promise {
+async function main(force: boolean): Promise {
const commit = process.env['VSCODE_DISTRO_COMMIT'] || getEnv('BUILD_SOURCEVERSION');
const quality = getEnv('VSCODE_QUALITY');
const aadCredentials = new ClientSecretCredential(process.env['AZURE_TENANT_ID']!, process.env['AZURE_CLIENT_ID']!, process.env['AZURE_CLIENT_SECRET']!);
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, aadCredentials });
- const config = await getConfig(client, quality);
- console.log('Quality config:', config);
+ if (!force) {
+ const config = await getConfig(client, quality);
- if (config.frozen) {
- console.log(`Skipping release because quality ${quality} is frozen.`);
- return;
+ console.log('Quality config:', config);
+
+ if (config.frozen) {
+ console.log(`Skipping release because quality ${quality} is frozen.`);
+ return;
+ }
}
console.log(`Releasing build ${commit}...`);
@@ -64,7 +65,9 @@ async function main(): Promise {
await retry(() => scripts.storedProcedure('releaseBuild').execute('', [commit]));
}
-main().then(() => {
+const [, , force] = process.argv;
+
+main(force === 'true').then(() => {
console.log('Build successfully released');
process.exit(0);
}, err => {
diff --git a/build/azure-pipelines/common/retry.js b/build/azure-pipelines/common/retry.js
index bd78d195abb..9c64a9b3226 100644
--- a/build/azure-pipelines/common/retry.js
+++ b/build/azure-pipelines/common/retry.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.retry = void 0;
async function retry(fn) {
diff --git a/build/azure-pipelines/common/retry.ts b/build/azure-pipelines/common/retry.ts
index 0c766771da8..ed232245dec 100644
--- a/build/azure-pipelines/common/retry.ts
+++ b/build/azure-pipelines/common/retry.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
export async function retry(fn: () => Promise): Promise {
let lastError: Error | undefined;
diff --git a/build/azure-pipelines/common/sign.js b/build/azure-pipelines/common/sign.js
index 2c2168cacc3..a1ebcc90e40 100644
--- a/build/azure-pipelines/common/sign.js
+++ b/build/azure-pipelines/common/sign.js
@@ -13,6 +13,8 @@ function getParams(type) {
switch (type) {
case 'windows':
return '[{"keyCode":"CP-230012","operationSetCode":"SigntoolSign","parameters":[{"parameterName":"OpusName","parameterValue":"VS Code"},{"parameterName":"OpusInfo","parameterValue":"https://code.visualstudio.com/"},{"parameterName":"Append","parameterValue":"/as"},{"parameterName":"FileDigest","parameterValue":"/fd \\"SHA256\\""},{"parameterName":"PageHash","parameterValue":"/NPH"},{"parameterName":"TimeStamp","parameterValue":"/tr \\"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\\" /td sha256"}],"toolName":"sign","toolVersion":"1.0"},{"keyCode":"CP-230012","operationSetCode":"SigntoolVerify","parameters":[{"parameterName":"VerifyAll","parameterValue":"/all"}],"toolName":"sign","toolVersion":"1.0"}]';
+ case 'windows-appx':
+ return '[{"keyCode":"CP-229979","operationSetCode":"SigntoolSign","parameters":[{"parameterName":"OpusName","parameterValue":"VS Code"},{"parameterName":"OpusInfo","parameterValue":"https://code.visualstudio.com/"},{"parameterName":"FileDigest","parameterValue":"/fd \\"SHA256\\""},{"parameterName":"PageHash","parameterValue":"/NPH"},{"parameterName":"TimeStamp","parameterValue":"/tr \\"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\\" /td sha256"}],"toolName":"sign","toolVersion":"1.0"},{"keyCode":"CP-229979","operationSetCode":"SigntoolVerify","parameters":[],"toolName":"sign","toolVersion":"1.0"}]';
case 'rpm':
return '[{ "keyCode": "CP-450779-Pgp", "operationSetCode": "LinuxSign", "parameters": [], "toolName": "sign", "toolVersion": "1.0" }]';
case 'darwin-sign':
diff --git a/build/azure-pipelines/common/sign.ts b/build/azure-pipelines/common/sign.ts
index a50ca698dfd..7f1916d26a2 100644
--- a/build/azure-pipelines/common/sign.ts
+++ b/build/azure-pipelines/common/sign.ts
@@ -12,6 +12,8 @@ function getParams(type: string): string {
switch (type) {
case 'windows':
return '[{"keyCode":"CP-230012","operationSetCode":"SigntoolSign","parameters":[{"parameterName":"OpusName","parameterValue":"VS Code"},{"parameterName":"OpusInfo","parameterValue":"https://code.visualstudio.com/"},{"parameterName":"Append","parameterValue":"/as"},{"parameterName":"FileDigest","parameterValue":"/fd \\"SHA256\\""},{"parameterName":"PageHash","parameterValue":"/NPH"},{"parameterName":"TimeStamp","parameterValue":"/tr \\"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\\" /td sha256"}],"toolName":"sign","toolVersion":"1.0"},{"keyCode":"CP-230012","operationSetCode":"SigntoolVerify","parameters":[{"parameterName":"VerifyAll","parameterValue":"/all"}],"toolName":"sign","toolVersion":"1.0"}]';
+ case 'windows-appx':
+ return '[{"keyCode":"CP-229979","operationSetCode":"SigntoolSign","parameters":[{"parameterName":"OpusName","parameterValue":"VS Code"},{"parameterName":"OpusInfo","parameterValue":"https://code.visualstudio.com/"},{"parameterName":"FileDigest","parameterValue":"/fd \\"SHA256\\""},{"parameterName":"PageHash","parameterValue":"/NPH"},{"parameterName":"TimeStamp","parameterValue":"/tr \\"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\\" /td sha256"}],"toolName":"sign","toolVersion":"1.0"},{"keyCode":"CP-229979","operationSetCode":"SigntoolVerify","parameters":[],"toolName":"sign","toolVersion":"1.0"}]';
case 'rpm':
return '[{ "keyCode": "CP-450779-Pgp", "operationSetCode": "LinuxSign", "parameters": [], "toolName": "sign", "toolVersion": "1.0" }]';
case 'darwin-sign':
diff --git a/build/azure-pipelines/darwin/cli-build-darwin.yml b/build/azure-pipelines/darwin/cli-build-darwin.yml
new file mode 100644
index 00000000000..90e15d1c9e1
--- /dev/null
+++ b/build/azure-pipelines/darwin/cli-build-darwin.yml
@@ -0,0 +1,69 @@
+parameters:
+ - name: VSCODE_QUALITY
+ type: string
+ - name: VSCODE_BUILD_MACOS
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_MACOS_ARM64
+ type: boolean
+ default: false
+ - name: channel
+ type: string
+ default: stable
+
+steps:
+ - task: Npm@1
+ displayName: Download openssl prebuilt
+ inputs:
+ command: custom
+ customCommand: pack @vscode-internal/openssl-prebuilt@0.0.1
+ customRegistry: useFeed
+ customFeed: 'Monaco/openssl-prebuilt'
+ workingDir: $(Build.ArtifactStagingDirectory)
+
+ - script: |
+ set -e
+ mkdir $(Build.ArtifactStagingDirectory)/openssl
+ tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.1.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
+ displayName: Extract openssl prebuilt
+
+ - task: NodeTool@0
+ inputs:
+ versionSpec: "16.x"
+
+ - template: ../mixin-distro-posix.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+
+ - script: |
+ set -e
+ node build/azure-pipelines/cli/prepare.js
+ displayName: Prepare CLI build
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+
+ - template: ../cli/install-rust-posix.yml
+ parameters:
+ targets:
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
+ - x86_64-apple-darwin
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
+ - aarch64-apple-darwin
+
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: x86_64-apple-darwin
+ VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_darwin_x64_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-osx/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-osx/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: aarch64-apple-darwin
+ VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_darwin_arm64_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-osx/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-osx/include
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-cli-sign.yml b/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml
new file mode 100644
index 00000000000..385697b412f
--- /dev/null
+++ b/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml
@@ -0,0 +1,55 @@
+parameters:
+ - name: VSCODE_BUILD_MACOS
+ type: boolean
+ - name: VSCODE_BUILD_MACOS_ARM64
+ type: boolean
+
+steps:
+ - task: NodeTool@0
+ inputs:
+ versionSpec: "16.x"
+
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
+
+ - script: |
+ set -e
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
+ - script: |
+ set -e
+ for i in {1..3}; do # try 3 times
+ yarn --cwd build --frozen-lockfile --check-files && break
+ if [ $i -eq 3 ]; then
+ echo "Yarn failed too many times" >&2
+ exit 1
+ fi
+ echo "Yarn failed $i, trying again..."
+ done
+ displayName: Install build dependencies
+
+ - template: ../cli/cli-darwin-sign.yml
+ parameters:
+ VSCODE_CLI_ARTIFACTS:
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
+ - unsigned_vscode_cli_darwin_x64_cli
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
+ - unsigned_vscode_cli_darwin_arm64_cli
diff --git a/build/azure-pipelines/darwin/product-build-darwin-sign.yml b/build/azure-pipelines/darwin/product-build-darwin-sign.yml
index f82e7a8b98d..79826b73541 100644
--- a/build/azure-pipelines/darwin/product-build-darwin-sign.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin-sign.yml
@@ -35,36 +35,95 @@ steps:
git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
displayName: Merge distro
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
- script: |
- set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ mkdir -p .build
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js x64 > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
+ displayName: Prepare yarn cache flags
+
+ - task: Cache@2
+ inputs:
+ key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
+ path: .build/node_modules_cache
+ cacheHitVar: NODE_MODULES_RESTORED
+ displayName: Restore node_modules cache
+
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
- script: |
set -e
- for i in {1..3}; do # try 3 times, for Terrapin
- yarn --cwd build --frozen-lockfile --check-files && break
+ tar -xzf .build/node_modules_cache/cache.tgz
+ displayName: Extract node_modules cache
+ condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ npm install -g node-gyp@latest
+ node-gyp --version
+ displayName: Update node-gyp
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: |
+ set -e
+ export npm_config_arch=$(VSCODE_ARCH)
+ export npm_config_node_gyp=$(which node-gyp)
+
+ for i in {1..3}; do # try 3 times
+ yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
- displayName: Install build dependencies
+ env:
+ ELECTRON_SKIP_BINARY_DOWNLOAD: 1
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Install dependencies
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
+ - script: |
+ set -e
+ node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
+ mkdir -p .build/node_modules_cache
+ tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ displayName: Create node_modules archive
- download: current
artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
displayName: Download $(VSCODE_ARCH) artifact
- - script: |
- set -e
- unzip $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip -d $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- mv $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
- displayName: Unzip & move
-
- task: UseDotNet@2
inputs:
version: 2.x
@@ -74,20 +133,38 @@ steps:
- script: |
set -e
- node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-sign $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(agent.builddirectory) VSCode-darwin-$(VSCODE_ARCH).zip
+ node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-sign $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive VSCode-darwin-$(VSCODE_ARCH).zip
displayName: Codesign
- script: |
set -e
- node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-notarize $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(agent.builddirectory) VSCode-darwin-$(VSCODE_ARCH).zip
+ node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" darwin-notarize $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive VSCode-darwin-$(VSCODE_ARCH).zip
displayName: Notarize
- script: |
set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ unzip $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip -d $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ displayName: Extract signed app
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
+
+ - script: |
+ set -e
+ APP_ROOT="$(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)"
APP_NAME="`ls $APP_ROOT | head -n 1`"
- "$APP_ROOT/$APP_NAME/Contents/Resources/app/bin/code" --export-default-configuration=.build
- displayName: Verify start after signing (export configuration)
+ echo "##vso[task.setvariable variable=APP_PATH]$APP_ROOT/$APP_NAME"
+ displayName: Find application path
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
+
+ - script: |
+ set -e
+ codesign -dv --deep --verbose=4 "$(APP_PATH)"
+ displayName: Verify signature
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
+
+ - script: |
+ set -e
+ "$(APP_PATH)/Contents/Resources/app/bin/code" --export-default-configuration=.build
+ displayName: Verify signed application starts OK
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
- script: |
@@ -100,9 +177,9 @@ steps:
echo "##vso[task.setvariable variable=ASSET_ID]$ASSET_ID"
displayName: Set asset id variable
- - script: mv $(agent.builddirectory)/VSCode-darwin-x64.zip $(agent.builddirectory)/VSCode-darwin.zip
- displayName: Rename x64 build to it's legacy name
+ - script: mv $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-x64.zip $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin.zip
+ displayName: Rename x64 build to its legacy name
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- - publish: $(Agent.BuildDirectory)/VSCode-$(ASSET_ID).zip
+ - publish: $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-$(ASSET_ID).zip
artifact: vscode_client_darwin_$(VSCODE_ARCH)_archive
diff --git a/build/azure-pipelines/darwin/product-build-darwin-test.yml b/build/azure-pipelines/darwin/product-build-darwin-test.yml
index dd495426b6d..29c7bf90925 100644
--- a/build/azure-pipelines/darwin/product-build-darwin-test.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin-test.yml
@@ -3,202 +3,62 @@ parameters:
type: string
- name: VSCODE_RUN_UNIT_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_INTEGRATION_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_SMOKE_TESTS
type: boolean
- default: true
steps:
- - task: NodeTool@0
- inputs:
- versionSpec: "16.x"
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password,macos-developer-certificate,macos-developer-certificate-key"
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifact: Compilation
- path: $(Build.ArtifactStagingDirectory)
- displayName: Download compilation output
-
- - script: |
- set -e
- tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
- displayName: Extract compilation output
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- # Set up the credentials to retrieve distro repo and setup git persona
- # to create a merge commit for when we merge distro into oss
- - script: |
- set -e
- cat << EOF > ~/.netrc
- machine github.com
- login vscode
- password $(github-distro-mixin-password)
- EOF
-
- git config user.email "vscode@microsoft.com"
- git config user.name "VSCode"
- displayName: Prepare tooling
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
- echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- git checkout FETCH_HEAD
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
- displayName: Merge distro
-
- - script: |
- mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
- displayName: Prepare yarn cache flags
-
- - task: Cache@2
- inputs:
- key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
- path: .build/node_modules_cache
- cacheHitVar: NODE_MODULES_RESTORED
- displayName: Restore node_modules cache
-
- - script: |
- set -e
- tar -xzf .build/node_modules_cache/cache.tgz
- condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
- displayName: Extract node_modules cache
-
- - script: |
- set -e
- npm install -g node-gyp@latest
- node-gyp --version
- displayName: Update node-gyp
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
-
- - script: |
- set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
-
- - script: |
- set -e
- export npm_config_arch=$(VSCODE_ARCH)
- export npm_config_node_gyp=$(which node-gyp)
-
- for i in {1..3}; do # try 3 times, for Terrapin
- yarn --frozen-lockfile --check-files && break
- if [ $i -eq 3 ]; then
- echo "Yarn failed too many times" >&2
- exit 1
- fi
- echo "Yarn failed $i, trying again..."
- done
- env:
- ELECTRON_SKIP_BINARY_DOWNLOAD: 1
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- GITHUB_TOKEN: "$(github-distro-mixin-password)"
- displayName: Install dependencies
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
-
- - script: |
- set -e
- node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
- mkdir -p .build/node_modules_cache
- tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- displayName: Create node_modules archive
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- # This script brings in the right resources (images, icons, etc) based on the quality (insiders, stable, exploration)
- - script: |
- set -e
- node build/azure-pipelines/mixin
- displayName: Mix in quality
-
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
- displayName: Build client
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- node build/azure-pipelines/mixin --server
- displayName: Mix in server quality
-
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
- displayName: Build Server
-
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
displayName: Download Electron and Playwright
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- # Setting hardened entitlements is a requirement for:
- # * Running tests on Big Sur (because Big Sur has additional security precautions)
- - script: |
- set -e
- security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
- security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
- security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
- echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
- security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
- VSCODE_ARCH=$(VSCODE_ARCH) DEBUG=electron-osx-sign* node build/darwin/sign.js
- displayName: Set Hardened Entitlements
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- ./scripts/test.sh --build --tfs "Unit Tests"
- displayName: Run unit tests (Electron)
- timeoutInMinutes: 15
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ ./scripts/test.sh --tfs "Unit Tests"
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- yarn test-node --build
- displayName: Run unit tests (node.js)
- timeoutInMinutes: 15
+ - script: |
+ set -e
+ yarn test-node
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- DEBUG=*browser* yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
- displayName: Run unit tests (Browser, Chromium & Webkit)
- timeoutInMinutes: 30
+ - script: |
+ set -e
+ DEBUG=*browser* yarn test-browser-no-install --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
+ displayName: Run unit tests (Browser, Chromium & Webkit)
+ timeoutInMinutes: 30
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ ./scripts/test.sh --build --tfs "Unit Tests"
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ yarn test-node --build
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ DEBUG=*browser* yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
+ displayName: Run unit tests (Browser, Chromium & Webkit)
+ timeoutInMinutes: 30
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- script: |
set -e
yarn gulp \
+ compile-extension:configuration-editing \
compile-extension:css-language-features-server \
compile-extension:emmet \
compile-extension:git \
@@ -206,50 +66,52 @@ steps:
compile-extension:html-language-features-server \
compile-extension:ipynb \
compile-extension:json-language-features-server \
+ compile-extension:markdown-language-features-server \
compile-extension:markdown-language-features \
compile-extension-media \
compile-extension:microsoft-authentication \
compile-extension:typescript-language-features \
compile-extension:vscode-api-tests \
compile-extension:vscode-colorize-tests \
- compile-extension:vscode-custom-editor-tests \
- compile-extension:vscode-notebook-tests \
compile-extension:vscode-test-resolver
displayName: Build integration tests
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- # Figure out the full absolute path of the product we just built
- # including the remote server and configure the integration tests
- # to run with these builds instead of running out of sources.
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- APP_NAME="`ls $APP_ROOT | head -n 1`"
- INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
- ./scripts/test-integration.sh --build --tfs "Integration Tests"
- displayName: Run integration tests (Electron)
- timeoutInMinutes: 20
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ ./scripts/test-integration.sh --tfs "Integration Tests"
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- set -e
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
- ./scripts/test-web-integration.sh --browser webkit
- displayName: Run integration tests (Browser, Webkit)
- timeoutInMinutes: 20
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ # Figure out the full absolute path of the product we just built
+ # including the remote server and configure the integration tests
+ # to run with these builds instead of running out of sources.
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ APP_NAME="`ls $APP_ROOT | head -n 1`"
+ INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
+ ./scripts/test-integration.sh --build --tfs "Integration Tests"
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- APP_NAME="`ls $APP_ROOT | head -n 1`"
- INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
- ./scripts/test-remote-integration.sh
- displayName: Run integration tests (Remote)
- timeoutInMinutes: 20
+ - script: |
+ set -e
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
+ ./scripts/test-web-integration.sh --browser webkit
+ displayName: Run integration tests (Browser, Webkit)
+ timeoutInMinutes: 20
+
+ - script: |
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ APP_NAME="`ls $APP_ROOT | head -n 1`"
+ INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
+ ./scripts/test-remote-integration.sh
+ displayName: Run integration tests (Remote)
+ timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
@@ -259,35 +121,49 @@ steps:
continueOnError: true
condition: succeededOrFailed()
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
- yarn smoketest-no-compile --web --tracing --headless
- timeoutInMinutes: 20
- displayName: Run smoke tests (Browser, Chromium)
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ yarn --cwd test/smoke compile
+ displayName: Compile smoke tests
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- APP_NAME="`ls $APP_ROOT | head -n 1`"
- yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
- timeoutInMinutes: 20
- displayName: Run smoke tests (Electron)
+ - script: |
+ set -e
+ yarn gulp compile-extension-media
+ displayName: Build extensions for smoke tests
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- yarn gulp compile-extension:vscode-test-resolver
- APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- APP_NAME="`ls $APP_ROOT | head -n 1`"
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
- yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
- timeoutInMinutes: 20
- displayName: Run smoke tests (Remote)
+ - script: |
+ set -e
+ yarn smoketest-no-compile --tracing
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Electron)
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ APP_NAME="`ls $APP_ROOT | head -n 1`"
+ yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Electron)
+
+ - script: |
+ set -e
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
+ yarn smoketest-no-compile --web --tracing --headless
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Browser, Chromium)
+
+ - script: |
+ set -e
+ yarn gulp compile-extension:vscode-test-resolver
+ APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ APP_NAME="`ls $APP_ROOT | head -n 1`"
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
+ yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Remote)
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
ps -ef
@@ -295,31 +171,47 @@ steps:
continueOnError: true
condition: succeededOrFailed()
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: crash-dump-macos-$(VSCODE_ARCH)
- targetPath: .build/crashes
- displayName: "Publish Crash Reports"
- continueOnError: true
- condition: failed()
+ - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build/crashes
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: crash-dump-macos-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: crash-dump-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: crash-dump-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Crash Reports"
+ continueOnError: true
+ condition: failed()
- # In order to properly symbolify above crash reports
- # (if any), we need the compiled native modules too
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: node-modules-macos-$(VSCODE_ARCH)
- targetPath: node_modules
- displayName: "Publish Node Modules"
- continueOnError: true
- condition: failed()
+ # In order to properly symbolify above crash reports
+ # (if any), we need the compiled native modules too
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: node_modules
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: node-modules-macos-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: node-modules-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: node-modules-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Node Modules"
+ continueOnError: true
+ condition: failed()
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: logs-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
- targetPath: .build/logs
- displayName: "Publish Log Files"
- continueOnError: true
- condition: failed()
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build/logs
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: logs-macos-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: logs-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: logs-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Log Files"
+ continueOnError: true
+ condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish Tests Results
diff --git a/build/azure-pipelines/darwin/product-build-darwin-universal.yml b/build/azure-pipelines/darwin/product-build-darwin-universal.yml
index 1b8cfef6737..5a3c3df5484 100644
--- a/build/azure-pipelines/darwin/product-build-darwin-universal.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin-universal.yml
@@ -35,9 +35,14 @@ steps:
git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
displayName: Merge distro
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js x64 $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js x64 > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
- task: Cache@2
@@ -47,10 +52,73 @@ steps:
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
displayName: Extract node_modules cache
+ condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ npm install -g node-gyp@latest
+ node-gyp --version
+ displayName: Update node-gyp
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: |
+ set -e
+ export npm_config_arch=$(VSCODE_ARCH)
+ export npm_config_node_gyp=$(which node-gyp)
+
+ for i in {1..3}; do # try 3 times
+ yarn --frozen-lockfile --check-files && break
+ if [ $i -eq 3 ]; then
+ echo "Yarn failed too many times" >&2
+ exit 1
+ fi
+ echo "Yarn failed $i, trying again..."
+ done
+ env:
+ ELECTRON_SKIP_BINARY_DOWNLOAD: 1
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Install dependencies
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
+ - script: |
+ set -e
+ node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
+ mkdir -p .build/node_modules_cache
+ tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ displayName: Create node_modules archive
- script: |
set -e
diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml
index 5c524dd42fb..4962f8491ff 100644
--- a/build/azure-pipelines/darwin/product-build-darwin.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin.yml
@@ -1,54 +1,84 @@
+parameters:
+ - name: VSCODE_PUBLISH
+ type: boolean
+ - name: VSCODE_QUALITY
+ type: string
+ - name: VSCODE_RUN_UNIT_TESTS
+ type: boolean
+ - name: VSCODE_RUN_INTEGRATION_TESTS
+ type: boolean
+ - name: VSCODE_RUN_SMOKE_TESTS
+ type: boolean
+ - name: VSCODE_BUILD_TUNNEL_CLI
+ type: boolean
+
steps:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - checkout: self
+ fetchDepth: 1
+ retryCountOnTaskFailure: 3
+
- task: NodeTool@0
inputs:
versionSpec: "16.x"
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password,macos-developer-certificate,macos-developer-certificate-key"
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password,macos-developer-certificate,macos-developer-certificate-key"
- - task: DownloadPipelineArtifact@2
- inputs:
- artifact: Compilation
- path: $(Build.ArtifactStagingDirectory)
- displayName: Download compilation output
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: Compilation
+ path: $(Build.ArtifactStagingDirectory)
+ displayName: Download compilation output
- - script: |
- set -e
- tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
- displayName: Extract compilation output
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
+ displayName: Extract compilation output
- - script: |
- set -e
- cat << EOF > ~/.netrc
- machine github.com
- login vscode
- password $(github-distro-mixin-password)
- EOF
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ cat << EOF > ~/.netrc
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
- git config user.email "vscode@microsoft.com"
- git config user.name "VSCode"
- displayName: Prepare tooling
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ displayName: Prepare tooling
- - script: |
- set -e
- git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
- echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- git checkout FETCH_HEAD
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
+ echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ git checkout FETCH_HEAD
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
- - script: |
- set -e
- git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
- displayName: Merge distro
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
+ displayName: Merge distro
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
- task: Cache@2
@@ -58,6 +88,12 @@ steps:
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
@@ -66,25 +102,24 @@ steps:
- script: |
set -e
- npm install -g node-gyp@latest
- node-gyp --version
- displayName: Update node-gyp
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
- - script: |
- set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- script: |
set -e
export npm_config_arch=$(VSCODE_ARCH)
export npm_config_node_gyp=$(which node-gyp)
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -99,6 +134,13 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
@@ -107,115 +149,175 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- # This script brings in the right resources (images, icons, etc) based on the quality (insiders, stable, exploration)
- - script: |
- set -e
- node build/azure-pipelines/mixin
- displayName: Mix in quality
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ # This script brings in the right resources (images, icons, etc) based on the quality (insiders, stable, exploration)
+ - script: |
+ set -e
+ node build/azure-pipelines/mixin
+ displayName: Mix in quality
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
+ displayName: Build client
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ node build/azure-pipelines/mixin --server
+ displayName: Mix in server quality
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
+ displayName: Build Server
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp "transpile-client-swc" "transpile-extensions"
+ displayName: Transpile
- script: |
set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
- displayName: Build client
+ APP_ROOT="$(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)"
+ APP_NAME="`ls $APP_ROOT | head -n 1`"
+ echo "##vso[task.setvariable variable=APP_PATH]$APP_ROOT/$APP_NAME"
+ displayName: Find application path
- - script: |
- set -e
- node build/azure-pipelines/mixin --server
- displayName: Mix in server quality
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: unsigned_vscode_cli_darwin_arm64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
- displayName: Build Server
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: unsigned_vscode_cli_darwin_x64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- # Setting hardened entitlements is a requirement for:
- # * Apple notarization
- # * Running tests on Big Sur (because Big Sur has additional security precautions)
- - script: |
- set -e
- security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
- security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
- security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
- echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
- security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
- VSCODE_ARCH=$(VSCODE_ARCH) DEBUG=electron-osx-sign* node build/darwin/sign.js
- displayName: Set Hardened Entitlements
+ - script: |
+ set -e
+ ARCHIVE_NAME=$(ls "$(Build.ArtifactStagingDirectory)/cli" | head -n 1)
+ unzip "$(Build.ArtifactStagingDirectory)/cli/$ARCHIVE_NAME" -d "$(Build.ArtifactStagingDirectory)/cli"
+ CLI_APP_NAME=$(node -p "require(\"$(APP_PATH)/Contents/Resources/app/product.json\").tunnelApplicationName")
+ mv "$(Build.ArtifactStagingDirectory)/cli/code" "$(APP_PATH)/Contents/Resources/app/bin/$CLI_APP_NAME"
+ chmod +x "$(APP_PATH)/Contents/Resources/app/bin/$CLI_APP_NAME"
+ displayName: Make CLI executable
- - script: |
- set -e
- pushd $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) && zip -r -X -y $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip * && popd
- displayName: Archive build
+ - ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - template: product-build-darwin-test.yml
+ parameters:
+ VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
+ VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_TESTS }}
- - script: |
- set -e
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ # Setting hardened entitlements is a requirement for:
+ # * Apple notarization
+ # * Running tests on Big Sur (because Big Sur has additional security precautions)
+ - script: |
+ set -e
+ security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
+ security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
+ security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
+ echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
+ security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
+ VSCODE_ARCH=$(VSCODE_ARCH) DEBUG=electron-osx-sign* node build/darwin/sign.js
+ displayName: Set Hardened Entitlements
- # package Remote Extension Host
- pushd .. && mv vscode-reh-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH) && zip -Xry vscode-server-darwin-$(VSCODE_ARCH).zip vscode-server-darwin-$(VSCODE_ARCH) && popd
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - script: |
+ set -e
+ pushd $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) && zip -r -X -y $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip * && popd
+ displayName: Archive build
- # package Remote Extension Host (Web)
- pushd .. && mv vscode-reh-web-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH)-web && zip -Xry vscode-server-darwin-$(VSCODE_ARCH)-web.zip vscode-server-darwin-$(VSCODE_ARCH)-web && popd
- displayName: Prepare to publish servers
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - script: |
+ set -e
- - publish: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
- artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
- displayName: Publish client archive
+ # package Remote Extension Host
+ pushd .. && mv vscode-reh-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH) && zip -Xry vscode-server-darwin-$(VSCODE_ARCH).zip vscode-server-darwin-$(VSCODE_ARCH) && popd
- - publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH).zip
- artifact: vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned
- displayName: Publish server archive
+ # package Remote Extension Host (Web)
+ pushd .. && mv vscode-reh-web-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH)-web && zip -Xry vscode-server-darwin-$(VSCODE_ARCH)-web.zip vscode-server-darwin-$(VSCODE_ARCH)-web && popd
+ displayName: Prepare to publish servers
- - publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web.zip
- artifact: vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned
- displayName: Publish web server archive
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (client)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code
- - task: AzureCLI@2
- inputs:
- azureSubscription: "vscode-builds-subscription"
- scriptType: pscore
- scriptLocation: inlineScript
- addSpnToEnvironment: true
- inlineScript: |
- Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
- Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
- Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - publish: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (client)
+ artifact: vscode_client_darwin_$(VSCODE_ARCH)_sbom
- - script: |
- set -e
- AZURE_STORAGE_ACCOUNT="ticino" \
- AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
- AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
- AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
- VSCODE_ARCH="$(VSCODE_ARCH)" \
- node build/azure-pipelines/upload-configuration
- displayName: Upload configuration (for Bing settings search)
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false'))
- continueOnError: true
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (server)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code Server
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (client)
- inputs:
- BuildDropPath: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
- PackageName: Visual Studio Code
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - publish: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (server)
+ artifact: vscode_server_darwin_$(VSCODE_ARCH)_sbom
- - publish: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (client)
- artifact: vscode_client_darwin_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - publish: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
+ artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
+ displayName: Publish client archive
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (server)
- inputs:
- BuildDropPath: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
- PackageName: Visual Studio Code Server
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH).zip
+ artifact: vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned
+ displayName: Publish server archive
- - publish: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (server)
- artifact: vscode_server_darwin_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web.zip
+ artifact: vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned
+ displayName: Publish web server archive
+
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - task: AzureCLI@2
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ scriptType: pscore
+ scriptLocation: inlineScript
+ addSpnToEnvironment: true
+ inlineScript: |
+ Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
+ Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
+ Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"
+
+ - ${{ if and(eq(parameters.VSCODE_PUBLISH, true), eq(parameters.VSCODE_RUN_UNIT_TESTS, false), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ - script: |
+ set -e
+ AZURE_STORAGE_ACCOUNT="ticino" \
+ AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
+ AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
+ AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
+ VSCODE_ARCH="$(VSCODE_ARCH)" \
+ node build/azure-pipelines/upload-configuration
+ displayName: Upload configuration (for Bing settings search)
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
+ continueOnError: true
diff --git a/build/azure-pipelines/linux/cli-build-linux.yml b/build/azure-pipelines/linux/cli-build-linux.yml
new file mode 100644
index 00000000000..b7b10504b4d
--- /dev/null
+++ b/build/azure-pipelines/linux/cli-build-linux.yml
@@ -0,0 +1,138 @@
+parameters:
+ - name: VSCODE_BUILD_LINUX_ALPINE
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_LINUX
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_LINUX_ALPINE_ARM64
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_LINUX_ARM64
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_LINUX_ARMHF
+ type: boolean
+ default: false
+ - name: VSCODE_QUALITY
+ type: string
+ - name: channel
+ type: string
+ default: stable
+
+steps:
+ - task: Npm@1
+ displayName: Download openssl prebuilt
+ inputs:
+ command: custom
+ customCommand: pack @vscode-internal/openssl-prebuilt@0.0.1
+ customRegistry: useFeed
+ customFeed: 'Monaco/openssl-prebuilt'
+ workingDir: $(Build.ArtifactStagingDirectory)
+
+ - script: |
+ set -e
+ mkdir $(Build.ArtifactStagingDirectory)/openssl
+ tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.1.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
+ displayName: Extract openssl prebuilt
+
+ # inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile
+ - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true)) }}:
+ - bash: |
+ set -e
+ sudo apt-get update
+ sudo apt-get install -yq build-essential musl-dev musl-tools linux-libc-dev pkgconf xutils-dev
+ sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
+ displayName: Install musl build dependencies
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
+ - bash: |
+ set -e
+ sudo apt-get install -yq gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
+ displayName: Install arm32 toolchains
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
+ - bash: |
+ set -e
+ sudo apt-get install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
+ displayName: Install arm64 toolchains
+
+ - task: NodeTool@0
+ inputs:
+ versionSpec: "16.x"
+
+ - template: ../mixin-distro-posix.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+
+ - script: |
+ set -e
+ node build/azure-pipelines/cli/prepare.js
+ displayName: Prepare CLI build
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+
+ - template: ../cli/install-rust-posix.yml
+ parameters:
+ targets:
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}:
+ - aarch64-unknown-linux-musl
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true) }}:
+ - x86_64-unknown-linux-musl
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
+ - aarch64-unknown-linux-gnu
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
+ - x86_64-unknown-linux-gnu
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
+ - armv7-unknown-linux-gnueabihf
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: aarch64-unknown-linux-musl
+ VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli
+ VSCODE_CLI_ENV:
+ CXX_aarch64-unknown-linux-musl: musl-g++
+ CC_aarch64-unknown-linux-musl: musl-gcc
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: x86_64-unknown-linux-musl
+ VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli
+ VSCODE_CLI_ENV:
+ CXX_aarch64-unknown-linux-musl: musl-g++
+ CC_aarch64-unknown-linux-musl: musl-gcc
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu
+ VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli
+ VSCODE_CLI_ENV:
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: x86_64-unknown-linux-gnu
+ VSCODE_CLI_ARTIFACT: vscode_cli_linux_x64_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: armv7-unknown-linux-gnueabihf
+ VSCODE_CLI_ARTIFACT: vscode_cli_linux_armhf_cli
+ VSCODE_CLI_ENV:
+ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/include
diff --git a/build/azure-pipelines/linux/product-build-alpine.yml b/build/azure-pipelines/linux/product-build-alpine.yml
index 3aef7279243..2175c76556e 100644
--- a/build/azure-pipelines/linux/product-build-alpine.yml
+++ b/build/azure-pipelines/linux/product-build-alpine.yml
@@ -55,9 +55,14 @@ steps:
git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
displayName: Merge distro
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js "alpine" $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js "alpine" > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
- task: Cache@2
@@ -67,6 +72,12 @@ steps:
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
@@ -75,15 +86,21 @@ steps:
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- script: |
set -e
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -98,6 +115,13 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
diff --git a/build/azure-pipelines/linux/product-build-linux-client-test.yml b/build/azure-pipelines/linux/product-build-linux-client-test.yml
new file mode 100644
index 00000000000..36495873d96
--- /dev/null
+++ b/build/azure-pipelines/linux/product-build-linux-client-test.yml
@@ -0,0 +1,278 @@
+parameters:
+ - name: VSCODE_QUALITY
+ type: string
+ - name: VSCODE_RUN_UNIT_TESTS
+ type: boolean
+ - name: VSCODE_RUN_INTEGRATION_TESTS
+ type: boolean
+ - name: VSCODE_RUN_SMOKE_TESTS
+ type: boolean
+
+steps:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
+ displayName: Download Electron and Playwright
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ sudo apt-get update
+ sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
+ sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
+ sudo chmod +x /etc/init.d/xvfb
+ sudo update-rc.d xvfb defaults
+ sudo service xvfb start
+ displayName: Setup build environment
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ ELECTRON_ROOT=.build/electron
+ sudo chown root $APP_ROOT/chrome-sandbox
+ sudo chown root $ELECTRON_ROOT/chrome-sandbox
+ sudo chmod 4755 $APP_ROOT/chrome-sandbox
+ sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
+ stat $APP_ROOT/chrome-sandbox
+ stat $ELECTRON_ROOT/chrome-sandbox
+ displayName: Change setuid helper binary permission
+
+ - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ yarn test-node
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ DEBUG=*browser* yarn test-browser-no-install --browser chromium --tfs "Browser Unit Tests"
+ displayName: Run unit tests (Browser, Chromium)
+ timeoutInMinutes: 15
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ ./scripts/test.sh --build --tfs "Unit Tests"
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ yarn test-node --build
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
+
+ - script: |
+ set -e
+ DEBUG=*browser* yarn test-browser-no-install --build --browser chromium --tfs "Browser Unit Tests"
+ displayName: Run unit tests (Browser, Chromium)
+ timeoutInMinutes: 15
+
+ - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
+ - script: |
+ set -e
+ yarn gulp \
+ compile-extension:configuration-editing \
+ compile-extension:css-language-features-server \
+ compile-extension:emmet \
+ compile-extension:git \
+ compile-extension:github-authentication \
+ compile-extension:html-language-features-server \
+ compile-extension:ipynb \
+ compile-extension:json-language-features-server \
+ compile-extension:markdown-language-features-server \
+ compile-extension:markdown-language-features \
+ compile-extension-media \
+ compile-extension:microsoft-authentication \
+ compile-extension:typescript-language-features \
+ compile-extension:vscode-api-tests \
+ compile-extension:vscode-colorize-tests \
+ compile-extension:vscode-test-resolver
+ displayName: Build integration tests
+
+ - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests"
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
+
+ - script: |
+ set -e
+ ./scripts/test-web-integration.sh --browser chromium
+ displayName: Run integration tests (Browser, Chromium)
+ timeoutInMinutes: 20
+
+ - script: |
+ set -e
+ ./scripts/test-remote-integration.sh
+ displayName: Run integration tests (Remote)
+ timeoutInMinutes: 20
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ # Figure out the full absolute path of the product we just built
+ # including the remote server and configure the integration tests
+ # to run with these builds instead of running out of sources.
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
+ INTEGRATION_TEST_APP_NAME="$APP_NAME" \
+ INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
+ ./scripts/test-integration.sh --build --tfs "Integration Tests"
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
+
+ - script: |
+ set -e
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
+ ./scripts/test-web-integration.sh --browser chromium
+ displayName: Run integration tests (Browser, Chromium)
+ timeoutInMinutes: 20
+
+ - script: |
+ set -e
+ APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
+ INTEGRATION_TEST_APP_NAME="$APP_NAME" \
+ INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
+ ./scripts/test-remote-integration.sh
+ displayName: Run integration tests (Remote)
+ timeoutInMinutes: 20
+
+ - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
+ - script: |
+ set -e
+ ps -ef
+ cat /proc/sys/fs/inotify/max_user_watches
+ lsof | wc -l
+ displayName: Diagnostics before smoke test run (processes, max_user_watches, number of opened file handles)
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ yarn --cwd test/smoke compile
+ displayName: Compile smoke tests
+
+ - script: |
+ set -e
+ yarn gulp \
+ compile-extension:markdown-language-features \
+ compile-extension-media
+ displayName: Build extensions for smoke tests
+
+ - script: |
+ set -e
+ yarn smoketest-no-compile --tracing
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Electron)
+
+ - script: |
+ set -e
+ yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Browser, Chromium)
+
+ - script: |
+ set -e
+ yarn gulp compile-extension:vscode-test-resolver
+ yarn smoketest-no-compile --remote --tracing
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Remote)
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ yarn smoketest-no-compile --tracing --build "$APP_PATH"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Electron)
+
+ - script: |
+ set -e
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
+ yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Browser, Chromium)
+
+ - script: |
+ set -e
+ yarn gulp compile-extension:vscode-test-resolver
+ APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
+ yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
+ timeoutInMinutes: 20
+ displayName: Run smoke tests (Remote)
+
+ - script: |
+ set -e
+ ps -ef
+ cat /proc/sys/fs/inotify/max_user_watches
+ lsof | wc -l
+ displayName: Diagnostics after smoke test run (processes, max_user_watches, number of opened file handles)
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build/crashes
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: crash-dump-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: crash-dump-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: crash-dump-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Crash Reports"
+ continueOnError: true
+ condition: failed()
+
+ # In order to properly symbolify above crash reports
+ # (if any), we need the compiled native modules too
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: node_modules
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: node-modules-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: node-modules-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: node-modules-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Node Modules"
+ continueOnError: true
+ condition: failed()
+
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build/logs
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: logs-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: logs-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: logs-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Log Files"
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - task: PublishTestResults@2
+ displayName: Publish Tests Results
+ inputs:
+ testResultsFiles: "*-results.xml"
+ searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
+ condition: succeededOrFailed()
diff --git a/build/azure-pipelines/linux/product-build-linux-client.yml b/build/azure-pipelines/linux/product-build-linux-client.yml
index 8f3b4aad146..099b2eae733 100644
--- a/build/azure-pipelines/linux/product-build-linux-client.yml
+++ b/build/azure-pipelines/linux/product-build-linux-client.yml
@@ -1,96 +1,126 @@
parameters:
+ - name: VSCODE_PUBLISH
+ type: boolean
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_UNIT_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_INTEGRATION_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_SMOKE_TESTS
type: boolean
- default: true
+ - name: VSCODE_BUILD_TUNNEL_CLI
+ type: boolean
steps:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - checkout: self
+ fetchDepth: 1
+ retryCountOnTaskFailure: 3
+
- task: NodeTool@0
inputs:
versionSpec: "16.x"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifact: Compilation
- path: $(Build.ArtifactStagingDirectory)
- displayName: Download compilation output
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifact: reh_node_modules-$(VSCODE_ARCH)
- path: $(Build.ArtifactStagingDirectory)
- displayName: Download server build dependencies
- condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'armhf'))
-
- - script: |
- set -e
- # Start X server
- /etc/init.d/xvfb start
- # Start dbus session
- DBUS_LAUNCH_RESULT=$(sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address)
- echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS]$DBUS_LAUNCH_RESULT"
- displayName: Setup system services
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
-
- - script: |
- set -e
- tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
- displayName: Extract compilation output
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- cat << EOF > ~/.netrc
- machine github.com
- login vscode
- password $(github-distro-mixin-password)
- EOF
-
- git config user.email "vscode@microsoft.com"
- git config user.name "VSCode"
- displayName: Prepare tooling
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: Compilation
+ path: $(Build.ArtifactStagingDirectory)
+ displayName: Download compilation output
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
- echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- git checkout FETCH_HEAD
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: reh_node_modules-$(VSCODE_ARCH)
+ path: $(Build.ArtifactStagingDirectory)
+ displayName: Download server build dependencies
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'armhf'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
- displayName: Merge distro
+ - script: |
+ set -e
+ # Start X server
+ /etc/init.d/xvfb start
+ # Start dbus session
+ DBUS_LAUNCH_RESULT=$(sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address)
+ echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS]$DBUS_LAUNCH_RESULT"
+ displayName: Setup system services
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
+ displayName: Extract compilation output
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ cat << EOF > ~/.netrc
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
+
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ displayName: Prepare tooling
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
+ echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ git checkout FETCH_HEAD
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
+ displayName: Merge distro
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: Cache@2
+ inputs:
+ key: "genericNodeModules | $(Agent.OS) | .build/yarnlockhash"
+ path: .build/node_modules_cache
+ cacheHitVar: NODE_MODULES_RESTORED
+ displayName: Restore node_modules cache
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: Cache@2
+ inputs:
+ key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
+ path: .build/node_modules_cache
+ cacheHitVar: NODE_MODULES_RESTORED
+ displayName: Restore node_modules cache
+
- task: Cache@2
inputs:
- key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
- path: .build/node_modules_cache
- cacheHitVar: NODE_MODULES_RESTORED
- displayName: Restore node_modules cache
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
- script: |
set -e
@@ -100,16 +130,22 @@ steps:
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- script: |
set -e
node build/npm/setupBuildYarnrc
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -155,7 +191,7 @@ steps:
export VSCODE_REMOTE_CXX=$(which g++)
fi
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -172,10 +208,18 @@ steps:
- script: |
set -e
- rm -rf remote/node_modules
- tar -xzf $(Build.ArtifactStagingDirectory)/reh_node_modules-$(VSCODE_ARCH).tar.gz --directory $(Build.SourcesDirectory)/remote
- displayName: Extract server node_modules output
- condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'armhf'))
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ rm -rf remote/node_modules
+ tar -xzf $(Build.ArtifactStagingDirectory)/reh_node_modules-$(VSCODE_ARCH).tar.gz --directory $(Build.SourcesDirectory)/remote
+ displayName: Extract server node_modules output
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'armhf'))
- script: |
set -e
@@ -186,319 +230,167 @@ steps:
displayName: Create node_modules archive
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- node build/azure-pipelines/mixin
- displayName: Mix in quality
-
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
- displayName: Build
+ - script: |
+ set -e
+ node build/azure-pipelines/mixin
+ displayName: Mix in quality
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- node build/azure-pipelines/mixin --server
- displayName: Mix in server quality
-
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
- displayName: Build Server
-
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
- displayName: Download Electron and Playwright
-
- - script: |
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- ELECTRON_ROOT=.build/electron
- sudo chown root $APP_ROOT/chrome-sandbox
- sudo chown root $ELECTRON_ROOT/chrome-sandbox
- sudo chmod 4755 $APP_ROOT/chrome-sandbox
- sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
- stat $APP_ROOT/chrome-sandbox
- stat $ELECTRON_ROOT/chrome-sandbox
- displayName: Change setuid helper binary permission
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- ./scripts/test.sh --build --tfs "Unit Tests"
- displayName: Run unit tests (Electron)
- timeoutInMinutes: 15
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- yarn test-node --build
- displayName: Run unit tests (node.js)
- timeoutInMinutes: 15
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - script: |
- set -e
- DEBUG=*browser* yarn test-browser-no-install --build --browser chromium --tfs "Browser Unit Tests"
- displayName: Run unit tests (Browser, Chromium)
- timeoutInMinutes: 15
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- set -e
- yarn gulp \
- compile-extension:css-language-features-server \
- compile-extension:emmet \
- compile-extension:git \
- compile-extension:github-authentication \
- compile-extension:html-language-features-server \
- compile-extension:ipynb \
- compile-extension:json-language-features-server \
- compile-extension:markdown-language-features \
- compile-extension-media \
- compile-extension:microsoft-authentication \
- compile-extension:typescript-language-features \
- compile-extension:vscode-api-tests \
- compile-extension:vscode-colorize-tests \
- compile-extension:vscode-custom-editor-tests \
- compile-extension:vscode-notebook-tests \
- compile-extension:vscode-test-resolver
- displayName: Build integration tests
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- # Figure out the full absolute path of the product we just built
- # including the remote server and configure the integration tests
- # to run with these builds instead of running out of sources.
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
- INTEGRATION_TEST_APP_NAME="$APP_NAME" \
- INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
- ./scripts/test-integration.sh --build --tfs "Integration Tests"
- displayName: Run integration tests (Electron)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- set -e
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
- ./scripts/test-web-integration.sh --browser chromium
- displayName: Run integration tests (Browser, Chromium)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - script: |
- set -e
- APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
- INTEGRATION_TEST_APP_NAME="$APP_NAME" \
- INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
- ./scripts/test-remote-integration.sh
- displayName: Run integration tests (Remote)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- ps -ef
- cat /proc/sys/fs/inotify/max_user_watches
- lsof | wc -l
- displayName: Diagnostics before smoke test run (processes, max_user_watches, number of opened file handles)
- continueOnError: true
- condition: and(succeededOrFailed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
- yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
- timeoutInMinutes: 20
- displayName: Run smoke tests (Browser, Chromium)
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- yarn smoketest-no-compile --tracing --build "$APP_PATH"
- timeoutInMinutes: 20
- displayName: Run smoke tests (Electron)
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- yarn gulp compile-extension:vscode-test-resolver
- APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
- yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
- timeoutInMinutes: 20
- displayName: Run smoke tests (Remote)
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - script: |
- set -e
- ps -ef
- cat /proc/sys/fs/inotify/max_user_watches
- lsof | wc -l
- displayName: Diagnostics after smoke test run (processes, max_user_watches, number of opened file handles)
- continueOnError: true
- condition: and(succeededOrFailed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: crash-dump-linux-$(VSCODE_ARCH)
- targetPath: .build/crashes
- displayName: "Publish Crash Reports"
- continueOnError: true
- condition: failed()
-
- # In order to properly symbolify above crash reports
- # (if any), we need the compiled native modules too
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: node-modules-linux-$(VSCODE_ARCH)
- targetPath: node_modules
- displayName: "Publish Node Modules"
- continueOnError: true
- condition: failed()
-
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: logs-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
- targetPath: .build/logs
- displayName: "Publish Log Files"
- continueOnError: true
- condition: and(failed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - task: PublishTestResults@2
- displayName: Publish Tests Results
- inputs:
- testResultsFiles: "*-results.xml"
- searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
- condition: and(succeededOrFailed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
+ displayName: Build
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
- yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
- displayName: Build deb, rpm packages
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - script: |
+ set -e
+ node build/azure-pipelines/mixin --server
+ displayName: Mix in server quality
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
- displayName: Prepare snap package
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
+ displayName: Build Server
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: UseDotNet@2
- inputs:
- version: 2.x
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn gulp "transpile-client-swc" "transpile-extensions"
+ displayName: Transpile
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: EsrpClientTool@1
- displayName: Download ESRPClient
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: vscode_cli_linux_arm64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" rpm $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) .build/linux/rpm '*.rpm'
- displayName: Codesign rpm
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: vscode_cli_linux_x64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- VSCODE_ARCH="$(VSCODE_ARCH)" \
- ./build/azure-pipelines/linux/prepare-publish.sh
- displayName: Prepare for Publish
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: vscode_cli_linux_armhf_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'armhf'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(DEB_PATH)
- artifact: vscode_client_linux_$(VSCODE_ARCH)_deb-package
- displayName: Publish deb package
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - script: |
+ set -e
+ tar -xzvf $(Build.ArtifactStagingDirectory)/cli/*.tar.gz -C $(Build.ArtifactStagingDirectory)/cli
+ CLI_APP_NAME=$(node -p "require(\"$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/resources/app/product.json\").tunnelApplicationName")
+ mv $(Build.ArtifactStagingDirectory)/cli/code $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/bin/$CLI_APP_NAME
+ displayName: Make CLI executable
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(RPM_PATH)
- artifact: vscode_client_linux_$(VSCODE_ARCH)_rpm-package
- displayName: Publish rpm package
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - template: product-build-linux-client-test.yml
+ parameters:
+ VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
+ VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_TESTS }}
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(TARBALL_PATH)
- artifact: vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
- displayName: Publish client archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - script: |
+ set -e
+ yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
+ yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
+ displayName: Build deb, rpm packages
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH).tar.gz
- artifact: vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
- displayName: Publish server archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - script: |
+ set -e
+ yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
+ displayName: Prepare snap package
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz
- artifact: vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
- displayName: Publish web server archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: UseDotNet@2
+ inputs:
+ version: 2.x
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: PublishPipelineArtifact@0
- displayName: "Publish Pipeline Artifact"
- inputs:
- artifactName: "snap-$(VSCODE_ARCH)"
- targetPath: .build/linux/snap-tarball
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: EsrpClientTool@1
+ displayName: Download ESRPClient
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (client)
- inputs:
- BuildDropPath: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
- PackageName: Visual Studio Code
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - script: |
+ set -e
+ node build/azure-pipelines/common/sign "$(esrpclient.toolpath)/$(esrpclient.toolname)" rpm $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) .build/linux/rpm '*.rpm'
+ displayName: Codesign rpm
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (client)
- artifact: vscode_client_linux_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - script: |
+ set -e
+ VSCODE_ARCH="$(VSCODE_ARCH)" \
+ ./build/azure-pipelines/linux/prepare-publish.sh
+ displayName: Prepare for Publish
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (server)
- inputs:
- BuildDropPath: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
- PackageName: Visual Studio Code Server
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (client)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (server)
- artifact: vscode_server_linux_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (client)
+ artifact: vscode_client_linux_$(VSCODE_ARCH)_sbom
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (server)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code Server
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (server)
+ artifact: vscode_server_linux_$(VSCODE_ARCH)_sbom
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(DEB_PATH)
+ artifact: vscode_client_linux_$(VSCODE_ARCH)_deb-package
+ displayName: Publish deb package
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(RPM_PATH)
+ artifact: vscode_client_linux_$(VSCODE_ARCH)_rpm-package
+ displayName: Publish rpm package
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(TARBALL_PATH)
+ artifact: vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
+ displayName: Publish client archive
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH).tar.gz
+ artifact: vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
+ displayName: Publish server archive
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz
+ artifact: vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
+ displayName: Publish web server archive
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: PublishPipelineArtifact@0
+ displayName: "Publish Pipeline Artifact"
+ inputs:
+ artifactName: "snap-$(VSCODE_ARCH)"
+ targetPath: .build/linux/snap-tarball
diff --git a/build/azure-pipelines/linux/product-build-linux-server.yml b/build/azure-pipelines/linux/product-build-linux-server.yml
index 8ab58da435c..ecc193d3fed 100644
--- a/build/azure-pipelines/linux/product-build-linux-server.yml
+++ b/build/azure-pipelines/linux/product-build-linux-server.yml
@@ -8,59 +8,69 @@ steps:
versionSpec: "16.x"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: Docker@1
- displayName: "Pull Docker image"
- inputs:
- azureSubscriptionEndpoint: "vscode-builds-subscription"
- azureContainerRegistry: vscodehub.azurecr.io
- command: "Run an image"
- imageName: "vscode-linux-build-agent:centos7-devtoolset8-arm64"
- containerCommand: uname
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
+ - task: Docker@1
+ displayName: "Pull Docker image"
+ inputs:
+ azureSubscriptionEndpoint: "vscode-builds-subscription"
+ azureContainerRegistry: vscodehub.azurecr.io
+ command: "Run an image"
+ imageName: "vscode-linux-build-agent:centos7-devtoolset8-arm64"
+ containerCommand: uname
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- cat << EOF > ~/.netrc
- machine github.com
- login vscode
- password $(github-distro-mixin-password)
- EOF
+ - script: |
+ set -e
+ cat << EOF > ~/.netrc
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
- git config user.email "vscode@microsoft.com"
- git config user.name "VSCode"
- displayName: Prepare tooling
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ displayName: Prepare tooling
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
- echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- git checkout FETCH_HEAD
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
+ - script: |
+ set -e
+ git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
+ echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ git checkout FETCH_HEAD
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
- displayName: Merge distro
+ - script: |
+ set -e
+ git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
+ displayName: Merge distro
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- script: |
set -e
@@ -71,18 +81,18 @@ steps:
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- displayName: Register Docker QEMU
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
+ - script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
+ displayName: Register Docker QEMU
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscode -v ~/.netrc:/root/.netrc vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-arm64 /root/vscode/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh
- displayName: Install dependencies via qemu
- env:
- GITHUB_TOKEN: "$(github-distro-mixin-password)"
- condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
+ - script: |
+ set -e
+ docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscode -v ~/.netrc:/root/.netrc vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-arm64 /root/vscode/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh
+ displayName: Install dependencies via qemu
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
- script: |
set -e
diff --git a/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh b/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh
index d2f62087661..c6b4e3115f1 100755
--- a/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh
+++ b/build/azure-pipelines/linux/scripts/install-remote-dependencies.sh
@@ -4,7 +4,7 @@ set -e
echo "Installing remote dependencies"
(cd remote && rm -rf node_modules)
-for i in {1..3}; do # try 3 times, for Terrapin
+for i in {1..3}; do # try 3 times
yarn --cwd remote --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
diff --git a/build/azure-pipelines/mixin-distro-posix.yml b/build/azure-pipelines/mixin-distro-posix.yml
new file mode 100644
index 00000000000..5340bda32d0
--- /dev/null
+++ b/build/azure-pipelines/mixin-distro-posix.yml
@@ -0,0 +1,40 @@
+parameters:
+ - name: VSCODE_QUALITY
+ type: string
+
+steps:
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password"
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ cat << EOF > ~/.netrc
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
+
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ displayName: Prepare tooling
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
+ echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ git checkout FETCH_HEAD
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
+ displayName: Merge distro
diff --git a/build/azure-pipelines/mixin-distro-win32.yml b/build/azure-pipelines/mixin-distro-win32.yml
new file mode 100644
index 00000000000..5ff4eacf41c
--- /dev/null
+++ b/build/azure-pipelines/mixin-distro-win32.yml
@@ -0,0 +1,40 @@
+parameters:
+ - name: VSCODE_QUALITY
+ type: string
+
+steps:
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password"
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ "machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
+
+ exec { git config user.email "vscode@microsoft.com" }
+ exec { git config user.name "VSCode" }
+ displayName: Prepare tooling
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+
+ exec { git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $(VSCODE_DISTRO_REF) }
+ Write-Host "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ exec { git checkout FETCH_HEAD }
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro") }
+ displayName: Merge distro
diff --git a/build/azure-pipelines/mixin.js b/build/azure-pipelines/mixin.js
index 769ac72a9ee..273aeda9fc2 100644
--- a/build/azure-pipelines/mixin.js
+++ b/build/azure-pipelines/mixin.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const json = require("gulp-json-editor");
const buffer = require('gulp-buffer');
diff --git a/build/azure-pipelines/mixin.ts b/build/azure-pipelines/mixin.ts
index ccd98d6e773..aec694a61df 100644
--- a/build/azure-pipelines/mixin.ts
+++ b/build/azure-pipelines/mixin.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as json from 'gulp-json-editor';
const buffer = require('gulp-buffer');
import * as filter from 'gulp-filter';
diff --git a/build/azure-pipelines/product-build-pr-cache.yml b/build/azure-pipelines/product-build-pr-cache.yml
new file mode 100644
index 00000000000..73f17eea5ac
--- /dev/null
+++ b/build/azure-pipelines/product-build-pr-cache.yml
@@ -0,0 +1,83 @@
+steps:
+ - checkout: self
+ fetchDepth: 1
+ retryCountOnTaskFailure: 3
+
+ - task: NodeTool@0
+ inputs:
+ versionSpec: "16.x"
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
+ - script: |
+ mkdir -p .build
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
+ displayName: Prepare yarn cache flags
+
+ - task: Cache@2
+ inputs:
+ key: "genericNodeModules | $(Agent.OS) | .build/yarnlockhash"
+ path: .build/node_modules_cache
+ cacheHitVar: NODE_MODULES_RESTORED
+ displayName: Restore node_modules cache
+
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
+ - script: |
+ set -e
+ tar -xzf .build/node_modules_cache/cache.tgz
+ condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
+ displayName: Extract node_modules cache
+
+ - script: |
+ set -e
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: |
+ set -e
+ for i in {1..3}; do # try 3 times
+ yarn --frozen-lockfile --check-files && break
+ if [ $i -eq 3 ]; then
+ echo "Yarn failed too many times" >&2
+ exit 1
+ fi
+ echo "Yarn failed $i, trying again..."
+ done
+ env:
+ ELECTRON_SKIP_BINARY_DOWNLOAD: 1
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Install dependencies
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
+ - script: |
+ set -e
+ node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
+ mkdir -p .build/node_modules_cache
+ tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ displayName: Create node_modules archive
diff --git a/build/azure-pipelines/product-build-pr.yml b/build/azure-pipelines/product-build-pr.yml
index 3c45858413e..2ef55d4d05f 100644
--- a/build/azure-pipelines/product-build-pr.yml
+++ b/build/azure-pipelines/product-build-pr.yml
@@ -6,22 +6,15 @@ pr:
branches:
include: ["main", "release/*"]
-resources:
- containers:
- - container: centos7-devtoolset8-x64
- image: vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-x64
- options: --user 0:0 --cap-add SYS_ADMIN
- - container: vscode-bionic-x64
- image: vscodehub.azurecr.io/vscode-linux-build-agent:bionic-x64
- options: --user 0:0 --cap-add SYS_ADMIN
-
variables:
- name: Codeql.SkipTaskAutoInjection
value: true
- name: skipComponentGovernanceDetection
value: true
- - name: ENABLE_TERRAPIN
- value: false
+ - name: NPM_REGISTRY
+ value: 'none'
+ - name: VSCODE_CIBUILD
+ value: ${{ in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') }}
- name: VSCODE_PUBLISH
value: false
- name: VSCODE_QUALITY
@@ -29,164 +22,178 @@ variables:
- name: VSCODE_STEP_ON_IT
value: false
-stages:
- - stage: Compile
- jobs:
- - job: Compile
- pool: vscode-1es-vscode-linux-18.04
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: product-compile.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+jobs:
+ - ${{ if ne(variables['VSCODE_CIBUILD'], true) }}:
+ - job: Compile
+ displayName: Compile & Hygiene
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: product-compile.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- - stage: LinuxServerDependencies
- dependsOn: []
- pool: vscode-1es-vscode-linux-18.04
- jobs:
- - job: x64
- container: centos7-devtoolset8-x64
- variables:
- VSCODE_ARCH: x64
- NPM_ARCH: x64
- steps:
- - template: linux/product-build-linux-server.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ - job: Linuxx64UnitTest
+ displayName: Linux (Unit Tests)
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: true
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
- - stage: Windows
- dependsOn:
- - Compile
- pool: vscode-1es-vscode-windows-2019
- jobs:
- - job: WindowsUnitTests
- displayName: Unit Tests
- timeoutInMinutes: 120
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: win32/product-build-win32.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: true
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: false
- - job: WindowsIntegrationTests
- displayName: Integration Tests
- timeoutInMinutes: 120
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: win32/product-build-win32.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: true
- VSCODE_RUN_SMOKE_TESTS: false
- - job: WindowsSmokeTests
- displayName: Smoke Tests
- timeoutInMinutes: 120
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: win32/product-build-win32.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: true
+ - job: Linuxx64IntegrationTest
+ displayName: Linux (Integration Tests)
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: true
+ VSCODE_RUN_SMOKE_TESTS: false
- - stage: Linux
- dependsOn:
- - Compile
- - LinuxServerDependencies
- pool: vscode-1es-vscode-linux-18.04
- jobs:
- - job: Linuxx64UnitTest
- displayName: Unit Tests
- container: vscode-bionic-x64
- variables:
- VSCODE_ARCH: x64
- NPM_ARCH: x64
- DISPLAY: ":10"
- steps:
- - template: linux/product-build-linux-client.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: true
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: false
- - job: Linuxx64IntegrationTest
- displayName: Integration Tests
- container: vscode-bionic-x64
- variables:
- VSCODE_ARCH: x64
- NPM_ARCH: x64
- DISPLAY: ":10"
- steps:
- - template: linux/product-build-linux-client.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: true
- VSCODE_RUN_SMOKE_TESTS: false
- - job: Linuxx64SmokeTest
- displayName: Smoke Tests
- container: vscode-bionic-x64
- variables:
- VSCODE_ARCH: x64
- NPM_ARCH: x64
- DISPLAY: ":10"
- steps:
- - template: linux/product-build-linux-client.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: true
+ - job: Linuxx64SmokeTest
+ displayName: Linux (Smoke Tests)
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: true
- - stage: macOS
- dependsOn:
- - Compile
- pool:
- vmImage: macOS-latest
- variables:
- BUILDSECMON_OPT_IN: true
- jobs:
- - job: macOSUnitTest
- displayName: Unit Tests
- timeoutInMinutes: 90
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: darwin/product-build-darwin-test.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: true
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: false
- - job: macOSIntegrationTest
- displayName: Integration Tests
- timeoutInMinutes: 90
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: darwin/product-build-darwin-test.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: true
- VSCODE_RUN_SMOKE_TESTS: false
- - job: macOSSmokeTest
- displayName: Smoke Tests
- timeoutInMinutes: 90
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: darwin/product-build-darwin-test.yml
- parameters:
- VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- VSCODE_RUN_UNIT_TESTS: false
- VSCODE_RUN_INTEGRATION_TESTS: false
- VSCODE_RUN_SMOKE_TESTS: true
+ - job: LinuxCLI
+ displayName: Linux (CLI)
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ steps:
+ - template: cli/test.yml
+
+ - ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
+ - job: Linuxx64MaintainNodeModulesCache
+ displayName: Linux (Maintain node_modules cache)
+ pool: vscode-1es-vscode-linux-20.04
+ timeoutInMinutes: 30
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: product-build-pr-cache.yml
+
+ # - job: macOSUnitTest
+ # displayName: macOS (Unit Tests)
+ # pool:
+ # vmImage: macOS-11
+ # timeoutInMinutes: 60
+ # variables:
+ # BUILDSECMON_OPT_IN: true
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: darwin/product-build-darwin.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: true
+ # VSCODE_RUN_INTEGRATION_TESTS: false
+ # VSCODE_RUN_SMOKE_TESTS: false
+ # - job: macOSIntegrationTest
+ # displayName: macOS (Integration Tests)
+ # pool:
+ # vmImage: macOS-11
+ # timeoutInMinutes: 60
+ # variables:
+ # BUILDSECMON_OPT_IN: true
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: darwin/product-build-darwin.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: false
+ # VSCODE_RUN_INTEGRATION_TESTS: true
+ # VSCODE_RUN_SMOKE_TESTS: false
+ # - job: macOSSmokeTest
+ # displayName: macOS (Smoke Tests)
+ # pool:
+ # vmImage: macOS-11
+ # timeoutInMinutes: 60
+ # variables:
+ # BUILDSECMON_OPT_IN: true
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: darwin/product-build-darwin.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: false
+ # VSCODE_RUN_INTEGRATION_TESTS: false
+ # VSCODE_RUN_SMOKE_TESTS: true
+
+ # - job: WindowsUnitTests
+ # displayName: Windows (Unit Tests)
+ # pool: vscode-1es-vscode-windows-2019
+ # timeoutInMinutes: 60
+ # variables:
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: win32/product-build-win32.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: true
+ # VSCODE_RUN_INTEGRATION_TESTS: false
+ # VSCODE_RUN_SMOKE_TESTS: false
+ # - job: WindowsIntegrationTests
+ # displayName: Windows (Integration Tests)
+ # pool: vscode-1es-vscode-windows-2019
+ # timeoutInMinutes: 60
+ # variables:
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: win32/product-build-win32.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: false
+ # VSCODE_RUN_INTEGRATION_TESTS: true
+ # VSCODE_RUN_SMOKE_TESTS: false
+ # - job: WindowsSmokeTests
+ # displayName: Windows (Smoke Tests)
+ # pool: vscode-1es-vscode-windows-2019
+ # timeoutInMinutes: 60
+ # variables:
+ # VSCODE_ARCH: x64
+ # steps:
+ # - template: win32/product-build-win32.yml
+ # parameters:
+ # VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ # VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ # VSCODE_RUN_UNIT_TESTS: false
+ # VSCODE_RUN_INTEGRATION_TESTS: false
+ # VSCODE_RUN_SMOKE_TESTS: true
diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml
index 3cc4fc399d9..ded4d810b69 100644
--- a/build/azure-pipelines/product-build.yml
+++ b/build/azure-pipelines/product-build.yml
@@ -25,10 +25,10 @@ parameters:
- exploration
- insider
- stable
- - name: ENABLE_TERRAPIN
- displayName: "Enable Terrapin"
- type: boolean
- default: true
+ - name: NPM_REGISTRY
+ displayName: "Custom NPM Registry"
+ type: string
+ default: 'https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/'
- name: VSCODE_BUILD_WIN32
displayName: "đ¯ Windows x64"
type: boolean
@@ -77,6 +77,10 @@ parameters:
displayName: "đ¯ Web"
type: boolean
default: true
+ - name: VSCODE_BUILD_TUNNEL_CLI
+ displayName: "Build Tunnel CLI"
+ type: boolean
+ default: true
- name: VSCODE_PUBLISH
displayName: "Publish to builds.code.visualstudio.com"
type: boolean
@@ -101,16 +105,18 @@ parameters:
variables:
- name: VSCODE_DISTRO_REF
value: ${{ parameters.VSCODE_DISTRO_REF }}
- - name: ENABLE_TERRAPIN
- value: ${{ eq(parameters.ENABLE_TERRAPIN, true) }}
+ - name: NPM_REGISTRY
+ value: ${{ parameters.NPM_REGISTRY }}
- name: VSCODE_QUALITY
value: ${{ parameters.VSCODE_QUALITY }}
- name: VSCODE_BUILD_STAGE_WINDOWS
value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}
- name: VSCODE_BUILD_STAGE_LINUX
- value: ${{ or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true), eq(parameters.VSCODE_BUILD_WEB, true)) }}
+ value: ${{ or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true)) }}
- name: VSCODE_BUILD_STAGE_MACOS
value: ${{ or(eq(parameters.VSCODE_BUILD_MACOS, true), eq(parameters.VSCODE_BUILD_MACOS_ARM64, true)) }}
+ - name: VSCODE_BUILD_STAGE_WEB
+ value: ${{ eq(parameters.VSCODE_BUILD_WEB, true) }}
- name: VSCODE_CIBUILD
value: ${{ in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') }}
- name: VSCODE_PUBLISH
@@ -169,13 +175,147 @@ stages:
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - stage: CompileCLI
+ dependsOn: []
+ jobs:
+ - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true)) }}:
+ - job: LinuxX64
+ pool: vscode-1es-linux
+ steps:
+ - template: ./linux/cli-build-linux.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_LINUX: ${{ parameters.VSCODE_BUILD_LINUX }}
+ VSCODE_BUILD_LINUX_ALPINE: ${{ parameters.VSCODE_BUILD_LINUX_ALPINE }}
+
+ - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true)) }}:
+ - job: LinuxGnuARM
+ pool: vscode-1es-linux
+ steps:
+ - template: ./linux/cli-build-linux.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_LINUX_ARMHF: ${{ parameters.VSCODE_BUILD_LINUX_ARMHF }}
+ VSCODE_BUILD_LINUX_ARM64: ${{ parameters.VSCODE_BUILD_LINUX_ARM64 }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}:
+ - job: LinuxAlpineARM64
+ pool: vscode-1es-linux-20.04-arm64
+ steps:
+ - task: NodeTool@0
+ displayName: Install Node.js
+ inputs:
+ versionSpec: 16.x
+ - script: |
+ set -e
+ npm install -g yarn
+ displayName: Install yarn
+ - template: ./linux/cli-build-linux.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_LINUX_ALPINE_ARM64: ${{ parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64 }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
+ - job: MacOSX64
+ pool:
+ vmImage: macOS-11
+ steps:
+ - template: ./darwin/cli-build-darwin.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
+ - job: MacOSARM64
+ pool:
+ vmImage: macOS-11
+ steps:
+ - template: ./darwin/cli-build-darwin.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
+ - job: WindowsX64
+ pool: vscode-1es-windows
+ steps:
+ - template: ./win32/cli-build-win32.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
+ - job: WindowsARM64
+ pool: vscode-1es-windows
+ steps:
+ - template: ./win32/cli-build-win32.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
+ - job: WindowsX86
+ pool: vscode-1es-windows
+ steps:
+ - template: ./win32/cli-build-win32.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_WIN32_32BIT: ${{ parameters.VSCODE_BUILD_WIN32_32BIT }}
+
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true)) }}:
- stage: Windows
dependsOn:
- Compile
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - CompileCLI
pool: vscode-1es-windows
jobs:
- - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
+ - ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
+ - job: WindowsUnitTests
+ displayName: Unit Tests
+ timeoutInMinutes: 60
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: win32/product-build-win32.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: true
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: WindowsIntegrationTests
+ displayName: Integration Tests
+ timeoutInMinutes: 60
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: win32/product-build-win32.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: true
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: WindowsSmokeTests
+ displayName: Smoke Tests
+ timeoutInMinutes: 60
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: win32/product-build-win32.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: true
+
+ - ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32, true)) }}:
- job: Windows
timeoutInMinutes: 120
variables:
@@ -183,7 +323,12 @@ stages:
steps:
- template: win32/product-build-win32.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true)) }}:
- job: Windows32
@@ -193,7 +338,12 @@ stages:
steps:
- template: win32/product-build-win32.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
- job: WindowsARM64
@@ -203,7 +353,22 @@ stages:
steps:
- template: win32/product-build-win32.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+
+ - ${{ if and(eq(variables['VSCODE_PUBLISH'], true), eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true)) }}:
+ - job: windowsCLISign
+ timeoutInMinutes: 90
+ steps:
+ - template: win32/product-build-win32-cli-sign.yml
+ parameters:
+ VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }}
+ VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
+ VSCODE_BUILD_WIN32_32BIT: ${{ parameters.VSCODE_BUILD_WIN32_32BIT }}
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_LINUX'], true)) }}:
- stage: LinuxServerDependencies
@@ -235,9 +400,61 @@ stages:
dependsOn:
- Compile
- LinuxServerDependencies
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - CompileCLI
pool: vscode-1es-linux
jobs:
- - ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
+ - ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
+ - job: Linuxx64UnitTest
+ displayName: Unit Tests
+ container: vscode-bionic-x64
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: true
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: Linuxx64IntegrationTest
+ displayName: Integration Tests
+ container: vscode-bionic-x64
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: true
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: Linuxx64SmokeTest
+ displayName: Smoke Tests
+ container: vscode-bionic-x64
+ variables:
+ VSCODE_ARCH: x64
+ NPM_ARCH: x64
+ DISPLAY: ":10"
+ steps:
+ - template: linux/product-build-linux-client.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: true
+
+ - ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_LINUX, true)) }}:
- job: Linuxx64
container: vscode-bionic-x64
variables:
@@ -247,7 +464,12 @@ stages:
steps:
- template: linux/product-build-linux-client.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_LINUX, true), ne(variables['VSCODE_PUBLISH'], 'false')) }}:
- job: LinuxSnap
@@ -268,7 +490,12 @@ stages:
steps:
- template: linux/product-build-linux-client.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
# TODO@joaomoreno: We don't ship ARM snaps for now
- ${{ if and(false, eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true)) }}:
@@ -290,7 +517,12 @@ stages:
steps:
- template: linux/product-build-linux-client.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
# TODO@joaomoreno: We don't ship ARM snaps for now
- ${{ if and(false, eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true)) }}:
@@ -318,39 +550,92 @@ stages:
steps:
- template: linux/product-build-alpine.yml
- - ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WEB, true)) }}:
- - job: LinuxWeb
- variables:
- VSCODE_ARCH: x64
- steps:
- - template: web/product-build-web.yml
-
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_MACOS'], true)) }}:
- stage: macOS
dependsOn:
- Compile
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - CompileCLI
pool:
- vmImage: macOS-latest
+ vmImage: macOS-11
variables:
BUILDSECMON_OPT_IN: true
jobs:
- - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
- - job: macOSTest
+ - ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
+ - job: macOSUnitTest
+ displayName: Unit Tests
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
steps:
- - template: darwin/product-build-darwin-test.yml
+ - template: darwin/product-build-darwin.yml
parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: true
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: macOSIntegrationTest
+ displayName: Integration Tests
+ timeoutInMinutes: 90
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: darwin/product-build-darwin.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: true
+ VSCODE_RUN_SMOKE_TESTS: false
+ - job: macOSSmokeTest
+ displayName: Smoke Tests
+ timeoutInMinutes: 90
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: darwin/product-build-darwin.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: true
- - ${{ if eq(variables['VSCODE_CIBUILD'], false) }}:
- - job: macOS
+ - ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_MACOS, true)) }}:
+ - job: macOS
+ timeoutInMinutes: 90
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: darwin/product-build-darwin.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+
+ - ${{ if eq(parameters.VSCODE_STEP_ON_IT, false) }}:
+ - job: macOSTest
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
steps:
- template: darwin/product-build-darwin.yml
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: false
+ VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+
+ - ${{ if eq(variables['VSCODE_PUBLISH'], true) }}:
- job: macOSSign
dependsOn:
- macOS
@@ -360,6 +645,15 @@ stages:
steps:
- template: darwin/product-build-darwin-sign.yml
+ - ${{ if and(eq(variables['VSCODE_PUBLISH'], true), eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true)) }}:
+ - job: macOSCLISign
+ timeoutInMinutes: 90
+ steps:
+ - template: darwin/product-build-darwin-cli-sign.yml
+ parameters:
+ VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }}
+ VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }}
+
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_MACOS_ARM64, true)) }}:
- job: macOSARM64
timeoutInMinutes: 90
@@ -367,7 +661,15 @@ stages:
VSCODE_ARCH: arm64
steps:
- template: darwin/product-build-darwin.yml
- - ${{ if eq(variables['VSCODE_CIBUILD'], false) }}:
+ parameters:
+ VSCODE_PUBLISH: ${{ variables.VSCODE_PUBLISH }}
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+ VSCODE_BUILD_TUNNEL_CLI: ${{ parameters.VSCODE_BUILD_TUNNEL_CLI }}
+ VSCODE_RUN_UNIT_TESTS: false
+ VSCODE_RUN_INTEGRATION_TESTS: false
+ VSCODE_RUN_SMOKE_TESTS: false
+
+ - ${{ if eq(variables['VSCODE_PUBLISH'], true) }}:
- job: macOSARM64Sign
dependsOn:
- macOSARM64
@@ -387,7 +689,8 @@ stages:
VSCODE_ARCH: universal
steps:
- template: darwin/product-build-darwin-universal.yml
- - ${{ if eq(variables['VSCODE_CIBUILD'], false) }}:
+
+ - ${{ if eq(variables['VSCODE_PUBLISH'], true) }}:
- job: macOSUniversalSign
dependsOn:
- macOSUniversal
@@ -397,6 +700,19 @@ stages:
steps:
- template: darwin/product-build-darwin-sign.yml
+ - ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WEB'], true)) }}:
+ - stage: Web
+ dependsOn:
+ - Compile
+ pool: vscode-1es-linux
+ jobs:
+ - ${{ if eq(parameters.VSCODE_BUILD_WEB, true) }}:
+ - job: Web
+ variables:
+ VSCODE_ARCH: x64
+ steps:
+ - template: web/product-build-web.yml
+
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), ne(variables['VSCODE_PUBLISH'], 'false')) }}:
- stage: Publish
dependsOn:
@@ -412,13 +728,33 @@ stages:
steps:
- template: product-publish.yml
+ - ${{ if and(parameters.VSCODE_RELEASE, eq(parameters.VSCODE_DISTRO_REF, ' ')) }}:
+ - stage: ApproveRelease
+ dependsOn: [] # run in parallel to compile stage
+ pool: vscode-1es-linux
+ jobs:
+ - deployment: ApproveRelease
+ displayName: "Approve Release"
+ environment: "vscode"
+ variables:
+ skipComponentGovernanceDetection: true
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - checkout: none
+
- ${{ if or(and(parameters.VSCODE_RELEASE, eq(parameters.VSCODE_DISTRO_REF, ' ')), and(in(parameters.VSCODE_QUALITY, 'insider', 'exploration'), eq(variables['VSCODE_SCHEDULEDBUILD'], true))) }}:
- stage: Release
dependsOn:
- Publish
+ - ${{ if and(parameters.VSCODE_RELEASE, eq(parameters.VSCODE_DISTRO_REF, ' ')) }}:
+ - ApproveRelease
pool: vscode-1es-linux
jobs:
- job: ReleaseBuild
displayName: Release Build
steps:
- template: product-release.yml
+ parameters:
+ VSCODE_RELEASE: ${{ parameters.VSCODE_RELEASE }}
diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml
index 1fd9b0441de..9da22cba292 100644
--- a/build/azure-pipelines/product-compile.yml
+++ b/build/azure-pipelines/product-compile.yml
@@ -7,45 +7,18 @@ steps:
inputs:
versionSpec: "16.x"
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password"
+ - template: ./mixin-distro-posix.yml
+ parameters:
+ VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- cat << EOF > ~/.netrc
- machine github.com
- login vscode
- password $(github-distro-mixin-password)
- EOF
-
- git config user.email "vscode@microsoft.com"
- git config user.name "VSCode"
- displayName: Prepare tooling
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $VSCODE_DISTRO_REF
- echo "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- git checkout FETCH_HEAD
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
-
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
- displayName: Merge distro
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
# using `genericNodeModules` instead of `nodeModules` here to avoid sharing the cache with builds running inside containers
@@ -56,6 +29,13 @@ steps:
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ # Cache built-in extensions to avoid GH rate limits.
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
@@ -64,11 +44,17 @@ steps:
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- script: |
set -e
@@ -79,7 +65,7 @@ steps:
- script: |
set -e
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -94,6 +80,13 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
@@ -103,75 +96,85 @@ steps:
displayName: Create node_modules archive
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- # Mixin must run before optimize, because the CSS loader will inline small SVGs
- - script: |
- set -e
- node build/azure-pipelines/mixin
- displayName: Mix in quality
+ # Mixin must run before optimize, because the CSS loader will inline small SVGs
+ - script: |
+ set -e
+ node build/azure-pipelines/mixin
+ displayName: Mix in quality
- 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
- - script: |
- set -e
- yarn --cwd test/smoke compile
- yarn --cwd test/integration/browser compile
- displayName: Compile test suites
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
+ - ${{ 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') }}:
- - task: AzureCLI@2
- inputs:
- azureSubscription: "vscode-builds-subscription"
- scriptType: pscore
- scriptLocation: inlineScript
- addSpnToEnvironment: true
- inlineScript: |
- Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
- Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
- Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"
+ - script: |
+ set -e
+ yarn --cwd test/smoke compile
+ yarn --cwd test/integration/browser compile
+ displayName: Compile test suites
+ condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- AZURE_STORAGE_ACCOUNT="ticino" \
- AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
- AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
- AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
- node build/azure-pipelines/upload-sourcemaps
- displayName: Upload sourcemaps
+ - task: AzureCLI@2
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ scriptType: pscore
+ scriptLocation: inlineScript
+ addSpnToEnvironment: true
+ inlineScript: |
+ Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
+ Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
+ Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -
- ./build/azure-pipelines/common/extract-telemetry.sh
- displayName: Extract Telemetry
-
- - script: |
- set -e
- tar -cz --ignore-failed-read -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out
- displayName: Compress compilation artifact
-
- - task: PublishPipelineArtifact@1
- inputs:
- targetPath: $(Build.ArtifactStagingDirectory)/compilation.tar.gz
- artifactName: Compilation
- displayName: Publish compilation artifact
+ - script: |
+ set -e
+ AZURE_STORAGE_ACCOUNT="ticino" \
+ AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
+ AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
+ AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
+ node build/azure-pipelines/upload-sourcemaps
+ displayName: Upload sourcemaps
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - script: |
- set -e
- VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
- yarn download-builtin-extensions-cg
- displayName: Built-in extensions component details
+ - script: |
+ set -
+ ./build/azure-pipelines/common/extract-telemetry.sh
+ displayName: Extract Telemetry
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
- displayName: "Component Detection"
- inputs:
- sourceScanPath: $(Build.SourcesDirectory)
- continueOnError: true
+ - script: |
+ set -e
+ tar -cz --ignore-failed-read -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out
+ displayName: Compress compilation artifact
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: PublishPipelineArtifact@1
+ inputs:
+ targetPath: $(Build.ArtifactStagingDirectory)/compilation.tar.gz
+ artifactName: Compilation
+ displayName: Publish compilation artifact
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - script: |
+ set -e
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ yarn download-builtin-extensions-cg
+ displayName: Built-in extensions component details
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
+ displayName: "Component Detection"
+ inputs:
+ sourceScanPath: $(Build.SourcesDirectory)
+ continueOnError: true
diff --git a/build/azure-pipelines/product-publish.ps1 b/build/azure-pipelines/product-publish.ps1
index 5abfed48dca..4e47d7d6cb2 100644
--- a/build/azure-pipelines/product-publish.ps1
+++ b/build/azure-pipelines/product-publish.ps1
@@ -46,6 +46,7 @@ $stages = @(
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
+ if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
)
do {
@@ -61,12 +62,15 @@ do {
if($set.Add($artifactName)) {
Write-Host "Processing artifact: '$artifactName. Downloading from: $($_.resource.downloadUrl)"
+ $extractPath = "$env:AGENT_TEMPDIRECTORY/$artifactName.zip"
try {
- Invoke-RestMethod $_.resource.downloadUrl -OutFile "$env:AGENT_TEMPDIRECTORY/$artifactName.zip" -Headers @{
+ Invoke-RestMethod $_.resource.downloadUrl -OutFile $extractPath -Headers @{
Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"
- } -MaximumRetryCount 5 -RetryIntervalSec 1 | Out-Null
+ } -MaximumRetryCount 5 -RetryIntervalSec 1 -TimeoutSec 300 | Out-Null
- Expand-Archive -Path "$env:AGENT_TEMPDIRECTORY/$artifactName.zip" -DestinationPath $env:AGENT_TEMPDIRECTORY | Out-Null
+ Write-Host "Extracting artifact: '$extractPath'"
+
+ Expand-Archive -Path $extractPath -DestinationPath $env:AGENT_TEMPDIRECTORY | Out-Null
} catch {
Write-Warning $_
$set.Remove($artifactName) | Out-Null
@@ -75,6 +79,13 @@ do {
$null,$product,$os,$arch,$type = $artifactName -split '_'
$asset = Get-ChildItem -rec "$env:AGENT_TEMPDIRECTORY/$artifactName"
+
+ if ($asset.Size -ne $_.resource.properties.artifactsize) {
+ Write-Warning "Artifact size mismatch for '$artifactName'. Expected: $($_.resource.properties.artifactsize). Actual: $($asset.Size)"
+ $set.Remove($artifactName) | Out-Null
+ continue
+ }
+
Write-Host "Processing artifact with the following values:"
# turning in into an object just to log nicely
@{
diff --git a/build/azure-pipelines/product-publish.yml b/build/azure-pipelines/product-publish.yml
index 4d711aba120..80076fd666d 100644
--- a/build/azure-pipelines/product-publish.yml
+++ b/build/azure-pipelines/product-publish.yml
@@ -109,6 +109,7 @@ steps:
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
+ if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
)
Write-Host "Stages to check: $stages"
diff --git a/build/azure-pipelines/product-release.yml b/build/azure-pipelines/product-release.yml
index a1086945595..8be900a9b41 100644
--- a/build/azure-pipelines/product-release.yml
+++ b/build/azure-pipelines/product-release.yml
@@ -1,3 +1,7 @@
+parameters:
+ - name: VSCODE_RELEASE
+ type: boolean
+
steps:
- task: NodeTool@0
inputs:
@@ -20,4 +24,4 @@ steps:
AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
- node build/azure-pipelines/common/releaseBuild.js
+ node build/azure-pipelines/common/releaseBuild.js ${{ parameters.VSCODE_RELEASE }}
diff --git a/build/azure-pipelines/publish-types/check-version.js b/build/azure-pipelines/publish-types/check-version.js
index b45ad3f4cc0..34779085a79 100644
--- a/build/azure-pipelines/publish-types/check-version.js
+++ b/build/azure-pipelines/publish-types/check-version.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const cp = require("child_process");
let tag = '';
diff --git a/build/azure-pipelines/publish-types/check-version.ts b/build/azure-pipelines/publish-types/check-version.ts
index 137e535353a..35c5a511593 100644
--- a/build/azure-pipelines/publish-types/check-version.ts
+++ b/build/azure-pipelines/publish-types/check-version.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as cp from 'child_process';
let tag = '';
diff --git a/build/azure-pipelines/publish-types/update-types.js b/build/azure-pipelines/publish-types/update-types.js
index e22911b8470..facece095c3 100644
--- a/build/azure-pipelines/publish-types/update-types.js
+++ b/build/azure-pipelines/publish-types/update-types.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const cp = require("child_process");
diff --git a/build/azure-pipelines/publish-types/update-types.ts b/build/azure-pipelines/publish-types/update-types.ts
index 7ccd976dba5..a727647e64a 100644
--- a/build/azure-pipelines/publish-types/update-types.ts
+++ b/build/azure-pipelines/publish-types/update-types.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as fs from 'fs';
import * as cp from 'child_process';
import * as path from 'path';
diff --git a/build/azure-pipelines/sdl-scan.yml b/build/azure-pipelines/sdl-scan.yml
index f6a44d4862b..460283240e8 100644
--- a/build/azure-pipelines/sdl-scan.yml
+++ b/build/azure-pipelines/sdl-scan.yml
@@ -2,10 +2,10 @@ trigger: none
pr: none
parameters:
- - name: ENABLE_TERRAPIN
- displayName: "Enable Terrapin"
- type: boolean
- default: true
+ - name: NPM_REGISTRY
+ displayName: "Custom NPM Registry"
+ type: string
+ default: "https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/"
- name: SCAN_WINDOWS
displayName: "Scan Windows"
type: boolean
@@ -16,8 +16,8 @@ parameters:
default: false
variables:
- - name: ENABLE_TERRAPIN
- value: ${{ eq(parameters.ENABLE_TERRAPIN, true) }}
+ - name: NPM_REGISTRY
+ value: ${{ parameters.NPM_REGISTRY }}
- name: SCAN_WINDOWS
value: ${{ eq(parameters.SCAN_WINDOWS, true) }}
- name: SCAN_LINUX
@@ -83,11 +83,24 @@ stages:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- exec { npx https://aka.ms/enablesecurefeed standAlone }
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
+ exec { npm config set always-auth=true --location=project }
+ exec { yarn config set registry "$env:NPM_REGISTRY" }
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/setup-npm-registry.js $env:NPM_REGISTRY }
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- task: Semmle@1
inputs:
@@ -184,15 +197,25 @@ stages:
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
+
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
- script: |
set -e
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -225,7 +248,7 @@ stages:
export VSCODE_REMOTE_CXX=$(which g++)
fi
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
diff --git a/build/azure-pipelines/upload-cdn.js b/build/azure-pipelines/upload-cdn.js
index 1bd3ed6f5fd..5a410547456 100644
--- a/build/azure-pipelines/upload-cdn.js
+++ b/build/azure-pipelines/upload-cdn.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const es = require("event-stream");
const Vinyl = require("vinyl");
diff --git a/build/azure-pipelines/upload-cdn.ts b/build/azure-pipelines/upload-cdn.ts
index 9ac656e7c26..ddb03c1e839 100644
--- a/build/azure-pipelines/upload-cdn.ts
+++ b/build/azure-pipelines/upload-cdn.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as es from 'event-stream';
import * as Vinyl from 'vinyl';
import * as vfs from 'vinyl-fs';
diff --git a/build/azure-pipelines/upload-configuration.js b/build/azure-pipelines/upload-configuration.js
index 8be7f4492cc..7ee4c8370ce 100644
--- a/build/azure-pipelines/upload-configuration.js
+++ b/build/azure-pipelines/upload-configuration.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSettingsSearchBuildId = exports.shouldSetupSettingsSearch = void 0;
const path = require("path");
@@ -52,7 +52,7 @@ function generateVSCodeConfigurationTask() {
const timer = setTimeout(() => {
codeProc.kill();
reject(new Error('export-default-configuration process timed out'));
- }, 30 * 1000);
+ }, 60 * 1000);
codeProc.on('error', err => {
clearTimeout(timer);
reject(err);
diff --git a/build/azure-pipelines/upload-configuration.ts b/build/azure-pipelines/upload-configuration.ts
index 49bc00fc46f..1455cfca78f 100644
--- a/build/azure-pipelines/upload-configuration.ts
+++ b/build/azure-pipelines/upload-configuration.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as path from 'path';
import * as os from 'os';
import * as cp from 'child_process';
@@ -63,7 +61,7 @@ function generateVSCodeConfigurationTask(): Promise {
const timer = setTimeout(() => {
codeProc.kill();
reject(new Error('export-default-configuration process timed out'));
- }, 30 * 1000);
+ }, 60 * 1000);
codeProc.on('error', err => {
clearTimeout(timer);
diff --git a/build/azure-pipelines/upload-nlsmetadata.js b/build/azure-pipelines/upload-nlsmetadata.js
index a17b8e71267..c92cd277d85 100644
--- a/build/azure-pipelines/upload-nlsmetadata.js
+++ b/build/azure-pipelines/upload-nlsmetadata.js
@@ -1,14 +1,16 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const es = require("event-stream");
const vfs = require("vinyl-fs");
const merge = require("gulp-merge-json");
const gzip = require("gulp-gzip");
const identity_1 = require("@azure/identity");
+const path = require("path");
+const fs_1 = require("fs");
const azure = require('gulp-azure-storage');
const commit = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
const credential = new identity_1.ClientSecretCredential(process.env['AZURE_TENANT_ID'], process.env['AZURE_CLIENT_ID'], process.env['AZURE_CLIENT_SECRET']);
@@ -18,8 +20,8 @@ function main() {
.pipe(merge({
fileName: 'combined.nls.metadata.json',
jsonSpace: '',
+ concatArrays: true,
edit: (parsedJson, file) => {
- let key;
if (file.base === 'out-vscode-web-min') {
return { vscode: parsedJson };
}
@@ -63,7 +65,11 @@ function main() {
break;
}
}
- key = 'vscode.' + file.relative.split('/')[0];
+ // Get extension id and use that as the key
+ const folderPath = path.join(file.base, file.relative.split('/')[0]);
+ const manifest = (0, fs_1.readFileSync)(path.join(folderPath, 'package.json'), 'utf-8');
+ const manifestJson = JSON.parse(manifest);
+ const key = manifestJson.publisher + '.' + manifestJson.name;
return { [key]: parsedJson };
},
}))
diff --git a/build/azure-pipelines/upload-nlsmetadata.ts b/build/azure-pipelines/upload-nlsmetadata.ts
index f1d5b5f4d8b..4749e1f9605 100644
--- a/build/azure-pipelines/upload-nlsmetadata.ts
+++ b/build/azure-pipelines/upload-nlsmetadata.ts
@@ -3,14 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as es from 'event-stream';
import * as Vinyl from 'vinyl';
import * as vfs from 'vinyl-fs';
import * as merge from 'gulp-merge-json';
import * as gzip from 'gulp-gzip';
import { ClientSecretCredential } from '@azure/identity';
+import path = require('path');
+import { readFileSync } from 'fs';
const azure = require('gulp-azure-storage');
const commit = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
@@ -33,8 +33,8 @@ function main(): Promise {
.pipe(merge({
fileName: 'combined.nls.metadata.json',
jsonSpace: '',
+ concatArrays: true,
edit: (parsedJson, file) => {
- let key;
if (file.base === 'out-vscode-web-min') {
return { vscode: parsedJson };
}
@@ -82,7 +82,12 @@ function main(): Promise {
break;
}
}
- key = 'vscode.' + file.relative.split('/')[0];
+
+ // Get extension id and use that as the key
+ const folderPath = path.join(file.base, file.relative.split('/')[0]);
+ const manifest = readFileSync(path.join(folderPath, 'package.json'), 'utf-8');
+ const manifestJson = JSON.parse(manifest);
+ const key = manifestJson.publisher + '.' + manifestJson.name;
return { [key]: parsedJson };
},
}))
@@ -113,4 +118,3 @@ main().catch(err => {
console.error(err);
process.exit(1);
});
-
diff --git a/build/azure-pipelines/upload-sourcemaps.js b/build/azure-pipelines/upload-sourcemaps.js
index 22e3e28290d..b852cb958eb 100644
--- a/build/azure-pipelines/upload-sourcemaps.js
+++ b/build/azure-pipelines/upload-sourcemaps.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const es = require("event-stream");
diff --git a/build/azure-pipelines/upload-sourcemaps.ts b/build/azure-pipelines/upload-sourcemaps.ts
index e78e783c064..1f76c4c73f4 100644
--- a/build/azure-pipelines/upload-sourcemaps.ts
+++ b/build/azure-pipelines/upload-sourcemaps.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as path from 'path';
import * as es from 'event-stream';
import * as Vinyl from 'vinyl';
diff --git a/build/azure-pipelines/web/product-build-web.yml b/build/azure-pipelines/web/product-build-web.yml
index fa07a82305d..092b3a13aff 100644
--- a/build/azure-pipelines/web/product-build-web.yml
+++ b/build/azure-pipelines/web/product-build-web.yml
@@ -46,9 +46,14 @@ steps:
git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
displayName: Merge distro
+ - script: node build/setup-npm-registry.js $NPM_REGISTRY
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
- script: |
mkdir -p .build
- node build/azure-pipelines/common/computeNodeModulesCacheKey.js "web" $ENABLE_TERRAPIN > .build/yarnlockhash
+ node build/azure-pipelines/common/computeNodeModulesCacheKey.js "web" > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
- task: Cache@2
@@ -58,6 +63,12 @@ steps:
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
@@ -66,15 +77,21 @@ steps:
- script: |
set -e
- npx https://aka.ms/enablesecurefeed standAlone
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ npm config set registry "$NPM_REGISTRY" --location=project
+ npm config set always-auth=true --location=project
+ yarn config set registry "$NPM_REGISTRY"
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- script: |
set -e
- for i in {1..3}; do # try 3 times, for Terrapin
+ for i in {1..3}; do # try 3 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
@@ -89,6 +106,13 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ - script: |
+ set -e
+ node build/lib/builtInExtensions.js
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
@@ -163,6 +187,7 @@ steps:
cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME
displayName: Prepare for publish
+ condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
- publish: $(Agent.BuildDirectory)/vscode-web.tar.gz
artifact: vscode_web_linux_standalone_archive-unsigned
diff --git a/build/azure-pipelines/win32/cli-build-win32.yml b/build/azure-pipelines/win32/cli-build-win32.yml
new file mode 100644
index 00000000000..d581591730a
--- /dev/null
+++ b/build/azure-pipelines/win32/cli-build-win32.yml
@@ -0,0 +1,83 @@
+parameters:
+ - name: VSCODE_BUILD_WIN32
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_WIN32_32BIT
+ type: boolean
+ default: false
+ - name: VSCODE_BUILD_WIN32_ARM64
+ type: boolean
+ default: false
+ - name: VSCODE_QUALITY
+ type: string
+ - name: channel
+ type: string
+ default: stable
+
+steps:
+ - task: Npm@1
+ displayName: Download openssl prebuilt
+ inputs:
+ command: custom
+ customCommand: pack @vscode-internal/openssl-prebuilt@0.0.1
+ customRegistry: useFeed
+ customFeed: 'Monaco/openssl-prebuilt'
+ workingDir: $(Build.ArtifactStagingDirectory)
+
+ - powershell: |
+ mkdir $(Build.ArtifactStagingDirectory)/openssl
+ tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.1.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
+ displayName: Extract openssl prebuilt
+
+ - task: NodeTool@0
+ inputs:
+ versionSpec: "16.x"
+
+ - template: ../mixin-distro-win32.yml
+ parameters:
+ VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/azure-pipelines/cli/prepare.js }
+ displayName: Prepare CLI build
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+
+ - template: ../cli/install-rust-win32.yml
+ parameters:
+ targets:
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
+ - x86_64-pc-windows-msvc
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
+ - aarch64-pc-windows-msvc
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
+ - i686-pc-windows-msvc
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: x86_64-pc-windows-msvc
+ VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_x64_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: aarch64-pc-windows-msvc
+ VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_arm64_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/include
+
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
+ - template: ../cli/cli-compile-and-publish.yml
+ parameters:
+ VSCODE_CLI_TARGET: i686-pc-windows-msvc
+ VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_ia32_cli
+ VSCODE_CLI_ENV:
+ OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/lib
+ OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/include
diff --git a/build/azure-pipelines/win32/product-build-win32-cli-sign.yml b/build/azure-pipelines/win32/product-build-win32-cli-sign.yml
new file mode 100644
index 00000000000..b3e7cf3764a
--- /dev/null
+++ b/build/azure-pipelines/win32/product-build-win32-cli-sign.yml
@@ -0,0 +1,29 @@
+parameters:
+ - name: VSCODE_BUILD_WIN32
+ type: boolean
+ - name: VSCODE_BUILD_WIN32_ARM64
+ type: boolean
+ - name: VSCODE_BUILD_WIN32_32BIT
+ type: boolean
+
+steps:
+ - task: NodeTool@0
+ displayName: "Use Node.js"
+ inputs:
+ versionSpec: "16.x"
+
+ - pwsh: |
+ . build/azure-pipelines/win32/exec.ps1
+ cd build
+ exec { yarn }
+ displayName: Install build dependencies
+
+ - template: ../cli/cli-win32-sign.yml
+ parameters:
+ VSCODE_CLI_ARTIFACTS:
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
+ - unsigned_vscode_cli_win32_x64_cli
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
+ - unsigned_vscode_cli_win32_arm64_cli
+ - ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
+ - unsigned_vscode_cli_win32_ia32_cli
diff --git a/build/azure-pipelines/win32/product-build-win32-test.yml b/build/azure-pipelines/win32/product-build-win32-test.yml
new file mode 100644
index 00000000000..9a17a88bca7
--- /dev/null
+++ b/build/azure-pipelines/win32/product-build-win32-test.yml
@@ -0,0 +1,251 @@
+parameters:
+ - name: VSCODE_QUALITY
+ type: string
+ - name: VSCODE_RUN_UNIT_TESTS
+ type: boolean
+ - name: VSCODE_RUN_INTEGRATION_TESTS
+ type: boolean
+ - name: VSCODE_RUN_SMOKE_TESTS
+ type: boolean
+
+steps:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ exec { yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install" }
+ displayName: Download Electron and Playwright
+
+ - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn electron $(VSCODE_ARCH) }
+ exec { .\scripts\test.bat --tfs "Unit Tests" }
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn test-node }
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node test/unit/browser/index.js --sequential --browser chromium --tfs "Browser Unit Tests" }
+ displayName: Run unit tests (Browser, Chromium)
+ timeoutInMinutes: 20
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn electron $(VSCODE_ARCH) }
+ exec { .\scripts\test.bat --build --tfs "Unit Tests" }
+ displayName: Run unit tests (Electron)
+ timeoutInMinutes: 15
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn test-node --build }
+ displayName: Run unit tests (node.js)
+ timeoutInMinutes: 15
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn test-browser-no-install --sequential --build --browser chromium --tfs "Browser Unit Tests" }
+ displayName: Run unit tests (Browser, Chromium)
+ timeoutInMinutes: 20
+
+ - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn gulp `
+ compile-extension:configuration-editing `
+ compile-extension:css-language-features-server `
+ compile-extension:emmet `
+ compile-extension:git `
+ compile-extension:github-authentication `
+ compile-extension:html-language-features-server `
+ compile-extension:ipynb `
+ compile-extension:json-language-features-server `
+ compile-extension:markdown-language-features-server `
+ compile-extension:markdown-language-features `
+ compile-extension-media `
+ compile-extension:microsoft-authentication `
+ compile-extension:typescript-language-features `
+ compile-extension:vscode-api-tests `
+ compile-extension:vscode-colorize-tests `
+ compile-extension:vscode-test-resolver `
+ }
+ displayName: Build integration tests
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { .\scripts\test-integration.bat --tfs "Integration Tests" }
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { .\scripts\test-web-integration.bat --browser firefox }
+ displayName: Run integration tests (Browser, Firefox)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { .\scripts\test-remote-integration.bat }
+ displayName: Run integration tests (Remote)
+ timeoutInMinutes: 20
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ # Figure out the full absolute path of the product we just built
+ # including the remote server and configure the integration tests
+ # to run with these builds instead of running out of sources.
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
+ $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
+ $AppNameShort = $AppProductJson.nameShort
+ exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
+ displayName: Run integration tests (Electron)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\scripts\test-web-integration.bat --browser firefox }
+ displayName: Run integration tests (Browser, Firefox)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
+ $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
+ $AppNameShort = $AppProductJson.nameShort
+ exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-remote-integration.bat }
+ displayName: Run integration tests (Remote)
+ timeoutInMinutes: 20
+
+ - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ exec {.\build\azure-pipelines\win32\listprocesses.bat }
+ displayName: Diagnostics before smoke test run
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn --cwd test/smoke compile }
+ displayName: Compile smoke tests
+
+ - script: |
+ set -e
+ yarn gulp compile-extension-media
+ displayName: Build extensions for smoke tests
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn smoketest-no-compile --tracing }
+ displayName: Run smoke tests (Electron)
+ timeoutInMinutes: 20
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
+ exec { yarn smoketest-no-compile --tracing --build "$AppRoot" }
+ displayName: Run smoke tests (Electron)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"
+ exec { yarn smoketest-no-compile --web --tracing --headless }
+ displayName: Run smoke tests (Browser, Chromium)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
+ $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
+ exec { yarn gulp compile-extension:vscode-test-resolver }
+ exec { yarn smoketest-no-compile --tracing --remote --build "$AppRoot" }
+ displayName: Run smoke tests (Remote)
+ timeoutInMinutes: 20
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ exec {.\build\azure-pipelines\win32\listprocesses.bat }
+ displayName: Diagnostics after smoke test run
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build\crashes
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: crash-dump-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: crash-dump-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: crash-dump-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Crash Reports"
+ continueOnError: true
+ condition: failed()
+
+ # In order to properly symbolify above crash reports
+ # (if any), we need the compiled native modules too
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: node_modules
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: node-modules-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: node-modules-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: node-modules-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Node Modules"
+ continueOnError: true
+ condition: failed()
+
+ - task: PublishPipelineArtifact@0
+ inputs:
+ targetPath: .build\logs
+ ${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
+ artifactName: logs-windows-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
+ ${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ artifactName: logs-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
+ ${{ else }}:
+ artifactName: logs-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
+ displayName: "Publish Log Files"
+ continueOnError: true
+ condition: succeededOrFailed()
+
+ - task: PublishTestResults@2
+ displayName: Publish Tests Results
+ inputs:
+ testResultsFiles: "*-results.xml"
+ searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
+ condition: succeededOrFailed()
diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml
index 7501869b57d..9f62ea0a0c3 100644
--- a/build/azure-pipelines/win32/product-build-win32.yml
+++ b/build/azure-pipelines/win32/product-build-win32.yml
@@ -1,17 +1,23 @@
parameters:
+ - name: VSCODE_PUBLISH
+ type: boolean
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_UNIT_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_INTEGRATION_TESTS
type: boolean
- default: true
- name: VSCODE_RUN_SMOKE_TESTS
type: boolean
- default: true
+ - name: VSCODE_BUILD_TUNNEL_CLI
+ type: boolean
steps:
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - checkout: self
+ fetchDepth: 1
+ retryCountOnTaskFailure: 3
+
- task: NodeTool@0
inputs:
versionSpec: "16.x"
@@ -22,66 +28,82 @@ steps:
addToPath: true
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureKeyVault@1
- displayName: "Azure Key Vault: Get Secrets"
- inputs:
- azureSubscription: "vscode-builds-subscription"
- KeyVaultName: vscode
- SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifact: Compilation
- path: $(Build.ArtifactStagingDirectory)
- displayName: Download compilation output
-
- - task: ExtractFiles@1
- displayName: Extract compilation output
- inputs:
- archiveFilePatterns: "$(Build.ArtifactStagingDirectory)/compilation.tar.gz"
- cleanDestinationFolder: false
+ - task: AzureKeyVault@1
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "vscode-builds-subscription"
+ KeyVaultName: vscode
+ SecretsFilter: "github-distro-mixin-password,ESRP-PKI,esrp-aad-username,esrp-aad-password"
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- "machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
-
- exec { git config user.email "vscode@microsoft.com" }
- exec { git config user.name "VSCode" }
- displayName: Prepare tooling
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: Compilation
+ path: $(Build.ArtifactStagingDirectory)
+ displayName: Download compilation output
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
-
- exec { git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $(VSCODE_DISTRO_REF) }
- Write-Host "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
- exec { git checkout FETCH_HEAD }
- condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
- displayName: Checkout override commit
+ - task: ExtractFiles@1
+ displayName: Extract compilation output
+ inputs:
+ archiveFilePatterns: "$(Build.ArtifactStagingDirectory)/compilation.tar.gz"
+ cleanDestinationFolder: false
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro") }
- displayName: Merge distro
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ "machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
+
+ exec { git config user.email "vscode@microsoft.com" }
+ exec { git config user.name "VSCode" }
+ displayName: Prepare tooling
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+
+ exec { git fetch https://github.com/$(VSCODE_MIXIN_REPO).git $(VSCODE_DISTRO_REF) }
+ Write-Host "##vso[task.setvariable variable=VSCODE_DISTRO_COMMIT;]$(git rev-parse FETCH_HEAD)"
+ exec { git checkout FETCH_HEAD }
+ condition: and(succeeded(), ne(variables.VSCODE_DISTRO_REF, ' '))
+ displayName: Checkout override commit
+
+ - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro") }
+ displayName: Merge distro
- powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/setup-npm-registry.js $env:NPM_REGISTRY }
+ condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Registry
+
+ - powershell: |
+ if (!(Test-Path ".build")) { New-Item -Path ".build" -ItemType Directory }
"$(VSCODE_ARCH)" | Out-File -Encoding ascii -NoNewLine .build\arch
- "$env:ENABLE_TERRAPIN" | Out-File -Encoding ascii -NoNewLine .build\terrapin
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
+ node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js > .build/builtindepshash
displayName: Prepare yarn cache flags
- task: Cache@2
inputs:
- key: "nodeModules | $(Agent.OS) | .build/arch, .build/terrapin, .build/yarnlockhash"
+ key: "nodeModules | $(Agent.OS) | .build/arch, .build/yarnlockhash"
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
+ - task: Cache@2
+ inputs:
+ key: '"builtInDeps" | .build/builtindepshash'
+ path: .build/builtInExtensions
+ displayName: Restore built-in extensions
+
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
@@ -92,11 +114,17 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- exec { npx https://aka.ms/enablesecurefeed standAlone }
- timeoutInMinutes: 5
- retryCountOnTaskFailure: 3
- condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
- displayName: Switch to Terrapin packages
+ exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
+ exec { npm config set always-auth=true --location=project }
+ exec { yarn config set registry "$env:NPM_REGISTRY" }
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM & Yarn
+
+ - task: npmAuthenticate@0
+ inputs:
+ workingFile: .npmrc
+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
+ displayName: Setup NPM Authentication
- powershell: |
. build/azure-pipelines/win32/exec.ps1
@@ -112,6 +140,14 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/lib/builtInExtensions.js }
+ env:
+ GITHUB_TOKEN: "$(github-distro-mixin-password)"
+ displayName: Download missing built-in extensions
+
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
@@ -122,346 +158,229 @@ steps:
displayName: Create node_modules archive
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { node build/azure-pipelines/mixin }
- displayName: Mix in quality
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/azure-pipelines/mixin }
+ displayName: Mix in quality
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { yarn npm-run-all -lp "electron $(VSCODE_ARCH)" }
- displayName: Download Electron
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build\lib\policies }
+ displayName: Generate Group Policy definitions
+ retryCountOnTaskFailure: 3
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
- echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)"
- displayName: Build
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ exec { yarn gulp "transpile-client-swc" "transpile-extensions" }
+ displayName: Transpile
+
+ - ${{ if eq(parameters.VSCODE_QUALITY, 'insider') }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_EXPLORER_APPX_DIR=$(Join-Path $pwd.Path ".build/win32/appx")
+ exec { node build/win32/explorer-appx-fetcher }
+ env:
+ VSCODE_ARCH: "$(VSCODE_ARCH)"
+ displayName: Download Explorer Sparse Package
+ condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
- displayName: Prepare Package
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
+ echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)"
+ displayName: Build
+
+ - ${{ if eq(parameters.VSCODE_BUILD_TUNNEL_CLI, true) }}:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: unsigned_vscode_cli_win32_arm64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: unsigned_vscode_cli_win32_x64_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifact: unsigned_vscode_cli_win32_ia32_cli
+ patterns: "**"
+ path: $(Build.ArtifactStagingDirectory)/cli
+ displayName: Download VS Code CLI
+ condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'ia32'))
+
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $ArtifactName = (gci -Path "$(Build.ArtifactStagingDirectory)/cli" | Select-Object -last 1).FullName
+ Expand-Archive -Path $ArtifactName -DestinationPath "$(Build.ArtifactStagingDirectory)/cli"
+ $AppProductJson = Get-Content -Raw -Path "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)\resources\app\product.json" | ConvertFrom-Json
+ $CliAppName = $AppProductJson.tunnelApplicationName
+ Move-Item -Path "$(Build.ArtifactStagingDirectory)/cli/code.exe" -Destination "$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/bin/$CliAppName.exe"
+ displayName: Move VS Code CLI
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
+ displayName: Prepare Package
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { node build/azure-pipelines/mixin --server }
- displayName: Mix in quality
-
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { yarn gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
- exec { yarn gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
- echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)"
- displayName: Build Server
- condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
- exec { yarn npm-run-all -lp "playwright-install" }
- displayName: Download Playwright
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { yarn electron $(VSCODE_ARCH) }
- exec { .\scripts\test.bat --build --tfs "Unit Tests" }
- displayName: Run unit tests (Electron)
- timeoutInMinutes: 15
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { yarn test-node --build }
- displayName: Run unit tests (node.js)
- timeoutInMinutes: 15
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { yarn test-browser-no-install --sequential --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
- displayName: Run unit tests (Browser, Chromium & Firefox)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { yarn gulp `
- compile-extension:css-language-features-server `
- compile-extension:emmet `
- compile-extension:git `
- compile-extension:github-authentication `
- compile-extension:html-language-features-server `
- compile-extension:ipynb `
- compile-extension:json-language-features-server `
- compile-extension:markdown-language-features `
- compile-extension-media `
- compile-extension:microsoft-authentication `
- compile-extension:typescript-language-features `
- compile-extension:vscode-api-tests `
- compile-extension:vscode-colorize-tests `
- compile-extension:vscode-custom-editor-tests `
- compile-extension:vscode-notebook-tests `
- compile-extension:vscode-test-resolver `
- }
- displayName: Build integration tests
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - powershell: |
- # Figure out the full absolute path of the product we just built
- # including the remote server and configure the integration tests
- # to run with these builds instead of running out of sources.
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
- $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
- $AppNameShort = $AppProductJson.nameShort
- exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
- displayName: Run integration tests (Electron)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\scripts\test-web-integration.bat --browser firefox }
- displayName: Run integration tests (Browser, Firefox)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
- $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
- $AppNameShort = $AppProductJson.nameShort
- exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-remote-integration.bat }
- displayName: Run integration tests (Remote)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- exec {.\build\azure-pipelines\win32\listprocesses.bat }
- displayName: Diagnostics before smoke test run
- continueOnError: true
- condition: and(succeededOrFailed(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"
- exec { yarn smoketest-no-compile --web --tracing --headless }
- displayName: Run smoke tests (Browser, Chromium)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
- exec { yarn smoketest-no-compile --tracing --build "$AppRoot" }
- displayName: Run smoke tests (Electron)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
- $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
- exec { yarn gulp compile-extension:vscode-test-resolver }
- exec { yarn smoketest-no-compile --tracing --remote --build "$AppRoot" }
- displayName: Run smoke tests (Remote)
- timeoutInMinutes: 20
- condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- exec {.\build\azure-pipelines\win32\listprocesses.bat }
- displayName: Diagnostics after smoke test run
- continueOnError: true
- condition: and(succeededOrFailed(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: crash-dump-windows-$(VSCODE_ARCH)
- targetPath: .build\crashes
- displayName: "Publish Crash Reports"
- continueOnError: true
- condition: failed()
-
- # In order to properly symbolify above crash reports
- # (if any), we need the compiled native modules too
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: node-modules-windows-$(VSCODE_ARCH)
- targetPath: node_modules
- displayName: "Publish Node Modules"
- continueOnError: true
- condition: failed()
-
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: logs-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
- targetPath: .build\logs
- displayName: "Publish Log Files"
- continueOnError: true
- condition: and(failed(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
- - task: PublishTestResults@2
- displayName: Publish Tests Results
- inputs:
- testResultsFiles: "*-results.xml"
- searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
- condition: and(succeededOrFailed(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build/azure-pipelines/mixin --server }
+ displayName: Mix in quality
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: UseDotNet@2
- inputs:
- version: 3.x
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ exec { yarn gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
+ exec { yarn gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
+ echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)"
+ displayName: Build Server
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: EsrpClientTool@1
- displayName: Download ESRPClient
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
+ - template: product-build-win32-test.yml
+ parameters:
+ VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
+ VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
+ VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
+ VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_TESTS }}
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $EsrpClientTool = (gci -directory -filter EsrpClientTool_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
- $EsrpCliZip = (gci -recurse -filter esrpcli.*.zip $EsrpClientTool | Select-Object -last 1).FullName
- mkdir -p $(Agent.TempDirectory)\esrpcli
- Expand-Archive -Path $EsrpCliZip -DestinationPath $(Agent.TempDirectory)\esrpcli
- $EsrpCliDllPath = (gci -recurse -filter esrpcli.dll $(Agent.TempDirectory)\esrpcli | Select-Object -last 1).FullName
- echo "##vso[task.setvariable variable=EsrpCliDllPath]$EsrpCliDllPath"
- displayName: Find ESRP CLI
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: UseDotNet@2
+ inputs:
+ version: 3.x
+ condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(CodeSigningFolderPath) '*.dll,*.exe,*.node' }
- displayName: Codesign
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: EsrpClientTool@1
+ displayName: Download ESRPClient
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-archive" }
- displayName: Package archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $EsrpClientTool = (gci -directory -filter EsrpClientTool_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
+ $EsrpCliZip = (gci -recurse -filter esrpcli.*.zip $EsrpClientTool | Select-Object -last 1).FullName
+ mkdir -p $(Agent.TempDirectory)\esrpcli
+ Expand-Archive -Path $EsrpCliZip -DestinationPath $(Agent.TempDirectory)\esrpcli
+ $EsrpCliDllPath = (gci -recurse -filter esrpcli.dll $(Agent.TempDirectory)\esrpcli | Select-Object -last 1).FullName
+ echo "##vso[task.setvariable variable=EsrpCliDllPath]$EsrpCliDllPath"
+ displayName: Find ESRP CLI
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- $env:ESRPPKI = "$(ESRP-PKI)"
- $env:ESRPAADUsername = "$(esrp-aad-username)"
- $env:ESRPAADPassword = "$(esrp-aad-password)"
- exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-system-setup" --sign }
- exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
- displayName: Package setups
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(CodeSigningFolderPath) '*.dll,*.exe,*.node' }
+ displayName: Codesign
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - powershell: |
- . build/azure-pipelines/win32/exec.ps1
- $ErrorActionPreference = "Stop"
- .\build\azure-pipelines\win32\prepare-publish.ps1
- displayName: Publish
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if and(eq(parameters.VSCODE_QUALITY, 'insider'), eq(parameters.VSCODE_PUBLISH, true)) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows-appx $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(CodeSigningFolderPath) '*.appx' }
+ displayName: Codesign context menu appx package
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\archive\$(ARCHIVE_NAME)
- artifact: vscode_client_win32_$(VSCODE_ARCH)_archive
- displayName: Publish archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-archive" }
+ displayName: Package archive
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\system-setup\$(SYSTEM_SETUP_NAME)
- artifact: vscode_client_win32_$(VSCODE_ARCH)_setup
- displayName: Publish system setup
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ $env:ESRPPKI = "$(ESRP-PKI)"
+ $env:ESRPAADUsername = "$(esrp-aad-username)"
+ $env:ESRPAADPassword = "$(esrp-aad-password)"
+ exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-system-setup" --sign }
+ exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
+ displayName: Package setups
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\user-setup\$(USER_SETUP_NAME)
- artifact: vscode_client_win32_$(VSCODE_ARCH)_user-setup
- displayName: Publish user setup
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ .\build\azure-pipelines\win32\prepare-publish.ps1
+ displayName: Publish
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH).zip
- artifact: vscode_server_win32_$(VSCODE_ARCH)_archive
- displayName: Publish server archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (client)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH)-web.zip
- artifact: vscode_web_win32_$(VSCODE_ARCH)_archive
- displayName: Publish web server archive
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (client)
+ artifact: vscode_client_win32_$(VSCODE_ARCH)_sbom
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (client)
- inputs:
- BuildDropPath: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)
- PackageName: Visual Studio Code
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: Generate SBOM (server)
+ inputs:
+ BuildDropPath: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)
+ PackageName: Visual Studio Code Server
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (client)
- artifact: vscode_client_win32_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)/_manifest
+ displayName: Publish SBOM (server)
+ artifact: vscode_server_win32_$(VSCODE_ARCH)_sbom
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
- displayName: Generate SBOM (server)
- inputs:
- BuildDropPath: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)
- PackageName: Visual Studio Code Server
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\archive\$(ARCHIVE_NAME)
+ artifact: vscode_client_win32_$(VSCODE_ARCH)_archive
+ displayName: Publish archive
- - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- - publish: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)/_manifest
- displayName: Publish SBOM (server)
- artifact: vscode_server_win32_$(VSCODE_ARCH)_sbom
- condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\system-setup\$(SYSTEM_SETUP_NAME)
+ artifact: vscode_client_win32_$(VSCODE_ARCH)_setup
+ displayName: Publish system setup
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\user-setup\$(USER_SETUP_NAME)
+ artifact: vscode_client_win32_$(VSCODE_ARCH)_user-setup
+ displayName: Publish user setup
+ condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH).zip
+ artifact: vscode_server_win32_$(VSCODE_ARCH)_archive
+ displayName: Publish server archive
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
+
+ - ${{ if eq(parameters.VSCODE_PUBLISH, true) }}:
+ - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH)-web.zip
+ artifact: vscode_web_win32_$(VSCODE_ARCH)_archive
+ displayName: Publish web server archive
+ condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
diff --git a/build/builtin/main.js b/build/builtin/main.js
index b1842e9a595..f4dbc6e8325 100644
--- a/build/builtin/main.js
+++ b/build/builtin/main.js
@@ -30,8 +30,7 @@ app.once('ready', () => {
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
- enableWebSQL: false,
- nativeWindowOpen: true
+ enableWebSQL: false
}
});
window.setMenuBarVisibility(false);
diff --git a/build/darwin/create-universal-app.js b/build/darwin/create-universal-app.js
index 197bf5b2f1b..750366e752d 100644
--- a/build/darwin/create-universal-app.js
+++ b/build/darwin/create-universal-app.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const vscode_universal_bundler_1 = require("vscode-universal-bundler");
const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
@@ -39,7 +39,7 @@ async function main() {
outAppPath,
force: true
});
- let productJson = await fs.readJson(productJsonPath);
+ const productJson = await fs.readJson(productJsonPath);
Object.assign(productJson, {
darwinUniversalAssetId: 'darwin-universal'
});
diff --git a/build/darwin/create-universal-app.ts b/build/darwin/create-universal-app.ts
index 7d145eaec71..5f4b3170532 100644
--- a/build/darwin/create-universal-app.ts
+++ b/build/darwin/create-universal-app.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import { makeUniversalApp } from 'vscode-universal-bundler';
import { spawn } from '@malept/cross-spawn-promise';
import * as fs from 'fs-extra';
@@ -45,7 +43,7 @@ async function main() {
force: true
});
- let productJson = await fs.readJson(productJsonPath);
+ const productJson = await fs.readJson(productJsonPath);
Object.assign(productJson, {
darwinUniversalAssetId: 'darwin-universal'
});
diff --git a/build/darwin/sign.js b/build/darwin/sign.js
index 02b0e1f052e..ef6bef395e4 100644
--- a/build/darwin/sign.js
+++ b/build/darwin/sign.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const codesign = require("electron-osx-sign");
const path = require("path");
@@ -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 9b0a9f75afc..7490d45eaed 100644
--- a/build/darwin/sign.ts
+++ b/build/darwin/sign.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as codesign from 'electron-osx-sign';
import * as path from 'path';
import * as util from '../lib/util';
@@ -31,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 = {
@@ -52,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);
}
};
@@ -70,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') {
@@ -98,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/eslint.js b/build/eslint.js
index c04f4ef7756..288917b35bf 100644
--- a/build/eslint.js
+++ b/build/eslint.js
@@ -13,8 +13,7 @@ function eslint() {
.src(eslintFilter, { base: '.', follow: true, allowEmpty: true })
.pipe(
gulpeslint({
- configFile: '.eslintrc.json',
- rulePaths: ['./build/lib/eslint'],
+ configFile: '.eslintrc.json'
})
)
.pipe(gulpeslint.formatEach('compact'))
diff --git a/build/filters.js b/build/filters.js
index c2a0a52bdb9..ff8e4ef81b3 100644
--- a/build/filters.js
+++ b/build/filters.js
@@ -22,6 +22,7 @@ module.exports.all = [
'scripts/**/*',
'src/**/*',
'test/**/*',
+ '!cli/**/*',
'!out*/**',
'!test/**/out/**',
'!**/node_modules/**',
@@ -39,6 +40,7 @@ module.exports.unicodeFilter = [
'!**/test/**',
'!**/*.test.ts',
'!**/*.{d.ts,json,md}',
+ '!**/*.mp3',
'!build/win32/**',
'!extensions/markdown-language-features/notebook-out/*.js',
@@ -48,7 +50,6 @@ module.exports.unicodeFilter = [
'!extensions/typescript-language-features/test-workspace/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
- '!extensions/vscode-custom-editor-tests/test-workspace/**',
'!extensions/**/dist/**',
'!extensions/**/out/**',
'!extensions/**/snippets/**',
@@ -66,10 +67,7 @@ module.exports.indentationFilter = [
'!**/LICENSE.{txt,rtf}',
'!LICENSES.chromium.html',
'!**/LICENSE',
- '!src/vs/nls.js',
- '!src/vs/nls.build.js',
- '!src/vs/css.js',
- '!src/vs/css.build.js',
+ '!**/*.mp3',
'!src/vs/loader.js',
'!src/vs/base/browser/dompurify/*',
'!src/vs/base/common/marked/marked.js',
@@ -85,10 +83,10 @@ module.exports.indentationFilter = [
'!test/monaco/out/**',
'!test/smoke/out/**',
'!extensions/typescript-language-features/test-workspace/**',
+ '!extensions/typescript-language-features/resources/walkthroughs/**',
'!extensions/markdown-math/notebook-out/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
- '!extensions/vscode-custom-editor-tests/test-workspace/**',
'!build/monaco/**',
'!build/win32/**',
@@ -141,10 +139,12 @@ module.exports.copyrightFilter = [
'!**/*.cmd',
'!**/*.ico',
'!**/*.opus',
+ '!**/*.mp3',
'!**/*.icns',
'!**/*.xml',
'!**/*.sh',
'!**/*.zsh',
+ '!**/*.fish',
'!**/*.txt',
'!**/*.xpm',
'!**/*.opts',
diff --git a/build/gulpfile.compile.js b/build/gulpfile.compile.js
index c3049784fe4..1424c90e3d0 100644
--- a/build/gulpfile.compile.js
+++ b/build/gulpfile.compile.js
@@ -9,13 +9,16 @@ 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.compileApiProposalNamesTask,
+ 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 41dbfe647ae..fb3a148f9a8 100644
--- a/build/gulpfile.editor.js
+++ b/build/gulpfile.editor.js
@@ -6,8 +6,9 @@
const gulp = require('gulp');
const path = require('path');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
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');
@@ -17,34 +18,41 @@ const compilation = require('./lib/compilation');
const monacoapi = require('./lib/monaco-api');
const fs = require('fs');
-let root = path.dirname(__dirname);
-let sha1 = util.getVersion(root);
-let semver = require('./monaco/package.json').version;
-let headerVersion = semver + '(' + sha1 + ')';
+const root = path.dirname(__dirname);
+const sha1 = getVersion(root);
+const semver = require('./monaco/package.json').version;
+const headerVersion = semver + '(' + sha1 + ')';
// Build
-let editorEntryPoints = [
+const editorEntryPoints = [
{
name: 'vs/editor/editor.main',
include: [],
exclude: ['vs/css', 'vs/nls'],
- prepend: ['out-editor-build/vs/css.js', 'out-editor-build/vs/nls.js'],
+ prepend: [
+ { path: 'out-editor-build/vs/css.js', amdModuleId: 'vs/css' },
+ { path: 'out-editor-build/vs/nls.js', amdModuleId: 'vs/nls' }
+ ],
},
{
name: 'vs/base/common/worker/simpleWorker',
include: ['vs/editor/common/services/editorSimpleWorker'],
- prepend: ['vs/loader.js'],
- append: ['vs/base/worker/workerMain'],
+ 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'
}
];
-let editorResources = [
+const editorResources = [
'out-editor-build/vs/base/browser/ui/codicons/**/*.ttf'
];
-let BUNDLED_FILE_HEADER = [
+const BUNDLED_FILE_HEADER = [
'/*!-----------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
' * Version: ' + headerVersion,
@@ -79,26 +87,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({
@@ -109,12 +120,6 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
'inlineEntryPoint:0.ts',
'inlineEntryPoint:1.ts',
'vs/loader.js',
- 'vs/nls.ts',
- 'vs/nls.build.js',
- 'vs/nls.d.ts',
- 'vs/css.js',
- 'vs/css.build.js',
- 'vs/css.d.ts',
'vs/base/worker/workerMain.ts',
],
renames: {
@@ -224,7 +229,7 @@ const appendJSToESMImportsTask = task.define('append-js-to-esm-imports', () => {
result.push(line);
continue;
}
- let modifiedLine = (
+ const modifiedLine = (
line
.replace(/^import(.*)\'([^']+)\'/, `import$1'$2.js'`)
.replace(/^export \* from \'([^']+)\'/, `export * from '$1.js'`)
@@ -239,10 +244,10 @@ const appendJSToESMImportsTask = task.define('append-js-to-esm-imports', () => {
* @param {string} contents
*/
function toExternalDTS(contents) {
- let lines = contents.split(/\r\n|\r|\n/);
+ const lines = contents.split(/\r\n|\r|\n/);
let killNextCloseCurlyBrace = false;
for (let i = 0; i < lines.length; i++) {
- let line = lines[i];
+ const line = lines[i];
if (killNextCloseCurlyBrace) {
if ('}' === line) {
@@ -316,7 +321,7 @@ const finalEditorResourcesTask = task.define('final-editor-resources', () => {
// package.json
gulp.src('build/monaco/package.json')
.pipe(es.through(function (data) {
- let json = JSON.parse(data.contents.toString());
+ const json = JSON.parse(data.contents.toString());
json.private = false;
data.contents = Buffer.from(JSON.stringify(json, null, ' '));
this.emit('data', data);
@@ -360,10 +365,10 @@ const finalEditorResourcesTask = task.define('final-editor-resources', () => {
return;
}
- let relativePathToMap = path.relative(path.join(data.relative), path.join('min-maps', data.relative + '.map'));
+ const relativePathToMap = path.relative(path.join(data.relative), path.join('min-maps', data.relative + '.map'));
let strContents = data.contents.toString();
- let newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
+ const newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
strContents = strContents.replace(/\/\/# sourceMappingURL=[^ ]+$/, newStr);
data.contents = Buffer.from(strContents);
@@ -483,13 +488,13 @@ function createTscCompileTask(watch) {
cwd: path.join(__dirname, '..'),
// stdio: [null, 'pipe', 'inherit']
});
- let errors = [];
- let reporter = createReporter('monaco');
+ const errors = [];
+ const reporter = createReporter('monaco');
/** @type {NodeJS.ReadWriteStream | undefined} */
let report;
// eslint-disable-next-line no-control-regex
- let magic = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; // https://stackoverflow.com/questions/25245716/remove-all-ansi-colors-styles-from-strings
+ const magic = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; // https://stackoverflow.com/questions/25245716/remove-all-ansi-colors-styles-from-strings
child.stdout.on('data', data => {
let str = String(data);
@@ -502,12 +507,12 @@ function createTscCompileTask(watch) {
report.end();
} else if (str) {
- let match = /(.*\(\d+,\d+\): )(.*: )(.*)/.exec(str);
+ const match = /(.*\(\d+,\d+\): )(.*: )(.*)/.exec(str);
if (match) {
// trying to massage the message so that it matches the gulp-tsb error messages
// e.g. src/vs/base/common/strings.ts(663,5): error TS2322: Type '1234' is not assignable to type 'string'.
- let fullpath = path.join(root, match[1]);
- let message = match[3];
+ const fullpath = path.join(root, match[1]);
+ const message = match[3];
reporter(fullpath + message);
} else {
reporter(str);
diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js
index ba2606861fd..c0b79bc0f9d 100644
--- a/build/gulpfile.extensions.js
+++ b/build/gulpfile.extensions.js
@@ -12,15 +12,15 @@ const nodeUtil = require('util');
const es = require('event-stream');
const filter = require('gulp-filter');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
const task = require('./lib/task');
const watcher = require('./lib/watch');
const createReporter = require('./lib/reporter').createReporter;
const glob = require('glob');
const root = path.dirname(__dirname);
-const commit = util.getVersion(root);
+const commit = 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');
@@ -47,14 +47,15 @@ const compilations = [
'gulp/tsconfig.json',
'html-language-features/client/tsconfig.json',
'html-language-features/server/tsconfig.json',
- 'image-preview/tsconfig.json',
'ipynb/tsconfig.json',
'jake/tsconfig.json',
'json-language-features/client/tsconfig.json',
'json-language-features/server/tsconfig.json',
'markdown-language-features/preview-src/tsconfig.json',
+ 'markdown-language-features/server/tsconfig.json',
'markdown-language-features/tsconfig.json',
'markdown-math/tsconfig.json',
+ 'media-preview/tsconfig.json',
'merge-conflict/tsconfig.json',
'microsoft-authentication/tsconfig.json',
'npm/tsconfig.json',
@@ -66,8 +67,6 @@ const compilations = [
'typescript-language-features/tsconfig.json',
'vscode-api-tests/tsconfig.json',
'vscode-colorize-tests/tsconfig.json',
- 'vscode-custom-editor-tests/tsconfig.json',
- 'vscode-notebook-tests/tsconfig.json',
'vscode-test-resolver/tsconfig.json'
];
@@ -91,7 +90,7 @@ const tasks = compilations.map(function (tsconfigFile) {
const baseUrl = getBaseUrl(out);
let headerId, headerOut;
- let index = relativeDirname.indexOf('/');
+ const index = relativeDirname.indexOf('/');
if (index < 0) {
headerId = 'vscode.' + relativeDirname;
headerOut = 'out';
@@ -100,7 +99,7 @@ const tasks = compilations.map(function (tsconfigFile) {
headerOut = relativeDirname.substr(index + 1) + '/out';
}
- function createPipeline(build, emitError) {
+ function createPipeline(build, emitError, transpileOnly) {
const nlsDev = require('vscode-nls-dev');
const tsb = require('./lib/tsb');
const sourcemaps = require('gulp-sourcemaps');
@@ -110,7 +109,7 @@ const tasks = compilations.map(function (tsconfigFile) {
overrideOptions.inlineSources = Boolean(build);
overrideOptions.base = path.dirname(absolutePath);
- const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString()));
+ const compilation = tsb.create(absolutePath, overrideOptions, { verbose: false, transpileOnly, transpileOnlyIncludesDts: transpileOnly, transpileWithSwc: true }, err => reporter(err.toString()));
const pipeline = function () {
const input = es.through();
@@ -152,6 +151,16 @@ const tasks = compilations.map(function (tsconfigFile) {
const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
+ const transpileTask = task.define(`transpile-extension:${name}`, task.series(cleanTask, () => {
+ const pipeline = createPipeline(false, true, true);
+ const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
+ const input = es.merge(nonts, pipeline.tsProjectSrc());
+
+ return input
+ .pipe(pipeline())
+ .pipe(gulp.dest(out));
+ }));
+
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(false, true);
const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
@@ -184,12 +193,16 @@ const tasks = compilations.map(function (tsconfigFile) {
}));
// Tasks
+ gulp.task(transpileTask);
gulp.task(compileTask);
gulp.task(watchTask);
- return { compileTask, watchTask, compileBuildTask };
+ return { transpileTask, compileTask, watchTask, compileBuildTask };
});
+const transpileExtensionsTask = task.define('transpile-extensions', task.parallel(...tasks.map(t => t.transpileTask)));
+gulp.task(transpileExtensionsTask);
+
const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask)));
gulp.task(compileExtensionsTask);
exports.compileExtensionsTask = compileExtensionsTask;
@@ -222,8 +235,8 @@ exports.compileExtensionMediaBuildTask = compileExtensionMediaBuildTask;
const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions'));
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
cleanExtensionsBuildTask,
+ task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false).pipe(gulp.dest('.build'))),
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream(false).pipe(gulp.dest('.build'))),
- task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false, product.extensionsGallery?.serviceUrl).pipe(gulp.dest('.build'))),
));
gulp.task(compileExtensionsBuildTask);
diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js
index a9691fcb0d8..c76fab7abc6 100644
--- a/build/gulpfile.hygiene.js
+++ b/build/gulpfile.hygiene.js
@@ -16,7 +16,7 @@ function checkPackageJSON(actualPath) {
const actual = require(path.join(__dirname, '..', actualPath));
const rootPackageJSON = require('../package.json');
const checkIncluded = (set1, set2) => {
- for (let depName in set1) {
+ for (const depName in set1) {
const depVersion = set1[depName];
const rootDepVersion = set2[depName];
if (!rootDepVersion) {
diff --git a/build/gulpfile.js b/build/gulpfile.js
index 65dda505fa7..e945c06eed4 100644
--- a/build/gulpfile.js
+++ b/build/gulpfile.js
@@ -11,7 +11,7 @@ require('events').EventEmitter.defaultMaxListeners = 100;
const gulp = require('gulp');
const util = require('./lib/util');
const task = require('./lib/task');
-const { compileTask, watchTask, compileApiProposalNamesTask, watchApiProposalNamesTask } = require('./lib/compilation');
+const { transpileClientSWC, transpileTask, compileTask, watchTask, compileApiProposalNamesTask, watchApiProposalNamesTask } = require('./lib/compilation');
const { monacoTypecheckTask/* , monacoTypecheckWatchTask */ } = require('./gulpfile.editor');
const { compileExtensionsTask, watchExtensionsTask, compileExtensionMediaTask } = require('./gulpfile.extensions');
@@ -19,6 +19,14 @@ const { compileExtensionsTask, watchExtensionsTask, compileExtensionMediaTask }
gulp.task(compileApiProposalNamesTask);
gulp.task(watchApiProposalNamesTask);
+// SWC Client Transpile
+const transpileClientSWCTask = task.define('transpile-client-swc', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src', 'out', true)));
+gulp.task(transpileClientSWCTask);
+
+// Transpile only
+const transpileClientTask = task.define('transpile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src', 'out')));
+gulp.task(transpileClientTask);
+
// Fast compile for development time
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), compileApiProposalNamesTask, compileTask('src', 'out', false)));
gulp.task(compileClientTask);
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 54135e9f50d..7475e04d6e5 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -9,8 +9,9 @@ const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
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');
@@ -30,7 +31,7 @@ const { vscodeWebEntryPoints, vscodeWebResourceIncludes, createVSCodeWebFileCont
const cp = require('child_process');
const REPO_ROOT = path.dirname(__dirname);
-const commit = util.getVersion(REPO_ROOT);
+const commit = getVersion(REPO_ROOT);
const BUILD_ROOT = path.dirname(REPO_ROOT);
const REMOTE_FOLDER = path.join(REPO_ROOT, 'remote');
@@ -58,15 +59,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',
@@ -76,12 +72,14 @@ const serverResources = [
'out-build/vs/base/node/ps.sh',
// Terminal shell integration
+ 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh',
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh',
+ 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish',
'!**/test/**'
];
@@ -252,7 +250,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 });
@@ -281,7 +279,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
].map(resource => gulp.src(resource, { base: '.' }).pipe(rename(resource)));
}
- let all = es.merge(
+ const all = es.merge(
packageJsonStream,
productJsonStream,
license,
@@ -355,23 +353,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 268650959cd..d5b4db00073 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -6,6 +6,7 @@
'use strict';
const gulp = require('gulp');
+const merge = require('gulp-merge-json');
const fs = require('fs');
const os = require('os');
const cp = require('child_process');
@@ -17,11 +18,12 @@ const replace = require('gulp-replace');
const filter = require('gulp-filter');
const _ = require('underscore');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
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 commit = getVersion(root);
const packageJson = require('../package.json');
const product = require('../product.json');
const crypto = require('crypto');
@@ -33,6 +35,9 @@ const minimist = require('minimist');
const { compileBuildTask } = require('./gulpfile.compile');
const { compileExtensionsBuildTask, compileExtensionMediaBuildTask } = require('./gulpfile.extensions');
const { getSettingsSearchBuildId, shouldSetupSettingsSearch } = require('./azure-pipelines/upload-configuration');
+const { promisify } = require('util');
+const glob = promisify(require('glob'));
+const rcedit = promisify(require('rcedit'));
// Build
const vscodeEntryPoints = _.flatten([
@@ -43,31 +48,28 @@ const vscodeEntryPoints = _.flatten([
buildfile.workerLanguageDetection,
buildfile.workerSharedProcess,
buildfile.workerLocalFileSearch,
+ buildfile.workerProfileAnalysis,
buildfile.workbenchDesktop,
buildfile.code
]);
const vscodeResources = [
- 'out-build/main.js',
- 'out-build/cli.js',
'out-build/bootstrap.js',
'out-build/bootstrap-fork.js',
'out-build/bootstrap-amd.js',
'out-build/bootstrap-node.js',
'out-build/bootstrap-window.js',
- 'out-build/vs/**/*.{svg,png,html,jpg,opus}',
+ 'out-build/vs/**/*.{svg,png,html,jpg,mp3}',
'!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',
+ 'out-build/vs/workbench/contrib/terminal/browser/media/*.fish',
'out-build/vs/workbench/contrib/terminal/browser/media/*.ps1',
'out-build/vs/workbench/contrib/terminal/browser/media/*.sh',
'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',
@@ -76,23 +78,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-browser/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);
@@ -100,7 +137,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);
@@ -122,9 +159,9 @@ gulp.task(core);
* @return {Object} A map of paths to checksums.
*/
function computeChecksums(out, filenames) {
- let result = {};
+ const result = {};
filenames.forEach(function (filename) {
- let fullPath = path.join(process.cwd(), out, filename);
+ const fullPath = path.join(process.cwd(), out, filename);
result[filename] = computeChecksum(fullPath);
});
return result;
@@ -137,9 +174,9 @@ function computeChecksums(out, filenames) {
* @return {string} The checksum for `filename`.
*/
function computeChecksum(filename) {
- let contents = fs.readFileSync(filename);
+ const contents = fs.readFileSync(filename);
- let hash = crypto
+ const hash = crypto
.createHash('md5')
.update(contents)
.digest('base64')
@@ -165,8 +202,8 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
'vs/workbench/workbench.desktop.main.js',
'vs/workbench/workbench.desktop.main.css',
'vs/workbench/api/node/extensionHostProcess.js',
- 'vs/code/electron-browser/workbench/workbench.html',
- 'vs/code/electron-browser/workbench/workbench.js'
+ 'vs/code/electron-sandbox/workbench/workbench.html',
+ 'vs/code/electron-sandbox/workbench/workbench.js'
]);
const src = gulp.src(out + '/**', { base: '.' })
@@ -206,7 +243,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);
@@ -240,6 +277,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
'**/node-pty/lib/worker/conoutSocketWorker.js',
'**/node-pty/lib/shared/conout.js',
'**/*.wasm',
+ '**/node-vsce-sign/bin/*',
], 'node_modules.asar'));
let all = es.merge(
@@ -331,6 +369,12 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
result = es.merge(result, gulp.src('resources/win32/VisualElementsManifest.xml', { base: 'resources/win32' })
.pipe(rename(product.nameShort + '.VisualElementsManifest.xml')));
+ result = es.merge(result, gulp.src('.build/policies/win32/**', { base: '.build/policies/win32' })
+ .pipe(rename(f => f.dirname = `policies/${f.dirname}`)));
+
+ if (quality === 'insider') {
+ result = es.merge(result, gulp.src('.build/win32/appx/**', { base: '.build/win32' }));
+ }
} else if (platform === 'linux') {
result = es.merge(result, gulp.src('resources/linux/bin/code.sh', { base: '.' })
.pipe(replace('@@PRODNAME@@', product.nameLong))
@@ -342,6 +386,35 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
};
}
+function patchWin32DependenciesTask(destinationFolderName) {
+ const cwd = path.join(path.dirname(root), destinationFolderName);
+
+ return async () => {
+ const deps = await glob('**/*.node', { cwd });
+ const packageJson = JSON.parse(await fs.promises.readFile(path.join(cwd, 'resources', 'app', 'package.json'), 'utf8'));
+ const product = JSON.parse(await fs.promises.readFile(path.join(cwd, 'resources', 'app', 'product.json'), 'utf8'));
+ const baseVersion = packageJson.version.replace(/-.*$/, '');
+
+ await Promise.all(deps.map(async dep => {
+ const basename = path.basename(dep);
+
+ await rcedit(path.join(cwd, dep), {
+ 'file-version': baseVersion,
+ 'version-string': {
+ 'CompanyName': 'Microsoft Corporation',
+ 'FileDescription': product.nameLong,
+ 'FileVersion': packageJson.version,
+ 'InternalName': basename,
+ 'LegalCopyright': 'Copyright (C) 2022 Microsoft. All rights reserved',
+ 'OriginalFilename': basename,
+ 'ProductName': product.nameLong,
+ 'ProductVersion': packageJson.version,
+ }
+ });
+ }));
+ };
+}
+
const buildRoot = path.dirname(root);
const BUILD_TARGETS = [
@@ -365,10 +438,16 @@ BUILD_TARGETS.forEach(buildTarget => {
const sourceFolderName = `out-vscode${dashed(minified)}`;
const destinationFolderName = `VSCode${dashed(platform)}${dashed(arch)}`;
- const vscodeTaskCI = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(
+ const tasks = [
util.rimraf(path.join(buildRoot, destinationFolderName)),
packageTask(platform, arch, sourceFolderName, destinationFolderName, opts)
- ));
+ ];
+
+ if (platform === 'win32') {
+ tasks.push(patchWin32DependenciesTask(destinationFolderName));
+ }
+
+ const vscodeTaskCI = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series(...tasks));
gulp.task(vscodeTaskCI);
const vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
@@ -389,6 +468,8 @@ BUILD_TARGETS.forEach(buildTarget => {
}
});
+// #region nls
+
const innoSetupConfig = {
'zh-cn': { codePage: 'CP936', defaultInfo: { name: 'Simplified Chinese', id: '$0804', } },
'zh-tw': { codePage: 'CP950', defaultInfo: { name: 'Traditional Chinese', id: '$0404' } },
@@ -404,46 +485,23 @@ const innoSetupConfig = {
'tr': { codePage: 'CP1254' }
};
-// Transifex Localizations
-
-const apiHostname = process.env.TRANSIFEX_API_URL;
-const apiName = process.env.TRANSIFEX_API_NAME;
-const apiToken = process.env.TRANSIFEX_API_TOKEN;
-
-gulp.task(task.define(
- 'vscode-translations-push',
- task.series(
- compileBuildTask,
- compileExtensionsBuildTask,
- optimizeVSCodeTask,
- function () {
- const pathToMetadata = './out-vscode/nls.metadata.json';
- const pathToExtensions = '.build/extensions/*';
- const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
-
- return es.merge(
- gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
- gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
- gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
- ).pipe(i18n.findObsoleteResources(apiHostname, apiName, apiToken)
- ).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken));
- }
- )
-));
-
gulp.task(task.define(
'vscode-translations-export',
task.series(
- compileBuildTask,
+ core,
compileExtensionsBuildTask,
- optimizeVSCodeTask,
function () {
const pathToMetadata = './out-vscode/nls.metadata.json';
+ const pathToRehWebMetadata = './out-vscode-reh-web/nls.metadata.json';
const pathToExtensions = '.build/extensions/*';
const pathToSetup = 'build/win32/i18n/messages.en.isl';
return es.merge(
- gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
+ gulp.src([pathToMetadata, pathToRehWebMetadata]).pipe(merge({
+ fileName: 'nls.metadata.json',
+ jsonSpace: '',
+ concatArrays: true
+ })).pipe(i18n.createXlfFilesForCoreBundle()),
gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
).pipe(vfs.dest('../vscode-translations-export'));
@@ -451,24 +509,19 @@ gulp.task(task.define(
)
));
-gulp.task('vscode-translations-pull', function () {
- return es.merge([...i18n.defaultLanguages, ...i18n.extraLanguages].map(language => {
- let includeDefault = !!innoSetupConfig[language.id].defaultInfo;
- return i18n.pullSetupXlfFiles(apiHostname, apiName, apiToken, language, includeDefault).pipe(vfs.dest(`../vscode-translations-import/${language.id}/setup`));
- }));
-});
-
gulp.task('vscode-translations-import', function () {
- let options = minimist(process.argv.slice(2), {
+ const options = minimist(process.argv.slice(2), {
string: 'location',
default: {
location: '../vscode-translations-import'
}
});
return es.merge([...i18n.defaultLanguages, ...i18n.extraLanguages].map(language => {
- let id = language.id;
+ const id = language.id;
return gulp.src(`${options.location}/${id}/vscode-setup/messages.xlf`)
.pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id]))
.pipe(vfs.dest(`./build/win32/i18n`));
}));
});
+
+// #endregion
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 7d0f70f9bef..cdc887013d8 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -12,16 +12,22 @@ const shell = require('gulp-shell');
const es = require('event-stream');
const vfs = require('vinyl-fs');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
const task = require('./lib/task');
const packageJson = require('../package.json');
const product = require('../product.json');
-const rpmDependenciesGenerator = require('./linux/rpm/dependencies-generator');
+const dependenciesGenerator = require('./linux/dependencies-generator');
+const sysrootInstaller = require('./linux/debian/install-sysroot');
+const debianRecommendedDependencies = require('./linux/debian/dep-lists').recommendedDeps;
const path = require('path');
const root = path.dirname(__dirname);
-const commit = util.getVersion(root);
+const commit = getVersion(root);
const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
+/**
+ * @param {string} arch
+ */
function getDebPackageArch(arch) {
return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
}
@@ -74,12 +80,16 @@ function prepareDebPackage(arch) {
let size = 0;
const control = code.pipe(es.through(
function (f) { size += f.isDirectory() ? 4096 : f.contents.length; },
- function () {
+ async function () {
const that = this;
+ const sysroot = await sysrootInstaller.getSysroot(debArch);
+ const dependencies = dependenciesGenerator.getDependencies('deb', binaryDir, product.applicationName, debArch, sysroot);
gulp.src('resources/linux/debian/control.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
.pipe(replace('@@ARCHITECTURE@@', debArch))
+ .pipe(replace('@@DEPENDS@@', dependencies.join(', ')))
+ .pipe(replace('@@RECOMMENDS@@', debianRecommendedDependencies.join(', ')))
.pipe(replace('@@INSTALLEDSIZE@@', Math.ceil(size / 1024)))
.pipe(rename('DEBIAN/control'))
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
@@ -176,7 +186,7 @@ function prepareRpmPackage(arch) {
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
- const dependencies = rpmDependenciesGenerator.getDependencies(binaryDir, product.applicationName, rpmArch);
+ const dependencies = dependenciesGenerator.getDependencies('rpm', binaryDir, product.applicationName, rpmArch);
const spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
@@ -210,7 +220,7 @@ function buildRpmPackage(arch) {
return shell.task([
'mkdir -p ' + destination,
- 'HOME="$(pwd)/' + destination + '" fakeroot rpmbuild -bb ' + rpmBuildPath + '/SPECS/' + product.applicationName + '.spec --target=' + rpmArch,
+ 'HOME="$(pwd)/' + destination + '" rpmbuild -bb ' + rpmBuildPath + '/SPECS/' + product.applicationName + '.spec --target=' + rpmArch,
'cp "' + rpmOut + '/$(ls ' + rpmOut + ')" ' + destination + '/'
]);
}
diff --git a/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js
index f0ad617f405..6de4d03d414 100644
--- a/build/gulpfile.vscode.web.js
+++ b/build/gulpfile.vscode.web.js
@@ -9,8 +9,9 @@ const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
+const { getVersion } = require('./lib/getVersion');
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');
@@ -26,13 +27,13 @@ const REPO_ROOT = path.dirname(__dirname);
const BUILD_ROOT = path.dirname(REPO_ROOT);
const WEB_FOLDER = path.join(REPO_ROOT, 'remote', 'web');
-const commit = util.getVersion(REPO_ROOT);
+const commit = getVersion(REPO_ROOT);
const quality = product.quality;
const version = (quality && quality !== 'stable') ? `${packageJson.version}-${quality}` : packageJson.version;
const vscodeWebResourceIncludes = [
// Workbench
- 'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,jpg,opus}',
+ 'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,jpg,mp3}',
'out-build/vs/code/browser/workbench/*.html',
'out-build/vs/base/browser/ui/codicons/codicon/**/*.ttf',
'out-build/vs/**/markdown.css',
@@ -70,6 +71,7 @@ const vscodeWebEntryPoints = _.flatten([
buildfile.workerNotebook,
buildfile.workerLanguageDetection,
buildfile.workerLocalFileSearch,
+ buildfile.workerProfileAnalysis,
buildfile.keyboardMaps,
buildfile.workbenchWeb
]);
@@ -153,24 +155,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);
@@ -208,7 +214,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
gulp.src('resources/server/code-512.png', { base: 'resources/server' })
);
- let all = es.merge(
+ const all = es.merge(
packageJsonStream,
license,
sources,
@@ -218,7 +224,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
pwaicons
);
- let result = all
+ const result = all
.pipe(util.skipDirectories())
.pipe(util.fixWin32DirectoryPermissions());
@@ -229,7 +235,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
const compileWebExtensionsBuildTask = task.define('compile-web-extensions-build', task.series(
task.define('clean-web-extensions-build', util.rimraf('.build/web/extensions')),
task.define('bundle-web-extensions-build', () => extensions.packageLocalExtensionsStream(true).pipe(gulp.dest('.build/web'))),
- task.define('bundle-marketplace-web-extensions-build', () => extensions.packageMarketplaceExtensionsStream(true, product.extensionsGallery?.serviceUrl).pipe(gulp.dest('.build/web'))),
+ task.define('bundle-marketplace-web-extensions-build', () => extensions.packageMarketplaceExtensionsStream(true).pipe(gulp.dest('.build/web'))),
task.define('bundle-web-extension-media-build', () => extensions.buildExtensionMedia(false, '.build/web/extensions')),
));
gulp.task(compileWebExtensionsBuildTask);
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
index 81ba5095816..9117a021b5a 100644
--- a/build/gulpfile.vscode.win32.js
+++ b/build/gulpfile.vscode.win32.js
@@ -87,6 +87,7 @@ function buildWin32Setup(arch, target) {
productJson['target'] = target;
fs.writeFileSync(productJsonPath, JSON.stringify(productJson, undefined, '\t'));
+ const quality = product.quality;
const definitions = {
NameLong: product.nameLong,
NameShort: product.nameShort,
@@ -109,9 +110,19 @@ function buildWin32Setup(arch, target) {
RepoDir: repoPath,
OutputDir: outputPath,
InstallTarget: target,
- ProductJsonPath: productJsonPath
+ ProductJsonPath: productJsonPath,
+ Quality: quality
};
+ if (quality === 'insider') {
+ const appxPackagePrefix = 'code_insiders';
+ definitions['AppxPackage'] = `${appxPackagePrefix}_explorer_${arch}.appx`;
+ if (arch === 'ia32') {
+ definitions['AppxPackage'] = `${appxPackagePrefix}_explorer_x86.appx`;
+ }
+ definitions['AppxPackageFullname'] = `Microsoft.${product.win32RegValueName}_1.0.0.0_neutral__8wekyb3d8bbwe`;
+ }
+
packageInnoSetup(issPath, { definitions }, cb);
};
}
diff --git a/build/hygiene.js b/build/hygiene.js
index 1668e508ec9..67f074c4ac0 100644
--- a/build/hygiene.js
+++ b/build/hygiene.js
@@ -10,6 +10,7 @@ const vfs = require('vinyl-fs');
const path = require('path');
const fs = require('fs');
const pall = require('p-all');
+
const { all, copyrightFilter, unicodeFilter, indentationFilter, tsFormattingFilter, eslintFilter } = require('./filters');
const copyrightHeaderLines = [
@@ -116,8 +117,8 @@ function hygiene(some, linting = true) {
})
.then(
(result) => {
- let original = result.src.replace(/\r\n/gm, '\n');
- let formatted = result.dest.replace(/\r\n/gm, '\n');
+ const original = result.src.replace(/\r\n/gm, '\n');
+ const formatted = result.dest.replace(/\r\n/gm, '\n');
if (original !== formatted) {
console.error(
@@ -173,8 +174,7 @@ function hygiene(some, linting = true) {
.pipe(filter(eslintFilter))
.pipe(
gulpeslint({
- configFile: '.eslintrc.json',
- rulePaths: ['./build/lib/eslint'],
+ configFile: '.eslintrc.json'
})
)
.pipe(gulpeslint.formatEach('compact'))
@@ -292,7 +292,7 @@ if (require.main === module) {
.then(
(vinyls) =>
new Promise((c, e) =>
- hygiene(es.readArray(vinyls))
+ hygiene(es.readArray(vinyls).pipe(filter(all)))
.on('end', () => c())
.on('error', e)
)
diff --git a/build/lib/asar.js b/build/lib/asar.js
index 708005791f6..9ee1616fdfa 100644
--- a/build/lib/asar.js
+++ b/build/lib/asar.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAsar = void 0;
const path = require("path");
@@ -81,7 +81,7 @@ function createAsar(folderPath, unpackGlobs, destFilename) {
out.push(file.contents);
}
}, function () {
- let finish = () => {
+ const finish = () => {
{
const headerPickle = pickle.createEmpty();
headerPickle.writeString(JSON.stringify(filesystem.header));
diff --git a/build/lib/asar.ts b/build/lib/asar.ts
index 18ab7b01946..44a6416bdfb 100644
--- a/build/lib/asar.ts
+++ b/build/lib/asar.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as path from 'path';
import * as es from 'event-stream';
const pickle = require('chromium-pickle-js');
@@ -98,7 +96,7 @@ export function createAsar(folderPath: string, unpackGlobs: string[], destFilena
}
}, function () {
- let finish = () => {
+ const finish = () => {
{
const headerPickle = pickle.createEmpty();
headerPickle.writeString(JSON.stringify(filesystem.header));
diff --git a/build/lib/builtInExtensions.js b/build/lib/builtInExtensions.js
index 2671a5a3a6c..38c30234b7e 100644
--- a/build/lib/builtInExtensions.js
+++ b/build/lib/builtInExtensions.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.getBuiltInExtensions = void 0;
+exports.getBuiltInExtensions = exports.getExtensionStream = void 0;
const fs = require("fs");
const path = require("path");
const os = require("os");
@@ -44,6 +44,21 @@ function isUpToDate(extension) {
return false;
}
}
+function getExtensionDownloadStream(extension) {
+ const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
+ return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
+ .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
+}
+function getExtensionStream(extension) {
+ // if the extension exists on disk, use those files instead of downloading anew
+ if (isUpToDate(extension)) {
+ log('[extensions]', `${extension.name}@${extension.version} up to date`, ansiColors.green('âī¸'));
+ return vfs.src(['**'], { cwd: getExtensionPath(extension), dot: true })
+ .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
+ }
+ return getExtensionDownloadStream(extension);
+}
+exports.getExtensionStream = getExtensionStream;
function syncMarketplaceExtension(extension) {
const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
const source = ansiColors.blue(galleryServiceUrl ? '[marketplace]' : '[github]');
@@ -52,8 +67,7 @@ function syncMarketplaceExtension(extension) {
return es.readArray([]);
}
rimraf.sync(getExtensionPath(extension));
- return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
- .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`))
+ return getExtensionDownloadStream(extension)
.pipe(vfs.dest('.build/builtInExtensions'))
.on('end', () => log(source, extension.name, ansiColors.green('âī¸')));
}
@@ -102,7 +116,7 @@ function getBuiltInExtensions() {
const control = readControlFile();
const streams = [];
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
- let controlState = control[extension.name] || 'marketplace';
+ const controlState = control[extension.name] || 'marketplace';
control[extension.name] = controlState;
streams.push(syncExtension(extension, controlState));
}
diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts
index 1abc85b3b09..912e05653ac 100644
--- a/build/lib/builtInExtensions.ts
+++ b/build/lib/builtInExtensions.ts
@@ -68,10 +68,26 @@ function isUpToDate(extension: IExtensionDefinition): boolean {
}
}
+function getExtensionDownloadStream(extension: IExtensionDefinition) {
+ const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
+ return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
+ .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
+}
+
+export function getExtensionStream(extension: IExtensionDefinition) {
+ // if the extension exists on disk, use those files instead of downloading anew
+ if (isUpToDate(extension)) {
+ log('[extensions]', `${extension.name}@${extension.version} up to date`, ansiColors.green('âī¸'));
+ return vfs.src(['**'], { cwd: getExtensionPath(extension), dot: true })
+ .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
+ }
+
+ return getExtensionDownloadStream(extension);
+}
+
function syncMarketplaceExtension(extension: IExtensionDefinition): Stream {
const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
const source = ansiColors.blue(galleryServiceUrl ? '[marketplace]' : '[github]');
-
if (isUpToDate(extension)) {
log(source, `${extension.name}@${extension.version}`, ansiColors.green('âī¸'));
return es.readArray([]);
@@ -79,8 +95,7 @@ function syncMarketplaceExtension(extension: IExtensionDefinition): Stream {
rimraf.sync(getExtensionPath(extension));
- return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
- .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`))
+ return getExtensionDownloadStream(extension)
.pipe(vfs.dest('.build/builtInExtensions'))
.on('end', () => log(source, extension.name, ansiColors.green('âī¸')));
}
@@ -143,7 +158,7 @@ export function getBuiltInExtensions(): Promise {
const streams: Stream[] = [];
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
- let controlState = control[extension.name] || 'marketplace';
+ const controlState = control[extension.name] || 'marketplace';
control[extension.name] = controlState;
streams.push(syncExtension(extension, controlState));
diff --git a/build/lib/bundle.js b/build/lib/bundle.js
index 8c1967d4c68..497ac4fb67e 100644
--- a/build/lib/bundle.js
+++ b/build/lib/bundle.js
@@ -42,14 +42,20 @@ function bundle(entryPoints, config, callback) {
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
+ config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
+ config.buildForceInvokeFactory['vs/nls'] = true;
+ config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);
loader(['require'], (localRequire) => {
- const resolvePath = (path) => {
- const r = localRequire.toUrl(path);
- if (!/\.js/.test(r)) {
- return r + '.js';
+ const resolvePath = (entry) => {
+ let r = localRequire.toUrl(entry.path);
+ if (!r.endsWith('.js')) {
+ r += '.js';
}
- return r;
+ // avoid packaging the build version of plugins:
+ r = r.replace('vs/nls.build.js', 'vs/nls.js');
+ r = r.replace('vs/css.build.js', 'vs/css.js');
+ return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
@@ -298,9 +304,18 @@ function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend,
if (module.shim) {
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
}
- else {
+ else if (module.defineLocation) {
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
}
+ else {
+ const moduleCopy = {
+ id: module.id,
+ path: module.path,
+ defineLocation: module.defineLocation,
+ dependencies: module.dependencies
+ };
+ throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
+ }
});
Object.keys(usedPlugins).forEach((pluginName) => {
const plugin = usedPlugins[pluginName];
@@ -321,10 +336,13 @@ function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend,
plugin.writeFile(pluginName, entryPoint, req, write, {});
}
});
- const toIFile = (path) => {
- const contents = readFileAndRemoveBOM(path);
+ const toIFile = (entry) => {
+ let contents = readFileAndRemoveBOM(entry.path);
+ if (entry.amdModuleId) {
+ contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
+ }
return {
- path: path,
+ path: entry.path,
contents: contents
};
};
diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts
index a1130d4bbbd..c5fdc2da18c 100644
--- a/build/lib/bundle.ts
+++ b/build/lib/bundle.ts
@@ -15,7 +15,7 @@ interface IPosition {
interface IBuildModuleInfo {
id: string;
path: string;
- defineLocation: IPosition;
+ defineLocation: IPosition | null;
dependencies: string[];
shim: string;
exports: any;
@@ -42,12 +42,17 @@ interface ILoaderPluginReqFunc {
toUrl(something: string): string;
}
+export interface IExtraFile {
+ path: string;
+ amdModuleId?: string;
+}
+
export interface IEntryPoint {
name: string;
include?: string[];
exclude?: string[];
- prepend?: string[];
- append?: string[];
+ prepend?: IExtraFile[];
+ append?: IExtraFile[];
dest?: string;
}
@@ -92,6 +97,13 @@ interface IPartialBundleResult {
export interface ILoaderConfig {
isBuild?: boolean;
paths?: { [path: string]: any };
+ /*
+ * Normally, during a build, no module factories are invoked. This can be used
+ * to forcefully execute a module's factory.
+ */
+ buildForceInvokeFactory: {
+ [moduleId: string]: boolean;
+ };
}
/**
@@ -132,15 +144,21 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
+ config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
+ config.buildForceInvokeFactory['vs/nls'] = true;
+ config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);
loader(['require'], (localRequire: any) => {
- const resolvePath = (path: string) => {
- const r = localRequire.toUrl(path);
- if (!/\.js/.test(r)) {
- return r + '.js';
+ const resolvePath = (entry: IExtraFile) => {
+ let r = localRequire.toUrl(entry.path);
+ if (!r.endsWith('.js')) {
+ r += '.js';
}
- return r;
+ // avoid packaging the build version of plugins:
+ r = r.replace('vs/nls.build.js', 'vs/nls.js');
+ r = r.replace('vs/css.build.js', 'vs/css.js');
+ return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
@@ -403,8 +421,8 @@ function emitEntryPoint(
deps: IGraph,
entryPoint: string,
includedModules: string[],
- prepend: string[],
- append: string[],
+ prepend: IExtraFile[],
+ append: IExtraFile[],
dest: string | undefined
): IEmitEntryPointResult {
if (!dest) {
@@ -444,8 +462,16 @@ function emitEntryPoint(
if (module.shim) {
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
- } else {
+ } else if (module.defineLocation) {
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
+ } else {
+ const moduleCopy = {
+ id: module.id,
+ path: module.path,
+ defineLocation: module.defineLocation,
+ dependencies: module.dependencies
+ };
+ throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
}
});
@@ -470,10 +496,13 @@ function emitEntryPoint(
}
});
- const toIFile = (path: string): IFile => {
- const contents = readFileAndRemoveBOM(path);
+ const toIFile = (entry: IExtraFile): IFile => {
+ let contents = readFileAndRemoveBOM(entry.path);
+ if (entry.amdModuleId) {
+ contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
+ }
return {
- path: path,
+ path: entry.path,
contents: contents
};
};
diff --git a/build/lib/compilation.js b/build/lib/compilation.js
index db489e01f9d..f5d46d7b20c 100644
--- a/build/lib/compilation.js
+++ b/build/lib/compilation.js
@@ -1,10 +1,10 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
-exports.watchApiProposalNamesTask = exports.compileApiProposalNamesTask = exports.watchTask = exports.compileTask = void 0;
+exports.watchApiProposalNamesTask = exports.compileApiProposalNamesTask = exports.watchTask = exports.compileTask = exports.transpileTask = void 0;
const es = require("event-stream");
const fs = require("fs");
const gulp = require("gulp");
@@ -19,10 +19,11 @@ const os = require("os");
const File = require("vinyl");
const task = require("./task");
const watch = require('./watch');
+// --- gulp-tsb: compile and transpile --------------------------------
const reporter = (0, reporter_1.createReporter)();
function getTypeScriptCompilerOptions(src) {
const rootDir = path.join(__dirname, `../../${src}`);
- let options = {};
+ const options = {};
options.verbose = false;
options.sourceMap = true;
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
@@ -34,7 +35,7 @@ function getTypeScriptCompilerOptions(src) {
options.newLine = /\r\n/.test(fs.readFileSync(__filename, 'utf8')) ? 0 : 1;
return options;
}
-function createCompile(src, build, emitError) {
+function createCompile(src, build, emitError, transpileOnly) {
const tsb = require('./tsb');
const sourcemaps = require('gulp-sourcemaps');
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
@@ -42,7 +43,11 @@ function createCompile(src, build, emitError) {
if (!build) {
overrideOptions.inlineSourceMap = true;
}
- const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
+ const compilation = tsb.create(projectPath, overrideOptions, {
+ verbose: false,
+ transpileOnly: Boolean(transpileOnly),
+ transpileWithSwc: typeof transpileOnly !== 'boolean' && transpileOnly.swc
+ }, err => reporter(err));
function pipeline(token) {
const bom = require('gulp-bom');
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
@@ -59,7 +64,7 @@ function createCompile(src, build, emitError) {
.pipe(noDeclarationsFilter)
.pipe(build ? nls.nls() : es.through())
.pipe(noDeclarationsFilter.restore)
- .pipe(sourcemaps.write('.', {
+ .pipe(transpileOnly ? es.through() : sourcemaps.write('.', {
addComment: false,
includeContent: !!build,
sourceRoot: overrideOptions.sourceRoot
@@ -73,14 +78,24 @@ function createCompile(src, build, emitError) {
};
return pipeline;
}
+function transpileTask(src, out, swc) {
+ return function () {
+ const transpile = createCompile(src, false, true, { swc });
+ const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
+ return srcPipe
+ .pipe(transpile())
+ .pipe(gulp.dest(out));
+ };
+}
+exports.transpileTask = transpileTask;
function compileTask(src, out, build) {
return function () {
if (os.totalmem() < 4000000000) {
throw new Error('compilation requires 4GB of RAM');
}
- const compile = createCompile(src, build, true);
+ const compile = createCompile(src, build, true, false);
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
- let generator = new MonacoGenerator(false);
+ const generator = new MonacoGenerator(false);
if (src === 'src') {
generator.execute();
}
@@ -93,10 +108,10 @@ function compileTask(src, out, build) {
exports.compileTask = compileTask;
function watchTask(out, build) {
return function () {
- const compile = createCompile('src', build);
+ const compile = createCompile('src', build, false, false);
const src = gulp.src('src/**', { base: 'src' });
const watchSrc = watch('src/**', { base: 'src', readDelay: 200 });
- let generator = new MonacoGenerator(true);
+ const generator = new MonacoGenerator(true);
generator.execute();
return watchSrc
.pipe(generator.stream)
@@ -112,7 +127,7 @@ class MonacoGenerator {
this._isWatch = isWatch;
this.stream = es.through();
this._watchedFiles = {};
- let onWillReadFile = (moduleId, filePath) => {
+ const onWillReadFile = (moduleId, filePath) => {
if (!this._isWatch) {
return;
}
@@ -149,7 +164,7 @@ class MonacoGenerator {
}, 20);
}
_run() {
- let r = monacodts.run3(this._declarationResolver);
+ const r = monacodts.run3(this._declarationResolver);
if (!r && !this._isWatch) {
// The build must always be able to generate the monaco.d.ts
throw new Error(`monaco.d.ts generation error - Cannot continue`);
@@ -178,6 +193,15 @@ class MonacoGenerator {
}
}
function generateApiProposalNames() {
+ let eol;
+ try {
+ const src = fs.readFileSync('src/vs/workbench/services/extensions/common/extensionsApiProposals.ts', 'utf-8');
+ const match = /\r?\n/m.exec(src);
+ eol = match ? match[0] : os.EOL;
+ }
+ catch {
+ eol = os.EOL;
+ }
const pattern = /vscode\.proposed\.([a-zA-Z]+)\.d\.ts$/;
const proposalNames = new Set();
const input = es.through();
@@ -200,11 +224,11 @@ function generateApiProposalNames() {
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
- `${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${os.EOL}`)}`,
+ `${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${eol}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'',
- ].join(os.EOL);
+ ].join(eol);
this.emit('data', new File({
path: 'vs/workbench/services/extensions/common/extensionsApiProposals.ts',
contents: Buffer.from(contents)
diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts
index d40b6139cc0..b9769822d73 100644
--- a/build/lib/compilation.ts
+++ b/build/lib/compilation.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as es from 'event-stream';
import * as fs from 'fs';
import * as gulp from 'gulp';
@@ -19,14 +17,16 @@ import * as os from 'os';
import ts = require('typescript');
import * as File from 'vinyl';
import * as task from './task';
-
const watch = require('./watch');
+
+// --- gulp-tsb: compile and transpile --------------------------------
+
const reporter = createReporter();
function getTypeScriptCompilerOptions(src: string): ts.CompilerOptions {
const rootDir = path.join(__dirname, `../../${src}`);
- let options: ts.CompilerOptions = {};
+ const options: ts.CompilerOptions = {};
options.verbose = false;
options.sourceMap = true;
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
@@ -39,7 +39,7 @@ function getTypeScriptCompilerOptions(src: string): ts.CompilerOptions {
return options;
}
-function createCompile(src: string, build: boolean, emitError?: boolean) {
+function createCompile(src: string, build: boolean, emitError: boolean, transpileOnly: boolean | { swc: boolean }) {
const tsb = require('./tsb') as typeof import('./tsb');
const sourcemaps = require('gulp-sourcemaps') as typeof import('gulp-sourcemaps');
@@ -50,7 +50,11 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
overrideOptions.inlineSourceMap = true;
}
- const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
+ const compilation = tsb.create(projectPath, overrideOptions, {
+ verbose: false,
+ transpileOnly: Boolean(transpileOnly),
+ transpileWithSwc: typeof transpileOnly !== 'boolean' && transpileOnly.swc
+ }, err => reporter(err));
function pipeline(token?: util.ICancellationToken) {
const bom = require('gulp-bom') as typeof import('gulp-bom');
@@ -70,7 +74,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
.pipe(noDeclarationsFilter)
.pipe(build ? nls.nls() : es.through())
.pipe(noDeclarationsFilter.restore)
- .pipe(sourcemaps.write('.', {
+ .pipe(transpileOnly ? es.through() : sourcemaps.write('.', {
addComment: false,
includeContent: !!build,
sourceRoot: overrideOptions.sourceRoot
@@ -86,6 +90,19 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
return pipeline;
}
+export function transpileTask(src: string, out: string, swc: boolean): () => NodeJS.ReadWriteStream {
+
+ return function () {
+
+ const transpile = createCompile(src, false, true, { swc });
+ const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
+
+ return srcPipe
+ .pipe(transpile())
+ .pipe(gulp.dest(out));
+ };
+}
+
export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
return function () {
@@ -94,9 +111,9 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
throw new Error('compilation requires 4GB of RAM');
}
- const compile = createCompile(src, build, true);
+ const compile = createCompile(src, build, true, false);
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
- let generator = new MonacoGenerator(false);
+ const generator = new MonacoGenerator(false);
if (src === 'src') {
generator.execute();
}
@@ -111,12 +128,12 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteStream {
return function () {
- const compile = createCompile('src', build);
+ const compile = createCompile('src', build, false, false);
const src = gulp.src('src/**', { base: 'src' });
const watchSrc = watch('src/**', { base: 'src', readDelay: 200 });
- let generator = new MonacoGenerator(true);
+ const generator = new MonacoGenerator(true);
generator.execute();
return watchSrc
@@ -140,7 +157,7 @@ class MonacoGenerator {
this._isWatch = isWatch;
this.stream = es.through();
this._watchedFiles = {};
- let onWillReadFile = (moduleId: string, filePath: string) => {
+ const onWillReadFile = (moduleId: string, filePath: string) => {
if (!this._isWatch) {
return;
}
@@ -182,7 +199,7 @@ class MonacoGenerator {
}
private _run(): monacodts.IMonacoDeclarationResult | null {
- let r = monacodts.run3(this._declarationResolver);
+ const r = monacodts.run3(this._declarationResolver);
if (!r && !this._isWatch) {
// The build must always be able to generate the monaco.d.ts
throw new Error(`monaco.d.ts generation error - Cannot continue`);
@@ -215,6 +232,16 @@ class MonacoGenerator {
}
function generateApiProposalNames() {
+ let eol: string;
+
+ try {
+ const src = fs.readFileSync('src/vs/workbench/services/extensions/common/extensionsApiProposals.ts', 'utf-8');
+ const match = /\r?\n/m.exec(src);
+ eol = match ? match[0] : os.EOL;
+ } catch {
+ eol = os.EOL;
+ }
+
const pattern = /vscode\.proposed\.([a-zA-Z]+)\.d\.ts$/;
const proposalNames = new Set();
@@ -239,11 +266,11 @@ function generateApiProposalNames() {
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
- `${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${os.EOL}`)}`,
+ `${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${eol}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'',
- ].join(os.EOL);
+ ].join(eol);
this.emit('data', new File({
path: 'vs/workbench/services/extensions/common/extensionsApiProposals.ts',
diff --git a/build/lib/dependencies.js b/build/lib/dependencies.js
index cbc6cec9d81..3b5a9e3e098 100644
--- a/build/lib/dependencies.js
+++ b/build/lib/dependencies.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProductionDependencies = void 0;
const path = require("path");
diff --git a/build/lib/dependencies.ts b/build/lib/dependencies.ts
index 516da11be67..eb195154924 100644
--- a/build/lib/dependencies.ts
+++ b/build/lib/dependencies.ts
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as path from 'path';
import * as cp from 'child_process';
import * as _ from 'underscore';
diff --git a/build/lib/electron.js b/build/lib/electron.js
index 362f6c38e69..38f13d0ff08 100644
--- a/build/lib/electron.js
+++ b/build/lib/electron.js
@@ -1,8 +1,8 @@
+"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
const fs = require("fs");
@@ -11,12 +11,13 @@ const vfs = require("vinyl-fs");
const filter = require("gulp-filter");
const _ = require("underscore");
const util = require("./util");
+const getVersion_1 = require("./getVersion");
function isDocumentSuffix(str) {
return str === 'document' || str === 'script' || str === 'file' || str === 'source code';
}
const root = path.dirname(path.dirname(__dirname));
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
-const commit = util.getVersion(root);
+const commit = (0, getVersion_1.getVersion)(root);
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
/**
* Generate a `DarwinDocumentType` given a list of file extensions, an icon name, and an optional suffix or file type name.
@@ -152,6 +153,7 @@ exports.config = {
'F# script': ['fsx', 'fsscript'],
'SVG document': ['svg', 'svgz'],
'TOML document': 'toml',
+ 'Swift source code': 'swift',
}, 'default'),
// Default icon with default name
darwinBundleDocumentType([
diff --git a/build/lib/electron.ts b/build/lib/electron.ts
index ed91f8c2f71..247de01c563 100644
--- a/build/lib/electron.ts
+++ b/build/lib/electron.ts
@@ -3,14 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as fs from 'fs';
import * as path from 'path';
import * as vfs from 'vinyl-fs';
import * as filter from 'gulp-filter';
import * as _ from 'underscore';
import * as util from './util';
+import { getVersion } from './getVersion';
type DarwinDocumentSuffix = 'document' | 'script' | 'file' | 'source code';
type DarwinDocumentType = {
@@ -28,7 +27,7 @@ function isDocumentSuffix(str?: string): str is DarwinDocumentSuffix {
const root = path.dirname(path.dirname(__dirname));
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
-const commit = util.getVersion(root);
+const commit = getVersion(root);
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
@@ -169,6 +168,7 @@ export const config = {
'F# script': ['fsx', 'fsscript'],
'SVG document': ['svg', 'svgz'],
'TOML document': 'toml',
+ 'Swift source code': 'swift',
}, 'default'),
// Default icon with default name
darwinBundleDocumentType([
diff --git a/build/lib/eslint/code-import-patterns.js b/build/lib/eslint/code-import-patterns.js
deleted file mode 100644
index 47cc3063d1c..00000000000
--- a/build/lib/eslint/code-import-patterns.js
+++ /dev/null
@@ -1,199 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const path = require("path");
-const minimatch = require("minimatch");
-const utils_1 = require("./utils");
-const REPO_ROOT = path.normalize(path.join(__dirname, '../../../'));
-function isLayerAllowRule(option) {
- return !!(option.when && option.allow);
-}
-/**
- * Returns the filename relative to the project root and using `/` as separators
- */
-function getRelativeFilename(context) {
- const filename = path.normalize(context.getFilename());
- return filename.substring(REPO_ROOT.length).replace(/\\/g, '/');
-}
-module.exports = new class {
- constructor() {
- this.meta = {
- messages: {
- badImport: 'Imports violates \'{{restrictions}}\' restrictions. See https://github.com/microsoft/vscode/wiki/Source-Code-Organization',
- badFilename: 'Missing definition in `code-import-patterns` for this file. Define rules at https://github.com/microsoft/vscode/blob/main/.eslintrc.json'
- },
- docs: {
- url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
- }
- };
- this._optionsCache = new WeakMap();
- }
- create(context) {
- const options = context.options;
- const configs = this._processOptions(options);
- const relativeFilename = getRelativeFilename(context);
- for (const config of configs) {
- if (minimatch(relativeFilename, config.target)) {
- return (0, utils_1.createImportRuleListener)((node, value) => this._checkImport(context, config, node, value));
- }
- }
- context.report({
- loc: { line: 1, column: 0 },
- messageId: 'badFilename'
- });
- return {};
- }
- _processOptions(options) {
- if (this._optionsCache.has(options)) {
- return this._optionsCache.get(options);
- }
- function orSegment(variants) {
- return (variants.length === 1 ? variants[0] : `{${variants.join(',')}}`);
- }
- const layerRules = [
- { layer: 'common', deps: orSegment(['common']) },
- { layer: 'worker', deps: orSegment(['common', 'worker']) },
- { layer: 'browser', deps: orSegment(['common', 'browser']), isBrowser: true },
- { layer: 'electron-sandbox', deps: orSegment(['common', 'browser', 'electron-sandbox']), isBrowser: true },
- { layer: 'node', deps: orSegment(['common', 'node']), isNode: true },
- { layer: 'electron-browser', deps: orSegment(['common', 'browser', 'node', 'electron-sandbox', 'electron-browser']), isBrowser: true, isNode: true },
- { layer: 'electron-main', deps: orSegment(['common', 'node', 'electron-main']), isNode: true },
- ];
- let browserAllow = [];
- let nodeAllow = [];
- let testAllow = [];
- for (const option of options) {
- if (isLayerAllowRule(option)) {
- if (option.when === 'hasBrowser') {
- browserAllow = option.allow.slice(0);
- }
- else if (option.when === 'hasNode') {
- nodeAllow = option.allow.slice(0);
- }
- else if (option.when === 'test') {
- testAllow = option.allow.slice(0);
- }
- }
- }
- function findLayer(layer) {
- for (const layerRule of layerRules) {
- if (layerRule.layer === layer) {
- return layerRule;
- }
- }
- return null;
- }
- function generateConfig(layerRule, target, rawRestrictions) {
- const restrictions = [];
- const testRestrictions = [...testAllow];
- if (layerRule.isBrowser) {
- restrictions.push(...browserAllow);
- }
- if (layerRule.isNode) {
- restrictions.push(...nodeAllow);
- }
- for (const rawRestriction of rawRestrictions) {
- let importPattern;
- let when = undefined;
- if (typeof rawRestriction === 'string') {
- importPattern = rawRestriction;
- }
- else {
- importPattern = rawRestriction.pattern;
- when = rawRestriction.when;
- }
- if (typeof when === 'undefined'
- || (when === 'hasBrowser' && layerRule.isBrowser)
- || (when === 'hasNode' && layerRule.isNode)) {
- restrictions.push(importPattern.replace(/\/\~$/, `/${layerRule.deps}/**`));
- testRestrictions.push(importPattern.replace(/\/\~$/, `/test/${layerRule.deps}/**`));
- }
- else if (when === 'test') {
- testRestrictions.push(importPattern.replace(/\/\~$/, `/${layerRule.deps}/**`));
- testRestrictions.push(importPattern.replace(/\/\~$/, `/test/${layerRule.deps}/**`));
- }
- }
- testRestrictions.push(...restrictions);
- return [
- {
- target: target.replace(/\/\~$/, `/${layerRule.layer}/**`),
- restrictions: restrictions
- },
- {
- target: target.replace(/\/\~$/, `/test/${layerRule.layer}/**`),
- restrictions: testRestrictions
- }
- ];
- }
- const configs = [];
- for (const option of options) {
- if (isLayerAllowRule(option)) {
- continue;
- }
- const target = option.target;
- const targetIsVS = /^src\/vs\//.test(target);
- const restrictions = (typeof option.restrictions === 'string' ? [option.restrictions] : option.restrictions).slice(0);
- if (targetIsVS) {
- // Always add "vs/nls"
- restrictions.push('vs/nls');
- }
- if (targetIsVS && option.layer) {
- // single layer => simple substitution for /~
- const layerRule = findLayer(option.layer);
- if (layerRule) {
- const [config, testConfig] = generateConfig(layerRule, target, restrictions);
- if (option.test) {
- configs.push(testConfig);
- }
- else {
- configs.push(config);
- }
- }
- }
- else if (targetIsVS && /\/\~$/.test(target)) {
- // generate all layers
- for (const layerRule of layerRules) {
- const [config, testConfig] = generateConfig(layerRule, target, restrictions);
- configs.push(config);
- configs.push(testConfig);
- }
- }
- else {
- configs.push({ target, restrictions: restrictions.filter(r => typeof r === 'string') });
- }
- }
- this._optionsCache.set(options, configs);
- return configs;
- }
- _checkImport(context, config, node, importPath) {
- // resolve relative paths
- if (importPath[0] === '.') {
- const relativeFilename = getRelativeFilename(context);
- importPath = path.posix.join(path.posix.dirname(relativeFilename), importPath);
- if (/^src\/vs\//.test(importPath)) {
- // resolve using AMD base url
- importPath = importPath.substring('src/'.length);
- }
- }
- const restrictions = config.restrictions;
- let matched = false;
- for (const pattern of restrictions) {
- if (minimatch(importPath, pattern)) {
- matched = true;
- break;
- }
- }
- if (!matched) {
- // None of the restrictions matched
- context.report({
- loc: node.loc,
- messageId: 'badImport',
- data: {
- restrictions: restrictions.join(' or ')
- }
- });
- }
- }
-};
diff --git a/build/lib/eslint/code-layering.js b/build/lib/eslint/code-layering.js
deleted file mode 100644
index bcb413d9db3..00000000000
--- a/build/lib/eslint/code-layering.js
+++ /dev/null
@@ -1,68 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const path_1 = require("path");
-const utils_1 = require("./utils");
-module.exports = new class {
- constructor() {
- this.meta = {
- messages: {
- layerbreaker: 'Bad layering. You are not allowed to access {{from}} from here, allowed layers are: [{{allowed}}]'
- },
- docs: {
- url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
- }
- };
- }
- create(context) {
- const fileDirname = (0, path_1.dirname)(context.getFilename());
- const parts = fileDirname.split(/\\|\//);
- const ruleArgs = context.options[0];
- let config;
- for (let i = parts.length - 1; i >= 0; i--) {
- if (ruleArgs[parts[i]]) {
- config = {
- allowed: new Set(ruleArgs[parts[i]]).add(parts[i]),
- disallowed: new Set()
- };
- Object.keys(ruleArgs).forEach(key => {
- if (!config.allowed.has(key)) {
- config.disallowed.add(key);
- }
- });
- break;
- }
- }
- if (!config) {
- // nothing
- return {};
- }
- return (0, utils_1.createImportRuleListener)((node, path) => {
- if (path[0] === '.') {
- path = (0, path_1.join)((0, path_1.dirname)(context.getFilename()), path);
- }
- const parts = (0, path_1.dirname)(path).split(/\\|\//);
- for (let i = parts.length - 1; i >= 0; i--) {
- const part = parts[i];
- if (config.allowed.has(part)) {
- // GOOD - same layer
- break;
- }
- if (config.disallowed.has(part)) {
- // BAD - wrong layer
- context.report({
- loc: node.loc,
- messageId: 'layerbreaker',
- data: {
- from: part,
- allowed: [...config.allowed.keys()].join(', ')
- }
- });
- break;
- }
- }
- });
- }
-};
diff --git a/build/lib/eslint/code-no-look-behind-regex.js b/build/lib/eslint/code-no-look-behind-regex.js
deleted file mode 100644
index 7c9c624a407..00000000000
--- a/build/lib/eslint/code-no-look-behind-regex.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-'use strict';
-Object.defineProperty(exports, "__esModule", { value: true });
-//------------------------------------------------------------------------------
-// Rule Definition
-//------------------------------------------------------------------------------
-const _positiveLookBehind = /\(\?<=.+/;
-const _negativeLookBehind = /\(\? {
- const pattern = node.regex?.pattern;
- if (_containsLookBehind(pattern)) {
- context.report({
- node,
- message: 'Look behind assertions are not yet supported in all browsers'
- });
- }
- },
- // new Regex("...")
- ['NewExpression[callee.name="RegExp"] Literal']: (node) => {
- if (_containsLookBehind(node.value)) {
- context.report({
- node,
- message: 'Look behind assertions are not yet supported in all browsers'
- });
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/code-no-nls-in-standalone-editor.js b/build/lib/eslint/code-no-nls-in-standalone-editor.js
deleted file mode 100644
index 36782a4b5bc..00000000000
--- a/build/lib/eslint/code-no-nls-in-standalone-editor.js
+++ /dev/null
@@ -1,38 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const path_1 = require("path");
-const utils_1 = require("./utils");
-module.exports = new class NoNlsInStandaloneEditorRule {
- constructor() {
- this.meta = {
- messages: {
- noNls: 'Not allowed to import vs/nls in standalone editor modules. Use standaloneStrings.ts'
- }
- };
- }
- create(context) {
- const fileName = context.getFilename();
- if (/vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(fileName)
- || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(fileName)
- || /vs(\/|\\)editor(\/|\\)editor.api/.test(fileName)
- || /vs(\/|\\)editor(\/|\\)editor.main/.test(fileName)
- || /vs(\/|\\)editor(\/|\\)editor.worker/.test(fileName)) {
- return (0, utils_1.createImportRuleListener)((node, path) => {
- // resolve relative paths
- if (path[0] === '.') {
- path = (0, path_1.join)(context.getFilename(), path);
- }
- if (/vs(\/|\\)nls/.test(path)) {
- context.report({
- loc: node.loc,
- messageId: 'noNls'
- });
- }
- });
- }
- return {};
- }
-};
diff --git a/build/lib/eslint/code-no-standalone-editor.js b/build/lib/eslint/code-no-standalone-editor.js
deleted file mode 100644
index c57bd560bcf..00000000000
--- a/build/lib/eslint/code-no-standalone-editor.js
+++ /dev/null
@@ -1,41 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const path_1 = require("path");
-const utils_1 = require("./utils");
-module.exports = new class NoNlsInStandaloneEditorRule {
- constructor() {
- this.meta = {
- messages: {
- badImport: 'Not allowed to import standalone editor modules.'
- },
- docs: {
- url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
- }
- };
- }
- create(context) {
- if (/vs(\/|\\)editor/.test(context.getFilename())) {
- // the vs/editor folder is allowed to use the standalone editor
- return {};
- }
- return (0, utils_1.createImportRuleListener)((node, path) => {
- // resolve relative paths
- if (path[0] === '.') {
- path = (0, path_1.join)(context.getFilename(), path);
- }
- if (/vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(path)
- || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(path)
- || /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
- || /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
- || /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)) {
- context.report({
- loc: node.loc,
- messageId: 'badImport'
- });
- }
- });
- }
-};
diff --git a/build/lib/eslint/code-no-test-only.js b/build/lib/eslint/code-no-test-only.js
deleted file mode 100644
index 46d144bfcaf..00000000000
--- a/build/lib/eslint/code-no-test-only.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-module.exports = new class NoTestOnly {
- create(context) {
- return {
- ['MemberExpression[object.name="test"][property.name="only"]']: (node) => {
- return context.report({
- node,
- message: 'test.only is a dev-time tool and CANNOT be pushed'
- });
- }
- };
- }
-};
diff --git a/build/lib/eslint/code-no-unexternalized-strings.js b/build/lib/eslint/code-no-unexternalized-strings.js
deleted file mode 100644
index b603f4d8e09..00000000000
--- a/build/lib/eslint/code-no-unexternalized-strings.js
+++ /dev/null
@@ -1,111 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var _a;
-const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
-function isStringLiteral(node) {
- return !!node && node.type === experimental_utils_1.AST_NODE_TYPES.Literal && typeof node.value === 'string';
-}
-function isDoubleQuoted(node) {
- return node.raw[0] === '"' && node.raw[node.raw.length - 1] === '"';
-}
-module.exports = new (_a = class NoUnexternalizedStrings {
- constructor() {
- this.meta = {
- messages: {
- doubleQuoted: 'Only use double-quoted strings for externalized strings.',
- badKey: 'The key \'{{key}}\' doesn\'t conform to a valid localize identifier.',
- duplicateKey: 'Duplicate key \'{{key}}\' with different message value.',
- badMessage: 'Message argument to \'{{message}}\' must be a string literal.'
- }
- };
- }
- create(context) {
- const externalizedStringLiterals = new Map();
- const doubleQuotedStringLiterals = new Set();
- function collectDoubleQuotedStrings(node) {
- if (isStringLiteral(node) && isDoubleQuoted(node)) {
- doubleQuotedStringLiterals.add(node);
- }
- }
- function visitLocalizeCall(node) {
- // localize(key, message)
- const [keyNode, messageNode] = node.arguments;
- // (1)
- // extract key so that it can be checked later
- let key;
- if (isStringLiteral(keyNode)) {
- doubleQuotedStringLiterals.delete(keyNode);
- key = keyNode.value;
- }
- else if (keyNode.type === experimental_utils_1.AST_NODE_TYPES.ObjectExpression) {
- for (let property of keyNode.properties) {
- if (property.type === experimental_utils_1.AST_NODE_TYPES.Property && !property.computed) {
- if (property.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier && property.key.name === 'key') {
- if (isStringLiteral(property.value)) {
- doubleQuotedStringLiterals.delete(property.value);
- key = property.value.value;
- break;
- }
- }
- }
- }
- }
- if (typeof key === 'string') {
- let array = externalizedStringLiterals.get(key);
- if (!array) {
- array = [];
- externalizedStringLiterals.set(key, array);
- }
- array.push({ call: node, message: messageNode });
- }
- // (2)
- // remove message-argument from doubleQuoted list and make
- // sure it is a string-literal
- doubleQuotedStringLiterals.delete(messageNode);
- if (!isStringLiteral(messageNode)) {
- context.report({
- loc: messageNode.loc,
- messageId: 'badMessage',
- data: { message: context.getSourceCode().getText(node) }
- });
- }
- }
- function reportBadStringsAndBadKeys() {
- // (1)
- // report all strings that are in double quotes
- for (const node of doubleQuotedStringLiterals) {
- context.report({ loc: node.loc, messageId: 'doubleQuoted' });
- }
- for (const [key, values] of externalizedStringLiterals) {
- // (2)
- // report all invalid NLS keys
- if (!key.match(NoUnexternalizedStrings._rNlsKeys)) {
- for (let value of values) {
- context.report({ loc: value.call.loc, messageId: 'badKey', data: { key } });
- }
- }
- // (2)
- // report all invalid duplicates (same key, different message)
- if (values.length > 1) {
- for (let i = 1; i < values.length; i++) {
- if (context.getSourceCode().getText(values[i - 1].message) !== context.getSourceCode().getText(values[i].message)) {
- context.report({ loc: values[i].call.loc, messageId: 'duplicateKey', data: { key } });
- }
- }
- }
- }
- }
- return {
- ['Literal']: (node) => collectDoubleQuotedStrings(node),
- ['ExpressionStatement[directive] Literal:exit']: (node) => doubleQuotedStringLiterals.delete(node),
- ['CallExpression[callee.type="MemberExpression"][callee.object.name="nls"][callee.property.name="localize"]:exit']: (node) => visitLocalizeCall(node),
- ['CallExpression[callee.name="localize"][arguments.length>=2]:exit']: (node) => visitLocalizeCall(node),
- ['Program:exit']: reportBadStringsAndBadKeys,
- };
- }
- },
- _a._rNlsKeys = /^[_a-zA-Z0-9][ .\-_a-zA-Z0-9]*$/,
- _a);
diff --git a/build/lib/eslint/code-no-unused-expressions.js b/build/lib/eslint/code-no-unused-expressions.js
deleted file mode 100644
index 530464f37b5..00000000000
--- a/build/lib/eslint/code-no-unused-expressions.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-// FORKED FROM https://github.com/eslint/eslint/blob/b23ad0d789a909baf8d7c41a35bc53df932eaf30/lib/rules/no-unused-expressions.js
-// and added support for `OptionalCallExpression`, see https://github.com/facebook/create-react-app/issues/8107 and https://github.com/eslint/eslint/issues/12642
-/**
- * @fileoverview Flag expressions in statement position that do not side effect
- * @author Michael Ficarra
- */
-'use strict';
-Object.defineProperty(exports, "__esModule", { value: true });
-//------------------------------------------------------------------------------
-// Rule Definition
-//------------------------------------------------------------------------------
-module.exports = {
- meta: {
- type: 'suggestion',
- docs: {
- description: 'disallow unused expressions',
- category: 'Best Practices',
- recommended: false,
- url: 'https://eslint.org/docs/rules/no-unused-expressions'
- },
- schema: [
- {
- type: 'object',
- properties: {
- allowShortCircuit: {
- type: 'boolean',
- default: false
- },
- allowTernary: {
- type: 'boolean',
- default: false
- },
- allowTaggedTemplates: {
- type: 'boolean',
- default: false
- }
- },
- additionalProperties: false
- }
- ]
- },
- create(context) {
- const config = context.options[0] || {}, allowShortCircuit = config.allowShortCircuit || false, allowTernary = config.allowTernary || false, allowTaggedTemplates = config.allowTaggedTemplates || false;
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param node any node
- * @returns whether the given node structurally represents a directive
- */
- function looksLikeDirective(node) {
- return node.type === 'ExpressionStatement' &&
- node.expression.type === 'Literal' && typeof node.expression.value === 'string';
- }
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param predicate ([a] -> Boolean) the function used to make the determination
- * @param list the input list
- * @returns the leading sequence of members in the given list that pass the given predicate
- */
- function takeWhile(predicate, list) {
- for (let i = 0; i < list.length; ++i) {
- if (!predicate(list[i])) {
- return list.slice(0, i);
- }
- }
- return list.slice();
- }
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param node a Program or BlockStatement node
- * @returns the leading sequence of directive nodes in the given node's body
- */
- function directives(node) {
- return takeWhile(looksLikeDirective, node.body);
- }
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param node any node
- * @param ancestors the given node's ancestors
- * @returns whether the given node is considered a directive in its current position
- */
- function isDirective(node, ancestors) {
- const parent = ancestors[ancestors.length - 1], grandparent = ancestors[ancestors.length - 2];
- return (parent.type === 'Program' || parent.type === 'BlockStatement' &&
- (/Function/u.test(grandparent.type))) &&
- directives(parent).indexOf(node) >= 0;
- }
- /**
- * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags.
- * @param node any node
- * @returns whether the given node is a valid expression
- */
- function isValidExpression(node) {
- if (allowTernary) {
- // Recursive check for ternary and logical expressions
- if (node.type === 'ConditionalExpression') {
- return isValidExpression(node.consequent) && isValidExpression(node.alternate);
- }
- }
- if (allowShortCircuit) {
- if (node.type === 'LogicalExpression') {
- return isValidExpression(node.right);
- }
- }
- if (allowTaggedTemplates && node.type === 'TaggedTemplateExpression') {
- return true;
- }
- if (node.type === 'ExpressionStatement') {
- return isValidExpression(node.expression);
- }
- return /^(?:Assignment|OptionalCall|Call|New|Update|Yield|Await|Chain)Expression$/u.test(node.type) ||
- (node.type === 'UnaryExpression' && ['delete', 'void'].indexOf(node.operator) >= 0);
- }
- return {
- ExpressionStatement(node) {
- if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) {
- context.report({ node: node, message: `Expected an assignment or function call and instead saw an expression. ${node.expression}` });
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/code-translation-remind.js b/build/lib/eslint/code-translation-remind.js
deleted file mode 100644
index 30b63429521..00000000000
--- a/build/lib/eslint/code-translation-remind.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var _a;
-const fs_1 = require("fs");
-const utils_1 = require("./utils");
-module.exports = new (_a = class TranslationRemind {
- constructor() {
- this.meta = {
- messages: {
- missing: 'Please add \'{{resource}}\' to ./build/lib/i18n.resources.json file to use translations here.'
- }
- };
- }
- create(context) {
- return (0, utils_1.createImportRuleListener)((node, path) => this._checkImport(context, node, path));
- }
- _checkImport(context, node, path) {
- if (path !== TranslationRemind.NLS_MODULE) {
- return;
- }
- const currentFile = context.getFilename();
- const matchService = currentFile.match(/vs\/workbench\/services\/\w+/);
- const matchPart = currentFile.match(/vs\/workbench\/contrib\/\w+/);
- if (!matchService && !matchPart) {
- return;
- }
- const resource = matchService ? matchService[0] : matchPart[0];
- let resourceDefined = false;
- let json;
- try {
- json = (0, fs_1.readFileSync)('./build/lib/i18n.resources.json', 'utf8');
- }
- catch (e) {
- console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.');
- return;
- }
- const workbenchResources = JSON.parse(json).workbench;
- workbenchResources.forEach((existingResource) => {
- if (existingResource.name === resource) {
- resourceDefined = true;
- return;
- }
- });
- if (!resourceDefined) {
- context.report({
- loc: node.loc,
- messageId: 'missing',
- data: { resource }
- });
- }
- }
- },
- _a.NLS_MODULE = 'vs/nls',
- _a);
diff --git a/build/lib/eslint/utils.js b/build/lib/eslint/utils.js
deleted file mode 100644
index c58e4e24be1..00000000000
--- a/build/lib/eslint/utils.js
+++ /dev/null
@@ -1,37 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * 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 });
-exports.createImportRuleListener = void 0;
-function createImportRuleListener(validateImport) {
- function _checkImport(node) {
- if (node && node.type === 'Literal' && typeof node.value === 'string') {
- validateImport(node, node.value);
- }
- }
- return {
- // import ??? from 'module'
- ImportDeclaration: (node) => {
- _checkImport(node.source);
- },
- // import('module').then(...) OR await import('module')
- ['CallExpression[callee.type="Import"][arguments.length=1] > Literal']: (node) => {
- _checkImport(node);
- },
- // import foo = ...
- ['TSImportEqualsDeclaration > TSExternalModuleReference > Literal']: (node) => {
- _checkImport(node);
- },
- // export ?? from 'module'
- ExportAllDeclaration: (node) => {
- _checkImport(node.source);
- },
- // export {foo} from 'module'
- ExportNamedDeclaration: (node) => {
- _checkImport(node.source);
- },
- };
-}
-exports.createImportRuleListener = createImportRuleListener;
diff --git a/build/lib/eslint/vscode-dts-cancellation.js b/build/lib/eslint/vscode-dts-cancellation.js
deleted file mode 100644
index d016f0d2ebc..00000000000
--- a/build/lib/eslint/vscode-dts-cancellation.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
-module.exports = new class ApiProviderNaming {
- constructor() {
- this.meta = {
- messages: {
- noToken: 'Function lacks a cancellation token, preferable as last argument',
- }
- };
- }
- create(context) {
- return {
- ['TSInterfaceDeclaration[id.name=/.+Provider/] TSMethodSignature[key.name=/^(provide|resolve).+/]']: (node) => {
- let found = false;
- for (let param of node.params) {
- if (param.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
- found = found || param.name === 'token';
- }
- }
- if (!found) {
- context.report({
- node,
- messageId: 'noToken'
- });
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/vscode-dts-create-func.js b/build/lib/eslint/vscode-dts-create-func.js
deleted file mode 100644
index e9ec659cef1..00000000000
--- a/build/lib/eslint/vscode-dts-create-func.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
-module.exports = new class ApiLiteralOrTypes {
- constructor() {
- this.meta = {
- docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#creating-objects' },
- messages: { sync: '`createXYZ`-functions are constructor-replacements and therefore must return sync', }
- };
- }
- create(context) {
- return {
- ['TSDeclareFunction Identifier[name=/create.*/]']: (node) => {
- const decl = node.parent;
- if (decl.returnType?.typeAnnotation.type !== experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
- return;
- }
- if (decl.returnType.typeAnnotation.typeName.type !== experimental_utils_1.AST_NODE_TYPES.Identifier) {
- return;
- }
- const ident = decl.returnType.typeAnnotation.typeName.name;
- if (ident === 'Promise' || ident === 'Thenable') {
- context.report({
- node,
- messageId: 'sync'
- });
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/vscode-dts-event-naming.js b/build/lib/eslint/vscode-dts-event-naming.js
deleted file mode 100644
index 1e376cca734..00000000000
--- a/build/lib/eslint/vscode-dts-event-naming.js
+++ /dev/null
@@ -1,86 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var _a;
-const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
-module.exports = new (_a = class ApiEventNaming {
- constructor() {
- this.meta = {
- docs: {
- url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#event-naming'
- },
- messages: {
- naming: 'Event names must follow this patten: `on[Did|Will]`',
- verb: 'Unknown verb \'{{verb}}\' - is this really a verb? Iff so, then add this verb to the configuration',
- subject: 'Unknown subject \'{{subject}}\' - This subject has not been used before but it should refer to something in the API',
- unknown: 'UNKNOWN event declaration, lint-rule needs tweaking'
- }
- };
- }
- create(context) {
- const config = context.options[0];
- const allowed = new Set(config.allowed);
- const verbs = new Set(config.verbs);
- return {
- ['TSTypeAnnotation TSTypeReference Identifier[name="Event"]']: (node) => {
- const def = node.parent?.parent?.parent;
- const ident = this.getIdent(def);
- if (!ident) {
- // event on unknown structure...
- return context.report({
- node,
- message: 'unknown'
- });
- }
- if (allowed.has(ident.name)) {
- // configured exception
- return;
- }
- const match = ApiEventNaming._nameRegExp.exec(ident.name);
- if (!match) {
- context.report({
- node: ident,
- messageId: 'naming'
- });
- return;
- }
- // check that is spelled out (configured) as verb
- if (!verbs.has(match[2].toLowerCase())) {
- context.report({
- node: ident,
- messageId: 'verb',
- data: { verb: match[2] }
- });
- }
- // check that a subject (if present) has occurred
- if (match[3]) {
- const regex = new RegExp(match[3], 'ig');
- const parts = context.getSourceCode().getText().split(regex);
- if (parts.length < 3) {
- context.report({
- node: ident,
- messageId: 'subject',
- data: { subject: match[3] }
- });
- }
- }
- }
- };
- }
- getIdent(def) {
- if (!def) {
- return;
- }
- if (def.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
- return def;
- }
- else if ((def.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature || def.type === experimental_utils_1.AST_NODE_TYPES.Property) && def.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
- return def.key;
- }
- return this.getIdent(def.parent);
- }
- },
- _a._nameRegExp = /on(Did|Will)([A-Z][a-z]+)([A-Z][a-z]+)?/,
- _a);
diff --git a/build/lib/eslint/vscode-dts-interface-naming.js b/build/lib/eslint/vscode-dts-interface-naming.js
deleted file mode 100644
index 70ca810825b..00000000000
--- a/build/lib/eslint/vscode-dts-interface-naming.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var _a;
-module.exports = new (_a = class ApiInterfaceNaming {
- constructor() {
- this.meta = {
- messages: {
- naming: 'Interfaces must not be prefixed with uppercase `I`',
- }
- };
- }
- create(context) {
- return {
- ['TSInterfaceDeclaration Identifier']: (node) => {
- const name = node.name;
- if (ApiInterfaceNaming._nameRegExp.test(name)) {
- context.report({
- node,
- messageId: 'naming'
- });
- }
- }
- };
- }
- },
- _a._nameRegExp = /I[A-Z]/,
- _a);
diff --git a/build/lib/eslint/vscode-dts-literal-or-types.js b/build/lib/eslint/vscode-dts-literal-or-types.js
deleted file mode 100644
index e4c075db91c..00000000000
--- a/build/lib/eslint/vscode-dts-literal-or-types.js
+++ /dev/null
@@ -1,25 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-module.exports = new class ApiLiteralOrTypes {
- constructor() {
- this.meta = {
- docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#enums' },
- messages: { useEnum: 'Use enums, not literal-or-types', }
- };
- }
- create(context) {
- return {
- ['TSTypeAnnotation TSUnionType']: (node) => {
- if (node.types.every(value => value.type === 'TSLiteralType')) {
- context.report({
- node: node,
- messageId: 'useEnum'
- });
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/vscode-dts-provider-naming.js b/build/lib/eslint/vscode-dts-provider-naming.js
deleted file mode 100644
index 0d94a8a9223..00000000000
--- a/build/lib/eslint/vscode-dts-provider-naming.js
+++ /dev/null
@@ -1,37 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var _a;
-module.exports = new (_a = class ApiProviderNaming {
- constructor() {
- this.meta = {
- messages: {
- naming: 'A provider should only have functions like provideXYZ or resolveXYZ',
- }
- };
- }
- create(context) {
- const config = context.options[0];
- const allowed = new Set(config.allowed);
- return {
- ['TSInterfaceDeclaration[id.name=/.+Provider/] TSMethodSignature']: (node) => {
- const interfaceName = node.parent?.parent.id.name;
- if (allowed.has(interfaceName)) {
- // allowed
- return;
- }
- const methodName = node.key.name;
- if (!ApiProviderNaming._providerFunctionNames.test(methodName)) {
- context.report({
- node,
- messageId: 'naming'
- });
- }
- }
- };
- }
- },
- _a._providerFunctionNames = /^(provide|resolve|prepare).+/,
- _a);
diff --git a/build/lib/eslint/vscode-dts-region-comments.js b/build/lib/eslint/vscode-dts-region-comments.js
deleted file mode 100644
index 2dc9487314e..00000000000
--- a/build/lib/eslint/vscode-dts-region-comments.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-module.exports = new class ApiEventNaming {
- constructor() {
- this.meta = {
- messages: {
- comment: 'region comments should start with a camel case identifier, `:`, then either a GH issue link or owner, e.g #region myProposalName: https://github.com/microsoft/vscode/issues/',
- }
- };
- }
- create(context) {
- const sourceCode = context.getSourceCode();
- return {
- ['Program']: (_node) => {
- for (const comment of sourceCode.getAllComments()) {
- if (comment.type !== 'Line') {
- continue;
- }
- if (!/^\s*#region /.test(comment.value)) {
- continue;
- }
- if (!/^\s*#region ([a-z]+): (@[a-z]+|https:\/\/github.com\/microsoft\/vscode\/issues\/\d+)/i.test(comment.value)) {
- context.report({
- node: comment,
- messageId: 'comment',
- });
- }
- }
- }
- };
- }
-};
diff --git a/build/lib/eslint/vscode-dts-use-thenable.js b/build/lib/eslint/vscode-dts-use-thenable.js
deleted file mode 100644
index 7e23953cb69..00000000000
--- a/build/lib/eslint/vscode-dts-use-thenable.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-module.exports = new class ApiEventNaming {
- constructor() {
- this.meta = {
- messages: {
- usage: 'Use the Thenable-type instead of the Promise type',
- }
- };
- }
- create(context) {
- return {
- ['TSTypeAnnotation TSTypeReference Identifier[name="Promise"]']: (node) => {
- context.report({
- node,
- messageId: 'usage',
- });
- }
- };
- }
-};
diff --git a/build/lib/eslint/vscode-dts-vscode-in-comments.js b/build/lib/eslint/vscode-dts-vscode-in-comments.js
deleted file mode 100644
index 8f9a13fb01f..00000000000
--- a/build/lib/eslint/vscode-dts-vscode-in-comments.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-module.exports = new class ApiVsCodeInComments {
- constructor() {
- this.meta = {
- messages: {
- comment: `Don't use the term 'vs code' in comments`
- }
- };
- }
- create(context) {
- const sourceCode = context.getSourceCode();
- return {
- ['Program']: (_node) => {
- for (const comment of sourceCode.getAllComments()) {
- if (comment.type !== 'Block') {
- continue;
- }
- if (!comment.range) {
- continue;
- }
- const startIndex = comment.range[0] + '/*'.length;
- const re = /vs code/ig;
- let match;
- while ((match = re.exec(comment.value))) {
- // Allow using 'VS Code' in quotes
- if (comment.value[match.index - 1] === `'` && comment.value[match.index + match[0].length] === `'`) {
- continue;
- }
- // Types for eslint seem incorrect
- const start = sourceCode.getLocFromIndex(startIndex + match.index);
- const end = sourceCode.getLocFromIndex(startIndex + match.index + match[0].length);
- context.report({
- messageId: 'comment',
- loc: { start, end }
- });
- }
- }
- }
- };
- }
-};
diff --git a/build/lib/extensions.js b/build/lib/extensions.js
index 50fc4dd945b..f69b3322018 100644
--- a/build/lib/extensions.js
+++ b/build/lib/extensions.js
@@ -25,9 +25,10 @@ const buffer = require('gulp-buffer');
const jsoncParser = require("jsonc-parser");
const dependencies_1 = require("./dependencies");
const _ = require("underscore");
-const util = require('./util');
+const builtInExtensions_1 = require("./builtInExtensions");
+const getVersion_1 = require("./getVersion");
const root = path.dirname(path.dirname(__dirname));
-const commit = util.getVersion(root);
+const commit = (0, getVersion_1.getVersion)(root);
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
function minifyExtensionResources(input) {
const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true });
@@ -245,8 +246,6 @@ const excludedExtensions = [
'vscode-test-resolver',
'ms-vscode.node-debug',
'ms-vscode.node-debug2',
- 'vscode-notebook-tests',
- 'vscode-custom-editor-tests',
];
const marketplaceWebExtensionsExclude = new Set([
'ms-vscode.node-debug',
@@ -313,16 +312,15 @@ function packageLocalExtensionsStream(forWeb) {
.pipe(util2.setExecutableBit(['**/*.sh'])));
}
exports.packageLocalExtensionsStream = packageLocalExtensionsStream;
-function packageMarketplaceExtensionsStream(forWeb, galleryServiceUrl) {
+function packageMarketplaceExtensionsStream(forWeb) {
const marketplaceExtensionsDescriptions = [
...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)),
...(forWeb ? webBuiltInExtensions : [])
];
const marketplaceExtensionsStream = minifyExtensionResources(es.merge(...marketplaceExtensionsDescriptions
.map(extension => {
- const input = (galleryServiceUrl ? fromMarketplace(galleryServiceUrl, extension) : fromGithub(extension))
- .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
- return updateExtensionPackageJSON(input, (data) => {
+ const src = (0, builtInExtensions_1.getExtensionStream)(extension).pipe(rename(p => p.dirname = `extensions/${p.dirname}`));
+ return updateExtensionPackageJSON(src, (data) => {
delete data.scripts;
delete data.dependencies;
delete data.devDependencies;
@@ -345,19 +343,27 @@ function scanBuiltinExtensions(extensionsRoot, exclude = []) {
if (!fs.existsSync(packageJSONPath)) {
continue;
}
- let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
+ const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
if (!isWebExtension(packageJSON)) {
continue;
}
const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder));
const packageNLSPath = children.filter(child => child === 'package.nls.json')[0];
const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined;
+ let browserNlsMetadataPath;
+ if (packageJSON.browser) {
+ const browserEntrypointFolderPath = path.join(extensionFolder, path.dirname(packageJSON.browser));
+ if (fs.existsSync(path.join(extensionsRoot, browserEntrypointFolderPath, 'nls.metadata.json'))) {
+ browserNlsMetadataPath = path.join(browserEntrypointFolderPath, 'nls.metadata.json');
+ }
+ }
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];
scannedExtensions.push({
extensionPath: extensionFolder,
packageJSON,
packageNLS,
+ browserNlsMetadataPath,
readmePath: readme ? path.join(extensionFolder, readme) : undefined,
changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined,
});
@@ -373,7 +379,7 @@ function translatePackageJSON(packageJSON, packageNLSPath) {
const CharCode_PC = '%'.charCodeAt(0);
const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString());
const translate = (obj) => {
- for (let key in obj) {
+ for (const key in obj) {
const val = obj[key];
if (Array.isArray(val)) {
val.forEach(translate);
@@ -400,6 +406,7 @@ const esbuildMediaScripts = [
'markdown-language-features/esbuild-preview.js',
'markdown-math/esbuild.js',
'notebook-renderers/esbuild.js',
+ 'ipynb/esbuild.js',
'simple-browser/esbuild-preview.js',
];
async function webpackExtensions(taskName, isWatch, webpackConfigLocations) {
diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts
index 312b830b903..36f29fcf3a1 100644
--- a/build/lib/extensions.ts
+++ b/build/lib/extensions.ts
@@ -25,9 +25,11 @@ import * as jsoncParser from 'jsonc-parser';
import webpack = require('webpack');
import { getProductionDependencies } from './dependencies';
import _ = require('underscore');
-const util = require('./util');
+import { getExtensionStream } from './builtInExtensions';
+import { getVersion } from './getVersion';
+
const root = path.dirname(path.dirname(__dirname));
-const commit = util.getVersion(root);
+const commit = getVersion(root);
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
function minifyExtensionResources(input: Stream): Stream {
@@ -285,8 +287,6 @@ const excludedExtensions = [
'vscode-test-resolver',
'ms-vscode.node-debug',
'ms-vscode.node-debug2',
- 'vscode-notebook-tests',
- 'vscode-custom-editor-tests',
];
const marketplaceWebExtensionsExclude = new Set([
@@ -382,7 +382,7 @@ export function packageLocalExtensionsStream(forWeb: boolean): Stream {
);
}
-export function packageMarketplaceExtensionsStream(forWeb: boolean, galleryServiceUrl?: string): Stream {
+export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream {
const marketplaceExtensionsDescriptions = [
...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)),
...(forWeb ? webBuiltInExtensions : [])
@@ -391,9 +391,8 @@ export function packageMarketplaceExtensionsStream(forWeb: boolean, galleryServi
es.merge(
...marketplaceExtensionsDescriptions
.map(extension => {
- const input = (galleryServiceUrl ? fromMarketplace(galleryServiceUrl, extension) : fromGithub(extension))
- .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
- return updateExtensionPackageJSON(input, (data: any) => {
+ const src = getExtensionStream(extension).pipe(rename(p => p.dirname = `extensions/${p.dirname}`));
+ return updateExtensionPackageJSON(src, (data: any) => {
delete data.scripts;
delete data.dependencies;
delete data.devDependencies;
@@ -413,6 +412,7 @@ export interface IScannedBuiltinExtension {
extensionPath: string;
packageJSON: any;
packageNLS?: any;
+ browserNlsMetadataPath?: string;
readmePath?: string;
changelogPath?: string;
}
@@ -430,13 +430,20 @@ export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[]
if (!fs.existsSync(packageJSONPath)) {
continue;
}
- let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
+ const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
if (!isWebExtension(packageJSON)) {
continue;
}
const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder));
const packageNLSPath = children.filter(child => child === 'package.nls.json')[0];
const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined;
+ let browserNlsMetadataPath: string | undefined;
+ if (packageJSON.browser) {
+ const browserEntrypointFolderPath = path.join(extensionFolder, path.dirname(packageJSON.browser));
+ if (fs.existsSync(path.join(extensionsRoot, browserEntrypointFolderPath, 'nls.metadata.json'))) {
+ browserNlsMetadataPath = path.join(browserEntrypointFolderPath, 'nls.metadata.json');
+ }
+ }
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];
@@ -444,6 +451,7 @@ export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[]
extensionPath: extensionFolder,
packageJSON,
packageNLS,
+ browserNlsMetadataPath,
readmePath: readme ? path.join(extensionFolder, readme) : undefined,
changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined,
});
@@ -461,7 +469,7 @@ export function translatePackageJSON(packageJSON: string, packageNLSPath: string
const CharCode_PC = '%'.charCodeAt(0);
const packageNls: NLSFormat = JSON.parse(fs.readFileSync(packageNLSPath).toString());
const translate = (obj: any) => {
- for (let key in obj) {
+ for (const key in obj) {
const val = obj[key];
if (Array.isArray(val)) {
val.forEach(translate);
@@ -487,6 +495,7 @@ const esbuildMediaScripts = [
'markdown-language-features/esbuild-preview.js',
'markdown-math/esbuild.js',
'notebook-renderers/esbuild.js',
+ 'ipynb/esbuild.js',
'simple-browser/esbuild-preview.js',
];
@@ -500,7 +509,7 @@ export async function webpackExtensions(taskName: string, isWatch: boolean, webp
function addConfig(configOrFn: webpack.Configuration | Function) {
let config;
if (typeof configOrFn === 'function') {
- config = configOrFn({}, {});
+ config = (configOrFn as Function)({}, {});
webpackConfigs.push(config);
} else {
config = configOrFn;
diff --git a/build/lib/getVersion.js b/build/lib/getVersion.js
new file mode 100644
index 00000000000..3f51e62f80d
--- /dev/null
+++ b/build/lib/getVersion.js
@@ -0,0 +1,16 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ * 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 });
+exports.getVersion = void 0;
+const git = require("./git");
+function getVersion(root) {
+ let version = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
+ if (!version || !/^[0-9a-f]{40}$/i.test(version.trim())) {
+ version = git.getVersion(root);
+ }
+ return version;
+}
+exports.getVersion = getVersion;
diff --git a/build/lib/getVersion.ts b/build/lib/getVersion.ts
new file mode 100644
index 00000000000..461302962d2
--- /dev/null
+++ b/build/lib/getVersion.ts
@@ -0,0 +1,16 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as git from './git';
+
+export function getVersion(root: string): string | undefined {
+ let version = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
+
+ if (!version || !/^[0-9a-f]{40}$/i.test(version.trim())) {
+ version = git.getVersion(root);
+ }
+
+ return version;
+}
diff --git a/build/lib/git.js b/build/lib/git.js
index 1726f76fcc7..0aa340347ac 100644
--- a/build/lib/git.js
+++ b/build/lib/git.js
@@ -1,10 +1,10 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getVersion = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.getVersion = void 0;
const path = require("path");
const fs = require("fs");
/**
@@ -45,7 +45,7 @@ function getVersion(repo) {
}
const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
let refsMatch;
- let refs = {};
+ const refs = {};
while (refsMatch = refsRegex.exec(refsRaw)) {
refs[refsMatch[2]] = refsMatch[1];
}
diff --git a/build/lib/git.ts b/build/lib/git.ts
index dc9c667c21b..dbb424f21df 100644
--- a/build/lib/git.ts
+++ b/build/lib/git.ts
@@ -2,8 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-'use strict';
-
import * as path from 'path';
import * as fs from 'fs';
@@ -51,7 +49,7 @@ export function getVersion(repo: string): string | undefined {
const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
let refsMatch: RegExpExecArray | null;
- let refs: { [ref: string]: string } = {};
+ const refs: { [ref: string]: string } = {};
while (refsMatch = refsRegex.exec(refsRaw)) {
refs[refsMatch[2]] = refsMatch[1];
diff --git a/build/lib/i18n.js b/build/lib/i18n.js
index e89cdf1504e..24e622bc7a8 100644
--- a/build/lib/i18n.js
+++ b/build/lib/i18n.js
@@ -4,19 +4,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
-exports.prepareIslFiles = exports.prepareI18nPackFiles = exports.prepareI18nFiles = exports.pullSetupXlfFiles = exports.findObsoleteResources = exports.pushXlfFiles = exports.createXlfFilesForIsl = exports.createXlfFilesForExtensions = exports.createXlfFilesForCoreBundle = exports.getResource = exports.processNlsFiles = exports.Limiter = exports.XLF = exports.Line = exports.externalExtensionsWithTranslations = exports.extraLanguages = exports.defaultLanguages = void 0;
+exports.prepareIslFiles = exports.prepareI18nPackFiles = exports.createXlfFilesForIsl = exports.createXlfFilesForExtensions = exports.createXlfFilesForCoreBundle = exports.getResource = exports.processNlsFiles = exports.XLF = exports.Line = exports.extraLanguages = exports.defaultLanguages = void 0;
const path = require("path");
const fs = require("fs");
const event_stream_1 = require("event-stream");
const File = require("vinyl");
const Is = require("is");
const xml2js = require("xml2js");
-const https = require("https");
const gulp = require("gulp");
const fancyLog = require("fancy-log");
const ansiColors = require("ansi-colors");
const iconv = require("@vscode/iconv-lite-umd");
-const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
+const l10n_dev_1 = require("@vscode/l10n-dev");
function log(message, ...rest) {
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
}
@@ -38,7 +37,7 @@ exports.extraLanguages = [
{ id: 'tr', folderName: 'trk' }
];
// non built-in extensions also that are transifex and need to be part of the language packs
-exports.externalExtensionsWithTranslations = {
+const externalExtensionsWithTranslations = {
'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome',
'vscode-node-debug': 'ms-vscode.node-debug',
'vscode-node-debug2': 'ms-vscode.node-debug2'
@@ -46,7 +45,7 @@ exports.externalExtensionsWithTranslations = {
var LocalizeInfo;
(function (LocalizeInfo) {
function is(value) {
- let candidate = value;
+ const candidate = value;
return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(element => Is.string(element))));
}
LocalizeInfo.is = is;
@@ -57,25 +56,12 @@ var BundledFormat;
if (Is.undef(value)) {
return false;
}
- let candidate = value;
- let length = Object.keys(value).length;
+ const candidate = value;
+ const length = Object.keys(value).length;
return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles);
}
BundledFormat.is = is;
})(BundledFormat || (BundledFormat = {}));
-var PackageJsonFormat;
-(function (PackageJsonFormat) {
- function is(value) {
- if (Is.undef(value) || !Is.object(value)) {
- return false;
- }
- return Object.keys(value).every(key => {
- let element = value[key];
- return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment));
- });
- }
- PackageJsonFormat.is = is;
-})(PackageJsonFormat || (PackageJsonFormat = {}));
class Line {
constructor(indent = 0) {
this.buffer = [];
@@ -133,9 +119,9 @@ class XLF {
}
this.numberOfMessages += keys.length;
this.files[original] = [];
- let existingKeys = new Set();
+ const existingKeys = new Set();
for (let i = 0; i < keys.length; i++) {
- let key = keys[i];
+ const key = keys[i];
let realKey;
let comment;
if (Is.string(key)) {
@@ -152,7 +138,7 @@ class XLF {
continue;
}
existingKeys.add(realKey);
- let message = encodeEntities(messages[i]);
+ const message = encodeEntities(messages[i]);
this.files[original].push({ id: realKey, message: message, comment: comment });
}
}
@@ -178,41 +164,16 @@ class XLF {
this.appendNewLine('', 0);
}
appendNewLine(content, indent) {
- let line = new Line(indent);
+ const line = new Line(indent);
line.append(content);
this.buffer.push(line.toString());
}
}
exports.XLF = XLF;
-XLF.parsePseudo = function (xlfString) {
- return new Promise((resolve) => {
- let parser = new xml2js.Parser();
- let files = [];
- parser.parseString(xlfString, function (_err, result) {
- const fileNodes = result['xliff']['file'];
- fileNodes.forEach(file => {
- const originalFilePath = file.$.original;
- const messages = {};
- const transUnits = file.body[0]['trans-unit'];
- if (transUnits) {
- transUnits.forEach((unit) => {
- const key = unit.$.id;
- const val = pseudify(unit.source[0]['_'].toString());
- if (key && val) {
- messages[key] = decodeEntities(val);
- }
- });
- files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' });
- }
- });
- resolve(files);
- });
- });
-};
XLF.parse = function (xlfString) {
return new Promise((resolve, reject) => {
- let parser = new xml2js.Parser();
- let files = [];
+ const parser = new xml2js.Parser();
+ const files = [];
parser.parseString(xlfString, function (err, result) {
if (err) {
reject(new Error(`XLF parsing error: Failed to parse XLIFF string. ${err}`));
@@ -222,11 +183,11 @@ XLF.parse = function (xlfString) {
reject(new Error(`XLF parsing error: XLIFF file does not contain "xliff" or "file" node(s) required for parsing.`));
}
fileNodes.forEach((file) => {
- const originalFilePath = file.$.original;
- if (!originalFilePath) {
+ const name = file.$.original;
+ if (!name) {
reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`));
}
- let language = file.$['target-language'];
+ const language = file.$['target-language'];
if (!language) {
reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`));
}
@@ -244,45 +205,18 @@ XLF.parse = function (xlfString) {
val = val._ ? val._ : '';
}
if (!key) {
- reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`));
+ reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${name} is missing the ID attribute.`));
return;
}
messages[key] = decodeEntities(val);
});
- files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
+ files.push({ messages, name, language: language.toLowerCase() });
}
});
resolve(files);
});
});
};
-class Limiter {
- constructor(maxDegreeOfParalellism) {
- this.maxDegreeOfParalellism = maxDegreeOfParalellism;
- this.outstandingPromises = [];
- this.runningPromises = 0;
- }
- queue(factory) {
- return new Promise((c, e) => {
- this.outstandingPromises.push({ factory, c, e });
- this.consume();
- });
- }
- consume() {
- while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) {
- const iLimitedTask = this.outstandingPromises.shift();
- this.runningPromises++;
- const promise = iLimitedTask.factory();
- promise.then(iLimitedTask.c).catch(iLimitedTask.e);
- promise.then(() => this.consumed()).catch(() => this.consumed());
- }
- }
- consumed() {
- this.runningPromises--;
- this.consume();
- }
-}
-exports.Limiter = Limiter;
function sortLanguages(languages) {
return languages.sort((a, b) => {
return a.id < b.id ? -1 : (a.id > b.id ? 1 : 0);
@@ -295,9 +229,10 @@ function stripComments(content) {
// Second group matches a single quoted string
// Third group matches a multi line comment
// Forth group matches a single line comment
- const regexp = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
- let result = content.replace(regexp, (match, _m1, _m2, m3, m4) => {
- // Only one of m1, m2, m3, m4 matches
+ // Fifth group matches a trailing comma
+ const regexp = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g;
+ const result = content.replace(regexp, (match, _m1, _m2, m3, m4, m5) => {
+ // Only one of m1, m2, m3, m4, m5 matches
if (m3) {
// A block comment. Replace with nothing
return '';
@@ -313,6 +248,10 @@ function stripComments(content) {
return '';
}
}
+ else if (m5) {
+ // Remove the trailing comma
+ return match.substring(1);
+ }
else {
// We match a string
return match;
@@ -356,20 +295,20 @@ function escapeCharacters(value) {
return result.join('');
}
function processCoreBundleFormat(fileHeader, languages, json, emitter) {
- let keysSection = json.keys;
- let messageSection = json.messages;
- let bundleSection = json.bundles;
- let statistics = Object.create(null);
- let defaultMessages = Object.create(null);
- let modules = Object.keys(keysSection);
+ const keysSection = json.keys;
+ const messageSection = json.messages;
+ const bundleSection = json.bundles;
+ const statistics = Object.create(null);
+ const defaultMessages = Object.create(null);
+ const modules = Object.keys(keysSection);
modules.forEach((module) => {
- let keys = keysSection[module];
- let messages = messageSection[module];
+ const keys = keysSection[module];
+ const messages = messageSection[module];
if (!messages || keys.length !== messages.length) {
emitter.emit('error', `Message for module ${module} corrupted. Mismatch in number of keys and messages.`);
return;
}
- let messageMap = Object.create(null);
+ const messageMap = Object.create(null);
defaultMessages[module] = messageMap;
keys.map((key, i) => {
if (typeof key === 'string') {
@@ -380,27 +319,27 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
}
});
});
- let languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n');
+ const languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n');
if (!fs.existsSync(languageDirectory)) {
log(`No VS Code localization repository found. Looking at ${languageDirectory}`);
log(`To bundle translations please check out the vscode-loc repository as a sibling of the vscode repository.`);
}
- let sortedLanguages = sortLanguages(languages);
+ const sortedLanguages = sortLanguages(languages);
sortedLanguages.forEach((language) => {
if (process.env['VSCODE_BUILD_VERBOSE']) {
log(`Generating nls bundles for: ${language.id}`);
}
statistics[language.id] = 0;
- let localizedModules = Object.create(null);
- let languageFolderName = language.translationId || language.id;
- let i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json');
+ const localizedModules = Object.create(null);
+ const languageFolderName = language.translationId || language.id;
+ const i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json');
let allMessages;
if (fs.existsSync(i18nFile)) {
- let content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
+ const content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
allMessages = JSON.parse(content);
}
modules.forEach((module) => {
- let order = keysSection[module];
+ const order = keysSection[module];
let moduleMessage;
if (allMessages) {
moduleMessage = allMessages.contents[module];
@@ -412,7 +351,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
moduleMessage = defaultMessages[module];
statistics[language.id] = statistics[language.id] + Object.keys(moduleMessage).length;
}
- let localizedMessages = [];
+ const localizedMessages = [];
order.forEach((keyInfo) => {
let key = null;
if (typeof keyInfo === 'string') {
@@ -434,14 +373,14 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
localizedModules[module] = localizedMessages;
});
Object.keys(bundleSection).forEach((bundle) => {
- let modules = bundleSection[bundle];
- let contents = [
+ const modules = bundleSection[bundle];
+ const contents = [
fileHeader,
`define("${bundle}.nls.${language.id}", {`
];
modules.forEach((module, index) => {
contents.push(`\t"${module}": [`);
- let messages = localizedModules[module];
+ const messages = localizedModules[module];
if (!messages) {
emitter.emit('error', `Didn't find messages for module ${module}.`);
return;
@@ -456,11 +395,11 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
});
});
Object.keys(statistics).forEach(key => {
- let value = statistics[key];
+ const value = statistics[key];
log(`${key} has ${value} untranslated strings.`);
});
sortedLanguages.forEach(language => {
- let stats = statistics[language.id];
+ const stats = statistics[language.id];
if (Is.undef(stats)) {
log(`\tNo translations found for language ${language.id}. Using default language instead.`);
}
@@ -468,7 +407,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
}
function processNlsFiles(opts) {
return (0, event_stream_1.through)(function (file) {
- let fileName = path.basename(file.path);
+ const fileName = path.basename(file.path);
if (fileName === 'nls.metadata.json') {
let json = null;
if (file.isBuffer()) {
@@ -486,7 +425,7 @@ function processNlsFiles(opts) {
});
}
exports.processNlsFiles = processNlsFiles;
-const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup';
+const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup', serverProject = 'vscode-server';
function getResource(sourceFile) {
let resource;
if (/^vs\/platform/.test(sourceFile)) {
@@ -504,6 +443,9 @@ function getResource(sourceFile) {
else if (/^vs\/code/.test(sourceFile)) {
return { name: 'vs/code', project: workbenchProject };
}
+ else if (/^vs\/server/.test(sourceFile)) {
+ return { name: 'vs/server', project: serverProject };
+ }
else if (/^vs\/workbench\/contrib/.test(sourceFile)) {
resource = sourceFile.split('/', 4).join('/');
return { name: resource, project: workbenchProject };
@@ -525,7 +467,7 @@ function createXlfFilesForCoreBundle() {
if (file.isBuffer()) {
const xlfs = Object.create(null);
const json = JSON.parse(file.contents.toString('utf8'));
- for (let coreModule in json.keys) {
+ for (const coreModule in json.keys) {
const projectResource = getResource(coreModule);
const resource = projectResource.name;
const project = projectResource.project;
@@ -544,7 +486,7 @@ function createXlfFilesForCoreBundle() {
xlf.addFile(`src/${coreModule}`, keys, messages);
}
}
- for (let resource in xlfs) {
+ for (const resource in xlfs) {
const xlf = xlfs[resource];
const filePath = `${xlf.project}/${resource.replace(/\//g, '_')}.xlf`;
const xlfFile = new File({
@@ -566,6 +508,28 @@ function createXlfFilesForCoreBundle() {
});
}
exports.createXlfFilesForCoreBundle = createXlfFilesForCoreBundle;
+function createL10nBundleForExtension(extensionName) {
+ const result = (0, event_stream_1.through)();
+ gulp.src([
+ `extensions/${extensionName}/src/**/*.ts`,
+ ]).pipe((0, event_stream_1.writeArray)((err, files) => {
+ if (err) {
+ result.emit('error', err);
+ return;
+ }
+ const json = (0, l10n_dev_1.getL10nJson)(files.map(file => {
+ return file.contents.toString('utf8');
+ }));
+ if (Object.keys(json).length > 0) {
+ result.emit('data', new File({
+ path: `${extensionName}/bundle.l10n.json`,
+ contents: Buffer.from(JSON.stringify(json), 'utf8')
+ }));
+ }
+ result.emit('end');
+ }));
+ return result;
+}
function createXlfFilesForExtensions() {
let counter = 0;
let folderStreamEnded = false;
@@ -576,57 +540,56 @@ function createXlfFilesForExtensions() {
if (!stat.isDirectory()) {
return;
}
- let extensionName = path.basename(extensionFolder.path);
+ const extensionName = path.basename(extensionFolder.path);
if (extensionName === 'node_modules') {
return;
}
counter++;
- let _xlf;
- function getXlf() {
- if (!_xlf) {
- _xlf = new XLF(extensionsProject);
+ let _l10nMap;
+ function getL10nMap() {
+ if (!_l10nMap) {
+ _l10nMap = new Map();
}
- return _xlf;
+ return _l10nMap;
}
- gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe((0, event_stream_1.through)(function (file) {
+ (0, event_stream_1.merge)(gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }), createL10nBundleForExtension(extensionName)).pipe((0, event_stream_1.through)(function (file) {
if (file.isBuffer()) {
const buffer = file.contents;
const basename = path.basename(file.path);
if (basename === 'package.nls.json') {
const json = JSON.parse(buffer.toString('utf8'));
- const keys = Object.keys(json);
- const messages = keys.map((key) => {
- const value = json[key];
- if (Is.string(value)) {
- return value;
- }
- else if (value) {
- return value.message;
- }
- else {
- return `Unknown message for key: ${key}`;
- }
- });
- getXlf().addFile(`extensions/${extensionName}/package`, keys, messages);
+ getL10nMap().set(`extensions/${extensionName}/package`, json);
}
else if (basename === 'nls.metadata.json') {
const json = JSON.parse(buffer.toString('utf8'));
const relPath = path.relative(`.build/extensions/${extensionName}`, path.dirname(file.path));
- for (let file in json) {
+ for (const file in json) {
const fileContent = json[file];
- getXlf().addFile(`extensions/${extensionName}/${relPath}/${file}`, fileContent.keys, fileContent.messages);
+ const info = Object.create(null);
+ for (let i = 0; i < fileContent.messages.length; i++) {
+ const message = fileContent.messages[i];
+ const { key, comment } = LocalizeInfo.is(fileContent.keys[i])
+ ? fileContent.keys[i]
+ : { key: fileContent.keys[i], comment: undefined };
+ info[key] = comment ? { message, comment } : message;
+ }
+ getL10nMap().set(`extensions/${extensionName}/${relPath}/${file}`, info);
}
}
+ else if (basename === 'bundle.l10n.json') {
+ const json = JSON.parse(buffer.toString('utf8'));
+ getL10nMap().set(`extensions/${extensionName}/bundle`, json);
+ }
else {
this.emit('error', new Error(`${file.path} is not a valid extension nls file`));
return;
}
}
}, function () {
- if (_xlf) {
- let xlfFile = new File({
+ if (_l10nMap?.size > 0) {
+ const xlfFile = new File({
path: path.join(extensionsProject, extensionName + '.xlf'),
- contents: Buffer.from(_xlf.toString(), 'utf8')
+ contents: Buffer.from((0, l10n_dev_1.getL10nXlf)(_l10nMap), 'utf8')
});
folderStream.queue(xlfFile);
}
@@ -656,14 +619,14 @@ function createXlfFilesForIsl() {
else {
throw new Error(`Unknown input file ${file.path}`);
}
- let xlf = new XLF(projectName), keys = [], messages = [];
- let model = new TextModel(file.contents.toString());
+ const xlf = new XLF(projectName), keys = [], messages = [];
+ const model = new TextModel(file.contents.toString());
let inMessageSection = false;
model.lines.forEach(line => {
if (line.length === 0) {
return;
}
- let firstChar = line.charAt(0);
+ const firstChar = line.charAt(0);
switch (firstChar) {
case ';':
// Comment line;
@@ -675,13 +638,13 @@ function createXlfFilesForIsl() {
if (!inMessageSection) {
return;
}
- let sections = line.split('=');
+ const sections = line.split('=');
if (sections.length !== 2) {
throw new Error(`Badly formatted message found: ${line}`);
}
else {
- let key = sections[0];
- let value = sections[1];
+ const key = sections[0];
+ const value = sections[1];
if (key.length > 0 && value.length > 0) {
keys.push(key);
messages.push(value);
@@ -697,300 +660,8 @@ function createXlfFilesForIsl() {
});
}
exports.createXlfFilesForIsl = createXlfFilesForIsl;
-function pushXlfFiles(apiHostname, username, password) {
- let tryGetPromises = [];
- let updateCreatePromises = [];
- return (0, event_stream_1.through)(function (file) {
- const project = path.dirname(file.relative);
- const fileName = path.basename(file.path);
- const slug = fileName.substr(0, fileName.length - '.xlf'.length);
- const credentials = `${username}:${password}`;
- // Check if resource already exists, if not, then create it.
- let promise = tryGetResource(project, slug, apiHostname, credentials);
- tryGetPromises.push(promise);
- promise.then(exists => {
- if (exists) {
- promise = updateResource(project, slug, file, apiHostname, credentials);
- }
- else {
- promise = createResource(project, slug, file, apiHostname, credentials);
- }
- updateCreatePromises.push(promise);
- });
- }, function () {
- // End the pipe only after all the communication with Transifex API happened
- Promise.all(tryGetPromises).then(() => {
- Promise.all(updateCreatePromises).then(() => {
- this.queue(null);
- }).catch((reason) => { throw new Error(reason); });
- }).catch((reason) => { throw new Error(reason); });
- });
-}
-exports.pushXlfFiles = pushXlfFiles;
-function getAllResources(project, apiHostname, username, password) {
- return new Promise((resolve, reject) => {
- const credentials = `${username}:${password}`;
- const options = {
- hostname: apiHostname,
- path: `/api/2/project/${project}/resources`,
- auth: credentials,
- method: 'GET'
- };
- const request = https.request(options, (res) => {
- let buffer = [];
- res.on('data', (chunk) => buffer.push(chunk));
- res.on('end', () => {
- if (res.statusCode === 200) {
- let json = JSON.parse(Buffer.concat(buffer).toString());
- if (Array.isArray(json)) {
- resolve(json.map(o => o.slug));
- return;
- }
- reject(`Unexpected data format. Response code: ${res.statusCode}.`);
- }
- else {
- reject(`No resources in ${project} returned no data. Response code: ${res.statusCode}.`);
- }
- });
- });
- request.on('error', (err) => {
- reject(`Failed to query resources in ${project} with the following error: ${err}. ${options.path}`);
- });
- request.end();
- });
-}
-function findObsoleteResources(apiHostname, username, password) {
- let resourcesByProject = Object.create(null);
- resourcesByProject[extensionsProject] = [].concat(exports.externalExtensionsWithTranslations); // clone
- return (0, event_stream_1.through)(function (file) {
- const project = path.dirname(file.relative);
- const fileName = path.basename(file.path);
- const slug = fileName.substr(0, fileName.length - '.xlf'.length);
- let slugs = resourcesByProject[project];
- if (!slugs) {
- resourcesByProject[project] = slugs = [];
- }
- slugs.push(slug);
- this.push(file);
- }, function () {
- const json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'));
- let i18Resources = [...json.editor, ...json.workbench].map((r) => r.project + '/' + r.name.replace(/\//g, '_'));
- let extractedResources = [];
- for (let project of [workbenchProject, editorProject]) {
- for (let resource of resourcesByProject[project]) {
- if (resource !== 'setup_messages') {
- extractedResources.push(project + '/' + resource);
- }
- }
- }
- if (i18Resources.length !== extractedResources.length) {
- console.log(`[i18n] Obsolete resources in file 'build/lib/i18n.resources.json': JSON.stringify(${i18Resources.filter(p => extractedResources.indexOf(p) === -1)})`);
- console.log(`[i18n] Missing resources in file 'build/lib/i18n.resources.json': JSON.stringify(${extractedResources.filter(p => i18Resources.indexOf(p) === -1)})`);
- }
- let promises = [];
- for (let project in resourcesByProject) {
- promises.push(getAllResources(project, apiHostname, username, password).then(resources => {
- let expectedResources = resourcesByProject[project];
- let unusedResources = resources.filter(resource => resource && expectedResources.indexOf(resource) === -1);
- if (unusedResources.length) {
- console.log(`[transifex] Obsolete resources in project '${project}': ${unusedResources.join(', ')}`);
- }
- }));
- }
- return Promise.all(promises).then(_ => {
- this.push(null);
- }).catch((reason) => { throw new Error(reason); });
- });
-}
-exports.findObsoleteResources = findObsoleteResources;
-function tryGetResource(project, slug, apiHostname, credentials) {
- return new Promise((resolve, reject) => {
- const options = {
- hostname: apiHostname,
- path: `/api/2/project/${project}/resource/${slug}/?details`,
- auth: credentials,
- method: 'GET'
- };
- const request = https.request(options, (response) => {
- if (response.statusCode === 404) {
- resolve(false);
- }
- else if (response.statusCode === 200) {
- resolve(true);
- }
- else {
- reject(`Failed to query resource ${project}/${slug}. Response: ${response.statusCode} ${response.statusMessage}`);
- }
- });
- request.on('error', (err) => {
- reject(`Failed to get ${project}/${slug} on Transifex: ${err}`);
- });
- request.end();
- });
-}
-function createResource(project, slug, xlfFile, apiHostname, credentials) {
- return new Promise((_resolve, reject) => {
- const data = JSON.stringify({
- 'content': xlfFile.contents.toString(),
- 'name': slug,
- 'slug': slug,
- 'i18n_type': 'XLIFF'
- });
- const options = {
- hostname: apiHostname,
- path: `/api/2/project/${project}/resources`,
- headers: {
- 'Content-Type': 'application/json',
- 'Content-Length': Buffer.byteLength(data)
- },
- auth: credentials,
- method: 'POST'
- };
- let request = https.request(options, (res) => {
- if (res.statusCode === 201) {
- log(`Resource ${project}/${slug} successfully created on Transifex.`);
- }
- else {
- reject(`Something went wrong in the request creating ${slug} in ${project}. ${res.statusCode}`);
- }
- });
- request.on('error', (err) => {
- reject(`Failed to create ${project}/${slug} on Transifex: ${err}`);
- });
- request.write(data);
- request.end();
- });
-}
-/**
- * The following link provides information about how Transifex handles updates of a resource file:
- * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files
- */
-function updateResource(project, slug, xlfFile, apiHostname, credentials) {
- return new Promise((resolve, reject) => {
- const data = JSON.stringify({ content: xlfFile.contents.toString() });
- const options = {
- hostname: apiHostname,
- path: `/api/2/project/${project}/resource/${slug}/content`,
- headers: {
- 'Content-Type': 'application/json',
- 'Content-Length': Buffer.byteLength(data)
- },
- auth: credentials,
- method: 'PUT'
- };
- let request = https.request(options, (res) => {
- if (res.statusCode === 200) {
- res.setEncoding('utf8');
- let responseBuffer = '';
- res.on('data', function (chunk) {
- responseBuffer += chunk;
- });
- res.on('end', () => {
- const response = JSON.parse(responseBuffer);
- log(`Resource ${project}/${slug} successfully updated on Transifex. Strings added: ${response.strings_added}, updated: ${response.strings_added}, deleted: ${response.strings_added}`);
- resolve();
- });
- }
- else {
- reject(`Something went wrong in the request updating ${slug} in ${project}. ${res.statusCode}`);
- }
- });
- request.on('error', (err) => {
- reject(`Failed to update ${project}/${slug} on Transifex: ${err}`);
- });
- request.write(data);
- request.end();
- });
-}
-function pullSetupXlfFiles(apiHostname, username, password, language, includeDefault) {
- let setupResources = [{ name: 'setup_messages', project: workbenchProject }];
- if (includeDefault) {
- setupResources.push({ name: 'setup_default', project: setupProject });
- }
- return pullXlfFiles(apiHostname, username, password, language, setupResources);
-}
-exports.pullSetupXlfFiles = pullSetupXlfFiles;
-function pullXlfFiles(apiHostname, username, password, language, resources) {
- const credentials = `${username}:${password}`;
- let expectedTranslationsCount = resources.length;
- let translationsRetrieved = 0, called = false;
- return (0, event_stream_1.readable)(function (_count, callback) {
- // Mark end of stream when all resources were retrieved
- if (translationsRetrieved === expectedTranslationsCount) {
- return this.emit('end');
- }
- if (!called) {
- called = true;
- const stream = this;
- resources.map(function (resource) {
- retrieveResource(language, resource, apiHostname, credentials).then((file) => {
- if (file) {
- stream.emit('data', file);
- }
- translationsRetrieved++;
- }).catch(error => { throw new Error(error); });
- });
- }
- callback();
- });
-}
-const limiter = new Limiter(NUMBER_OF_CONCURRENT_DOWNLOADS);
-function retrieveResource(language, resource, apiHostname, credentials) {
- return limiter.queue(() => new Promise((resolve, reject) => {
- const slug = resource.name.replace(/\//g, '_');
- const project = resource.project;
- let transifexLanguageId = language.id === 'ps' ? 'en' : language.translationId || language.id;
- const options = {
- hostname: apiHostname,
- path: `/api/2/project/${project}/resource/${slug}/translation/${transifexLanguageId}?file&mode=onlyreviewed`,
- auth: credentials,
- port: 443,
- method: 'GET'
- };
- console.log('[transifex] Fetching ' + options.path);
- let request = https.request(options, (res) => {
- let xlfBuffer = [];
- res.on('data', (chunk) => xlfBuffer.push(chunk));
- res.on('end', () => {
- if (res.statusCode === 200) {
- resolve(new File({ contents: Buffer.concat(xlfBuffer), path: `${project}/${slug}.xlf` }));
- }
- else if (res.statusCode === 404) {
- console.log(`[transifex] ${slug} in ${project} returned no data.`);
- resolve(null);
- }
- else {
- reject(`${slug} in ${project} returned no data. Response code: ${res.statusCode}.`);
- }
- });
- });
- request.on('error', (err) => {
- reject(`Failed to query resource ${slug} with the following error: ${err}. ${options.path}`);
- });
- request.end();
- }));
-}
-function prepareI18nFiles() {
- let parsePromises = [];
- return (0, event_stream_1.through)(function (xlf) {
- let stream = this;
- let parsePromise = XLF.parse(xlf.contents.toString());
- parsePromises.push(parsePromise);
- parsePromise.then(resolvedFiles => {
- resolvedFiles.forEach(file => {
- let translatedFile = createI18nFile(file.originalFilePath, file.messages);
- stream.queue(translatedFile);
- });
- });
- }, function () {
- Promise.all(parsePromises)
- .then(() => { this.queue(null); })
- .catch(reason => { throw new Error(reason); });
- });
-}
-exports.prepareI18nFiles = prepareI18nFiles;
-function createI18nFile(originalFilePath, messages) {
- let result = Object.create(null);
+function createI18nFile(name, messages) {
+ const result = Object.create(null);
result[''] = [
'--------------------------------------------------------------------------------------------',
'Copyright (c) Microsoft Corporation. All rights reserved.',
@@ -998,7 +669,7 @@ function createI18nFile(originalFilePath, messages) {
'--------------------------------------------------------------------------------------------',
'Do not edit this file. It is machine generated.'
];
- for (let key of Object.keys(messages)) {
+ for (const key of Object.keys(messages)) {
result[key] = messages[key];
}
let content = JSON.stringify(result, null, '\t');
@@ -1006,43 +677,51 @@ function createI18nFile(originalFilePath, messages) {
content = content.replace(/\n/g, '\r\n');
}
return new File({
- path: path.join(originalFilePath + '.i18n.json'),
+ path: path.join(name + '.i18n.json'),
contents: Buffer.from(content, 'utf8')
});
}
const i18nPackVersion = '1.0.0';
-function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pseudo = false) {
- let parsePromises = [];
- let mainPack = { version: i18nPackVersion, contents: {} };
- let extensionsPacks = {};
- let errors = [];
+function getRecordFromL10nJsonFormat(l10nJsonFormat) {
+ const record = {};
+ for (const key of Object.keys(l10nJsonFormat)) {
+ const value = l10nJsonFormat[key];
+ record[key] = typeof value === 'string' ? value : value.message;
+ }
+ return record;
+}
+function prepareI18nPackFiles(resultingTranslationPaths) {
+ const parsePromises = [];
+ const mainPack = { version: i18nPackVersion, contents: {} };
+ const extensionsPacks = {};
+ const errors = [];
return (0, event_stream_1.through)(function (xlf) {
- let project = path.basename(path.dirname(path.dirname(xlf.relative)));
- let resource = path.basename(xlf.relative, '.xlf');
- let contents = xlf.contents.toString();
+ const project = path.basename(path.dirname(path.dirname(xlf.relative)));
+ const resource = path.basename(xlf.relative, '.xlf');
+ const contents = xlf.contents.toString();
log(`Found ${project}: ${resource}`);
- let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents);
+ const parsePromise = (0, l10n_dev_1.getL10nFilesFromXlf)(contents);
parsePromises.push(parsePromise);
parsePromise.then(resolvedFiles => {
resolvedFiles.forEach(file => {
- const path = file.originalFilePath;
+ const path = file.name;
const firstSlash = path.indexOf('/');
if (project === extensionsProject) {
let extPack = extensionsPacks[resource];
if (!extPack) {
extPack = extensionsPacks[resource] = { version: i18nPackVersion, contents: {} };
}
- const externalId = externalExtensions[resource];
+ const externalId = externalExtensionsWithTranslations[resource];
if (!externalId) { // internal extension: remove 'extensions/extensionId/' segnent
const secondSlash = path.indexOf('/', firstSlash + 1);
- extPack.contents[path.substr(secondSlash + 1)] = file.messages;
+ extPack.contents[path.substring(secondSlash + 1)] = getRecordFromL10nJsonFormat(file.messages);
}
else {
- extPack.contents[path] = file.messages;
+ extPack.contents[path] = getRecordFromL10nJsonFormat(file.messages);
}
}
else {
- mainPack.contents[path.substr(firstSlash + 1)] = file.messages;
+ mainPack.contents[path.substring(firstSlash + 1)] = getRecordFromL10nJsonFormat(file.messages);
}
});
}).catch(reason => {
@@ -1057,10 +736,10 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
const translatedMainFile = createI18nFile('./main', mainPack);
resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' });
this.queue(translatedMainFile);
- for (let extension in extensionsPacks) {
+ for (const extension in extensionsPacks) {
const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
this.queue(translatedExtFile);
- const externalExtensionId = externalExtensions[extension];
+ const externalExtensionId = externalExtensionsWithTranslations[extension];
if (externalExtensionId) {
resultingTranslationPaths.push({ id: externalExtensionId, resourceName: `extensions/${extension}.i18n.json` });
}
@@ -1077,14 +756,14 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
}
exports.prepareI18nPackFiles = prepareI18nPackFiles;
function prepareIslFiles(language, innoSetupConfig) {
- let parsePromises = [];
+ const parsePromises = [];
return (0, event_stream_1.through)(function (xlf) {
- let stream = this;
- let parsePromise = XLF.parse(xlf.contents.toString());
+ const stream = this;
+ const parsePromise = XLF.parse(xlf.contents.toString());
parsePromises.push(parsePromise);
parsePromise.then(resolvedFiles => {
resolvedFiles.forEach(file => {
- let translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig);
+ const translatedFile = createIslFile(file.name, file.messages, language, innoSetupConfig);
stream.queue(translatedFile);
});
}).catch(reason => {
@@ -1099,27 +778,27 @@ function prepareIslFiles(language, innoSetupConfig) {
});
}
exports.prepareIslFiles = prepareIslFiles;
-function createIslFile(originalFilePath, messages, language, innoSetup) {
- let content = [];
+function createIslFile(name, messages, language, innoSetup) {
+ const content = [];
let originalContent;
- if (path.basename(originalFilePath) === 'Default') {
- originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8'));
+ if (path.basename(name) === 'Default') {
+ originalContent = new TextModel(fs.readFileSync(name + '.isl', 'utf8'));
}
else {
- originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8'));
+ originalContent = new TextModel(fs.readFileSync(name + '.en.isl', 'utf8'));
}
originalContent.lines.forEach(line => {
if (line.length > 0) {
- let firstChar = line.charAt(0);
+ const firstChar = line.charAt(0);
if (firstChar === '[' || firstChar === ';') {
content.push(line);
}
else {
- let sections = line.split('=');
- let key = sections[0];
+ const sections = line.split('=');
+ const key = sections[0];
let translated = line;
if (key) {
- let translatedMessage = messages[key];
+ const translatedMessage = messages[key];
if (translatedMessage) {
translated = `${key}=${translatedMessage}`;
}
@@ -1128,7 +807,7 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
}
}
});
- const basename = path.basename(originalFilePath);
+ const basename = path.basename(name);
const filePath = `${basename}.${language.id}.isl`;
const encoded = iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage);
return new File({
@@ -1137,9 +816,9 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
});
}
function encodeEntities(value) {
- let result = [];
+ const result = [];
for (let i = 0; i < value.length; i++) {
- let ch = value[i];
+ const ch = value[i];
switch (ch) {
case '<':
result.push('<');
@@ -1159,6 +838,3 @@ function encodeEntities(value) {
function decodeEntities(value) {
return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&');
}
-function pseudify(message) {
- return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
-}
diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json
index b7b2cd1833e..fa8f6fc1feb 100644
--- a/build/lib/i18n.resources.json
+++ b/build/lib/i18n.resources.json
@@ -90,6 +90,10 @@
"name": "vs/workbench/contrib/files",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/contrib/folding",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/contrib/html",
"project": "vscode-workbench"
@@ -278,6 +282,10 @@
"name": "vs/workbench/contrib/userDataSync",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/contrib/editSessions",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/contrib/views",
"project": "vscode-workbench"
@@ -290,10 +298,22 @@
"name": "vs/workbench/contrib/audioCues",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/contrib/deprecatedExtensionMigrator",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/bracketPairColorizer2Telemetry",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/contrib/offline",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/contrib/remoteTunnel",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/services/actions",
"project": "vscode-workbench"
@@ -426,6 +446,10 @@
"name": "vs/workbench/services/userDataSync",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/services/editSessions",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/services/views",
"project": "vscode-workbench"
@@ -455,11 +479,11 @@
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/contrib/profiles",
+ "name": "vs/workbench/contrib/userDataProfile",
"project": "vscode-profiles"
},
{
- "name": "vs/workbench/services/profiles",
+ "name": "vs/workbench/services/userDataProfile",
"project": "vscode-profiles"
}
]
diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts
index 3ea4f7efb4e..1962ba98926 100644
--- a/build/lib/i18n.ts
+++ b/build/lib/i18n.ts
@@ -6,17 +6,15 @@
import * as path from 'path';
import * as fs from 'fs';
-import { through, readable, ThroughStream } from 'event-stream';
+import { merge, through, ThroughStream, writeArray } from 'event-stream';
import * as File from 'vinyl';
import * as Is from 'is';
import * as xml2js from 'xml2js';
-import * as https from 'https';
import * as gulp from 'gulp';
import * as fancyLog from 'fancy-log';
import * as ansiColors from 'ansi-colors';
import * as iconv from '@vscode/iconv-lite-umd';
-
-const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
+import { l10nJsonFormat, getL10nXlf, l10nJsonDetails, getL10nFilesFromXlf, getL10nJson } from '@vscode/l10n-dev';
function log(message: any, ...rest: any[]): void {
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
@@ -52,17 +50,12 @@ export const extraLanguages: Language[] = [
];
// non built-in extensions also that are transifex and need to be part of the language packs
-export const externalExtensionsWithTranslations = {
+const externalExtensionsWithTranslations: Record = {
'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome',
'vscode-node-debug': 'ms-vscode.node-debug',
'vscode-node-debug2': 'ms-vscode.node-debug2'
};
-
-interface Map {
- [key: string]: V;
-}
-
interface Item {
id: string;
message: string;
@@ -74,12 +67,6 @@ export interface Resource {
project: string;
}
-interface ParsedXLF {
- messages: Map;
- originalFilePath: string;
- language: string;
-}
-
interface LocalizeInfo {
key: string;
comment: string[];
@@ -87,15 +74,15 @@ interface LocalizeInfo {
module LocalizeInfo {
export function is(value: any): value is LocalizeInfo {
- let candidate = value as LocalizeInfo;
+ const candidate = value as LocalizeInfo;
return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(element => Is.string(element))));
}
}
interface BundledFormat {
- keys: Map<(string | LocalizeInfo)[]>;
- messages: Map;
- bundles: Map;
+ keys: Record;
+ messages: Record;
+ bundles: Record;
}
module BundledFormat {
@@ -104,34 +91,13 @@ module BundledFormat {
return false;
}
- let candidate = value as BundledFormat;
- let length = Object.keys(value).length;
+ const candidate = value as BundledFormat;
+ const length = Object.keys(value).length;
return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles);
}
}
-interface ValueFormat {
- message: string;
- comment: string[];
-}
-
-interface PackageJsonFormat {
- [key: string]: string | ValueFormat;
-}
-
-module PackageJsonFormat {
- export function is(value: any): value is PackageJsonFormat {
- if (Is.undef(value) || !Is.object(value)) {
- return false;
- }
- return Object.keys(value).every(key => {
- let element = value[key];
- return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment));
- });
- }
-}
-
interface BundledExtensionFormat {
[key: string]: {
messages: string[];
@@ -181,7 +147,7 @@ class TextModel {
export class XLF {
private buffer: string[];
- private files: Map- ;
+ private files: Record;
public numberOfMessages: number;
constructor(public project: string) {
@@ -218,9 +184,9 @@ export class XLF {
}
this.numberOfMessages += keys.length;
this.files[original] = [];
- let existingKeys = new Set();
+ const existingKeys = new Set();
for (let i = 0; i < keys.length; i++) {
- let key = keys[i];
+ const key = keys[i];
let realKey: string | undefined;
let comment: string | undefined;
if (Is.string(key)) {
@@ -236,7 +202,7 @@ export class XLF {
continue;
}
existingKeys.add(realKey);
- let message: string = encodeEntities(messages[i]);
+ const message: string = encodeEntities(messages[i]);
this.files[original].push({ id: realKey, message: message, comment: comment });
}
}
@@ -269,42 +235,16 @@ export class XLF {
}
private appendNewLine(content: string, indent?: number): void {
- let line = new Line(indent);
+ const line = new Line(indent);
line.append(content);
this.buffer.push(line.toString());
}
- static parsePseudo = function (xlfString: string): Promise {
- return new Promise((resolve) => {
- let parser = new xml2js.Parser();
- let files: { messages: Map; originalFilePath: string; language: string }[] = [];
- parser.parseString(xlfString, function (_err: any, result: any) {
- const fileNodes: any[] = result['xliff']['file'];
- fileNodes.forEach(file => {
- const originalFilePath = file.$.original;
- const messages: Map = {};
- const transUnits = file.body[0]['trans-unit'];
- if (transUnits) {
- transUnits.forEach((unit: any) => {
- const key = unit.$.id;
- const val = pseudify(unit.source[0]['_'].toString());
- if (key && val) {
- messages[key] = decodeEntities(val);
- }
- });
- files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' });
- }
- });
- resolve(files);
- });
- });
- };
-
- static parse = function (xlfString: string): Promise {
+ static parse = function (xlfString: string): Promise {
return new Promise((resolve, reject) => {
- let parser = new xml2js.Parser();
+ const parser = new xml2js.Parser();
- let files: { messages: Map; originalFilePath: string; language: string }[] = [];
+ const files: { messages: Record; name: string; language: string }[] = [];
parser.parseString(xlfString, function (err: any, result: any) {
if (err) {
@@ -317,15 +257,15 @@ export class XLF {
}
fileNodes.forEach((file) => {
- const originalFilePath = file.$.original;
- if (!originalFilePath) {
+ const name = file.$.original;
+ if (!name) {
reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`));
}
- let language = file.$['target-language'];
+ const language = file.$['target-language'];
if (!language) {
reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`));
}
- const messages: Map = {};
+ const messages: Record = {};
const transUnits = file.body[0]['trans-unit'];
if (transUnits) {
@@ -341,12 +281,12 @@ export class XLF {
val = val._ ? val._ : '';
}
if (!key) {
- reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`));
+ reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${name} is missing the ID attribute.`));
return;
}
messages[key] = decodeEntities(val);
});
- files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
+ files.push({ messages, name, language: language.toLowerCase() });
}
});
@@ -356,49 +296,6 @@ export class XLF {
};
}
-export interface ITask {
- (): T;
-}
-
-interface ILimitedTaskFactory {
- factory: ITask>;
- c: (value?: T | Promise) => void;
- e: (error?: any) => void;
-}
-
-export class Limiter {
- private runningPromises: number;
- private outstandingPromises: ILimitedTaskFactory[];
-
- constructor(private maxDegreeOfParalellism: number) {
- this.outstandingPromises = [];
- this.runningPromises = 0;
- }
-
- queue(factory: ITask>): Promise {
- return new Promise((c, e) => {
- this.outstandingPromises.push({ factory, c, e });
- this.consume();
- });
- }
-
- private consume(): void {
- while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) {
- const iLimitedTask = this.outstandingPromises.shift()!;
- this.runningPromises++;
-
- const promise = iLimitedTask.factory();
- promise.then(iLimitedTask.c).catch(iLimitedTask.e);
- promise.then(() => this.consumed()).catch(() => this.consumed());
- }
- }
-
- private consumed(): void {
- this.runningPromises--;
- this.consume();
- }
-}
-
function sortLanguages(languages: Language[]): Language[] {
return languages.sort((a: Language, b: Language): number => {
return a.id < b.id ? -1 : (a.id > b.id ? 1 : 0);
@@ -412,9 +309,10 @@ function stripComments(content: string): string {
// Second group matches a single quoted string
// Third group matches a multi line comment
// Forth group matches a single line comment
- const regexp = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
- let result = content.replace(regexp, (match, _m1: string, _m2: string, m3: string, m4: string) => {
- // Only one of m1, m2, m3, m4 matches
+ // Fifth group matches a trailing comma
+ const regexp = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g;
+ const result = content.replace(regexp, (match, _m1: string, _m2: string, m3: string, m4: string, m5: string) => {
+ // Only one of m1, m2, m3, m4, m5 matches
if (m3) {
// A block comment. Replace with nothing
return '';
@@ -427,6 +325,9 @@ function stripComments(content: string): string {
} else {
return '';
}
+ } else if (m5) {
+ // Remove the trailing comma
+ return match.substring(1);
} else {
// We match a string
return match;
@@ -472,22 +373,22 @@ function escapeCharacters(value: string): string {
}
function processCoreBundleFormat(fileHeader: string, languages: Language[], json: BundledFormat, emitter: ThroughStream) {
- let keysSection = json.keys;
- let messageSection = json.messages;
- let bundleSection = json.bundles;
+ const keysSection = json.keys;
+ const messageSection = json.messages;
+ const bundleSection = json.bundles;
- let statistics: Map = Object.create(null);
+ const statistics: Record = Object.create(null);
- let defaultMessages: Map