mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 15:35:20 +01:00
Merge branch 'main' into fix-226095-transparency-grid-zoom
This commit is contained in:
@@ -18,17 +18,6 @@ properties:
|
||||
id: OpenJS.NodeJS.LTS
|
||||
version: "20.14.0"
|
||||
source: winget
|
||||
- resource: NpmDsc/NpmPackage
|
||||
id: yarn
|
||||
dependsOn:
|
||||
- npm
|
||||
directives:
|
||||
description: Install Yarn
|
||||
allowPrerelease: true
|
||||
settings:
|
||||
Name: 'yarn'
|
||||
Global: true
|
||||
PackageDirectory: '${WinGetConfigRoot}\..\'
|
||||
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
||||
directives:
|
||||
description: Install Python 3.10
|
||||
@@ -56,7 +45,7 @@ properties:
|
||||
includeRecommended: true
|
||||
components:
|
||||
- Microsoft.VisualStudio.Workload.VCTools
|
||||
- resource: YarnDsc/YarnInstall
|
||||
- resource: NpmDsc/NpmInstall
|
||||
dependsOn:
|
||||
- npm
|
||||
directives:
|
||||
|
||||
@@ -7,8 +7,8 @@ RUN git config --system codespaces-theme.hide-status 1
|
||||
|
||||
USER node
|
||||
RUN npm install -g node-gyp
|
||||
RUN YARN_CACHE="$(yarn cache dir)" && rm -rf "$YARN_CACHE" && ln -s /vscode-dev/yarn-cache "$YARN_CACHE"
|
||||
RUN NPM_CACHE="$(npm config get cache)" && rm -rf "$NPM_CACHE" && ln -s /vscode-dev/npm-cache "$NPM_CACHE"
|
||||
RUN echo 'export DISPLAY="${DISPLAY:-:1}"' | tee -a ~/.bashrc >> ~/.zshrc
|
||||
|
||||
USER root
|
||||
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/yarn-cache && sleep inf
|
||||
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/npm-cache && sleep inf
|
||||
|
||||
@@ -24,7 +24,7 @@ If you already have VS Code and Docker installed, you can click the badge above
|
||||
|
||||
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> 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 using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
|
||||
> **Tip:** While you can use your local source tree instead, operations like `npm i` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
|
||||
|
||||
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.
|
||||
|
||||
@@ -85,7 +85,7 @@ To start working with Code - OSS, follow these steps:
|
||||
1. In your local VS Code client, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
npm i
|
||||
bash scripts/code.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
yarn install --network-timeout 180000
|
||||
yarn electron
|
||||
npm i
|
||||
npm run electron
|
||||
|
||||
@@ -12,7 +12,8 @@ export = new class EnsureNoDisposablesAreLeakedInTestSuite implements eslint.Rul
|
||||
type: 'problem',
|
||||
messages: {
|
||||
ensure: 'Suites should include a call to `ensureNoDisposablesAreLeakedInTestSuite()` to ensure no disposables are leaked in tests.'
|
||||
}
|
||||
},
|
||||
fixable: 'code'
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
@@ -30,6 +31,10 @@ export = new class EnsureNoDisposablesAreLeakedInTestSuite implements eslint.Rul
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'ensure',
|
||||
fix: (fixer) => {
|
||||
const updatedSrc = src.replace(/(suite\(.*\n)/, '$1\n\tensureNoDisposablesAreLeakedInTestSuite();\n');
|
||||
return fixer.replaceText(node, updatedSrc);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -12,19 +12,19 @@ import { createImportRuleListener } from './utils';
|
||||
const REPO_ROOT = path.normalize(path.join(__dirname, '../'));
|
||||
|
||||
interface ConditionalPattern {
|
||||
when?: 'hasBrowser' | 'hasNode' | 'test';
|
||||
when?: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test';
|
||||
pattern: string;
|
||||
}
|
||||
|
||||
interface RawImportPatternsConfig {
|
||||
target: string;
|
||||
layer?: 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-main';
|
||||
layer?: 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-utility' | 'electron-main';
|
||||
test?: boolean;
|
||||
restrictions: string | (string | ConditionalPattern)[];
|
||||
}
|
||||
|
||||
interface LayerAllowRule {
|
||||
when: 'hasBrowser' | 'hasNode' | 'test';
|
||||
when: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test';
|
||||
allow: string[];
|
||||
}
|
||||
|
||||
@@ -44,7 +44,9 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
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'
|
||||
badFilename: 'Missing definition in `code-import-patterns` for this file. Define rules at https://github.com/microsoft/vscode/blob/main/.eslintrc.json',
|
||||
badAbsolute: 'Imports have to be relative to support ESM',
|
||||
badExtension: 'Imports have to end with `.js` or `.css` to support ESM',
|
||||
},
|
||||
docs: {
|
||||
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
|
||||
@@ -77,13 +79,14 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
return this._optionsCache.get(options)!;
|
||||
}
|
||||
|
||||
type Layer = 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-main';
|
||||
type Layer = 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-utility' | 'electron-main';
|
||||
|
||||
interface ILayerRule {
|
||||
layer: Layer;
|
||||
deps: string;
|
||||
isBrowser?: boolean;
|
||||
isNode?: boolean;
|
||||
isElectron?: boolean;
|
||||
}
|
||||
|
||||
function orSegment(variants: Layer[]): string {
|
||||
@@ -96,11 +99,13 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
{ 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-main', deps: orSegment(['common', 'node', 'electron-main']), isNode: true },
|
||||
{ layer: 'electron-utility', deps: orSegment(['common', 'node', 'electron-utility']), isNode: true, isElectron: true },
|
||||
{ layer: 'electron-main', deps: orSegment(['common', 'node', 'electron-utility', 'electron-main']), isNode: true, isElectron: true },
|
||||
];
|
||||
|
||||
let browserAllow: string[] = [];
|
||||
let nodeAllow: string[] = [];
|
||||
let electronAllow: string[] = [];
|
||||
let testAllow: string[] = [];
|
||||
for (const option of options) {
|
||||
if (isLayerAllowRule(option)) {
|
||||
@@ -108,6 +113,8 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
browserAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'hasNode') {
|
||||
nodeAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'hasElectron') {
|
||||
electronAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'test') {
|
||||
testAllow = option.allow.slice(0);
|
||||
}
|
||||
@@ -135,9 +142,13 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
restrictions.push(...nodeAllow);
|
||||
}
|
||||
|
||||
if (layerRule.isElectron) {
|
||||
restrictions.push(...electronAllow);
|
||||
}
|
||||
|
||||
for (const rawRestriction of rawRestrictions) {
|
||||
let importPattern: string;
|
||||
let when: 'hasBrowser' | 'hasNode' | 'test' | undefined = undefined;
|
||||
let when: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test' | undefined = undefined;
|
||||
if (typeof rawRestriction === 'string') {
|
||||
importPattern = rawRestriction;
|
||||
} else {
|
||||
@@ -147,6 +158,7 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
if (typeof when === 'undefined'
|
||||
|| (when === 'hasBrowser' && layerRule.isBrowser)
|
||||
|| (when === 'hasNode' && layerRule.isNode)
|
||||
|| (when === 'hasElectron' && layerRule.isElectron)
|
||||
) {
|
||||
restrictions.push(importPattern.replace(/\/\~$/, `/${layerRule.deps}/**`));
|
||||
testRestrictions.push(importPattern.replace(/\/\~$/, `/test/${layerRule.deps}/**`));
|
||||
@@ -181,8 +193,8 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
|
||||
if (targetIsVS) {
|
||||
// Always add "vs/nls" and "vs/amdX"
|
||||
restrictions.push('vs/nls');
|
||||
restrictions.push('vs/amdX'); // TODO@jrieken remove after ESM is real
|
||||
restrictions.push('vs/nls.js');
|
||||
restrictions.push('vs/amdX.js'); // TODO@jrieken remove after ESM is real
|
||||
}
|
||||
|
||||
if (targetIsVS && option.layer) {
|
||||
@@ -212,6 +224,25 @@ export = new class implements eslint.Rule.RuleModule {
|
||||
}
|
||||
|
||||
private _checkImport(context: eslint.Rule.RuleContext, config: ImportPatternsConfig, node: TSESTree.Node, importPath: string) {
|
||||
const targetIsVS = /^src\/vs\//.test(getRelativeFilename(context));
|
||||
if (targetIsVS) {
|
||||
|
||||
// ESM: check for import ending with ".js" or ".css"
|
||||
if (importPath[0] === '.' && !importPath.endsWith('.js') && !importPath.endsWith('.css')) {
|
||||
context.report({
|
||||
loc: node.loc,
|
||||
messageId: 'badExtension',
|
||||
});
|
||||
}
|
||||
|
||||
// check for import being relative
|
||||
if (importPath.startsWith('vs/')) {
|
||||
context.report({
|
||||
loc: node.loc,
|
||||
messageId: 'badAbsolute',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// resolve relative paths
|
||||
if (importPath[0] === '.') {
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const _positiveLookBehind = /\(\?<=.+/;
|
||||
const _negativeLookBehind = /\(\?<!.+/;
|
||||
|
||||
function _containsLookBehind(pattern: string | unknown): boolean {
|
||||
if (typeof pattern !== 'string') {
|
||||
return false;
|
||||
}
|
||||
return _positiveLookBehind.test(pattern) || _negativeLookBehind.test(pattern);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
create(context: eslint.Rule.RuleContext) {
|
||||
return {
|
||||
// /.../
|
||||
['Literal[regex]']: (node: any) => {
|
||||
type RegexLiteral = TSESTree.Literal & { regex: { pattern: string; flags: string } };
|
||||
const pattern = (<RegexLiteral>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: ESTree.Literal) => {
|
||||
if (_containsLookBehind(node.value)) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'Look behind assertions are not yet supported in all browsers'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
+128
-10
@@ -92,9 +92,14 @@
|
||||
"common",
|
||||
"browser"
|
||||
],
|
||||
"electron-main": [
|
||||
"electron-utility": [
|
||||
"common",
|
||||
"node"
|
||||
],
|
||||
"electron-main": [
|
||||
"common",
|
||||
"node",
|
||||
"electron-utility"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -611,12 +616,64 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"src/**/electron-utility/**/*.ts"
|
||||
],
|
||||
"rules": {
|
||||
"no-restricted-imports": [
|
||||
"warn",
|
||||
{
|
||||
"paths": [
|
||||
{
|
||||
"name": "electron",
|
||||
"importNames": [
|
||||
"app",
|
||||
"autoUpdater",
|
||||
"BaseWindow",
|
||||
"BrowserWindow",
|
||||
"contentTracing",
|
||||
"desktopCapturer",
|
||||
"dialog",
|
||||
"globalShortcut",
|
||||
"inAppPurchase",
|
||||
"ipcMain",
|
||||
"Menu",
|
||||
"MenuItem",
|
||||
"MessageChannelMain",
|
||||
"MessagePortMain",
|
||||
"nativeTheme",
|
||||
"netLog",
|
||||
"Notification",
|
||||
"powerMonitor",
|
||||
"powerSaveBlocker",
|
||||
"protocol",
|
||||
"pushNotifications",
|
||||
"safeStorage",
|
||||
"screen",
|
||||
"session",
|
||||
"ShareMenu",
|
||||
"TouchBar",
|
||||
"Tray",
|
||||
"utilityProcess",
|
||||
"View",
|
||||
"webContents",
|
||||
"webFrameMain",
|
||||
"webContentsView",
|
||||
"default"
|
||||
],
|
||||
"message": "Only net and system-preferences are allowed to be imported from electron"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"rules": {
|
||||
"local/code-no-look-behind-regex": "warn",
|
||||
"local/code-import-patterns": [
|
||||
"warn",
|
||||
{
|
||||
@@ -631,6 +688,7 @@
|
||||
{
|
||||
// imports that are allowed in all files of layers:
|
||||
// - node
|
||||
// - electron-utility
|
||||
// - electron-main
|
||||
"when": "hasNode",
|
||||
"allow": [
|
||||
@@ -649,13 +707,13 @@
|
||||
"cookie",
|
||||
"crypto",
|
||||
"dns",
|
||||
"electron",
|
||||
"events",
|
||||
"fs",
|
||||
"fs/promises",
|
||||
"http",
|
||||
"https",
|
||||
"minimist",
|
||||
"node:module",
|
||||
"native-keymap",
|
||||
"native-watchdog",
|
||||
"net",
|
||||
@@ -687,11 +745,21 @@
|
||||
"zlib"
|
||||
]
|
||||
},
|
||||
{
|
||||
// imports that are allowed in all files of layers:
|
||||
// - electron-utility
|
||||
// - electron-main
|
||||
"when": "hasElectron",
|
||||
"allow": [
|
||||
"electron"
|
||||
]
|
||||
},
|
||||
{
|
||||
// imports that are allowed in all /test/ files
|
||||
"when": "test",
|
||||
"allow": [
|
||||
"vs/css.build",
|
||||
"vs/css.build.js",
|
||||
"assert",
|
||||
"sinon",
|
||||
"sinon-test"
|
||||
@@ -746,7 +814,8 @@
|
||||
"vs/platform/*/~",
|
||||
"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/
|
||||
"@microsoft/1ds-post-js", // node module allowed even in /common/
|
||||
"@xterm/headless" // node module allowed even in /common/
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -777,7 +846,8 @@
|
||||
"vs/platform/*/~",
|
||||
"vs/editor/~",
|
||||
"vs/editor/contrib/*/~",
|
||||
"vs/editor/standalone/~"
|
||||
"vs/editor/standalone/~",
|
||||
"@vscode/tree-sitter-wasm" // type import
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -863,6 +933,7 @@
|
||||
"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/
|
||||
"@vscode/tree-sitter-wasm", // type import
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "@xterm/xterm"
|
||||
@@ -880,6 +951,7 @@
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/contrib/terminal/terminalContribExports*",
|
||||
"vscode-notebook-renderer", // Type only import
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
@@ -909,6 +981,7 @@
|
||||
// Only allow terminalContrib to import from itself, this works because
|
||||
// terminalContrib is one extra folder deep
|
||||
"vs/workbench/contrib/terminalContrib/*/~",
|
||||
"vs/workbench/contrib/terminal/terminalContribExports*",
|
||||
"vscode-notebook-renderer", // Type only import
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
@@ -921,7 +994,8 @@
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vscode-textmate"
|
||||
} // node module allowed even in /browser/
|
||||
}, // node module allowed even in /browser/
|
||||
"@xterm/headless" // node module allowed even in /common/ and /browser/
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -937,6 +1011,18 @@
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vs/workbench/workbench.web.main"
|
||||
},
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vs/workbench/workbench.web.main.js"
|
||||
},
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vs/workbench/workbench.web.main.internal"
|
||||
},
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vs/workbench/workbench.web.main.internal.js"
|
||||
},
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
"pattern": "vs/workbench/~"
|
||||
@@ -967,6 +1053,13 @@
|
||||
"vs/workbench/contrib/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "src/vs/workbench/contrib/terminal/terminalContribExports.ts",
|
||||
"layer": "browser",
|
||||
"restrictions": [
|
||||
"vs/workbench/contrib/terminalContrib/*/~"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "src/vs/workbench/workbench.common.main.ts",
|
||||
"layer": "browser",
|
||||
@@ -977,11 +1070,13 @@
|
||||
"vs/editor/~",
|
||||
"vs/editor/contrib/*/~",
|
||||
"vs/editor/editor.all",
|
||||
"vs/editor/editor.all.js",
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/api/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/contrib/terminal/terminal.all"
|
||||
"vs/workbench/contrib/terminal/terminal.all",
|
||||
"vs/workbench/contrib/terminal/terminal.all.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -994,11 +1089,32 @@
|
||||
"vs/editor/~",
|
||||
"vs/editor/contrib/*/~",
|
||||
"vs/editor/editor.all",
|
||||
"vs/editor/editor.all.js",
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/api/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/workbench.common.main"
|
||||
"vs/workbench/workbench.common.main",
|
||||
"vs/workbench/workbench.common.main.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "src/vs/workbench/workbench.web.main.internal.ts",
|
||||
"layer": "browser",
|
||||
"restrictions": [
|
||||
"vs/base/~",
|
||||
"vs/base/parts/*/~",
|
||||
"vs/platform/*/~",
|
||||
"vs/editor/~",
|
||||
"vs/editor/contrib/*/~",
|
||||
"vs/editor/editor.all",
|
||||
"vs/editor/editor.all.js",
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/api/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/workbench.common.main",
|
||||
"vs/workbench/workbench.common.main.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1011,11 +1127,13 @@
|
||||
"vs/editor/~",
|
||||
"vs/editor/contrib/*/~",
|
||||
"vs/editor/editor.all",
|
||||
"vs/editor/editor.all.js",
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/api/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/workbench.common.main"
|
||||
"vs/workbench/workbench.common.main",
|
||||
"vs/workbench/workbench.common.main.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1025,7 +1143,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.messages.ts,nls.ts}",
|
||||
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.ts,nls.messages.ts}",
|
||||
"restrictions": []
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,3 +26,6 @@ ee1655a82ebdfd38bf8792088a6602c69f7bbd94
|
||||
|
||||
# jrieken: new eslint-rule
|
||||
4a130c40ed876644ed8af2943809d08221375408
|
||||
|
||||
# bpasero: ESM migration
|
||||
6b924c51528e663dda5091a1493229a361676aca
|
||||
|
||||
+35
-34
@@ -42,26 +42,26 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
- name: Compile and Download
|
||||
run: yarn npm-run-all --max-old-space-size=4095 -lp compile "electron x64"
|
||||
run: npm exec -- npm-run-all -lp compile "electron x64"
|
||||
|
||||
- name: Run Unit Tests
|
||||
id: electron-unit-tests
|
||||
@@ -94,44 +94,45 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
- name: Run Hygiene Checks
|
||||
run: yarn gulp hygiene
|
||||
run: npm run gulp hygiene
|
||||
|
||||
- name: Run Valid Layers Checks
|
||||
run: yarn valid-layers-check
|
||||
run: npm run valid-layers-check
|
||||
|
||||
- name: Compile /build/
|
||||
run: yarn --cwd build compile
|
||||
run: npm run compile
|
||||
working-directory: build
|
||||
|
||||
- name: Check clean git state
|
||||
run: ./.github/workflows/check-clean-git-state.sh
|
||||
|
||||
- name: Run eslint
|
||||
run: yarn eslint
|
||||
run: npm run eslint
|
||||
|
||||
- name: Run vscode-dts Compile Checks
|
||||
run: yarn vscode-dts-compile-check
|
||||
run: npm run vscode-dts-compile-check
|
||||
|
||||
- name: Run Trusted Types Checks
|
||||
run: yarn tsec-compile-check
|
||||
run: npm run tsec-compile-check
|
||||
|
||||
warm-cache:
|
||||
name: Warm up node modules cache
|
||||
@@ -156,20 +157,20 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
+59
-55
@@ -43,23 +43,23 @@ jobs:
|
||||
- name: Extract node_modules archive
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit == 'true' }}
|
||||
run: 7z.exe x .build/node_modules_cache/cache.7z -aos
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
- name: Create node_modules archive
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
@@ -69,19 +69,20 @@ jobs:
|
||||
7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt
|
||||
|
||||
- name: Compile and Download
|
||||
run: yarn npm-run-all --max-old-space-size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
run: npm exec -- npm-run-all -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
|
||||
- name: Compile Integration Tests
|
||||
run: yarn --cwd test/integration/browser compile
|
||||
run: npm run compile
|
||||
working-directory: test/integration/browser
|
||||
|
||||
- name: Run Unit Tests (Electron)
|
||||
run: .\scripts\test.bat
|
||||
|
||||
- name: Run Unit Tests (node.js)
|
||||
run: yarn test-node
|
||||
run: npm run test-node
|
||||
|
||||
- name: Run Unit Tests (Browser, Chromium)
|
||||
run: yarn test-browser-no-install --browser chromium
|
||||
run: npm run test-browser-no-install --browser chromium
|
||||
|
||||
- name: Run Integration Tests (Electron)
|
||||
run: .\scripts\test-integration.bat
|
||||
@@ -126,29 +127,30 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
- name: Compile and Download
|
||||
run: yarn npm-run-all --max-old-space-size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
run: npm exec -- npm-run-all -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
|
||||
- name: Compile Integration Tests
|
||||
run: yarn --cwd test/integration/browser compile
|
||||
run: npm run compile
|
||||
working-directory: test/integration/browser
|
||||
|
||||
- name: Run Unit Tests (Electron)
|
||||
id: electron-unit-tests
|
||||
@@ -156,11 +158,11 @@ jobs:
|
||||
|
||||
- name: Run Unit Tests (node.js)
|
||||
id: nodejs-unit-tests
|
||||
run: yarn test-node
|
||||
run: npm run test-node
|
||||
|
||||
- name: Run Unit Tests (Browser, Chromium)
|
||||
id: browser-unit-tests
|
||||
run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
|
||||
run: DISPLAY=:10 npm run test-browser-no-install --browser chromium
|
||||
|
||||
- name: Run Integration Tests (Electron)
|
||||
id: electron-integration-tests
|
||||
@@ -197,29 +199,30 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesMacOS-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
- name: Compile and Download
|
||||
run: yarn npm-run-all --max-old-space-size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
run: npm exec -- npm-run-all -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
|
||||
- name: Compile Integration Tests
|
||||
run: yarn --cwd test/integration/browser compile
|
||||
run: npm run compile
|
||||
working-directory: test/integration/browser
|
||||
|
||||
# This is required for SecretStorage unittests
|
||||
- name: Create temporary keychain
|
||||
@@ -232,10 +235,10 @@ jobs:
|
||||
run: DISPLAY=:10 ./scripts/test.sh
|
||||
|
||||
- name: Run Unit Tests (node.js)
|
||||
run: yarn test-node
|
||||
run: npm run test-node
|
||||
|
||||
- name: Run Unit Tests (Browser, Chromium)
|
||||
run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
|
||||
run: DISPLAY=:10 npm run test-browser-no-install --browser chromium
|
||||
|
||||
- name: Run Integration Tests (Electron)
|
||||
run: DISPLAY=:10 ./scripts/test-integration.sh
|
||||
@@ -269,44 +272,45 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
- name: Execute yarn
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: npm ci
|
||||
|
||||
- name: Download Playwright
|
||||
run: yarn playwright-install
|
||||
run: npm run playwright-install
|
||||
|
||||
- name: Run Hygiene Checks
|
||||
run: yarn gulp hygiene
|
||||
run: npm run gulp hygiene
|
||||
|
||||
- name: Run Valid Layers Checks
|
||||
run: yarn valid-layers-check
|
||||
run: npm run valid-layers-check
|
||||
|
||||
- name: Compile /build/
|
||||
run: yarn --cwd build compile
|
||||
run: npm run compile
|
||||
working-directory: build
|
||||
|
||||
- name: Check clean git state
|
||||
run: ./.github/workflows/check-clean-git-state.sh
|
||||
|
||||
- name: Run eslint
|
||||
run: yarn eslint
|
||||
run: npm run eslint
|
||||
|
||||
- name: Run vscode-dts Compile Checks
|
||||
run: yarn vscode-dts-compile-check
|
||||
run: npm run vscode-dts-compile-check
|
||||
|
||||
- name: Run Trusted Types Checks
|
||||
run: yarn tsec-compile-check
|
||||
run: npm run tsec-compile-check
|
||||
|
||||
@@ -34,43 +34,42 @@ jobs:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules20-
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
- name: Get npm cache directory path
|
||||
id: npmCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Cache yarn directory
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
path: ${{ steps.npmCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-npmCacheDir-
|
||||
- name: Install libkrb5-dev
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y libkrb5-dev
|
||||
- name: Execute yarn
|
||||
- name: Execute npm
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: |
|
||||
npm i -g node-gyp@9.4.0
|
||||
yarn --frozen-lockfile --network-timeout 180000
|
||||
npm ci
|
||||
|
||||
- name: Download Playwright
|
||||
run: yarn playwright-install
|
||||
run: npm run playwright-install
|
||||
|
||||
- name: Run Monaco Editor Checks
|
||||
run: yarn monaco-compile-check
|
||||
run: npm run monaco-compile-check
|
||||
|
||||
- name: Editor Distro & ESM
|
||||
run: yarn gulp editor-esm
|
||||
run: npm run gulp editor-esm
|
||||
|
||||
- name: Editor ESM sources check
|
||||
working-directory: ./test/monaco
|
||||
run: yarn run esm-check
|
||||
run: npm run esm-check
|
||||
|
||||
- name: Typings validation prep
|
||||
run: |
|
||||
@@ -79,20 +78,20 @@ jobs:
|
||||
- name: Typings validation
|
||||
working-directory: ./typings-test
|
||||
run: |
|
||||
yarn init -yp
|
||||
npm init -yp
|
||||
../node_modules/.bin/tsc --init
|
||||
echo "import '../out-monaco-editor-core';" > a.ts
|
||||
../node_modules/.bin/tsc --noEmit
|
||||
|
||||
- name: Package Editor with Webpack
|
||||
working-directory: ./test/monaco
|
||||
run: yarn run bundle-webpack
|
||||
run: npm run bundle-webpack
|
||||
|
||||
- name: Compile Editor Tests
|
||||
working-directory: ./test/monaco
|
||||
run: yarn run compile
|
||||
run: npm run compile
|
||||
|
||||
- name: Run Editor Tests
|
||||
timeout-minutes: 5
|
||||
working-directory: ./test/monaco
|
||||
run: yarn test
|
||||
run: npm run test
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Prevent package-lock.json changes in PRs
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Prevent package-lock.json changes in PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: octokit/request-action@v2.x
|
||||
id: get_permissions
|
||||
with:
|
||||
route: GET /repos/microsoft/vscode/collaborators/{username}/permission
|
||||
username: ${{ github.event.pull_request.user.login }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set control output variable
|
||||
id: control
|
||||
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", "maintain", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) }}"
|
||||
echo "should_run=${{ !contains(fromJson('["admin", "maintain", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) && github.event.pull_request.user.login != 'dependabot[bot]' }}" >> $GITHUB_OUTPUT
|
||||
- name: Get file changes
|
||||
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
|
||||
if: ${{ steps.control.outputs.should_run == 'true' }}
|
||||
- name: Check for lockfile changes
|
||||
if: ${{ steps.control.outputs.should_run == 'true' }}
|
||||
run: |
|
||||
cat $HOME/files.json | jq -e 'any(test("package-lock\\.json$|Cargo\\.lock$")) | not' \
|
||||
|| (echo "Changes to package-lock.json/Cargo.lock files aren't allowed in PRs." && exit 1)
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
name: Cache VS Code dependencies
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-dependencies-${{ hashfiles('yarn.lock') }}
|
||||
key: ${{ runner.os }}-dependencies-${{ hashfiles('package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-dependencies-
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.caching-stage.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: npm ci
|
||||
env:
|
||||
CHILD_CONCURRENCY: 1
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ build/node_modules
|
||||
coverage/
|
||||
test_data/
|
||||
test-results/
|
||||
yarn-error.log
|
||||
test-results.xml
|
||||
vscode.lsif
|
||||
vscode.db
|
||||
/.profile-oss
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
disturl="https://electronjs.org/headers"
|
||||
target="30.4.0"
|
||||
ms_build_id="10073054"
|
||||
runtime="electron"
|
||||
build_from_source="true"
|
||||
legacy-peer-deps="true"
|
||||
timeout=180000
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"--enable-proposed-api=ms-vscode.vscode-selfhost-import-aid"
|
||||
],
|
||||
"name": "Launch Extension",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"request": "launch",
|
||||
"type": "extensionHost"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "always"
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"typescript": "5.5.4"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.5.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
||||
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"displayName": "VS Code Selfhost Import Aid",
|
||||
"description": "Util to improve dealing with imports",
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"publisher": "ms-vscode",
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onLanguage:typescript"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/vscode.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:vscode-selfhost-import-aid",
|
||||
"watch": "gulp watch-extension:vscode-selfhost-import-aid"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "5.5.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as ts from 'typescript';
|
||||
import * as path from 'path';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
const fileIndex = new class {
|
||||
|
||||
private _currentRun?: Thenable<void>;
|
||||
|
||||
private _disposables: vscode.Disposable[] = [];
|
||||
|
||||
private readonly _index = new Map<string, vscode.Uri>();
|
||||
|
||||
constructor() {
|
||||
const watcher = vscode.workspace.createFileSystemWatcher('**/*.ts', false, true, false);
|
||||
this._disposables.push(watcher.onDidChange(e => { this._index.set(e.toString(), e); }));
|
||||
this._disposables.push(watcher.onDidDelete(e => { this._index.delete(e.toString()); }));
|
||||
this._disposables.push(watcher);
|
||||
|
||||
this._refresh(false);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
for (const disposable of this._disposables) {
|
||||
disposable.dispose();
|
||||
}
|
||||
this._disposables = [];
|
||||
this._index.clear();
|
||||
}
|
||||
|
||||
async all(token: vscode.CancellationToken) {
|
||||
|
||||
await Promise.race([this._currentRun, new Promise<void>(resolve => token.onCancellationRequested(resolve))]);
|
||||
|
||||
if (token.isCancellationRequested) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return Array.from(this._index.values());
|
||||
}
|
||||
|
||||
private _refresh(clear: boolean) {
|
||||
// TODO@jrieken LATEST API! findFiles2New
|
||||
this._currentRun = vscode.workspace.findFiles('src/vs/**/*.ts', '{**/node_modules/**,**/extensions/**}').then(all => {
|
||||
if (clear) {
|
||||
this._index.clear();
|
||||
}
|
||||
for (const item of all) {
|
||||
this._index.set(item.toString(), item);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const selector: vscode.DocumentSelector = 'typescript';
|
||||
|
||||
function findNodeAtPosition(document: vscode.TextDocument, node: ts.Node, position: vscode.Position): ts.Node | undefined {
|
||||
if (node.getStart() <= document.offsetAt(position) && node.getEnd() >= document.offsetAt(position)) {
|
||||
return ts.forEachChild(node, child => findNodeAtPosition(document, child, position)) || node;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function findImportAt(document: vscode.TextDocument, position: vscode.Position): ts.ImportDeclaration | undefined {
|
||||
const sourceFile = ts.createSourceFile(document.fileName, document.getText(), ts.ScriptTarget.Latest, true);
|
||||
const node = findNodeAtPosition(document, sourceFile, position);
|
||||
if (node && ts.isStringLiteral(node) && ts.isImportDeclaration(node.parent)) {
|
||||
return node.parent;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const completionProvider = new class implements vscode.CompletionItemProvider {
|
||||
async provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Promise<vscode.CompletionList | undefined> {
|
||||
|
||||
const index = document.getText().lastIndexOf(' from \'');
|
||||
if (index < 0 || document.positionAt(index).line < position.line) {
|
||||
// line after last import is before position
|
||||
// -> no completion, safe a parse call
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const node = findImportAt(document, position);
|
||||
if (!node) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const range = new vscode.Range(document.positionAt(node.moduleSpecifier.pos), document.positionAt(node.moduleSpecifier.end));
|
||||
const uris = await fileIndex.all(token);
|
||||
|
||||
if (!uris) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const result = new vscode.CompletionList();
|
||||
result.isIncomplete = true;
|
||||
|
||||
for (const item of uris) {
|
||||
|
||||
if (!item.path.endsWith('.ts')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let relativePath = path.relative(path.dirname(document.uri.path), item.path);
|
||||
relativePath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
||||
|
||||
const label = path.basename(item.path, path.extname(item.path));
|
||||
const insertText = ` '${relativePath.replace(/\.ts$/, '.js')}'`;
|
||||
const filterText = ` '${label}'`;
|
||||
|
||||
const completion = new vscode.CompletionItem({
|
||||
label: label,
|
||||
description: vscode.workspace.asRelativePath(item),
|
||||
});
|
||||
completion.kind = vscode.CompletionItemKind.File;
|
||||
completion.insertText = insertText;
|
||||
completion.filterText = filterText;
|
||||
completion.range = range;
|
||||
|
||||
result.items.push(completion);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
class ImportCodeActions implements vscode.CodeActionProvider {
|
||||
|
||||
static FixKind = vscode.CodeActionKind.QuickFix.append('esmImport');
|
||||
|
||||
static SourceKind = vscode.CodeActionKind.SourceFixAll.append('esmImport');
|
||||
|
||||
async provideCodeActions(document: vscode.TextDocument, range: vscode.Range | vscode.Selection, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
|
||||
if (context.only && ImportCodeActions.SourceKind.intersects(context.only)) {
|
||||
return this._provideFixAll(document, context, token);
|
||||
}
|
||||
|
||||
return this._provideFix(document, range, context, token);
|
||||
}
|
||||
|
||||
private async _provideFixAll(document: vscode.TextDocument, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
|
||||
const diagnostics = context.diagnostics
|
||||
.filter(d => d.code === 2307)
|
||||
.sort((a, b) => b.range.start.compareTo(a.range.start));
|
||||
|
||||
if (diagnostics.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const uris = await fileIndex.all(token);
|
||||
if (!uris) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const result = new vscode.CodeAction(`Fix All ESM Imports`, ImportCodeActions.SourceKind);
|
||||
result.edit = new vscode.WorkspaceEdit();
|
||||
result.diagnostics = [];
|
||||
|
||||
for (const diag of diagnostics) {
|
||||
|
||||
const actions = this._provideFixesForDiag(document, diag, uris);
|
||||
|
||||
if (actions.length === 0) {
|
||||
console.log(`ESM: no fixes for "${diag.message}"`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (actions.length > 1) {
|
||||
console.log(`ESM: more than one fix for "${diag.message}", taking first`);
|
||||
console.log(actions);
|
||||
}
|
||||
|
||||
const [first] = actions;
|
||||
result.diagnostics.push(diag);
|
||||
|
||||
for (const [uri, edits] of first.edit!.entries()) {
|
||||
result.edit.set(uri, edits);
|
||||
}
|
||||
}
|
||||
// console.log(result.edit.get(document.uri));
|
||||
return [result];
|
||||
}
|
||||
|
||||
private async _provideFix(document: vscode.TextDocument, range: vscode.Range | vscode.Selection, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
const uris = await fileIndex.all(token);
|
||||
if (!uris) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const diag = context.diagnostics.find(d => d.code === 2307 && d.range.intersection(range));
|
||||
return diag && this._provideFixesForDiag(document, diag, uris);
|
||||
}
|
||||
|
||||
private _provideFixesForDiag(document: vscode.TextDocument, diag: vscode.Diagnostic, uris: Iterable<vscode.Uri>): vscode.CodeAction[] {
|
||||
|
||||
const node = findImportAt(document, diag.range.start)?.moduleSpecifier;
|
||||
if (!node || !ts.isStringLiteral(node)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const nodeRange = new vscode.Range(document.positionAt(node.pos), document.positionAt(node.end));
|
||||
const name = path.basename(node.text, path.extname(node.text));
|
||||
|
||||
const result: vscode.CodeAction[] = [];
|
||||
|
||||
for (const item of uris) {
|
||||
if (path.basename(item.path, path.extname(item.path)) === name) {
|
||||
let relativePath = path.relative(path.dirname(document.uri.path), item.path).replace(/\.ts$/, '.js');
|
||||
relativePath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
||||
|
||||
const action = new vscode.CodeAction(`Fix to '${relativePath}'`, ImportCodeActions.FixKind);
|
||||
action.edit = new vscode.WorkspaceEdit();
|
||||
action.edit.replace(document.uri, nodeRange, ` '${relativePath}'`);
|
||||
action.diagnostics = [diag];
|
||||
result.push(action);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
context.subscriptions.push(fileIndex);
|
||||
context.subscriptions.push(vscode.languages.registerCompletionItemProvider(selector, completionProvider));
|
||||
context.subscriptions.push(vscode.languages.registerCodeActionsProvider(selector, new ImportCodeActions(), { providedCodeActionKinds: [ImportCodeActions.FixKind, ImportCodeActions.SourceKind] }));
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../../../extensions/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out",
|
||||
"types": [
|
||||
"node",
|
||||
"mocha",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"../../../src/vscode-dts/vscode.d.ts"
|
||||
]
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"name": "vscode-selfhost-test-provider",
|
||||
"version": "0.4.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vscode-selfhost-test-provider",
|
||||
"version": "0.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"ansi-styles": "^5.2.0",
|
||||
"cockatiel": "^3.1.3",
|
||||
"istanbul-to-vscode": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^10.0.6",
|
||||
"@types/node": "20.x"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/resolve-uri": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.25",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
|
||||
"integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w=="
|
||||
},
|
||||
"node_modules/@types/mocha": {
|
||||
"version": "10.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz",
|
||||
"integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.12.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz",
|
||||
"integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
|
||||
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/cockatiel": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.3.tgz",
|
||||
"integrity": "sha512-xC759TpZ69d7HhfDp8m2WkRwEUiCkxY8Ee2OQH/3H6zmy2D/5Sm+zSTbPRa+V2QyjDtpMvjOIAOVjA2gp6N1kQ==",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/istanbul-to-vscode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-to-vscode/-/istanbul-to-vscode-2.0.1.tgz",
|
||||
"integrity": "sha512-V9Hhr7kX3UvkvkaT1lK3AmCRPkaIAIogQBrduTpNiLTkp1eVsybnJhWiDSVeCQap/3aGeZ2019oIivhX9MNsCQ==",
|
||||
"dependencies": {
|
||||
"@types/istanbul-lib-coverage": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import * as vscode from 'vscode';
|
||||
import { TestCase, TestConstruct, TestSuite, VSCodeTest } from './testTree';
|
||||
|
||||
const suiteNames = new Set(['suite', 'flakySuite']);
|
||||
const testNames = new Set(['test']);
|
||||
|
||||
export const enum Action {
|
||||
Skip,
|
||||
@@ -19,22 +20,19 @@ export const extractTestFromNode = (src: ts.SourceFile, node: ts.Node, parent: V
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
let lhs = node.expression;
|
||||
if (isSkipCall(lhs)) {
|
||||
const asSuite = identifyCall(node.expression, suiteNames);
|
||||
const asTest = identifyCall(node.expression, testNames);
|
||||
const either = asSuite || asTest;
|
||||
if (either === IdentifiedCall.Skipped) {
|
||||
return Action.Skip;
|
||||
}
|
||||
|
||||
if (isPropertyCall(lhs) && lhs.name.text === 'only') {
|
||||
lhs = lhs.expression;
|
||||
if (either === IdentifiedCall.Nothing) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
const name = node.arguments[0];
|
||||
const func = node.arguments[1];
|
||||
if (!name || !ts.isIdentifier(lhs) || !ts.isStringLiteralLike(name)) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
if (!func) {
|
||||
if (!name || !ts.isStringLiteralLike(name) || !func) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
@@ -46,23 +44,45 @@ export const extractTestFromNode = (src: ts.SourceFile, node: ts.Node, parent: V
|
||||
);
|
||||
|
||||
const cparent = parent instanceof TestConstruct ? parent : undefined;
|
||||
if (lhs.escapedText === 'test') {
|
||||
|
||||
// we know this is either a suite or a test because we checked for skipped/nothing above
|
||||
|
||||
if (asTest) {
|
||||
return new TestCase(name.text, range, cparent);
|
||||
}
|
||||
|
||||
if (suiteNames.has(lhs.escapedText.toString())) {
|
||||
if (asSuite) {
|
||||
return new TestSuite(name.text, range, cparent);
|
||||
}
|
||||
|
||||
return Action.Recurse;
|
||||
throw new Error('unreachable');
|
||||
};
|
||||
|
||||
const enum IdentifiedCall {
|
||||
Nothing,
|
||||
Skipped,
|
||||
IsThing,
|
||||
}
|
||||
|
||||
const identifyCall = (lhs: ts.Node, needles: ReadonlySet<string>): IdentifiedCall => {
|
||||
if (ts.isIdentifier(lhs)) {
|
||||
return needles.has(lhs.escapedText || lhs.text) ? IdentifiedCall.IsThing : IdentifiedCall.Nothing;
|
||||
}
|
||||
|
||||
if (isPropertyCall(lhs) && lhs.name.text === 'skip') {
|
||||
return needles.has(lhs.expression.text) ? IdentifiedCall.Skipped : IdentifiedCall.Nothing;
|
||||
}
|
||||
|
||||
if (ts.isParenthesizedExpression(lhs) && ts.isConditionalExpression(lhs.expression)) {
|
||||
return Math.max(identifyCall(lhs.expression.whenTrue, needles), identifyCall(lhs.expression.whenFalse, needles));
|
||||
}
|
||||
|
||||
return IdentifiedCall.Nothing;
|
||||
};
|
||||
|
||||
const isPropertyCall = (
|
||||
lhs: ts.LeftHandSideExpression
|
||||
lhs: ts.Node
|
||||
): lhs is ts.PropertyAccessExpression & { expression: ts.Identifier; name: ts.Identifier } =>
|
||||
ts.isPropertyAccessExpression(lhs) &&
|
||||
ts.isIdentifier(lhs.expression) &&
|
||||
ts.isIdentifier(lhs.name);
|
||||
|
||||
const isSkipCall = (lhs: ts.LeftHandSideExpression) =>
|
||||
isPropertyCall(lhs) && suiteNames.has(lhs.expression.text) && lhs.name.text === 'skip';
|
||||
|
||||
@@ -63,7 +63,7 @@ export abstract class VSCodeTestRunner {
|
||||
const cp = spawn(await this.binaryPath(), args, {
|
||||
cwd: this.repoLocation.uri.fsPath,
|
||||
stdio: 'pipe',
|
||||
env: this.getEnvironment(),
|
||||
env: this.getEnvironment(port),
|
||||
});
|
||||
|
||||
// Register a descriptor factory that signals the server when any
|
||||
@@ -139,7 +139,7 @@ export abstract class VSCodeTestRunner {
|
||||
});
|
||||
}
|
||||
|
||||
protected getEnvironment(): NodeJS.ProcessEnv {
|
||||
protected getEnvironment(_remoteDebugPort?: number): NodeJS.ProcessEnv {
|
||||
return {
|
||||
...process.env,
|
||||
ELECTRON_RUN_AS_NODE: undefined,
|
||||
@@ -261,9 +261,10 @@ export class BrowserTestRunner extends VSCodeTestRunner {
|
||||
}
|
||||
|
||||
/** @override */
|
||||
protected override getEnvironment() {
|
||||
protected override getEnvironment(remoteDebugPort?: number) {
|
||||
return {
|
||||
...super.getEnvironment(),
|
||||
...super.getEnvironment(remoteDebugPort),
|
||||
PLAYWRIGHT_CHROMIUM_DEBUG_PORT: remoteDebugPort ? String(remoteDebugPort) : undefined,
|
||||
ELECTRON_RUN_AS_NODE: '1',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@jridgewell/resolve-uri@^3.1.0":
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
|
||||
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
|
||||
|
||||
"@jridgewell/sourcemap-codec@^1.4.14":
|
||||
version "1.4.15"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
|
||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||
|
||||
"@jridgewell/trace-mapping@^0.3.25":
|
||||
version "0.3.25"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
|
||||
integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.1.0"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.14"
|
||||
|
||||
"@types/istanbul-lib-coverage@^2.0.6":
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
||||
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
|
||||
|
||||
"@types/mocha@^10.0.6":
|
||||
version "10.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b"
|
||||
integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==
|
||||
|
||||
"@types/node@20.x":
|
||||
version "20.12.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be"
|
||||
integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
ansi-styles@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
||||
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
||||
|
||||
cockatiel@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cockatiel/-/cockatiel-3.1.3.tgz#bb1774a498a17e739dd994d56610dc6538b02858"
|
||||
integrity sha512-xC759TpZ69d7HhfDp8m2WkRwEUiCkxY8Ee2OQH/3H6zmy2D/5Sm+zSTbPRa+V2QyjDtpMvjOIAOVjA2gp6N1kQ==
|
||||
|
||||
istanbul-to-vscode@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-to-vscode/-/istanbul-to-vscode-2.0.1.tgz#84994d06e604b68cac7301840f338b1e74eb888b"
|
||||
integrity sha512-V9Hhr7kX3UvkvkaT1lK3AmCRPkaIAIogQBrduTpNiLTkp1eVsybnJhWiDSVeCQap/3aGeZ2019oIivhX9MNsCQ==
|
||||
dependencies:
|
||||
"@types/istanbul-lib-coverage" "^2.0.6"
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"August 2024\""
|
||||
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"September 2024\""
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "// list of repos we work in\n$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n// current milestone name\n$MILESTONE=milestone:\"August 2024\"\n"
|
||||
"value": "// list of repos we work in\n$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n// current milestone name\n$MILESTONE=milestone:\"September 2024\"\n"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
||||
Vendored
+4
-3
@@ -34,10 +34,12 @@
|
||||
"src/vs/workbench/api/test/browser/extHostDocumentData.test.perf-data.ts": true,
|
||||
"src/vs/base/test/node/uri.test.data.txt": true,
|
||||
"src/vs/editor/test/node/diffing/fixtures/**": true,
|
||||
"build/loader.min": true
|
||||
},
|
||||
"files.readonlyInclude": {
|
||||
"**/node_modules/**/*.*": true,
|
||||
"**/yarn.lock": true,
|
||||
"**/package-lock.json": true,
|
||||
"**/Cargo.lock": true,
|
||||
"src/vs/workbench/workbench.web.main.css": true,
|
||||
"src/vs/workbench/workbench.desktop.main.css": true,
|
||||
@@ -74,9 +76,8 @@
|
||||
],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"npm.exclude": "**/extensions/**",
|
||||
"npm.packageManager": "yarn",
|
||||
"emmet.excludeLanguages": [],
|
||||
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||
"typescript.preferences.importModuleSpecifier": "relative",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"json.schemas": [
|
||||
{
|
||||
@@ -162,7 +163,7 @@
|
||||
"@xterm/headless",
|
||||
"node-pty",
|
||||
"vscode-notebook-renderer",
|
||||
"src/vs/workbench/workbench.web.main.ts"
|
||||
"src/vs/workbench/workbench.web.main.internal.ts"
|
||||
],
|
||||
"[github-issues]": {
|
||||
"editor.wordWrap": "on"
|
||||
|
||||
Vendored
+1
-1
@@ -113,7 +113,7 @@
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Kill VS Code - Build, Yarn, VS Code - Build",
|
||||
"label": "Kill VS Code - Build, Npm, VS Code - Build",
|
||||
"dependsOn": [
|
||||
"Kill VS Code - Build",
|
||||
"npm: install",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
disturl "https://electronjs.org/headers"
|
||||
target "30.3.1"
|
||||
ms_build_id "9960165"
|
||||
runtime "electron"
|
||||
build_from_source "true"
|
||||
+31
-3
@@ -263,6 +263,34 @@ suitability for any purpose.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
cacheable-request 7.0.4 - MIT
|
||||
|
||||
|
||||
Copyright (c) cacheable-request authors
|
||||
|
||||
MIT License
|
||||
|
||||
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.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
Colorsublime-Themes 0.1.0
|
||||
https://github.com/Colorsublime/Colorsublime-Themes
|
||||
|
||||
@@ -890,7 +918,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
JuliaEditorSupport/atom-language-julia 0.22.1 - MIT
|
||||
JuliaEditorSupport/atom-language-julia 0.23.0 - MIT
|
||||
https://github.com/JuliaEditorSupport/atom-language-julia
|
||||
|
||||
The atom-language-julia package is licensed under the MIT "Expat" License:
|
||||
@@ -1241,7 +1269,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
marked 4.1.0 - MIT
|
||||
marked 14.0.0 - MIT
|
||||
https://github.com/markedjs/marked
|
||||
|
||||
information
|
||||
@@ -1506,7 +1534,7 @@ SOFTWARE.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
RedCMD/YAML-Syntax-Highlighter 1.0.1 - MIT
|
||||
RedCMD/YAML-Syntax-Highlighter 1.1.1 - MIT
|
||||
https://github.com/RedCMD/YAML-Syntax-Highlighter
|
||||
|
||||
MIT License
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2024-08-14T18:12:43.548Z
|
||||
2024-09-04T10:21:29.952Z
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
.yarnrc
|
||||
*.js.map
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ typescript/lib/tsserverlibrary.js
|
||||
|
||||
jschardet/index.js
|
||||
jschardet/src/**
|
||||
jschardet/dist/jschardet.js
|
||||
# TODO@esm uncomment when we can use jschardet.min.js again jschardet/dist/jschardet.js
|
||||
|
||||
es6-promise/lib/**
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
disturl="https://nodejs.org/dist"
|
||||
runtime="node"
|
||||
build_from_source="true"
|
||||
legacy-peer-deps="true"
|
||||
timeout=180000
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
jschardet/index.js
|
||||
jschardet/src/**
|
||||
jschardet/dist/jschardet.js
|
||||
# TODO@esm uncomment when we can use jschardet.min.js again jschardet/dist/jschardet.js
|
||||
|
||||
vscode-textmate/webpack.config.js
|
||||
|
||||
|
||||
@@ -19,17 +19,9 @@ steps:
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
# Install yarn as the ARM64 build agent is using vanilla Ubuntu
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
- task: Npm@1
|
||||
displayName: Install yarn
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: install --global yarn
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn --frozen-lockfile --ignore-optional
|
||||
npm ci
|
||||
workingDirectory: build
|
||||
displayName: Install pipeline build
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ steps:
|
||||
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -27,12 +27,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -43,18 +43,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -75,12 +74,12 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
@@ -89,7 +88,7 @@ steps:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:alpine-$(VSCODE_ARCH)
|
||||
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
|
||||
displayName: Install build dependencies
|
||||
displayName: Install dependencies
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
@@ -112,7 +111,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64") # TODO@joaomoreno
|
||||
yarn gulp vscode-reh-$TARGET-min-ci
|
||||
npm run gulp vscode-reh-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-$TARGET vscode-server-$TARGET) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-$TARGET.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET)"
|
||||
@@ -127,7 +126,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64")
|
||||
yarn gulp vscode-reh-web-$TARGET-min-ci
|
||||
npm run gulp vscode-reh-web-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-web-$TARGET vscode-server-$TARGET-web) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-$TARGET-web.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET-web)"
|
||||
|
||||
@@ -4,7 +4,7 @@ parameters:
|
||||
default: []
|
||||
|
||||
steps:
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
|
||||
@@ -4,7 +4,7 @@ parameters:
|
||||
default: []
|
||||
|
||||
steps:
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
parameters:
|
||||
- name: channel
|
||||
type: string
|
||||
default: 1.77
|
||||
default: 1.81
|
||||
- name: targets
|
||||
default: []
|
||||
type: object
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
parameters:
|
||||
- name: channel
|
||||
type: string
|
||||
default: 1.77
|
||||
default: 1.81
|
||||
- name: targets
|
||||
default: []
|
||||
type: object
|
||||
|
||||
@@ -11,9 +11,10 @@ const { dirs } = require('../../npm/dirs');
|
||||
const ROOT = path.join(__dirname, '../../../');
|
||||
const shasum = crypto.createHash('sha256');
|
||||
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
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, '.npmrc')));
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, 'build', '.npmrc')));
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, 'remote', '.npmrc')));
|
||||
// Add `package.json` and `package-lock.json` files
|
||||
for (const dir of dirs) {
|
||||
const packageJsonPath = path.join(ROOT, dir, 'package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
|
||||
@@ -25,8 +26,8 @@ for (const dir of dirs) {
|
||||
distro: packageJson.distro
|
||||
};
|
||||
shasum.update(JSON.stringify(relevantPackageJsonSections));
|
||||
const yarnLockPath = path.join(ROOT, dir, 'yarn.lock');
|
||||
shasum.update(fs.readFileSync(yarnLockPath));
|
||||
const packageLockPath = path.join(ROOT, dir, 'package-lock.json');
|
||||
shasum.update(fs.readFileSync(packageLockPath));
|
||||
}
|
||||
// Add any other command line arguments
|
||||
for (let i = 2; i < process.argv.length; i++) {
|
||||
|
||||
@@ -13,10 +13,11 @@ const ROOT = path.join(__dirname, '../../../');
|
||||
const shasum = crypto.createHash('sha256');
|
||||
|
||||
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')));
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, '.npmrc')));
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, 'build', '.npmrc')));
|
||||
shasum.update(fs.readFileSync(path.join(ROOT, 'remote', '.npmrc')));
|
||||
|
||||
// Add `package.json` and `yarn.lock` files
|
||||
// Add `package.json` and `package-lock.json` files
|
||||
for (const dir of dirs) {
|
||||
const packageJsonPath = path.join(ROOT, dir, 'package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
|
||||
@@ -29,8 +30,8 @@ for (const dir of dirs) {
|
||||
};
|
||||
shasum.update(JSON.stringify(relevantPackageJsonSections));
|
||||
|
||||
const yarnLockPath = path.join(ROOT, dir, 'yarn.lock');
|
||||
shasum.update(fs.readFileSync(yarnLockPath));
|
||||
const packageLockPath = path.join(ROOT, dir, 'package-lock.json');
|
||||
shasum.update(fs.readFileSync(packageLockPath));
|
||||
}
|
||||
|
||||
// Add any other command line arguments
|
||||
|
||||
@@ -17,31 +17,30 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
workingDirectory: build
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: build/.npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
@@ -13,7 +13,7 @@ steps:
|
||||
continueOnError: true
|
||||
displayName: Download ESRPClient
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
|
||||
@@ -7,12 +7,12 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_RUN_SMOKE_TESTS
|
||||
type: boolean
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- script: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
- script: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download Electron and Playwright
|
||||
@@ -20,52 +20,52 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-esm.sh --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-amd.sh --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-esm
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- script: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-esm-no-install --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-amd-no-install -- --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit) [ESM]
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit) [AMD]
|
||||
timeoutInMinutes: 30
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test.sh --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node
|
||||
- script: npm run test-node
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-no-install --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-no-install -- --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit)
|
||||
timeoutInMinutes: 30
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-esm.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-amd.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-esm --build
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-esm-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-amd-no-install -- --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit) [ESM]
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit) [AMD]
|
||||
timeoutInMinutes: 30
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node --build
|
||||
- script: npm run test-node -- --build
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-no-install -- --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium & Webkit)
|
||||
@@ -74,7 +74,7 @@ steps:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp \
|
||||
npm run gulp \
|
||||
compile-extension:configuration-editing \
|
||||
compile-extension:css-language-features-server \
|
||||
compile-extension:emmet \
|
||||
@@ -94,17 +94,17 @@ steps:
|
||||
displayName: Build integration tests
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-integration-esm.sh --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-integration-amd.sh --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test-integration --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -113,12 +113,12 @@ steps:
|
||||
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" \
|
||||
./scripts/test-integration-esm.sh --build --tfs "Integration Tests"
|
||||
./scripts/test-integration-amd.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -157,13 +157,14 @@ steps:
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn --cwd test/smoke compile
|
||||
- script: npm run compile
|
||||
workingDirectory: test/smoke
|
||||
displayName: Compile smoke tests
|
||||
|
||||
- script: yarn gulp compile-extension-media
|
||||
- script: npm run gulp compile-extension-media
|
||||
displayName: Compile extensions for smoke tests
|
||||
|
||||
- script: yarn smoketest-no-compile --tracing
|
||||
- script: npm run smoketest-no-compile -- --tracing
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Electron)
|
||||
|
||||
@@ -172,11 +173,11 @@ steps:
|
||||
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"
|
||||
npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Electron)
|
||||
|
||||
- script: yarn smoketest-no-compile --web --tracing --headless
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
|
||||
timeoutInMinutes: 20
|
||||
@@ -184,10 +185,10 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp compile-extension:vscode-test-resolver
|
||||
npm run gulp compile-extension:vscode-test-resolver
|
||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
|
||||
npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
@@ -7,7 +7,7 @@ steps:
|
||||
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -20,31 +20,30 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
workingDirectory: build
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: build/.npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
@@ -9,7 +9,7 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_RUN_SMOKE_TESTS
|
||||
type: boolean
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -28,7 +28,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -48,12 +48,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js darwin $VSCODE_ARCH > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js darwin $VSCODE_ARCH > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -64,18 +64,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -92,12 +91,12 @@ steps:
|
||||
python3 -m pip install setuptools
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
npm_config_arch: $(VSCODE_ARCH)
|
||||
@@ -134,7 +133,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
|
||||
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
@@ -142,7 +141,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH).zip"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
@@ -154,7 +153,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-web-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH)-web.zip"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
@@ -165,7 +164,7 @@ steps:
|
||||
displayName: Build server (web)
|
||||
|
||||
- ${{ else }}:
|
||||
- script: yarn gulp transpile-client-swc transpile-extensions
|
||||
- script: npm run gulp transpile-client-swc transpile-extensions
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile
|
||||
@@ -177,7 +176,7 @@ steps:
|
||||
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 }}
|
||||
VSCODE_BUILD_ESM: ${{ parameters.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ parameters.VSCODE_BUILD_AMD }}
|
||||
|
||||
- ${{ elseif and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
steps:
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -51,6 +51,5 @@ steps:
|
||||
|
||||
unzip $ArchivePath -d .build
|
||||
mv .build/microsoft-vscode-distro-$DistroVersion .build/distro
|
||||
cp remote/.yarnrc .build/distro/npm/remote/.yarnrc
|
||||
condition: and(succeeded(), not(contains(variables['Agent.OS'], 'windows')))
|
||||
displayName: Download distro (non-Windows)
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
## Copied from https://github.com/actions/runner-images/blob/ubuntu22/20240825.1/images/ubuntu/scripts/build/configure-apt-mock.sh
|
||||
################################################################################
|
||||
|
||||
i=1
|
||||
while [ $i -le 30 ];do
|
||||
err=$(mktemp)
|
||||
"$@" 2>$err
|
||||
|
||||
# no errors, break the loop and continue normal flow
|
||||
test -f $err || break
|
||||
cat $err >&2
|
||||
|
||||
retry=false
|
||||
|
||||
if grep -q 'Could not get lock' $err;then
|
||||
# apt db locked needs retry
|
||||
retry=true
|
||||
elif grep -q 'Could not open file /var/lib/apt/lists' $err;then
|
||||
# apt update is not completed, needs retry
|
||||
retry=true
|
||||
elif grep -q 'IPC connect call failed' $err;then
|
||||
# the delay should help with gpg-agent not ready
|
||||
retry=true
|
||||
elif grep -q 'Temporary failure in name resolution' $err;then
|
||||
# It looks like DNS is not updated with random generated hostname yet
|
||||
retry=true
|
||||
elif grep -q 'dpkg frontend is locked by another process' $err;then
|
||||
# dpkg process is busy by another process
|
||||
retry=true
|
||||
fi
|
||||
|
||||
rm $err
|
||||
if [ $retry = false ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
echo "...retry $i"
|
||||
i=$((i + 1))
|
||||
done
|
||||
@@ -40,24 +40,23 @@ steps:
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: node build/setup-npm-registry.js $NPM_REGISTRY
|
||||
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -65,13 +64,14 @@ steps:
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --cwd build --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
- script: |
|
||||
|
||||
@@ -5,7 +5,7 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_ARCH
|
||||
type: string
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -18,7 +18,7 @@ steps:
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -37,8 +37,8 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
# Start X server
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pkg-config \
|
||||
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get update
|
||||
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get install -y pkg-config \
|
||||
dbus \
|
||||
xvfb \
|
||||
libgtk-3-0 \
|
||||
@@ -62,18 +62,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -89,28 +88,31 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
# To workaround the issue of yarn not respecting the registry value from .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --cwd build --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
|
||||
source ./build/azure-pipelines/linux/setup-env.sh --only-remote
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
@@ -134,7 +136,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
ARCHIVE_PATH=".build/linux/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
|
||||
@@ -152,7 +154,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
||||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-legacy-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
@@ -167,7 +169,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
||||
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-legacy-$(VSCODE_ARCH)-web.tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
@@ -204,7 +206,7 @@ steps:
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
|
||||
VSCODE_RUN_SMOKE_TESTS: false
|
||||
VSCODE_BUILD_ESM: ${{ parameters.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ parameters.VSCODE_BUILD_AMD }}
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ parameters:
|
||||
- name: PUBLISH_TASK_NAME
|
||||
type: string
|
||||
default: PublishPipelineArtifact@0
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- script: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
- script: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download Electron and Playwright
|
||||
@@ -36,30 +36,30 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-esm.sh --tfs "Unit Tests"
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-amd.sh --tfs "Unit Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-esm
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- script: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-esm-no-install --browser chromium --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-amd-no-install -- --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium) [ESM]
|
||||
displayName: Run unit tests (Browser, Chromium) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test.sh --tfs "Unit Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node
|
||||
- script: npm run test-node
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-no-install --browser chromium --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-no-install -- --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium)
|
||||
@@ -67,26 +67,26 @@ steps:
|
||||
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-esm.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-amd.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-esm --build
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-esm-no-install --build --browser chromium --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-amd-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium) [ESM]
|
||||
displayName: Run unit tests (Browser, Chromium) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node --build
|
||||
- script: npm run test-node -- --build
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-no-install --build --browser chromium --tfs "Browser Unit Tests"
|
||||
- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
|
||||
env:
|
||||
DEBUG: "*browser*"
|
||||
displayName: Run unit tests (Browser, Chromium)
|
||||
@@ -95,7 +95,7 @@ steps:
|
||||
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp \
|
||||
npm run gulp \
|
||||
compile-extension:configuration-editing \
|
||||
compile-extension:css-language-features-server \
|
||||
compile-extension:emmet \
|
||||
@@ -116,13 +116,13 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: ./scripts/test-integration-esm.sh --tfs "Integration Tests"
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: ./scripts/test-integration-amd.sh --tfs "Integration Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
|
||||
env:
|
||||
DISPLAY: ":10"
|
||||
@@ -138,7 +138,7 @@ steps:
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -148,12 +148,12 @@ steps:
|
||||
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" \
|
||||
./scripts/test-integration-esm.sh --build --tfs "Integration Tests"
|
||||
./scripts/test-integration-amd.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- script: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -198,34 +198,35 @@ steps:
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn --cwd test/smoke compile
|
||||
- script: npm run compile
|
||||
workingDirectory: test/smoke
|
||||
displayName: Compile smoke tests
|
||||
|
||||
- script: yarn gulp compile-extension:markdown-language-features compile-extension:ipynb compile-extension-media compile-extension:vscode-test-resolver
|
||||
- script: npm run gulp compile-extension:markdown-language-features compile-extension:ipynb compile-extension-media compile-extension:vscode-test-resolver
|
||||
displayName: Build extensions for smoke tests
|
||||
|
||||
- script: yarn gulp node
|
||||
- script: npm run gulp node
|
||||
displayName: Download node.js for remote smoke tests
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
- script: yarn smoketest-no-compile --tracing
|
||||
- script: npm run smoketest-no-compile -- --tracing
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Electron)
|
||||
|
||||
- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Browser, Chromium)
|
||||
|
||||
- script: yarn smoketest-no-compile --remote --tracing
|
||||
- script: npm run smoketest-no-compile -- --remote --tracing
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Remote)
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||
- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Electron)
|
||||
|
||||
- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
|
||||
- script: npm run smoketest-no-compile -- --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
timeoutInMinutes: 20
|
||||
@@ -233,10 +234,10 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp compile-extension:vscode-test-resolver
|
||||
npm run gulp compile-extension:vscode-test-resolver
|
||||
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
|
||||
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
|
||||
npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Remote)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_ARCH
|
||||
type: string
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -30,7 +30,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -49,8 +49,8 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
# Start X server
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pkg-config \
|
||||
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get update
|
||||
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get install -y pkg-config \
|
||||
dbus \
|
||||
xvfb \
|
||||
libgtk-3-0 \
|
||||
@@ -72,12 +72,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -88,18 +88,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -107,23 +106,44 @@ steps:
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --cwd build --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
# Step will be used by both Install dependencies and building rpm package,
|
||||
# hence avoid adding it behind NODE_MODULES_RESTORED condition.
|
||||
- script: |
|
||||
set -e
|
||||
SYSROOT_ARCH=$VSCODE_ARCH
|
||||
if [ "$SYSROOT_ARCH" == "x64" ]; then
|
||||
SYSROOT_ARCH="amd64"
|
||||
fi
|
||||
export VSCODE_SYSROOT_DIR=$(Build.SourcesDirectory)/.build/sysroots
|
||||
SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
|
||||
env:
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download vscode sysroots
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
source ./build/azure-pipelines/linux/setup-env.sh
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
@@ -170,7 +190,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
ARCHIVE_PATH=".build/linux/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
|
||||
@@ -203,7 +223,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
@@ -217,7 +237,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
npm run gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
@@ -258,7 +278,7 @@ steps:
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: yarn gulp "transpile-client-swc" "transpile-extensions"
|
||||
- script: npm run gulp "transpile-client-swc" "transpile-extensions"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile client and extensions
|
||||
@@ -270,38 +290,50 @@ steps:
|
||||
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 }}
|
||||
VSCODE_BUILD_ESM: ${{ parameters.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ parameters.VSCODE_BUILD_AMD }}
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-deb"
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-prepare-deb"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Prepare deb package
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
||||
echo "##vso[task.setvariable variable=DEB_PATH]$(ls .build/linux/deb/*/deb/*.deb)"
|
||||
displayName: Build deb package
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-rpm"
|
||||
TRIPLE=""
|
||||
if [ "$VSCODE_ARCH" == "x64" ]; then
|
||||
TRIPLE="x86_64-linux-gnu"
|
||||
elif [ "$VSCODE_ARCH" == "arm64" ]; then
|
||||
TRIPLE="aarch64-linux-gnu"
|
||||
elif [ "$VSCODE_ARCH" == "armhf" ]; then
|
||||
TRIPLE="arm-rpi-linux-gnueabihf"
|
||||
fi
|
||||
export VSCODE_SYSROOT_DIR=$(Build.SourcesDirectory)/.build/sysroots
|
||||
export STRIP="$VSCODE_SYSROOT_DIR/$TRIPLE/$TRIPLE/bin/strip"
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-prepare-rpm"
|
||||
env:
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Prepare rpm package
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
||||
echo "##vso[task.setvariable variable=RPM_PATH]$(ls .build/linux/rpm/*/*.rpm)"
|
||||
displayName: Build rpm package
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
||||
ARCHIVE_PATH=".build/linux/snap-tarball/snap-$(VSCODE_ARCH).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar -czf $ARCHIVE_PATH -C .build/linux snap
|
||||
|
||||
@@ -8,7 +8,12 @@ if [ "$SYSROOT_ARCH" == "x64" ]; then
|
||||
fi
|
||||
|
||||
export VSCODE_SYSROOT_DIR=$PWD/.build/sysroots
|
||||
SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
|
||||
if [ -d "$VSCODE_SYSROOT_DIR" ]; then
|
||||
echo "Using cached sysroot"
|
||||
else
|
||||
echo "Downloading sysroot"
|
||||
SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot } = require("./build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
|
||||
fi
|
||||
|
||||
if [ "$npm_config_arch" == "x64" ]; then
|
||||
if [ "$(echo "$@" | grep -c -- "--only-remote")" -eq 0 ]; then
|
||||
|
||||
@@ -22,17 +22,11 @@ steps:
|
||||
sudo apt-get upgrade -y
|
||||
sudo apt-get install -y curl apt-transport-https ca-certificates
|
||||
|
||||
# Yarn
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y yarn
|
||||
|
||||
# Define variables
|
||||
SNAP_ROOT="$(pwd)/.build/linux/snap/$(VSCODE_ARCH)"
|
||||
|
||||
# Install build dependencies
|
||||
(cd build && yarn)
|
||||
(cd build && npm ci)
|
||||
|
||||
# Unpack snap tarball artifact, in order to preserve file perms
|
||||
(cd .build/linux && tar -xzf snap-tarball/snap-$(VSCODE_ARCH).tar.gz)
|
||||
|
||||
@@ -10,7 +10,7 @@ elif [ "$VSCODE_ARCH" == "armhf" ]; then
|
||||
fi
|
||||
|
||||
# Get all files with .node extension from server folder
|
||||
files=$(find $SEARCH_PATH -name "*.node" -not -path "*prebuilds*" -o -type f -executable -name "node")
|
||||
files=$(find $SEARCH_PATH -name "*.node" -not -path "*prebuilds*" -not -path "*extensions/node_modules/@parcel/watcher*" -o -type f -executable -name "node")
|
||||
|
||||
echo "Verifying requirements for files: $files"
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -29,18 +29,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -51,12 +50,12 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
@@ -15,12 +15,12 @@ steps:
|
||||
|
||||
- pwsh: |
|
||||
mkdir .build -ea 0
|
||||
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/yarnlockhash
|
||||
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -32,18 +32,18 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
|
||||
exec { yarn config set registry "$env:NPM_REGISTRY" }
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" }
|
||||
$NpmrcPath = (npm config get userconfig)
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -53,7 +53,7 @@ steps:
|
||||
$ErrorActionPreference = "Stop"
|
||||
$env:npm_config_arch="$(VSCODE_ARCH)"
|
||||
$env:CHILD_CONCURRENCY="1"
|
||||
retry { exec { yarn --frozen-lockfile --check-files } }
|
||||
retry { exec { npm ci } }
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
|
||||
@@ -21,12 +21,14 @@ variables:
|
||||
value: oss
|
||||
- name: VSCODE_STEP_ON_IT
|
||||
value: false
|
||||
- name: VSCODE_BUILD_AMD
|
||||
value: false
|
||||
|
||||
jobs:
|
||||
- ${{ if ne(variables['VSCODE_CIBUILD'], true) }}:
|
||||
- job: Compile
|
||||
displayName: Compile & Hygiene
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -37,7 +39,7 @@ jobs:
|
||||
|
||||
- job: Linuxx64UnitTest
|
||||
displayName: Linux (Unit Tests)
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -48,6 +50,7 @@ jobs:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -55,7 +58,7 @@ jobs:
|
||||
|
||||
- job: Linuxx64IntegrationTest
|
||||
displayName: Linux (Integration Tests)
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -66,6 +69,7 @@ jobs:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: true
|
||||
@@ -73,7 +77,7 @@ jobs:
|
||||
|
||||
- job: Linuxx64SmokeTest
|
||||
displayName: Linux (Smoke Tests)
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -84,6 +88,7 @@ jobs:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -91,14 +96,14 @@ jobs:
|
||||
|
||||
- job: LinuxCLI
|
||||
displayName: Linux (CLI)
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
steps:
|
||||
- template: cli/test.yml@self
|
||||
|
||||
- job: Windowsx64UnitTests
|
||||
displayName: Windows (Unit Tests)
|
||||
pool: 1es-oss-windows-2019-x64
|
||||
pool: 1es-oss-windows-2022-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -107,6 +112,7 @@ jobs:
|
||||
- template: win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
@@ -115,8 +121,8 @@ jobs:
|
||||
|
||||
- job: Windowsx64IntegrationTests
|
||||
displayName: Windows (Integration Tests)
|
||||
pool: 1es-oss-windows-2019-x64
|
||||
timeoutInMinutes: 30
|
||||
pool: 1es-oss-windows-2022-x64
|
||||
timeoutInMinutes: 60
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
NPM_ARCH: x64
|
||||
@@ -124,6 +130,7 @@ jobs:
|
||||
- template: win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
@@ -132,7 +139,7 @@ jobs:
|
||||
|
||||
# - job: Windowsx64SmokeTests
|
||||
# displayName: Windows (Smoke Tests)
|
||||
# pool: 1es-oss-windows-2019-x64
|
||||
# pool: 1es-oss-windows-2022-x64
|
||||
# timeoutInMinutes: 30
|
||||
# variables:
|
||||
# VSCODE_ARCH: x64
|
||||
@@ -149,7 +156,7 @@ jobs:
|
||||
- ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
|
||||
- job: Linuxx64MaintainNodeModulesCache
|
||||
displayName: Linux (Maintain node_modules cache)
|
||||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
pool: 1es-oss-ubuntu-22.04-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -158,7 +165,7 @@ jobs:
|
||||
|
||||
- job: Windowsx64MaintainNodeModulesCache
|
||||
displayName: Windows (Maintain node_modules cache)
|
||||
pool: 1es-oss-windows-2019-x64
|
||||
pool: 1es-oss-windows-2022-x64
|
||||
timeoutInMinutes: 30
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
|
||||
@@ -100,8 +100,8 @@ parameters:
|
||||
displayName: "Skip tests"
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_ESM # TODO@bpasero TODO@esm remove me once ESM is shipped
|
||||
displayName: "️❗ Build as ESM (!FOR TESTING ONLY!) ️❗"
|
||||
- name: VSCODE_BUILD_AMD # TODO@bpasero TODO@esm remove me once AMD is removed
|
||||
displayName: "️❗ Build as AMD (!FOR EMERGENCY ONLY!) ️❗"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -114,8 +114,8 @@ variables:
|
||||
value: ${{ parameters.CARGO_REGISTRY }}
|
||||
- name: VSCODE_QUALITY
|
||||
value: ${{ parameters.VSCODE_QUALITY }}
|
||||
- name: VSCODE_BUILD_ESM
|
||||
value: ${{ parameters.VSCODE_BUILD_ESM }}
|
||||
- name: VSCODE_BUILD_AMD
|
||||
value: ${{ parameters.VSCODE_BUILD_AMD }}
|
||||
- name: VSCODE_BUILD_STAGE_WINDOWS
|
||||
value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}
|
||||
- name: VSCODE_BUILD_STAGE_LINUX
|
||||
@@ -201,6 +201,7 @@ extends:
|
||||
enableExclusions: true
|
||||
exclusionsFilePath: $(Build.SourcesDirectory)/.eslintignore
|
||||
sourceAnalysisPool: 1es-windows-2022-x64
|
||||
createAdoIssuesForJustificationsForDisablement: false
|
||||
containers:
|
||||
snapcraft:
|
||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:snapcraft-x64
|
||||
@@ -216,7 +217,7 @@ extends:
|
||||
- job: Compile
|
||||
timeoutInMinutes: 90
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
@@ -224,7 +225,7 @@ extends:
|
||||
- template: build/azure-pipelines/product-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
|
||||
- ${{ if 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_ALPINE, true),eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true),eq(parameters.VSCODE_BUILD_MACOS, true),eq(parameters.VSCODE_BUILD_MACOS_ARM64, true),eq(parameters.VSCODE_BUILD_WIN32, true),eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
|
||||
- stage: CompileCLI
|
||||
@@ -233,7 +234,7 @@ extends:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- job: CLILinuxX64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: build/azure-pipelines/linux/cli-build-linux.yml@self
|
||||
@@ -245,7 +246,7 @@ extends:
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), or(eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true))) }}:
|
||||
- job: CLILinuxGnuARM
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: build/azure-pipelines/linux/cli-build-linux.yml@self
|
||||
@@ -257,7 +258,7 @@ extends:
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_ALPINE, true)) }}:
|
||||
- job: CLIAlpineX64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: build/azure-pipelines/alpine/cli-build-alpine.yml@self
|
||||
@@ -362,7 +363,7 @@ extends:
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
@@ -377,7 +378,7 @@ extends:
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
@@ -392,7 +393,7 @@ extends:
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
@@ -408,7 +409,7 @@ extends:
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
@@ -432,7 +433,7 @@ extends:
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_ARCH: arm64
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
@@ -446,7 +447,7 @@ extends:
|
||||
- ${{ if 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_ALPINE, true),eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true),eq(parameters.VSCODE_BUILD_MACOS, true),eq(parameters.VSCODE_BUILD_MACOS_ARM64, true),eq(parameters.VSCODE_BUILD_WIN32, true),eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
|
||||
- CompileCLI
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
|
||||
@@ -461,7 +462,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -477,7 +478,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: true
|
||||
@@ -493,7 +494,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -511,7 +512,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
@@ -537,7 +538,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: armhf
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -553,7 +554,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: arm64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -578,7 +579,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF_LEGACY_SERVER, true) }}:
|
||||
@@ -591,7 +592,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: armhf
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64_LEGACY_SERVER, true) }}:
|
||||
@@ -604,7 +605,7 @@ extends:
|
||||
parameters:
|
||||
VSCODE_ARCH: arm64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_ALPINE'], true)) }}:
|
||||
@@ -614,7 +615,7 @@ extends:
|
||||
- ${{ if 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_ALPINE, true),eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true),eq(parameters.VSCODE_BUILD_MACOS, true),eq(parameters.VSCODE_BUILD_MACOS_ARM64, true),eq(parameters.VSCODE_BUILD_WIN32, true),eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
|
||||
- CompileCLI
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
||||
@@ -657,7 +658,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -671,7 +672,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: true
|
||||
@@ -685,7 +686,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -700,7 +701,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -715,7 +716,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
|
||||
@@ -747,7 +748,7 @@ extends:
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ESM: ${{ variables.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ variables.VSCODE_BUILD_AMD }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: false
|
||||
@@ -787,7 +788,7 @@ extends:
|
||||
dependsOn:
|
||||
- Compile
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WEB, true) }}:
|
||||
@@ -817,7 +818,7 @@ extends:
|
||||
- stage: ApproveRelease
|
||||
dependsOn: [] # run in parallel to compile stage
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- deployment: ApproveRelease
|
||||
@@ -838,7 +839,7 @@ extends:
|
||||
- ${{ if and(parameters.VSCODE_RELEASE, eq(variables['VSCODE_PRIVATE_BUILD'], false)) }}:
|
||||
- ApproveRelease
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- job: ReleaseBuild
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
parameters:
|
||||
- name: VSCODE_QUALITY
|
||||
type: string
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -15,7 +15,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ./distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -26,12 +26,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js compile > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js compile > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -42,18 +42,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -63,15 +62,14 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm i -g node-gyp@9.4.0
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
@@ -94,38 +92,47 @@ steps:
|
||||
displayName: Create node_modules archive
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn --cwd build compile && ./.github/workflows/check-clean-git-state.sh
|
||||
- script: npm run compile
|
||||
workingDirectory: build
|
||||
displayName: Compile /build/ folder
|
||||
|
||||
- script: .github/workflows/check-clean-git-state.sh
|
||||
displayName: Check /build/ folder
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- script: node migrate.mjs --disable-watch
|
||||
displayName: Migrate to ESM
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- script: node migrate.mjs --disable-watch --enable-esm-to-amd
|
||||
displayName: Migrate ESM -> AMD
|
||||
|
||||
- template: common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
- script: npm exec -- npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
|
||||
displayName: Compile & Hygiene (OSS)
|
||||
- ${{ else }}:
|
||||
- script: yarn npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
- script: npm exec -- 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)"
|
||||
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
|
||||
displayName: Compile & Hygiene (non-OSS)
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn --cwd test/smoke compile
|
||||
yarn --cwd test/integration/browser compile
|
||||
displayName: Compile test suites (non-OSS)
|
||||
npm run compile
|
||||
displayName: Compile smoke test suites (non-OSS)
|
||||
workingDirectory: test/smoke
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm run compile
|
||||
displayName: Compile integration test suites (non-OSS)
|
||||
workingDirectory: test/integration/browser
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- task: AzureCLI@2
|
||||
@@ -171,7 +178,7 @@ steps:
|
||||
sbomEnabled: false
|
||||
displayName: Publish compilation artifact
|
||||
|
||||
- script: yarn download-builtin-extensions-cg
|
||||
- script: npm run download-builtin-extensions-cg
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download component details of built-in extensions
|
||||
|
||||
@@ -8,14 +8,14 @@ steps:
|
||||
- task: SFP.build-tasks.esrpclient-tools-task.EsrpClientTool@2
|
||||
displayName: "Use EsrpClient"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
KeyVaultName: vscode-build-secrets
|
||||
SecretsFilter: "github-distro-mixin-password,esrp-aad-username,esrp-aad-password"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -26,10 +26,8 @@ steps:
|
||||
- pwsh: Write-Host "##vso[build.addbuildtag]🚀"
|
||||
displayName: Add build tag
|
||||
|
||||
- pwsh: node build/npm/setupBuildYarnrc
|
||||
displayName: Prepare build dependencies
|
||||
|
||||
- pwsh: yarn
|
||||
- pwsh: |
|
||||
npm ci
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
|
||||
@@ -23,7 +23,12 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
(cd build ; yarn)
|
||||
npm ci
|
||||
workingDirectory: build
|
||||
displayName: Install /build dependencies
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
|
||||
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
|
||||
AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
|
||||
|
||||
@@ -34,7 +34,7 @@ steps:
|
||||
|
||||
- bash: |
|
||||
# Install build dependencies
|
||||
(cd build && yarn)
|
||||
(cd build && npm ci)
|
||||
node build/azure-pipelines/publish-types/check-version.js
|
||||
displayName: Check version
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ const path = require("path");
|
||||
const es = require("event-stream");
|
||||
const vfs = require("vinyl-fs");
|
||||
const util = require("../lib/util");
|
||||
const amd_1 = require("../lib/amd");
|
||||
// @ts-ignore
|
||||
const deps = require("../lib/dependencies");
|
||||
const identity_1 = require("@azure/identity");
|
||||
@@ -25,13 +26,16 @@ function src(base, maps = `${base}/**/*.map`) {
|
||||
}));
|
||||
}
|
||||
function main() {
|
||||
if ((0, amd_1.isAMD)()) {
|
||||
return Promise.resolve(); // in AMD we run into some issues, but we want to unblock the build for recovery
|
||||
}
|
||||
const sources = [];
|
||||
// vscode client maps (default)
|
||||
if (!base) {
|
||||
const vs = src('out-vscode-min'); // client source-maps only
|
||||
sources.push(vs);
|
||||
const productionDependencies = deps.getProductionDependencies(root);
|
||||
const productionDependenciesSrc = productionDependencies.map(d => path.relative(root, d.path)).map(d => `./${d}/**/*.map`);
|
||||
const productionDependenciesSrc = productionDependencies.map(d => path.relative(root, d)).map(d => `./${d}/**/*.map`);
|
||||
const nodeModules = vfs.src(productionDependenciesSrc, { base: '.' })
|
||||
.pipe(util.cleanNodeModules(path.join(root, 'build', '.moduleignore')))
|
||||
.pipe(util.cleanNodeModules(path.join(root, 'build', `.moduleignore.${process.platform}`)));
|
||||
|
||||
@@ -8,6 +8,7 @@ import * as es from 'event-stream';
|
||||
import * as Vinyl from 'vinyl';
|
||||
import * as vfs from 'vinyl-fs';
|
||||
import * as util from '../lib/util';
|
||||
import { isAMD } from '../lib/amd';
|
||||
// @ts-ignore
|
||||
import * as deps from '../lib/dependencies';
|
||||
import { ClientSecretCredential } from '@azure/identity';
|
||||
@@ -29,6 +30,9 @@ function src(base: string, maps = `${base}/**/*.map`) {
|
||||
}
|
||||
|
||||
function main(): Promise<void> {
|
||||
if (isAMD()) {
|
||||
return Promise.resolve(); // in AMD we run into some issues, but we want to unblock the build for recovery
|
||||
}
|
||||
const sources: any[] = [];
|
||||
|
||||
// vscode client maps (default)
|
||||
@@ -36,8 +40,8 @@ function main(): Promise<void> {
|
||||
const vs = src('out-vscode-min'); // client source-maps only
|
||||
sources.push(vs);
|
||||
|
||||
const productionDependencies: { name: string; path: string; version: string }[] = deps.getProductionDependencies(root);
|
||||
const productionDependenciesSrc = productionDependencies.map(d => path.relative(root, d.path)).map(d => `./${d}/**/*.map`);
|
||||
const productionDependencies = deps.getProductionDependencies(root);
|
||||
const productionDependenciesSrc = productionDependencies.map(d => path.relative(root, d)).map(d => `./${d}/**/*.map`);
|
||||
const nodeModules = vfs.src(productionDependenciesSrc, { base: '.' })
|
||||
.pipe(util.cleanNodeModules(path.join(root, 'build', '.moduleignore')))
|
||||
.pipe(util.cleanNodeModules(path.join(root, 'build', `.moduleignore.${process.platform}`)));
|
||||
|
||||
@@ -7,7 +7,7 @@ steps:
|
||||
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -27,12 +27,12 @@ steps:
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js web > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js web > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -43,18 +43,17 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -65,12 +64,12 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
@@ -98,13 +97,12 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn gulp vscode-web-min-ci
|
||||
npm run gulp vscode-web-min-ci
|
||||
ARCHIVE_PATH=".build/web/vscode-web.tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-web
|
||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build
|
||||
|
||||
|
||||
@@ -17,21 +17,20 @@ steps:
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- powershell: |
|
||||
. azure-pipelines/win32/exec.ps1
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
|
||||
exec { yarn config set registry "$env:NPM_REGISTRY" }
|
||||
workingDirectory: build
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" }
|
||||
$NpmrcPath = (npm config get userconfig)
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: build/.npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -40,7 +39,7 @@ steps:
|
||||
. azure-pipelines/win32/retry.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
$env:CHILD_CONCURRENCY="1"
|
||||
retry { exec { yarn --frozen-lockfile --check-files } }
|
||||
retry { exec { npm ci } }
|
||||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ parameters:
|
||||
- name: PUBLISH_TASK_NAME
|
||||
type: string
|
||||
default: PublishPipelineArtifact@0
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- powershell: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
- powershell: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download Electron and Playwright
|
||||
@@ -25,21 +25,21 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- powershell: .\scripts\test-esm.bat --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- powershell: .\scripts\test-amd.bat --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-node-esm
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- powershell: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: node test/unit/browser/index.esm.js --sequential --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium) [ESM]
|
||||
- powershell: node test/unit/browser/index.amd.js --sequential --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- powershell: .\scripts\test.bat --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-node
|
||||
- powershell: npm run test-node
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- powershell: node test/unit/browser/index.js --sequential --browser chromium --tfs "Browser Unit Tests"
|
||||
@@ -47,24 +47,24 @@ steps:
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- powershell: .\scripts\test-esm.bat --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- powershell: .\scripts\test-amd.bat --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-esm --build
|
||||
displayName: Run unit tests (node.js) [ESM]
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-browser-esm-no-install --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium) [ESM]
|
||||
- powershell: npm run test-browser-amd-no-install -- --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- powershell: .\scripts\test.bat --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-node --build
|
||||
- powershell: npm run test-node -- --build
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-browser-no-install --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
- powershell: npm run test-browser-no-install -- --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
@@ -72,7 +72,7 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { yarn gulp `
|
||||
exec { npm run gulp `
|
||||
compile-extension:configuration-editing `
|
||||
compile-extension:css-language-features-server `
|
||||
compile-extension:emmet `
|
||||
@@ -98,17 +98,17 @@ steps:
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- powershell: .\scripts\test-integration-esm.bat --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- powershell: .\scripts\test-integration-amd.bat --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- powershell: .\scripts\test-integration.bat --tfs "Integration Tests"
|
||||
displayName: Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- powershell: .\scripts\test-web-integration.bat --browser firefox
|
||||
displayName: Run integration tests (Browser, Firefox)
|
||||
- powershell: .\scripts\test-web-integration.bat --browser chromium
|
||||
displayName: Run integration tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- powershell: .\scripts\test-remote-integration.bat
|
||||
@@ -116,7 +116,7 @@ steps:
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, true) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, true) }}:
|
||||
- powershell: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -128,10 +128,10 @@ steps:
|
||||
$AppNameShort = $AppProductJson.nameShort
|
||||
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
|
||||
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)"
|
||||
exec { .\scripts\test-integration-esm.bat --build --tfs "Integration Tests" }
|
||||
displayName: Run integration tests (Electron) [ESM]
|
||||
exec { .\scripts\test-integration-amd.bat --build --tfs "Integration Tests" }
|
||||
displayName: Run integration tests (Electron) [AMD]
|
||||
timeoutInMinutes: 20
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ESM, false) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_AMD, false) }}:
|
||||
- powershell: |
|
||||
# Figure out the full absolute path of the product we just built
|
||||
# including the remote server and configure the integration tests
|
||||
@@ -179,32 +179,33 @@ steps:
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- powershell: yarn --cwd test/smoke compile
|
||||
- powershell: npm run compile
|
||||
workingDirectory: test/smoke
|
||||
displayName: Compile smoke tests
|
||||
|
||||
- powershell: yarn gulp compile-extension-media
|
||||
- powershell: npm run gulp compile-extension-media
|
||||
displayName: Build extensions for smoke tests
|
||||
|
||||
- powershell: yarn smoketest-no-compile --tracing
|
||||
- powershell: npm run smoketest-no-compile -- --tracing
|
||||
displayName: Run smoke tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- powershell: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
- powershell: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
displayName: Run smoke tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- powershell: yarn smoketest-no-compile --web --tracing --headless
|
||||
- powershell: npm run smoketest-no-compile -- --web --tracing --headless
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)-web
|
||||
displayName: Run smoke tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- powershell: yarn gulp compile-extension:vscode-test-resolver
|
||||
- powershell: npm run gulp compile-extension:vscode-test-resolver
|
||||
displayName: Compile test resolver extension
|
||||
timeoutInMinutes: 20
|
||||
|
||||
- powershell: yarn smoketest-no-compile --tracing --remote --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
- powershell: npm run smoketest-no-compile -- --tracing --remote --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)
|
||||
displayName: Run smoke tests (Remote)
|
||||
|
||||
@@ -11,7 +11,7 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_RUN_SMOKE_TESTS
|
||||
type: boolean
|
||||
- name: VSCODE_BUILD_ESM
|
||||
- name: VSCODE_BUILD_AMD
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -35,7 +35,7 @@ steps:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -60,12 +60,12 @@ steps:
|
||||
|
||||
- pwsh: |
|
||||
mkdir .build -ea 0
|
||||
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/yarnlockhash
|
||||
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
@@ -77,18 +77,18 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
|
||||
exec { yarn config set registry "$env:NPM_REGISTRY" }
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" }
|
||||
$NpmrcPath = (npm config get userconfig)
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -96,7 +96,7 @@ steps:
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
. build/azure-pipelines/win32/retry.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
retry { exec { yarn --frozen-lockfile --check-files } }
|
||||
retry { exec { npm ci } }
|
||||
env:
|
||||
npm_config_arch: $(VSCODE_ARCH)
|
||||
CHILD_CONCURRENCY: 1
|
||||
@@ -132,7 +132,7 @@ steps:
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- powershell: yarn gulp "transpile-client-swc" "transpile-extensions"
|
||||
- powershell: npm run gulp "transpile-client-swc" "transpile-extensions"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile client and extensions
|
||||
@@ -145,8 +145,8 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
|
||||
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
|
||||
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
|
||||
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)"
|
||||
env:
|
||||
@@ -156,7 +156,7 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { yarn gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
exec { npm run gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
mv ..\vscode-reh-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
echo "##vso[task.setvariable variable=BUILT_SERVER]true"
|
||||
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)"
|
||||
@@ -167,7 +167,7 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { yarn gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
exec { npm run gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
|
||||
mv ..\vscode-reh-web-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
echo "##vso[task.setvariable variable=BUILT_WEB]true"
|
||||
env:
|
||||
@@ -182,7 +182,7 @@ steps:
|
||||
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 }}
|
||||
VSCODE_BUILD_ESM: ${{ parameters.VSCODE_BUILD_ESM }}
|
||||
VSCODE_BUILD_AMD: ${{ parameters.VSCODE_BUILD_AMD }}
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
@@ -275,7 +275,7 @@ steps:
|
||||
$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 { npm run -- gulp "vscode-win32-$(VSCODE_ARCH)-system-setup" --sign }
|
||||
$SetupPath = ".build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
|
||||
mv .build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe $SetupPath
|
||||
echo "##vso[task.setvariable variable=SYSTEM_SETUP_PATH]$SetupPath"
|
||||
@@ -287,7 +287,7 @@ steps:
|
||||
$env:ESRPPKI = "$(ESRP-PKI)"
|
||||
$env:ESRPAADUsername = "$(esrp-aad-username)"
|
||||
$env:ESRPAADPassword = "$(esrp-aad-password)"
|
||||
exec { yarn gulp "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
|
||||
exec { npm run -- gulp "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
|
||||
$SetupPath = ".build\win32-$(VSCODE_ARCH)\user-setup\VSCodeUserSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
|
||||
mv .build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe $SetupPath
|
||||
echo "##vso[task.setvariable variable=USER_SETUP_PATH]$SetupPath"
|
||||
|
||||
@@ -18,7 +18,7 @@ steps:
|
||||
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
@@ -32,18 +32,18 @@ steps:
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
|
||||
exec { yarn config set registry "$env:NPM_REGISTRY" }
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
exec { npm config set registry "$env:NPM_REGISTRY" }
|
||||
$NpmrcPath = (npm config get userconfig)
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
@@ -82,7 +82,7 @@ steps:
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
. build/azure-pipelines/win32/retry.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
retry { exec { yarn --frozen-lockfile --check-files } }
|
||||
retry { exec { npm ci } }
|
||||
env:
|
||||
npm_config_arch: ${{ parameters.VSCODE_ARCH }}
|
||||
CHILD_CONCURRENCY: 1
|
||||
@@ -99,7 +99,7 @@ steps:
|
||||
env:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
|
||||
- powershell: yarn compile
|
||||
- powershell: npm run compile
|
||||
displayName: Compile
|
||||
|
||||
- powershell: |
|
||||
@@ -109,7 +109,7 @@ steps:
|
||||
Get-ChildItem '$(Build.SourcesDirectory)' -Recurse -Filter "*.pdb"
|
||||
displayName: List files
|
||||
|
||||
- powershell: yarn gulp "vscode-symbols-win32-${{ parameters.VSCODE_ARCH }}"
|
||||
- powershell: npm run gulp "vscode-symbols-win32-${{ parameters.VSCODE_ARCH }}"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Download Symbols
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const { isESM } = require('../build/lib/esm');
|
||||
const { isAMD } = require('./lib/amd');
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string[]=} exclude
|
||||
* @returns {import('../build/lib/bundle').IEntryPoint}
|
||||
* @returns {import('./lib/bundle').IEntryPoint}
|
||||
*/
|
||||
function createModuleDescription(name, exclude) {
|
||||
|
||||
@@ -71,7 +71,7 @@ exports.workerOutputLinks = createEditorWorkerModuleDescription('vs/workbench/co
|
||||
exports.workerBackgroundTokenization = createEditorWorkerModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker');
|
||||
|
||||
exports.workbenchDesktop = function () {
|
||||
return isESM() ? [
|
||||
return !isAMD() ? [
|
||||
createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'),
|
||||
createModuleDescription('vs/platform/files/node/watcher/watcherMain'),
|
||||
createModuleDescription('vs/platform/terminal/node/ptyHostMain'),
|
||||
@@ -90,12 +90,12 @@ exports.workbenchDesktop = function () {
|
||||
};
|
||||
|
||||
exports.workbenchWeb = function () {
|
||||
return isESM() ? [
|
||||
return !isAMD() ? [
|
||||
createModuleDescription('vs/workbench/workbench.web.main')
|
||||
] : [
|
||||
...createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'),
|
||||
...createEditorWorkerModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker'),
|
||||
createModuleDescription('vs/code/browser/workbench/workbench', ['vs/workbench/workbench.web.main'])
|
||||
createModuleDescription('vs/code/browser/workbench/workbench', ['vs/workbench/workbench.web.main.internal'])
|
||||
];
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ exports.code = [
|
||||
createModuleDescription('vs/code/electron-main/main'),
|
||||
createModuleDescription('vs/code/node/cli'),
|
||||
createModuleDescription('vs/code/node/cliProcessMain', ['vs/code/node/cli']),
|
||||
createModuleDescription('vs/code/node/sharedProcess/sharedProcessMain'),
|
||||
createModuleDescription('vs/code/electron-utility/sharedProcess/sharedProcessMain'),
|
||||
createModuleDescription('vs/code/electron-sandbox/processExplorer/processExplorerMain')
|
||||
];
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
65621c6968832b604d1b81b65c2a4fdc56baafe167e76d22c55afa4c67c840f1 *chromedriver-v30.3.1-darwin-arm64.zip
|
||||
28001491af5805d8975f59edcee644f93e425b7e59f1fe94915ce9a286f7cd9e *chromedriver-v30.3.1-darwin-x64.zip
|
||||
c7767da210b8d4f084576e308570fcf15268c7f6a1182a621ce90788fe45d458 *chromedriver-v30.3.1-linux-arm64.zip
|
||||
509197b47830f31b715f3ab8940279c5b2c7f473c2059148efd86dffb58b895d *chromedriver-v30.3.1-linux-armv7l.zip
|
||||
f4f6a66323b1180045321c779eacb88b48c8969e3ddf95d1d0aab92eb26ff071 *chromedriver-v30.3.1-linux-x64.zip
|
||||
b66e108c5c3ea7ed9c3cc1ec57f3e248222ebcbf3b44acea740e1b6bb142e088 *chromedriver-v30.3.1-mas-arm64.zip
|
||||
7f70cd8e34081f5991d9270885d56dd2ec13ac7e2aada8c486cb6cdced1104ab *chromedriver-v30.3.1-mas-x64.zip
|
||||
4b983f7a9daf85f792ea4a98889d2ae1fe865cd132e9cb383bccc9cc85a922c2 *chromedriver-v30.3.1-win32-arm64.zip
|
||||
4ec1c750ff60ffd381bde850f9769d1b38c7d227f83e79f969d1e9808f453219 *chromedriver-v30.3.1-win32-ia32.zip
|
||||
bfaa6754c0cb425c731c69f4a097ebab70b4384d94ec258a055d1e18c611952a *chromedriver-v30.3.1-win32-x64.zip
|
||||
64b237fce7aba1ee0f74355cc37a5d88a4989de253d94161a20002ee276242ea *electron-api.json
|
||||
16f1e22aabb19fb9551dd4c0eeb36789813decca31a0921cc62745d314ffcda0 *electron-v30.3.1-darwin-arm64-dsym-snapshot.zip
|
||||
c6b220a63b9afc19b7875127f2496f2aa42d5c092ef85e4b8f4d2783c26dcf6e *electron-v30.3.1-darwin-arm64-dsym.zip
|
||||
bf8b1f7c511b9b71d6ca277a3f4b49ff3d6a17740b66ce1ea3de86d5d6219bbc *electron-v30.3.1-darwin-arm64-symbols.zip
|
||||
9d7b31185ef61628e6f3abda32517953518f68d9f71a8fa29f2a0a17b9d3b9bb *electron-v30.3.1-darwin-arm64.zip
|
||||
185b6216dc5f8e8284150eaf6398d56dcf611a8cef9320f1754ac235f96f877e *electron-v30.3.1-darwin-x64-dsym-snapshot.zip
|
||||
a148b28e52ed9a8aa0ef605038bb9c232143f795e448c053452a3e259e55c7f1 *electron-v30.3.1-darwin-x64-dsym.zip
|
||||
8cfa27404ae829d61962211304e4a7b3de14488fa816bb68ef12d3a359ab64d3 *electron-v30.3.1-darwin-x64-symbols.zip
|
||||
a66dbe01006fee9319f19c16ef08d4d72ecbb79bd35fffece32b36b8afe2ea47 *electron-v30.3.1-darwin-x64.zip
|
||||
302f8f0ac2bfd6e5abcf6c6ab631b2d9f726332e3db17e53a5311cc831d0c784 *electron-v30.3.1-linux-arm64-debug.zip
|
||||
85a9babff9a45804c5356159baa747ee6ec5f31c60f1c11ddf5ebf2cc7752be7 *electron-v30.3.1-linux-arm64-symbols.zip
|
||||
5f2326631080cc4a5f6231a83e492d8d75d9ccdd3bd41f56f6a1090e790d2a2a *electron-v30.3.1-linux-arm64.zip
|
||||
302f8f0ac2bfd6e5abcf6c6ab631b2d9f726332e3db17e53a5311cc831d0c784 *electron-v30.3.1-linux-armv7l-debug.zip
|
||||
aaa80103e9bdf90b8524c40a75588816ac8f41c5c3e3d399cce1be559e0a9c90 *electron-v30.3.1-linux-armv7l-symbols.zip
|
||||
ef7be229a610cee357cba2f790618b239aab82fc2b26e0645c4cf4600dffb1c4 *electron-v30.3.1-linux-armv7l.zip
|
||||
78ebaf13163db5065e2bc649c2d7de9f70448ebd593c618bc4b14467587d4ea2 *electron-v30.3.1-linux-x64-debug.zip
|
||||
082c614d78f81a817fa098f874f23662ad1da7a25cf0536f313ebde8f8d8ec9c *electron-v30.3.1-linux-x64-symbols.zip
|
||||
94d7470d9dae2dd2376612c804068ea6514e5efe342de8946f49f93bf0ed50de *electron-v30.3.1-linux-x64.zip
|
||||
4665bf2334ebec90a5c8757e78c9b49cb102603f25bf4091dd890603cc8656f0 *electron-v30.3.1-mas-arm64-dsym-snapshot.zip
|
||||
d104a56931d1acda28ca990c9d422fc8b14bc0ad1b340b7a6968778b8004727f *electron-v30.3.1-mas-arm64-dsym.zip
|
||||
dd8e7e4b0adc35258cf7ad2f7119a6f367bb67442c1c53d3197324d3459676cd *electron-v30.3.1-mas-arm64-symbols.zip
|
||||
84c806219aeb9d51d041b5f51a87a046c6234c9a42fdaa2dd76376141c668390 *electron-v30.3.1-mas-arm64.zip
|
||||
ab0c4bce223194ebf4a1ec690ba21124e0478dd8b5a445f4666780d93e56e084 *electron-v30.3.1-mas-x64-dsym-snapshot.zip
|
||||
e60b71d65b2101798a633645e251f97b3357018ea06bbc54f980c963d49c588f *electron-v30.3.1-mas-x64-dsym.zip
|
||||
875cc7a062edf1c83d0c45be073e3edf8a7820bec2be45940c8092029aaafab6 *electron-v30.3.1-mas-x64-symbols.zip
|
||||
c674cd81a47b25b74a0827c2184e895b1a56b51c5cc926963b7d4f04aae102cf *electron-v30.3.1-mas-x64.zip
|
||||
1dedd1067c9110297ef503eee5c3c46d6acd2cfd9beacc6b74c1ceee50589818 *electron-v30.3.1-win32-arm64-pdb.zip
|
||||
6c6cd1cf07e065ca64b383df12f9a7db3a1019a703e4a901da95a54f2d9672c2 *electron-v30.3.1-win32-arm64-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.3.1-win32-arm64-toolchain-profile.zip
|
||||
ad1cf249104bedf4f2f22025c43aef14e26ca8eb57e14ee8061cbe9ec89185d2 *electron-v30.3.1-win32-arm64.zip
|
||||
b9904b4f6a922995ade1a65580e6333956ee7862dce289d29052a0e3aa4b59e5 *electron-v30.3.1-win32-ia32-pdb.zip
|
||||
e1bc6a68a1ff6f84ee95343e74bbbb4a47ac801307398537fa6e0d26343f916d *electron-v30.3.1-win32-ia32-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.3.1-win32-ia32-toolchain-profile.zip
|
||||
65b5dda5cb4fcd5eec6a8e7667d6461324abf321ff7287b1aa79cc885fec2711 *electron-v30.3.1-win32-ia32.zip
|
||||
2597a12e9c03bfe52c991f3e51319ad2861d1931890b8d6ec94c44edcac73e79 *electron-v30.3.1-win32-x64-pdb.zip
|
||||
66cf63327bb0fd2a0a0aadb39f949714ed80e3a80832d852658a54dd59cf502f *electron-v30.3.1-win32-x64-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.3.1-win32-x64-toolchain-profile.zip
|
||||
5b2701e5b02a89f4a07b0d7a401c7daaa4cc26926cbdc88637982c2cb941f82f *electron-v30.3.1-win32-x64.zip
|
||||
a61941eebd117ed89d6fbda8558f246558b95a6c4dd7d2d37d38f1e7631da221 *electron.d.ts
|
||||
7bdcd58d36dd5e985a93112c9c690ce08409953affe676815fbf7829fa03cda8 *ffmpeg-v30.3.1-darwin-arm64.zip
|
||||
9e64d80ccc6b1e35ac8035e0def8c849e2db3b073070dbcc2a2eedc9ad7004b3 *ffmpeg-v30.3.1-darwin-x64.zip
|
||||
d8e8ac7d0da34655aa4276750bc13bbd43cc47c67f9e1330bdf1607ad4a4b50e *ffmpeg-v30.3.1-linux-arm64.zip
|
||||
4f7583513d48b48c44a2cbc4430cbc9a33d8f9728622166db688e3de61190821 *ffmpeg-v30.3.1-linux-armv7l.zip
|
||||
4d7514fba8524bbc3d0e541324bf9d702dfb61d102041d6ee8fbe3a428935292 *ffmpeg-v30.3.1-linux-x64.zip
|
||||
7bdcd58d36dd5e985a93112c9c690ce08409953affe676815fbf7829fa03cda8 *ffmpeg-v30.3.1-mas-arm64.zip
|
||||
9e64d80ccc6b1e35ac8035e0def8c849e2db3b073070dbcc2a2eedc9ad7004b3 *ffmpeg-v30.3.1-mas-x64.zip
|
||||
584b0ae41a9b2cf5682fbe4260a40566e1d1f93bb104e5bed54212e64cb6ae5b *ffmpeg-v30.3.1-win32-arm64.zip
|
||||
4987fa69493ef769077cab04d626a879e344b0da166048c34c8aedcf3b10f89c *ffmpeg-v30.3.1-win32-ia32.zip
|
||||
190f265268d6fb948d93ec177b2ac504acea8bd5e254d5b34369da6674236bad *ffmpeg-v30.3.1-win32-x64.zip
|
||||
0db5cfa86a97971eedc62a09baec388ca88a9ef5e607044f2e288c92cc04ed60 *hunspell_dictionaries.zip
|
||||
421ff8bbe7d784d1d7ce794eae88e5d345ab9c9180e8c2aa643886440b4bbe97 *libcxx-objects-v30.3.1-linux-arm64.zip
|
||||
aa6a2f00286b9c41d37426a839d64b6cbfaed7a7a5348e5390e3aadbce6937a4 *libcxx-objects-v30.3.1-linux-armv7l.zip
|
||||
7f89023e904af0262b2806c05068e8a2f1a2152de9839ef52f235222045e8082 *libcxx-objects-v30.3.1-linux-x64.zip
|
||||
c7b21096ffbdcdff5c0135260184388b842616c63201f45e0939ab425ac5a0aa *libcxx_headers.zip
|
||||
5ff9e452351176c45ad43ab3c754ad25ec300872b96f583963d73d071ab349c6 *libcxxabi_headers.zip
|
||||
fe69b74f92a7902dfee1cd9a91bd9dd4a13f75513083d0481ba65b27c8979473 *mksnapshot-v30.3.1-darwin-arm64.zip
|
||||
eee44d512db09f72b57fb0decae6dd8ad3e67a04f263e27876ae4f99feb270ab *mksnapshot-v30.3.1-darwin-x64.zip
|
||||
40fd5aaa90f697dfbd16f2577f409ea0349e2f9d7f9d4eca8aac313c10dc85fd *mksnapshot-v30.3.1-linux-arm64-x64.zip
|
||||
9fd98963fae95b8fe8b9641e7ac1f29f06e6f91d944653d08e5c02bd2bd59010 *mksnapshot-v30.3.1-linux-armv7l-x64.zip
|
||||
1cb47a00b4cf699a953751ebd6c3e09fbcf0a16780ecc0bce71605a9edce4673 *mksnapshot-v30.3.1-linux-x64.zip
|
||||
5216e7e39618acb8815b26cea10fe91f8f1aac90bfb74c10bf997744eb98b781 *mksnapshot-v30.3.1-mas-arm64.zip
|
||||
e3bd5ca0ff14b6e16b9ab73f9e4bb7c543c6b9fe45acef60191c1f1a99e74a95 *mksnapshot-v30.3.1-mas-x64.zip
|
||||
93e882361573c53ff990bb633d3402e65027d871cf1417fc582a9fe126ca14c7 *mksnapshot-v30.3.1-win32-arm64-x64.zip
|
||||
224eb2493a93f1ba47321edfbe6413583fe353ecf9c1773f7b2b212a1e293518 *mksnapshot-v30.3.1-win32-ia32.zip
|
||||
ff3fa1c931f33c01d2b094f811f83ab0c370b400e8a2df4210648c46699ff4b1 *mksnapshot-v30.3.1-win32-x64.zip
|
||||
3e432bd550279c2d58c6a02b0bda048fa2a9a89aef9752e22c39a518a83fe96f *chromedriver-v30.4.0-darwin-arm64.zip
|
||||
4d38f40ec33955dd0aef5cc0053b2b07c4744abb9f2614a44780280c4678aca9 *chromedriver-v30.4.0-darwin-x64.zip
|
||||
338f2a361448e78aa8c319cd582f2dd6d891d6c0c66b676c628e50511c27514f *chromedriver-v30.4.0-linux-arm64.zip
|
||||
8cffae19618fe5f0eaff40378c40084e18f9747bbbe2d87390203a3012c98367 *chromedriver-v30.4.0-linux-armv7l.zip
|
||||
7ff1b75defc522f327c0f1bf6f4d13938b041cf5de1d7417b9dc5d1e7026e93c *chromedriver-v30.4.0-linux-x64.zip
|
||||
8e93b0892d7d01c38608fa7907f28da1da27de09bb382f261d81a676f8c2ba64 *chromedriver-v30.4.0-mas-arm64.zip
|
||||
d306ef0bc651bef046b21ba2e4745e2768be9df1b6c2fc2e7b1a0368f7e10d76 *chromedriver-v30.4.0-mas-x64.zip
|
||||
bb7c5db2a20f437e0b398846ecc8111e7e51e2021b78f60db021262daacf7d7c *chromedriver-v30.4.0-win32-arm64.zip
|
||||
df4acaa6684e7db07468c6dc8102cb49746884e8db2b53648431b2b61e8debb2 *chromedriver-v30.4.0-win32-ia32.zip
|
||||
7a207b29977e52ba052037f00f4ea6284177fdd93e0774dfc39e83ee5a86513d *chromedriver-v30.4.0-win32-x64.zip
|
||||
8c876662fd46c37b2dd9487ea8e62fde3f20a729dc95e42f12f7db4986138edc *electron-api.json
|
||||
a36786c7d4e30887a6aa1f2adbc23e721266a31ffe84191bf4caddb731cfb973 *electron-v30.4.0-darwin-arm64-dsym-snapshot.zip
|
||||
e5edcad107307e97bdd6f69ccab0368df4c3270213f2f42f259f3723d24ca611 *electron-v30.4.0-darwin-arm64-dsym.zip
|
||||
cc522e772a1d80f7ec73ce2077dae93de76cd4f6767c467b6a8e01e4a252f15f *electron-v30.4.0-darwin-arm64-symbols.zip
|
||||
2238c45a85b2c78aed00aeaf15bbfa2f64b4d13e48cc6b9bc330f24c4d214595 *electron-v30.4.0-darwin-arm64.zip
|
||||
48c3197fc36f5ef64eaa913a0a769d2b2d4b79c94e61991ca73e8be2b24bf997 *electron-v30.4.0-darwin-x64-dsym-snapshot.zip
|
||||
9b669dc060695e5495573cce7b7916bdadd980d523772fbbf57fd1811bb4feca *electron-v30.4.0-darwin-x64-dsym.zip
|
||||
0acd5b74cbb1719a89a310fb42f5ab4282711bb0ccf4e8b242d9c24c8ecc7136 *electron-v30.4.0-darwin-x64-symbols.zip
|
||||
6e633bf87be9f8bf46dff9733cfd0d611e018ae5df75f30735747721f91fcf43 *electron-v30.4.0-darwin-x64.zip
|
||||
5bc27ceae706116a14fa24da3cda32f00893dd3f51ae2c2d58c4c08f26ce2ac2 *electron-v30.4.0-linux-arm64-debug.zip
|
||||
d13970ef6f4ad30dd8268563ed0b768f703d6e4ea1389ee36b8e7eb407b40523 *electron-v30.4.0-linux-arm64-symbols.zip
|
||||
aa422122373b84f4eb8ce937937b1b6fe8fb3975c3edafb9df85f7fba449afd4 *electron-v30.4.0-linux-arm64.zip
|
||||
5bc27ceae706116a14fa24da3cda32f00893dd3f51ae2c2d58c4c08f26ce2ac2 *electron-v30.4.0-linux-armv7l-debug.zip
|
||||
645af6535a3956e263d8ff586bfb45c5d16ec4c07add406e7c2a767eec070e8e *electron-v30.4.0-linux-armv7l-symbols.zip
|
||||
3643857e1eec3037ad6f07e755bffc64f033a7196307ff0386bf67c9cc3ec31e *electron-v30.4.0-linux-armv7l.zip
|
||||
0f099b597830fd990bac82fbe976720d5610450133dff880b570cbe1ef793742 *electron-v30.4.0-linux-x64-debug.zip
|
||||
084566b78797502ad164832e49690d8845c53a8becb28085f271ab1a9fe20942 *electron-v30.4.0-linux-x64-symbols.zip
|
||||
b365aac23c61dc0b18002c60937c4842e814cbe6d8e6a34e4dc211774ebaec01 *electron-v30.4.0-linux-x64.zip
|
||||
b050b4de0fda4c2fa4ceeb0ecaf452cc426a9b03a9e286686d2167c7ded252f4 *electron-v30.4.0-mas-arm64-dsym-snapshot.zip
|
||||
1e9c3f820e809fc2e05434d54862c7309dd04b74406869e06edb1e07faa3e40f *electron-v30.4.0-mas-arm64-dsym.zip
|
||||
9b4112c73606d1a0393320178a3d0f172671ec211fe69b2106ad9b04b55b3538 *electron-v30.4.0-mas-arm64-symbols.zip
|
||||
10ac65b581c2941fd05b2804055be2eed8d69de4c82b90f7357a3989d8276c9f *electron-v30.4.0-mas-arm64.zip
|
||||
9e4cba132474d82894541ab33d02b28894f0452f4c6808e2428878d0b6a55aac *electron-v30.4.0-mas-x64-dsym-snapshot.zip
|
||||
33c9c13a8a33ab292db5f14b1d8af1fa7967601badf505a06972fd3cdc9cb6bb *electron-v30.4.0-mas-x64-dsym.zip
|
||||
1e8871c34294912bc562861226742dcd2de073ae2dc3fef8065fe86550265bca *electron-v30.4.0-mas-x64-symbols.zip
|
||||
055bea26dfd9fa86838e25b77e29fec3967ed21020ce1362ff683be07ac90c45 *electron-v30.4.0-mas-x64.zip
|
||||
1fd654358ad895fce4806fcd39be848deeccd20f767e96006ebb5c88ca973d92 *electron-v30.4.0-win32-arm64-pdb.zip
|
||||
5cf51db3ece15f155afc066230f844bf7825fe912f0f479b8cf9eb47e46a2278 *electron-v30.4.0-win32-arm64-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.4.0-win32-arm64-toolchain-profile.zip
|
||||
51bc3a21faefe99ccc8e8670dccf2320249af5c185728a31d907a18092542d73 *electron-v30.4.0-win32-arm64.zip
|
||||
b4a539c7dbad3db544d7709faaf357d55d7f3349bfd4d42c884b0608725b526d *electron-v30.4.0-win32-ia32-pdb.zip
|
||||
ddb355e3e45978eee33c679c42781587533b934f3e98374057d2b0c212062915 *electron-v30.4.0-win32-ia32-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.4.0-win32-ia32-toolchain-profile.zip
|
||||
7260c9f533d5fa0c543d34593bb1a8bc4904943ca872afc5246e15da6f00b43a *electron-v30.4.0-win32-ia32.zip
|
||||
2d0d5631158971e0fac9bb7c427c5361177c7e967cca41940ad18183d95c3e23 *electron-v30.4.0-win32-x64-pdb.zip
|
||||
0ea8c0b8734bd45cb04ae83390bd7efee407ed6bb30dbaa1030e1a1f03a0f025 *electron-v30.4.0-win32-x64-symbols.zip
|
||||
7351fa5cb892853a7d4b67d8858d0f9cc6506c554a2e42c9ad7e8d5e29ae2743 *electron-v30.4.0-win32-x64-toolchain-profile.zip
|
||||
9dcf4b5bbdb6c672ba1b3812d4b642999faf4b6f4e2a4e4af314ba61596a62dc *electron-v30.4.0-win32-x64.zip
|
||||
c524777653f0b3ba58da6c1e97aa5a3a172caf68d9b24a7d33f733b36c281ce8 *electron.d.ts
|
||||
c1586ee3f3960943dfa1c1a3da2ebc327afd95c3c7a160b0646730fbc78731bb *ffmpeg-v30.4.0-darwin-arm64.zip
|
||||
7f76a792c8f9ee9611f966956b4b70017253f9357ec73806d35c568808eec470 *ffmpeg-v30.4.0-darwin-x64.zip
|
||||
5160348bcae6cb4fce20905338a903475c2eb52511370b44bdfeafef3cbeab6c *ffmpeg-v30.4.0-linux-arm64.zip
|
||||
4f7583513d48b48c44a2cbc4430cbc9a33d8f9728622166db688e3de61190821 *ffmpeg-v30.4.0-linux-armv7l.zip
|
||||
4f62d246a2ccb904e9f03bdc65fd5806edd69b95099fa2dcba4f148d44ea1bce *ffmpeg-v30.4.0-linux-x64.zip
|
||||
c1586ee3f3960943dfa1c1a3da2ebc327afd95c3c7a160b0646730fbc78731bb *ffmpeg-v30.4.0-mas-arm64.zip
|
||||
7f76a792c8f9ee9611f966956b4b70017253f9357ec73806d35c568808eec470 *ffmpeg-v30.4.0-mas-x64.zip
|
||||
26b82e5943d09eb0765804df27182cd45c45e63e82fe95d60a5a78611d85a926 *ffmpeg-v30.4.0-win32-arm64.zip
|
||||
ea688b108cb545bd436621c8d1279696ac6cb0b041d1d3d322dba06f8dd0f295 *ffmpeg-v30.4.0-win32-ia32.zip
|
||||
733a522d2095964ff3796f3301591b7aa9cf1ba8dcc545d1928745022ef99e6a *ffmpeg-v30.4.0-win32-x64.zip
|
||||
0b82c8db956264c1be4006eff3908b51ae8e48a17176fe61fa86d8ca8c103bf5 *hunspell_dictionaries.zip
|
||||
27d5d6d82bd5703342e6a3804ff3c032433cda833ad3881f263035b23193ace9 *libcxx-objects-v30.4.0-linux-arm64.zip
|
||||
babe51c929cc77907fdb5af11781938bab4b9f31642a0220b4ce4a35cfb904ff *libcxx-objects-v30.4.0-linux-armv7l.zip
|
||||
e6e13dd7c493841c3ab406b147d021b4e5a379e286767c1459d23bd9581c10c9 *libcxx-objects-v30.4.0-linux-x64.zip
|
||||
c9ba1b8c0e971cf477f7c0120436cc45a02b72908a41c82cd809ec8014b81e32 *libcxx_headers.zip
|
||||
2c4c140bfeb235584f8f7c699d0d95b16ddb959484923aaa59eeb3310dbc161a *libcxxabi_headers.zip
|
||||
0cee8848525e0d633d3ccf599d03ac05be6e0bc014b5a77ddce99c3a50941feb *mksnapshot-v30.4.0-darwin-arm64.zip
|
||||
0c491f602cfc6fbd81b8b771d3fa28ec1eb77c23c7636479a158265dd7d59977 *mksnapshot-v30.4.0-darwin-x64.zip
|
||||
6ea645627b0a0cab88cda80a2fa4d399a491bc5f0d0ff1d007f6dd28728d4592 *mksnapshot-v30.4.0-linux-arm64-x64.zip
|
||||
6b33e8bc53281710d9754e3ea88a8c025649f3d7c499e9b8693183bd2b76ea8d *mksnapshot-v30.4.0-linux-armv7l-x64.zip
|
||||
092afde6a2ab8ac922524a02b30343cd11f96c01405814019797bf38fa8c634b *mksnapshot-v30.4.0-linux-x64.zip
|
||||
dada39480526a46992f2ff0ad8ea72a26565384e9976497867a6c4776705e49f *mksnapshot-v30.4.0-mas-arm64.zip
|
||||
4082f5b379b788d300b2a7fc7c84deee80ebc61a34b534c795c1b4594c3f0d1a *mksnapshot-v30.4.0-mas-x64.zip
|
||||
01a5e83fe293dd2c52e1d5cc79450fbfc1dfa1e4988146f94bfbf9a9e24cb9d7 *mksnapshot-v30.4.0-win32-arm64-x64.zip
|
||||
0bccaa2779f8ce98bd4a2a66be082bcd3c34484aad8000c08de0fed5acb8ad88 *mksnapshot-v30.4.0-win32-ia32.zip
|
||||
439c7f5b9fdd0ea19ee95f724773cda42382b27a31494ae8f2aca5c2ec043ec7 *mksnapshot-v30.4.0-win32-x64.zip
|
||||
|
||||
@@ -9,7 +9,6 @@ const fs = require("fs");
|
||||
const minimatch = require("minimatch");
|
||||
const vscode_universal_bundler_1 = require("vscode-universal-bundler");
|
||||
const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
|
||||
const esm_1 = require("../lib/esm");
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
async function main(buildDir) {
|
||||
const arch = process.env['VSCODE_ARCH'];
|
||||
@@ -27,14 +26,13 @@ async function main(buildDir) {
|
||||
'**/CodeResources',
|
||||
'**/Credits.rtf',
|
||||
];
|
||||
const canAsar = !(0, esm_1.isESM)('ASAR disabled in universal build'); // TODO@esm ASAR disabled in ESM
|
||||
await (0, vscode_universal_bundler_1.makeUniversalApp)({
|
||||
x64AppPath,
|
||||
arm64AppPath,
|
||||
asarPath: canAsar ? asarRelativePath : undefined,
|
||||
asarPath: asarRelativePath,
|
||||
outAppPath,
|
||||
force: true,
|
||||
mergeASARs: canAsar,
|
||||
mergeASARs: true,
|
||||
x64ArchFiles: '*/kerberos.node',
|
||||
filesToSkipComparison: (file) => {
|
||||
for (const expected of filesToSkip) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import * as fs from 'fs';
|
||||
import * as minimatch from 'minimatch';
|
||||
import { makeUniversalApp } from 'vscode-universal-bundler';
|
||||
import { spawn } from '@malept/cross-spawn-promise';
|
||||
import { isESM } from '../lib/esm';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
@@ -32,15 +31,13 @@ async function main(buildDir?: string) {
|
||||
'**/Credits.rtf',
|
||||
];
|
||||
|
||||
const canAsar = !isESM('ASAR disabled in universal build'); // TODO@esm ASAR disabled in ESM
|
||||
|
||||
await makeUniversalApp({
|
||||
x64AppPath,
|
||||
arm64AppPath,
|
||||
asarPath: canAsar ? asarRelativePath : undefined,
|
||||
asarPath: asarRelativePath,
|
||||
outAppPath,
|
||||
force: true,
|
||||
mergeASARs: canAsar,
|
||||
mergeASARs: true,
|
||||
x64ArchFiles: '*/kerberos.node',
|
||||
filesToSkipComparison: (file: string) => {
|
||||
for (const expected of filesToSkip) {
|
||||
|
||||
@@ -10,8 +10,8 @@ const codesign = require("electron-osx-sign");
|
||||
const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
function getElectronVersion() {
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
const npmrc = fs.readFileSync(path.join(root, '.npmrc'), 'utf8');
|
||||
const target = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
return target;
|
||||
}
|
||||
async function main(buildDir) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import { spawn } from '@malept/cross-spawn-promise';
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
function getElectronVersion(): string {
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||
const npmrc = fs.readFileSync(path.join(root, '.npmrc'), 'utf8');
|
||||
const target = /^target="(.*)"$/m.exec(npmrc)![1];
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -101,8 +101,7 @@ module.exports.indentationFilter = [
|
||||
|
||||
// except multiple specific files
|
||||
'!**/package.json',
|
||||
'!**/yarn.lock',
|
||||
'!**/yarn-error.log',
|
||||
'!**/package-lock.json',
|
||||
|
||||
// except multiple specific folders
|
||||
'!**/codicon/**',
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
const gulp = require('gulp');
|
||||
const util = require('./lib/util');
|
||||
const date = require('./lib/date');
|
||||
const esm = require('./lib/esm');
|
||||
const amd = require('./lib/amd');
|
||||
const task = require('./lib/task');
|
||||
const compilation = require('./lib/compilation');
|
||||
const optimize = require('./lib/optimize');
|
||||
|
||||
const isESMBuild = typeof process.env.VSCODE_BUILD_ESM === 'string' && process.env.VSCODE_BUILD_ESM.toLowerCase() === 'true';
|
||||
const isAMDBuild = typeof process.env.VSCODE_BUILD_AMD === 'string' && process.env.VSCODE_BUILD_AMD.toLowerCase() === 'true';
|
||||
|
||||
/**
|
||||
* @param {boolean} disableMangle
|
||||
@@ -24,9 +24,9 @@ function makeCompileBuildTask(disableMangle) {
|
||||
util.rimraf('out-build'),
|
||||
util.buildWebNodePaths('out-build'),
|
||||
date.writeISODate('out-build'),
|
||||
esm.setESM(isESMBuild),
|
||||
amd.setAMD(isAMDBuild),
|
||||
compilation.compileApiProposalNamesTask,
|
||||
compilation.compileTask(isESMBuild ? 'src2' : 'src', 'out-build', true, { disableMangle }),
|
||||
compilation.compileTask(isAMDBuild ? 'src2' : 'src', 'out-build', true, { disableMangle }),
|
||||
optimize.optimizeLoaderTask('out-build', 'out-build', true)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
||||
extrausages
|
||||
],
|
||||
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
|
||||
importIgnorePattern: /(^vs\/css!)/,
|
||||
importIgnorePattern: /\.css$/,
|
||||
destRoot: path.join(root, 'out-editor-src'),
|
||||
redirects: {
|
||||
'@vscode/tree-sitter-wasm': '../node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-web',
|
||||
@@ -198,49 +198,11 @@ const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
||||
}
|
||||
|
||||
console.log(`Open in VS Code the folder at '${destPath}' and you can analyze the compilation error`);
|
||||
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `yarn run gulp editor-distro` on your machine to further analyze the compilation problem.');
|
||||
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `npm run gulp editor-distro` on your machine to further analyze the compilation problem.');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Go over all .js files in `/out-monaco-editor-core/esm/` and make sure that all imports
|
||||
* use `.js` at the end in order to be ESM compliant.
|
||||
*/
|
||||
const appendJSToESMImportsTask = task.define('append-js-to-esm-imports', () => {
|
||||
const SRC_DIR = path.join(__dirname, '../out-monaco-editor-core/esm');
|
||||
const files = util.rreddir(SRC_DIR);
|
||||
for (const file of files) {
|
||||
const filePath = path.join(SRC_DIR, file);
|
||||
if (!/\.js$/.test(filePath)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const contents = fs.readFileSync(filePath).toString();
|
||||
const lines = contents.split(/\r\n|\r|\n/g);
|
||||
const /** @type {string[]} */result = [];
|
||||
for (const line of lines) {
|
||||
if (!/^import/.test(line) && !/^export \* from/.test(line)) {
|
||||
// not an import
|
||||
result.push(line);
|
||||
continue;
|
||||
}
|
||||
if (/^import '[^']+\.css';/.test(line)) {
|
||||
// CSS import
|
||||
result.push(line);
|
||||
continue;
|
||||
}
|
||||
const modifiedLine = (
|
||||
line
|
||||
.replace(/^import(.*)\'([^']+)\'/, `import$1'$2.js'`)
|
||||
.replace(/^export \* from \'([^']+)\'/, `export * from '$1.js'`)
|
||||
);
|
||||
result.push(modifiedLine);
|
||||
}
|
||||
fs.writeFileSync(filePath, result.join('\n'));
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @param {string} contents
|
||||
*/
|
||||
@@ -413,7 +375,6 @@ gulp.task('editor-distro',
|
||||
task.series(
|
||||
createESMSourcesAndResourcesTask,
|
||||
compileEditorESMTask,
|
||||
appendJSToESMImportsTask
|
||||
)
|
||||
),
|
||||
finalEditorResourcesTask
|
||||
@@ -430,7 +391,6 @@ gulp.task('editor-esm',
|
||||
extractEditorSrcTask,
|
||||
createESMSourcesAndResourcesTask,
|
||||
compileEditorESMTask,
|
||||
appendJSToESMImportsTask,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ const compilations = [
|
||||
'extensions/vscode-test-resolver/tsconfig.json',
|
||||
|
||||
'.vscode/extensions/vscode-selfhost-test-provider/tsconfig.json',
|
||||
'.vscode/extensions/vscode-selfhost-import-aid/tsconfig.json',
|
||||
];
|
||||
|
||||
const getBaseUrl = out => `https://main.vscode-cdn.net/sourcemaps/${commit}/${out}`;
|
||||
@@ -100,7 +101,6 @@ const tasks = compilations.map(function (tsconfigFile) {
|
||||
}
|
||||
|
||||
function createPipeline(build, emitError, transpileOnly) {
|
||||
const nlsDev = require('vscode-nls-dev');
|
||||
const tsb = require('./lib/tsb');
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
@@ -125,7 +125,6 @@ const tasks = compilations.map(function (tsconfigFile) {
|
||||
.pipe(tsFilter)
|
||||
.pipe(util.loadSourcemaps())
|
||||
.pipe(compilation())
|
||||
.pipe(build ? nlsDev.rewriteLocalizeCalls() : es.through())
|
||||
.pipe(build ? util.stripSourceMappingURL() : es.through())
|
||||
.pipe(sourcemaps.write('.', {
|
||||
sourceMappingURL: !build ? null : f => `${baseUrl}/${f.relative}.map`,
|
||||
@@ -135,9 +134,6 @@ const tasks = compilations.map(function (tsconfigFile) {
|
||||
sourceRoot: '../src/',
|
||||
}))
|
||||
.pipe(tsFilter.restore)
|
||||
.pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through())
|
||||
// Filter out *.nls.json file. We needed them only to bundle meta data file.
|
||||
.pipe(filter(['**', '!**/*.nls.json'], { dot: true }))
|
||||
.pipe(reporter.end(emitError));
|
||||
|
||||
return es.duplex(input, output);
|
||||
|
||||
+3
-3
@@ -34,15 +34,15 @@ gulp.task(compileClientTask);
|
||||
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), task.parallel(watchTask('out', false), watchApiProposalNamesTask)));
|
||||
gulp.task(watchClientTask);
|
||||
|
||||
const watchClientESMTask = task.define('watch-client-esm', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), task.parallel(watchTask('out', false, 'src2'), watchApiProposalNamesTask)));
|
||||
gulp.task(watchClientESMTask);
|
||||
const watchClientAMDTask = task.define('watch-client-amd', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), task.parallel(watchTask('out', false, 'src2'), watchApiProposalNamesTask)));
|
||||
gulp.task(watchClientAMDTask);
|
||||
|
||||
// All
|
||||
const _compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask, compileExtensionMediaTask));
|
||||
gulp.task(_compileTask);
|
||||
|
||||
gulp.task(task.define('watch', task.parallel(/* monacoTypecheckWatchTask, */ watchClientTask, watchExtensionsTask)));
|
||||
gulp.task(task.define('watch-esm', task.parallel(/* monacoTypecheckWatchTask, */ watchClientESMTask, watchExtensionsTask)));
|
||||
gulp.task(task.define('watch-amd', task.parallel(/* monacoTypecheckWatchTask, */ watchClientAMDTask, watchExtensionsTask)));
|
||||
|
||||
// Default
|
||||
gulp.task('default', _compileTask);
|
||||
|
||||
+22
-21
@@ -31,8 +31,8 @@ const { compileExtensionsBuildTask, compileExtensionMediaBuildTask } = require('
|
||||
const { vscodeWebResourceIncludes, createVSCodeWebFileContentMapper } = require('./gulpfile.vscode.web');
|
||||
const cp = require('child_process');
|
||||
const log = require('fancy-log');
|
||||
const { isESM } = require('./lib/esm');
|
||||
const buildfile = require('../src/buildfile');
|
||||
const { isAMD } = require('./lib/amd');
|
||||
const buildfile = require('./buildfile');
|
||||
|
||||
const REPO_ROOT = path.dirname(__dirname);
|
||||
const commit = getVersion(REPO_ROOT);
|
||||
@@ -65,19 +65,20 @@ const serverResourceIncludes = [
|
||||
'out-build/vs/base/node/ps.sh',
|
||||
|
||||
// Terminal shell integration
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/CodeTabExpansion.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/GitTabExpansion.psm1',
|
||||
'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/fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/CodeTabExpansion.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/GitTabExpansion.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration-env.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration-profile.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration-rc.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/shellIntegration-login.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish',
|
||||
|
||||
];
|
||||
|
||||
const serverResourceExcludes = [
|
||||
'!out-build/vs/**/{electron-sandbox,electron-main}/**',
|
||||
'!out-build/vs/**/{electron-sandbox,electron-main,electron-utility}/**',
|
||||
'!out-build/vs/editor/standalone/**',
|
||||
'!out-build/vs/workbench/**/*-tb.png',
|
||||
'!**/test/**'
|
||||
@@ -88,7 +89,7 @@ const serverResources = [
|
||||
...serverResourceExcludes
|
||||
];
|
||||
|
||||
const serverWithWebResourceIncludes = isESM() ? [
|
||||
const serverWithWebResourceIncludes = !isAMD() ? [
|
||||
...serverResourceIncludes,
|
||||
'out-build/vs/code/browser/workbench/*.html',
|
||||
...vscodeWebResourceIncludes
|
||||
@@ -131,7 +132,7 @@ const serverEntryPoints = [
|
||||
}
|
||||
];
|
||||
|
||||
const webEntryPoints = isESM() ? [
|
||||
const webEntryPoints = !isAMD() ? [
|
||||
buildfile.base,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.workerNotebook,
|
||||
@@ -142,7 +143,7 @@ const webEntryPoints = isESM() ? [
|
||||
buildfile.keyboardMaps,
|
||||
buildfile.codeWeb
|
||||
].flat() : [
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.main'),
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.main.internal'),
|
||||
buildfile.base,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.workerNotebook,
|
||||
@@ -168,9 +169,9 @@ const commonJSEntryPoints = [
|
||||
];
|
||||
|
||||
function getNodeVersion() {
|
||||
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
|
||||
const nodeVersion = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
const internalNodeVersion = /^ms_build_id "(.*)"$/m.exec(yarnrc)[1];
|
||||
const npmrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.npmrc'), 'utf8');
|
||||
const nodeVersion = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
const internalNodeVersion = /^ms_build_id="(.*)"$/m.exec(npmrc)[1];
|
||||
return { nodeVersion, internalNodeVersion };
|
||||
}
|
||||
|
||||
@@ -343,7 +344,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
|
||||
let packageJsonContents;
|
||||
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
|
||||
.pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, ...(isESM(`Setting 'type: module' in top level package.json`) ? { type: 'module' } : {}) })) // TODO@esm this should be configured in the top level package.json
|
||||
.pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, ...(!isAMD() ? { type: 'module' } : {}) })) // TODO@esm this should be configured in the top level package.json
|
||||
.pipe(es.through(function (file) {
|
||||
packageJsonContents = file.contents.toString();
|
||||
this.emit('data', file);
|
||||
@@ -362,10 +363,10 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
const jsFilter = util.filter(data => !data.isDirectory() && /\.js$/.test(data.path));
|
||||
|
||||
const productionDependencies = getProductionDependencies(REMOTE_FOLDER);
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(REPO_ROOT, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]).flat();
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(REPO_ROOT, d)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]).flat();
|
||||
const deps = gulp.src(dependenciesSrc, { base: 'remote', dot: true })
|
||||
// filter out unnecessary files, no source maps in server build
|
||||
.pipe(filter(['**', '!**/package-lock.json', '!**/yarn.lock', '!**/*.js.map']))
|
||||
.pipe(filter(['**', '!**/package-lock.json', '!**/*.js.map']))
|
||||
.pipe(util.cleanNodeModules(path.join(__dirname, '.moduleignore')))
|
||||
.pipe(util.cleanNodeModules(path.join(__dirname, `.moduleignore.${process.platform}`)))
|
||||
.pipe(jsFilter)
|
||||
|
||||
@@ -73,7 +73,7 @@ BUILD_TARGETS.forEach(buildTarget => {
|
||||
|
||||
function nodeModules(destinationExe, destinationPdb, platform) {
|
||||
const productionDependencies = deps.getProductionDependencies(root);
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`]).flat();
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(root, d)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`]).flat();
|
||||
|
||||
const exe = () => {
|
||||
return gulp.src(dependenciesSrc, { base: '.', dot: true })
|
||||
|
||||
+28
-31
@@ -17,7 +17,7 @@ const util = require('./lib/util');
|
||||
const { getVersion } = require('./lib/getVersion');
|
||||
const { readISODate } = require('./lib/date');
|
||||
const task = require('./lib/task');
|
||||
const buildfile = require('../src/buildfile');
|
||||
const buildfile = require('./buildfile');
|
||||
const optimize = require('./lib/optimize');
|
||||
const { inlineMeta } = require('./lib/inlineMeta');
|
||||
const root = path.dirname(__dirname);
|
||||
@@ -33,12 +33,12 @@ const minimist = require('minimist');
|
||||
const { compileBuildTask } = require('./gulpfile.compile');
|
||||
const { compileExtensionsBuildTask, compileExtensionMediaBuildTask } = require('./gulpfile.extensions');
|
||||
const { promisify } = require('util');
|
||||
const { isESM } = require('./lib/esm');
|
||||
const { isAMD } = require('./lib/amd');
|
||||
const glob = promisify(require('glob'));
|
||||
const rcedit = promisify(require('rcedit'));
|
||||
|
||||
// Build
|
||||
const vscodeEntryPoints = isESM() ? [
|
||||
const vscodeEntryPoints = !isAMD() ? [
|
||||
buildfile.base,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.workerNotebook,
|
||||
@@ -61,7 +61,7 @@ const vscodeEntryPoints = isESM() ? [
|
||||
buildfile.code
|
||||
].flat();
|
||||
|
||||
const vscodeResourceIncludes = isESM() ? [
|
||||
const vscodeResourceIncludes = !isAMD() ? [
|
||||
|
||||
// NLS
|
||||
'out-build/nls.messages.json',
|
||||
@@ -85,11 +85,11 @@ const vscodeResourceIncludes = isESM() ? [
|
||||
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
||||
|
||||
// Terminal shell integration
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/*.fish',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/fish_xdg_data/fish/vendor_conf.d/*.fish',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.zsh',
|
||||
|
||||
// Accessibility Signals
|
||||
'out-build/vs/platform/accessibilitySignal/browser/media/*.mp3',
|
||||
@@ -130,11 +130,11 @@ const vscodeResourceIncludes = isESM() ? [
|
||||
'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_xdg_data/fish/vendor_conf.d/*.fish',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/fish_xdg_data/fish/vendor_conf.d/*.fish',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.ps1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.psm1',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/common/scripts/*.zsh',
|
||||
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
||||
'!out-build/vs/workbench/contrib/issue/**/*-dev.html',
|
||||
'!out-build/vs/workbench/contrib/issue/**/*-dev.esm.html',
|
||||
@@ -163,7 +163,7 @@ const vscodeResources = [
|
||||
// be inlined into the target window file in this order
|
||||
// and they depend on each other in this way.
|
||||
const windowBootstrapFiles = [];
|
||||
if (!isESM('Skipping loader.js in window bootstrap files')) {
|
||||
if (isAMD()) {
|
||||
windowBootstrapFiles.push('out-build/vs/loader.js');
|
||||
}
|
||||
windowBootstrapFiles.push('out-build/bootstrap-window.js');
|
||||
@@ -296,7 +296,7 @@ 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',
|
||||
isESM() ? 'vs/code/electron-sandbox/workbench/workbench.esm.html' : 'vs/code/electron-sandbox/workbench/workbench.html',
|
||||
!isAMD() ? 'vs/code/electron-sandbox/workbench/workbench.esm.html' : 'vs/code/electron-sandbox/workbench/workbench.html',
|
||||
'vs/code/electron-sandbox/workbench/workbench.js'
|
||||
]);
|
||||
|
||||
@@ -325,13 +325,8 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
version += '-' + quality;
|
||||
}
|
||||
|
||||
if (isESM() && typeof quality === 'string' && quality !== 'exploration') {
|
||||
// TODO@esm remove this safeguard
|
||||
throw new Error('Refuse to build ESM on quality other than exploration');
|
||||
}
|
||||
|
||||
const name = product.nameShort;
|
||||
const packageJsonUpdates = { name, version, ...(isESM(`Setting 'type: module' and 'main: out/main.js' in top level package.json`) ? { type: 'module', main: 'out/main.js' } : {}) }; // TODO@esm this should be configured in the top level package.json
|
||||
const packageJsonUpdates = { name, version, ...(!isAMD() ? { type: 'module', main: 'out/main.js' } : {}) }; // TODO@esm this should be configured in the top level package.json
|
||||
|
||||
// for linux url handling
|
||||
if (platform === 'linux') {
|
||||
@@ -364,18 +359,16 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
const jsFilter = util.filter(data => !data.isDirectory() && /\.js$/.test(data.path));
|
||||
const root = path.resolve(path.join(__dirname, '..'));
|
||||
const productionDependencies = getProductionDependencies(root);
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!**/*.mk`]).flat();
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(root, d)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!**/*.mk`]).flat();
|
||||
|
||||
let deps = gulp.src(dependenciesSrc, { base: '.', dot: true })
|
||||
const deps = gulp.src(dependenciesSrc, { base: '.', dot: true })
|
||||
.pipe(filter(['**', `!**/${config.version}/**`, '!**/bin/darwin-arm64-87/**', '!**/package-lock.json', '!**/yarn.lock', '!**/*.js.map']))
|
||||
.pipe(util.cleanNodeModules(path.join(__dirname, '.moduleignore')))
|
||||
.pipe(util.cleanNodeModules(path.join(__dirname, `.moduleignore.${process.platform}`)))
|
||||
.pipe(jsFilter)
|
||||
.pipe(util.rewriteSourceMappingURL(sourceMappingURLBase))
|
||||
.pipe(jsFilter.restore);
|
||||
|
||||
if (!isESM('ASAR disabled in VS Code builds')) { // TODO@esm: ASAR disabled in ESM
|
||||
deps = deps.pipe(createAsar(path.join(process.cwd(), 'node_modules'), [
|
||||
.pipe(jsFilter.restore)
|
||||
.pipe(createAsar(path.join(process.cwd(), 'node_modules'), [
|
||||
'**/*.node',
|
||||
'**/@vscode/ripgrep/bin/*',
|
||||
'**/node-pty/build/Release/*',
|
||||
@@ -384,10 +377,14 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
'**/node-pty/lib/shared/conout.js',
|
||||
'**/*.wasm',
|
||||
'**/@vscode/vsce-sign/bin/*',
|
||||
], [
|
||||
], isAMD() ? [
|
||||
'**/*.mk',
|
||||
] : [
|
||||
'**/*.mk',
|
||||
'!node_modules/vsda/**' // stay compatible with extensions that depend on us shipping `vsda` into ASAR
|
||||
], isAMD() ? [] : [
|
||||
'node_modules/vsda/**' // retain copy of `vsda` in node_modules for internal use
|
||||
], 'node_modules.asar'));
|
||||
}
|
||||
|
||||
let all = es.merge(
|
||||
packageJsonStream,
|
||||
@@ -505,7 +502,7 @@ function patchWin32DependenciesTask(destinationFolderName) {
|
||||
const cwd = path.join(path.dirname(root), destinationFolderName);
|
||||
|
||||
return async () => {
|
||||
const deps = await glob('**/*.node', { cwd });
|
||||
const deps = await glob('**/*.node', { cwd, ignore: 'extensions/node_modules/@parcel/watcher/**' });
|
||||
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(/-.*$/, '');
|
||||
|
||||
@@ -152,6 +152,7 @@ function getRpmPackageArch(arch) {
|
||||
function prepareRpmPackage(arch) {
|
||||
const binaryDir = '../VSCode-linux-' + arch;
|
||||
const rpmArch = getRpmPackageArch(arch);
|
||||
const stripBinary = process.env['STRIP'] ?? '/usr/bin/strip';
|
||||
|
||||
return function () {
|
||||
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
||||
@@ -208,6 +209,7 @@ function prepareRpmPackage(arch) {
|
||||
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
|
||||
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
|
||||
.pipe(replace('@@DEPENDENCIES@@', dependencies.join(', ')))
|
||||
.pipe(replace('@@STRIP@@', stripBinary))
|
||||
.pipe(rename('SPECS/' + product.applicationName + '.spec'))
|
||||
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
|
||||
}));
|
||||
|
||||
@@ -21,7 +21,8 @@ const vfs = require('vinyl-fs');
|
||||
const packageJson = require('../package.json');
|
||||
const { compileBuildTask } = require('./gulpfile.compile');
|
||||
const extensions = require('./lib/extensions');
|
||||
const { isESM } = require('./lib/esm');
|
||||
const { isAMD } = require('./lib/amd');
|
||||
const VinylFile = require('vinyl');
|
||||
|
||||
const REPO_ROOT = path.dirname(__dirname);
|
||||
const BUILD_ROOT = path.dirname(REPO_ROOT);
|
||||
@@ -31,7 +32,7 @@ const commit = getVersion(REPO_ROOT);
|
||||
const quality = product.quality;
|
||||
const version = (quality && quality !== 'stable') ? `${packageJson.version}-${quality}` : packageJson.version;
|
||||
|
||||
const vscodeWebResourceIncludes = isESM() ? [
|
||||
const vscodeWebResourceIncludes = !isAMD() ? [
|
||||
|
||||
// NLS
|
||||
'out-build/nls.messages.js',
|
||||
@@ -54,7 +55,7 @@ const vscodeWebResourceIncludes = isESM() ? [
|
||||
|
||||
// Extension Host Worker
|
||||
'out-build/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html',
|
||||
]: [
|
||||
] : [
|
||||
|
||||
// Workbench
|
||||
'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,jpg,mp3}',
|
||||
@@ -71,7 +72,7 @@ const vscodeWebResourceIncludes = isESM() ? [
|
||||
|
||||
// Extension Worker
|
||||
'out-build/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html',
|
||||
|
||||
|
||||
// Tree Sitter highlights
|
||||
'out-build/vs/editor/common/languages/highlights/*.scm',
|
||||
|
||||
@@ -86,7 +87,7 @@ const vscodeWebResources = [
|
||||
...vscodeWebResourceIncludes,
|
||||
|
||||
// Excludes
|
||||
'!out-build/vs/**/{node,electron-sandbox,electron-main}/**',
|
||||
'!out-build/vs/**/{node,electron-sandbox,electron-main,electron-utility}/**',
|
||||
'!out-build/vs/editor/standalone/**',
|
||||
'!out-build/vs/workbench/**/*-tb.png',
|
||||
'!out-build/vs/code/**/*-dev.html',
|
||||
@@ -94,9 +95,9 @@ const vscodeWebResources = [
|
||||
'!**/test/**'
|
||||
];
|
||||
|
||||
const buildfile = require('../src/buildfile');
|
||||
const buildfile = require('./buildfile');
|
||||
|
||||
const vscodeWebEntryPoints = isESM() ? [
|
||||
const vscodeWebEntryPoints = !isAMD() ? [
|
||||
buildfile.base,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.workerNotebook,
|
||||
@@ -105,9 +106,10 @@ const vscodeWebEntryPoints = isESM() ? [
|
||||
buildfile.workerOutputLinks,
|
||||
buildfile.workerBackgroundTokenization,
|
||||
buildfile.keyboardMaps,
|
||||
buildfile.workbenchWeb()
|
||||
buildfile.workbenchWeb(),
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.main.internal') // TODO@esm remove line when we stop supporting web-amd-esm-bridge
|
||||
].flat() : [
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.main'),
|
||||
buildfile.entrypoint('vs/workbench/workbench.web.main.internal'),
|
||||
buildfile.base,
|
||||
buildfile.workerExtensionHost,
|
||||
buildfile.workerNotebook,
|
||||
@@ -229,8 +231,21 @@ function packageTask(sourceFolderName, destinationFolderName) {
|
||||
|
||||
const extensions = gulp.src('.build/web/extensions/**', { base: '.build/web', dot: true });
|
||||
|
||||
const sources = es.merge(src, extensions)
|
||||
.pipe(filter(['**', '!**/*.js.map'], { dot: true }));
|
||||
const loader = gulp.src('build/loader.min', { base: 'build', dot: true }).pipe(rename('out/vs/loader.js')); // TODO@esm remove line when we stop supporting web-amd-esm-bridge
|
||||
|
||||
const sources = es.merge(...(!isAMD() ? [src, extensions, loader] : [src, extensions]))
|
||||
.pipe(filter(['**', '!**/*.js.map'], { dot: true }))
|
||||
// TODO@esm remove me once we stop supporting our web-esm-bridge
|
||||
.pipe(es.through(function (file) {
|
||||
if (file.relative === 'out/vs/workbench/workbench.web.main.internal.css') {
|
||||
this.emit('data', new VinylFile({
|
||||
contents: file.contents,
|
||||
path: file.path.replace('workbench.web.main.internal.css', 'workbench.web.main.css'),
|
||||
base: file.base
|
||||
}));
|
||||
}
|
||||
this.emit('data', file);
|
||||
}));
|
||||
|
||||
const name = product.nameShort;
|
||||
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })
|
||||
@@ -239,7 +254,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
|
||||
const license = gulp.src(['remote/LICENSE'], { base: 'remote', allowEmpty: true });
|
||||
|
||||
const productionDependencies = getProductionDependencies(WEB_FOLDER);
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(REPO_ROOT, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]).flat();
|
||||
const dependenciesSrc = productionDependencies.map(d => path.relative(REPO_ROOT, d)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]).flat();
|
||||
|
||||
const deps = gulp.src(dependenciesSrc, { base: 'remote/web', dot: true })
|
||||
.pipe(filter(['**', '!**/package-lock.json']))
|
||||
|
||||
@@ -16,7 +16,6 @@ const pkg = require('../package.json');
|
||||
const product = require('../product.json');
|
||||
const vfs = require('vinyl-fs');
|
||||
const rcedit = require('rcedit');
|
||||
const mkdirp = require('mkdirp');
|
||||
|
||||
const repoPath = path.dirname(__dirname);
|
||||
const buildPath = (/** @type {string} */ arch) => path.join(path.dirname(repoPath), `VSCode-win32-${arch}`);
|
||||
@@ -75,7 +74,7 @@ function buildWin32Setup(arch, target) {
|
||||
|
||||
const sourcePath = buildPath(arch);
|
||||
const outputPath = setupDir(arch, target);
|
||||
mkdirp.sync(outputPath);
|
||||
fs.mkdirSync(outputPath, { recursive: true });
|
||||
|
||||
const originalProductJsonPath = path.join(sourcePath, 'resources/app/product.json');
|
||||
const productJsonPath = path.join(outputPath, 'product.json');
|
||||
|
||||
@@ -145,11 +145,13 @@ function hygiene(some, linting = true) {
|
||||
|
||||
const productJsonFilter = filter('product.json', { restore: true });
|
||||
const snapshotFilter = filter(['**', '!**/*.snap', '!**/*.snap.actual']);
|
||||
const yarnLockFilter = filter(['**', '!**/yarn.lock']);
|
||||
const unicodeFilterStream = filter(unicodeFilter, { restore: true });
|
||||
|
||||
const result = input
|
||||
.pipe(filter((f) => !f.stat.isDirectory()))
|
||||
.pipe(snapshotFilter)
|
||||
.pipe(yarnLockFilter)
|
||||
.pipe(productJsonFilter)
|
||||
.pipe(process.env['BUILD_SOURCEVERSION'] ? es.through() : productJson)
|
||||
.pipe(productJsonFilter.restore)
|
||||
|
||||
@@ -4,33 +4,33 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.setESM = setESM;
|
||||
exports.isESM = isESM;
|
||||
exports.setAMD = setAMD;
|
||||
exports.isAMD = isAMD;
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
// TODO@esm remove this
|
||||
const outDirectory = path.join(__dirname, '..', '..', 'out-build');
|
||||
const esmMarkerFile = path.join(outDirectory, 'esm');
|
||||
function setESM(enabled) {
|
||||
const amdMarkerFile = path.join(outDirectory, 'amd');
|
||||
function setAMD(enabled) {
|
||||
const result = () => new Promise((resolve, _) => {
|
||||
if (enabled) {
|
||||
fs.mkdirSync(outDirectory, { recursive: true });
|
||||
fs.writeFileSync(esmMarkerFile, 'true', 'utf8');
|
||||
console.warn(`Setting build to ESM: true`);
|
||||
fs.writeFileSync(amdMarkerFile, 'true', 'utf8');
|
||||
console.warn(`Setting build to AMD: true`);
|
||||
}
|
||||
else {
|
||||
console.warn(`Setting build to ESM: false`);
|
||||
console.warn(`Setting build to AMD: false`);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
result.taskName = 'set-esm';
|
||||
result.taskName = 'set-amd';
|
||||
return result;
|
||||
}
|
||||
function isESM(logWarning) {
|
||||
function isAMD(logWarning) {
|
||||
try {
|
||||
const res = (typeof process.env.VSCODE_BUILD_ESM === 'string' && process.env.VSCODE_BUILD_ESM.toLowerCase() === 'true') || (fs.readFileSync(esmMarkerFile, 'utf8') === 'true');
|
||||
const res = (typeof process.env.VSCODE_BUILD_AMD === 'string' && process.env.VSCODE_BUILD_AMD.toLowerCase() === 'true') || (fs.readFileSync(amdMarkerFile, 'utf8') === 'true');
|
||||
if (res && logWarning) {
|
||||
console.warn(`[esm] ${logWarning}`);
|
||||
console.warn(`[amd] ${logWarning}`);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -38,4 +38,4 @@ function isESM(logWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=esm.js.map
|
||||
//# sourceMappingURL=amd.js.map
|
||||
@@ -9,29 +9,29 @@ import * as fs from 'fs';
|
||||
// TODO@esm remove this
|
||||
|
||||
const outDirectory = path.join(__dirname, '..', '..', 'out-build');
|
||||
const esmMarkerFile = path.join(outDirectory, 'esm');
|
||||
const amdMarkerFile = path.join(outDirectory, 'amd');
|
||||
|
||||
export function setESM(enabled: boolean) {
|
||||
export function setAMD(enabled: boolean) {
|
||||
const result = () => new Promise<void>((resolve, _) => {
|
||||
if (enabled) {
|
||||
fs.mkdirSync(outDirectory, { recursive: true });
|
||||
fs.writeFileSync(esmMarkerFile, 'true', 'utf8');
|
||||
console.warn(`Setting build to ESM: true`);
|
||||
fs.writeFileSync(amdMarkerFile, 'true', 'utf8');
|
||||
console.warn(`Setting build to AMD: true`);
|
||||
} else {
|
||||
console.warn(`Setting build to ESM: false`);
|
||||
console.warn(`Setting build to AMD: false`);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
result.taskName = 'set-esm';
|
||||
result.taskName = 'set-amd';
|
||||
return result;
|
||||
}
|
||||
|
||||
export function isESM(logWarning?: string): boolean {
|
||||
export function isAMD(logWarning?: string): boolean {
|
||||
try {
|
||||
const res = (typeof process.env.VSCODE_BUILD_ESM === 'string' && process.env.VSCODE_BUILD_ESM.toLowerCase() === 'true') || (fs.readFileSync(esmMarkerFile, 'utf8') === 'true');
|
||||
const res = (typeof process.env.VSCODE_BUILD_AMD === 'string' && process.env.VSCODE_BUILD_AMD.toLowerCase() === 'true') || (fs.readFileSync(amdMarkerFile, 'utf8') === 'true');
|
||||
if (res && logWarning) {
|
||||
console.warn(`[esm] ${logWarning}`);
|
||||
console.warn(`[amd] ${logWarning}`);
|
||||
}
|
||||
return res;
|
||||
} catch (error) {
|
||||
+25
-1
@@ -11,7 +11,7 @@ const pickle = require('chromium-pickle-js');
|
||||
const Filesystem = require('asar/lib/filesystem');
|
||||
const VinylFile = require("vinyl");
|
||||
const minimatch = require("minimatch");
|
||||
function createAsar(folderPath, unpackGlobs, skipGlobs, destFilename) {
|
||||
function createAsar(folderPath, unpackGlobs, skipGlobs, duplicateGlobs, destFilename) {
|
||||
const shouldUnpackFile = (file) => {
|
||||
for (let i = 0; i < unpackGlobs.length; i++) {
|
||||
if (minimatch(file.relative, unpackGlobs[i])) {
|
||||
@@ -28,6 +28,16 @@ function createAsar(folderPath, unpackGlobs, skipGlobs, destFilename) {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
// Files that should be duplicated between
|
||||
// node_modules.asar and node_modules
|
||||
const shouldDuplicateFile = (file) => {
|
||||
for (const duplicateGlob of duplicateGlobs) {
|
||||
if (minimatch(file.relative, duplicateGlob)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const filesystem = new Filesystem(folderPath);
|
||||
const out = [];
|
||||
// Keep track of pending inserts
|
||||
@@ -73,8 +83,22 @@ function createAsar(folderPath, unpackGlobs, skipGlobs, destFilename) {
|
||||
throw new Error(`unknown item in stream!`);
|
||||
}
|
||||
if (shouldSkipFile(file)) {
|
||||
this.queue(new VinylFile({
|
||||
base: '.',
|
||||
path: file.path,
|
||||
stat: file.stat,
|
||||
contents: file.contents
|
||||
}));
|
||||
return;
|
||||
}
|
||||
if (shouldDuplicateFile(file)) {
|
||||
this.queue(new VinylFile({
|
||||
base: '.',
|
||||
path: file.path,
|
||||
stat: file.stat,
|
||||
contents: file.contents
|
||||
}));
|
||||
}
|
||||
const shouldUnpack = shouldUnpackFile(file);
|
||||
insertFile(file.relative, { size: file.contents.length, mode: file.stat.mode }, shouldUnpack);
|
||||
if (shouldUnpack) {
|
||||
|
||||
+26
-1
@@ -17,7 +17,7 @@ declare class AsarFilesystem {
|
||||
insertFile(path: string, shouldUnpack: boolean, file: { stat: { size: number; mode: number } }, options: {}): Promise<void>;
|
||||
}
|
||||
|
||||
export function createAsar(folderPath: string, unpackGlobs: string[], skipGlobs: string[], destFilename: string): NodeJS.ReadWriteStream {
|
||||
export function createAsar(folderPath: string, unpackGlobs: string[], skipGlobs: string[], duplicateGlobs: string[], destFilename: string): NodeJS.ReadWriteStream {
|
||||
|
||||
const shouldUnpackFile = (file: VinylFile): boolean => {
|
||||
for (let i = 0; i < unpackGlobs.length; i++) {
|
||||
@@ -37,6 +37,17 @@ export function createAsar(folderPath: string, unpackGlobs: string[], skipGlobs:
|
||||
return false;
|
||||
};
|
||||
|
||||
// Files that should be duplicated between
|
||||
// node_modules.asar and node_modules
|
||||
const shouldDuplicateFile = (file: VinylFile): boolean => {
|
||||
for (const duplicateGlob of duplicateGlobs) {
|
||||
if (minimatch(file.relative, duplicateGlob)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const filesystem = new Filesystem(folderPath);
|
||||
const out: Buffer[] = [];
|
||||
|
||||
@@ -88,8 +99,22 @@ export function createAsar(folderPath: string, unpackGlobs: string[], skipGlobs:
|
||||
throw new Error(`unknown item in stream!`);
|
||||
}
|
||||
if (shouldSkipFile(file)) {
|
||||
this.queue(new VinylFile({
|
||||
base: '.',
|
||||
path: file.path,
|
||||
stat: file.stat,
|
||||
contents: file.contents
|
||||
}));
|
||||
return;
|
||||
}
|
||||
if (shouldDuplicateFile(file)) {
|
||||
this.queue(new VinylFile({
|
||||
base: '.',
|
||||
path: file.path,
|
||||
stat: file.stat,
|
||||
contents: file.contents
|
||||
}));
|
||||
}
|
||||
const shouldUnpack = shouldUnpackFile(file);
|
||||
insertFile(file.relative, { size: file.contents.length, mode: file.stat.mode }, shouldUnpack);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ const vfs = require("vinyl-fs");
|
||||
const ext = require("./extensions");
|
||||
const fancyLog = require("fancy-log");
|
||||
const ansiColors = require("ansi-colors");
|
||||
const mkdirp = require('mkdirp');
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
||||
const builtInExtensions = productjson.builtInExtensions || [];
|
||||
@@ -107,7 +106,7 @@ function readControlFile() {
|
||||
}
|
||||
}
|
||||
function writeControlFile(control) {
|
||||
mkdirp.sync(path.dirname(controlFilePath));
|
||||
fs.mkdirSync(path.dirname(controlFilePath), { recursive: true });
|
||||
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
|
||||
}
|
||||
function getBuiltInExtensions() {
|
||||
|
||||
@@ -15,8 +15,6 @@ import * as fancyLog from 'fancy-log';
|
||||
import * as ansiColors from 'ansi-colors';
|
||||
import { Stream } from 'stream';
|
||||
|
||||
const mkdirp = require('mkdirp');
|
||||
|
||||
export interface IExtensionDefinition {
|
||||
name: string;
|
||||
version: string;
|
||||
@@ -147,7 +145,7 @@ function readControlFile(): IControlFile {
|
||||
}
|
||||
|
||||
function writeControlFile(control: IControlFile): void {
|
||||
mkdirp.sync(path.dirname(controlFilePath));
|
||||
fs.mkdirSync(path.dirname(controlFilePath), { recursive: true });
|
||||
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const builtInExtensions = productjson.builtInExtensions || [];
|
||||
const webBuiltInExtensions = productjson.webBuiltInExtensions || [];
|
||||
const token = process.env['GITHUB_TOKEN'];
|
||||
const contentBasePath = 'raw.githubusercontent.com';
|
||||
const contentFileNames = ['package.json', 'package-lock.json', 'yarn.lock'];
|
||||
const contentFileNames = ['package.json', 'package-lock.json'];
|
||||
async function downloadExtensionDetails(extension) {
|
||||
const extensionLabel = `${extension.name}@${extension.version}`;
|
||||
const repository = url.parse(extension.repo).path.substr(1);
|
||||
@@ -58,9 +58,8 @@ async function downloadExtensionDetails(extension) {
|
||||
if (!results.find(r => r.fileName === 'package.json')?.body) {
|
||||
// throw new Error(`The "package.json" file could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
if (!results.find(r => r.fileName === 'package-lock.json')?.body &&
|
||||
!results.find(r => r.fileName === 'yarn.lock')?.body) {
|
||||
// throw new Error(`The "package-lock.json"/"yarn.lock" could not be found for the built-in extension - ${extensionLabel}`);
|
||||
if (!results.find(r => r.fileName === 'package-lock.json')?.body) {
|
||||
// throw new Error(`The "package-lock.json" could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
}
|
||||
async function main() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user