mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-06 23:06:20 +01:00
Merge remote-tracking branch 'origin/main' into pr/nojaf/226632
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,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[];
|
||||
}
|
||||
|
||||
@@ -79,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 {
|
||||
@@ -98,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)) {
|
||||
@@ -110,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);
|
||||
}
|
||||
@@ -137,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 {
|
||||
@@ -149,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}/**`));
|
||||
|
||||
+82
-4
@@ -92,9 +92,14 @@
|
||||
"common",
|
||||
"browser"
|
||||
],
|
||||
"electron-main": [
|
||||
"electron-utility": [
|
||||
"common",
|
||||
"node"
|
||||
],
|
||||
"electron-main": [
|
||||
"common",
|
||||
"node",
|
||||
"electron-utility"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -611,6 +616,59 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
@@ -630,6 +688,7 @@
|
||||
{
|
||||
// imports that are allowed in all files of layers:
|
||||
// - node
|
||||
// - electron-utility
|
||||
// - electron-main
|
||||
"when": "hasNode",
|
||||
"allow": [
|
||||
@@ -648,7 +707,6 @@
|
||||
"cookie",
|
||||
"crypto",
|
||||
"dns",
|
||||
"electron",
|
||||
"events",
|
||||
"fs",
|
||||
"fs/promises",
|
||||
@@ -687,6 +745,15 @@
|
||||
"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",
|
||||
@@ -747,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/
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -881,6 +949,7 @@
|
||||
"vs/workbench/~",
|
||||
"vs/workbench/services/*/~",
|
||||
"vs/workbench/contrib/*/~",
|
||||
"vs/workbench/contrib/terminal/terminalContribExports*",
|
||||
"vscode-notebook-renderer", // Type only import
|
||||
{
|
||||
"when": "hasBrowser",
|
||||
@@ -910,6 +979,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",
|
||||
@@ -922,7 +992,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/
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -980,6 +1051,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",
|
||||
|
||||
+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,65 +34,64 @@ 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
|
||||
- name: Editor Distro & ESM
|
||||
run: npm run gulp editor-esm
|
||||
|
||||
# - name: Editor ESM sources check
|
||||
# working-directory: ./test/monaco
|
||||
# run: yarn run esm-check
|
||||
- name: Editor ESM sources check
|
||||
working-directory: ./test/monaco
|
||||
run: npm run esm-check
|
||||
|
||||
# - name: Typings validation prep
|
||||
# run: |
|
||||
# mkdir typings-test
|
||||
- name: Typings validation prep
|
||||
run: |
|
||||
mkdir typings-test
|
||||
|
||||
# - name: Typings validation
|
||||
# working-directory: ./typings-test
|
||||
# run: |
|
||||
# yarn init -yp
|
||||
# ../node_modules/.bin/tsc --init
|
||||
# echo "import '../out-monaco-editor-core';" > a.ts
|
||||
# ../node_modules/.bin/tsc --noEmit
|
||||
- name: Typings validation
|
||||
working-directory: ./typings-test
|
||||
run: |
|
||||
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
|
||||
- name: Package Editor with Webpack
|
||||
working-directory: ./test/monaco
|
||||
run: npm run bundle-webpack
|
||||
|
||||
# - name: Compile Editor Tests
|
||||
# working-directory: ./test/monaco
|
||||
# run: yarn run compile
|
||||
- name: Compile Editor Tests
|
||||
working-directory: ./test/monaco
|
||||
run: npm run compile
|
||||
|
||||
# - name: Run Editor Tests
|
||||
# timeout-minutes: 5
|
||||
# working-directory: ./test/monaco
|
||||
# run: yarn test
|
||||
- name: Run Editor Tests
|
||||
timeout-minutes: 5
|
||||
working-directory: ./test/monaco
|
||||
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
|
||||
+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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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==
|
||||
+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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
+1
-1
@@ -39,6 +39,7 @@
|
||||
"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,
|
||||
@@ -75,7 +76,6 @@
|
||||
],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"npm.exclude": "**/extensions/**",
|
||||
"npm.packageManager": "yarn",
|
||||
"emmet.excludeLanguages": [],
|
||||
"typescript.preferences.importModuleSpecifier": "relative",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
|
||||
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.4.0"
|
||||
ms_build_id "10073054"
|
||||
runtime "electron"
|
||||
build_from_source "true"
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2024-08-14T18:12:43.548Z
|
||||
2024-09-04T10:21:29.952Z
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
.yarnrc
|
||||
*.js.map
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
disturl="https://nodejs.org/dist"
|
||||
runtime="node"
|
||||
build_from_source="true"
|
||||
legacy-peer-deps="true"
|
||||
timeout=180000
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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)"
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
|
||||
@@ -12,7 +12,7 @@ parameters:
|
||||
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
|
||||
@@ -24,10 +24,10 @@ steps:
|
||||
- script: ./scripts/test-amd.sh --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-amd
|
||||
- script: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-amd-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) [AMD]
|
||||
@@ -36,10 +36,10 @@ steps:
|
||||
- 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)
|
||||
@@ -50,10 +50,10 @@ steps:
|
||||
- script: ./scripts/test-amd.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-amd --build
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-amd-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) [AMD]
|
||||
@@ -62,10 +62,10 @@ steps:
|
||||
- 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 \
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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: |
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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)
|
||||
|
||||
@@ -15,7 +15,7 @@ parameters:
|
||||
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
|
||||
@@ -42,10 +42,10 @@ steps:
|
||||
DISPLAY: ":10"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-amd
|
||||
- script: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-amd-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) [AMD]
|
||||
@@ -56,10 +56,10 @@ steps:
|
||||
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)
|
||||
@@ -71,10 +71,10 @@ steps:
|
||||
- script: ./scripts/test-amd.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-amd --build
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-browser-amd-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) [AMD]
|
||||
@@ -83,10 +83,10 @@ steps:
|
||||
- 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 \
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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,13 +106,14 @@ steps:
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --cwd build --frozen-lockfile --check-files && break
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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'))
|
||||
|
||||
@@ -138,12 +138,12 @@ steps:
|
||||
source ./build/azure-pipelines/linux/setup-env.sh
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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)
|
||||
@@ -190,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"
|
||||
@@ -223,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)"
|
||||
@@ -237,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)
|
||||
@@ -278,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
|
||||
@@ -297,14 +297,14 @@ steps:
|
||||
- ${{ 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
|
||||
|
||||
@@ -320,20 +320,20 @@ steps:
|
||||
fi
|
||||
export VSCODE_SYSROOT_DIR=$(Build.SourcesDirectory)/.build/sysroots
|
||||
export STRIP="$VSCODE_SYSROOT_DIR/$TRIPLE/$TRIPLE/bin/strip"
|
||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-rpm"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
- job: Windowsx64IntegrationTests
|
||||
displayName: Windows (Integration Tests)
|
||||
pool: 1es-oss-windows-2022-x64
|
||||
timeoutInMinutes: 30
|
||||
timeoutInMinutes: 60
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
NPM_ARCH: x64
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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) }}:
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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,7 +92,11 @@ 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') }}:
|
||||
@@ -108,24 +110,29 @@ steps:
|
||||
- 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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ function main() {
|
||||
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}`)));
|
||||
|
||||
@@ -40,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}`)));
|
||||
|
||||
@@ -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
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
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
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ parameters:
|
||||
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
|
||||
@@ -29,7 +29,7 @@ steps:
|
||||
- powershell: .\scripts\test-amd.bat --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-node-amd
|
||||
- powershell: npm run test-node-amd
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: node test/unit/browser/index.amd.js --sequential --browser chromium --tfs "Browser Unit Tests"
|
||||
@@ -39,7 +39,7 @@ steps:
|
||||
- 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"
|
||||
@@ -51,20 +51,20 @@ steps:
|
||||
- powershell: .\scripts\test-amd.bat --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- script: yarn test-node-amd --build
|
||||
- script: npm run test-node-amd -- --build
|
||||
displayName: Run unit tests (node.js) [AMD]
|
||||
timeoutInMinutes: 15
|
||||
- powershell: yarn test-browser-amd-no-install --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
- 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_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 `
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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')
|
||||
];
|
||||
|
||||
|
||||
@@ -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 amd_1 = require("../lib/amd");
|
||||
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, amd_1.isAMD)(); // 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 { isAMD } from '../lib/amd';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
@@ -32,15 +31,13 @@ async function main(buildDir?: string) {
|
||||
'**/Credits.rtf',
|
||||
];
|
||||
|
||||
const canAsar = isAMD(); // 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/**',
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ const serverResourceIncludes = [
|
||||
];
|
||||
|
||||
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/**'
|
||||
@@ -169,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 };
|
||||
}
|
||||
|
||||
@@ -363,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 })
|
||||
|
||||
@@ -359,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 (isAMD()) { // 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/*',
|
||||
@@ -379,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,
|
||||
@@ -500,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(/-.*$/, '');
|
||||
|
||||
@@ -87,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',
|
||||
@@ -254,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']))
|
||||
|
||||
@@ -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)
|
||||
|
||||
+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);
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -17,7 +17,7 @@ const webBuiltInExtensions = <IExtensionDefinition[]>productjson.webBuiltInExten
|
||||
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: IExtensionDefinition): Promise<void> {
|
||||
const extensionLabel = `${extension.name}@${extension.version}`;
|
||||
@@ -61,9 +61,8 @@ async function downloadExtensionDetails(extension: IExtensionDefinition): Promis
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+26
-47
@@ -8,64 +8,43 @@ exports.getProductionDependencies = getProductionDependencies;
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const cp = require("child_process");
|
||||
const parseSemver = require('parse-semver');
|
||||
const root = fs.realpathSync(path.dirname(path.dirname(__dirname)));
|
||||
function asYarnDependency(prefix, tree) {
|
||||
let parseResult;
|
||||
function getNpmProductionDependencies(folder) {
|
||||
let raw;
|
||||
try {
|
||||
parseResult = parseSemver(tree.name);
|
||||
raw = cp.execSync('npm ls --all --omit=dev --parseable', { cwd: folder, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' }, stdio: [null, null, null] });
|
||||
}
|
||||
catch (err) {
|
||||
err.message += `: ${tree.name}`;
|
||||
console.warn(`Could not parse semver: ${tree.name}`);
|
||||
return null;
|
||||
}
|
||||
// not an actual dependency in disk
|
||||
if (parseResult.version !== parseResult.range) {
|
||||
return null;
|
||||
}
|
||||
const name = parseResult.name;
|
||||
const version = parseResult.version;
|
||||
const dependencyPath = path.join(prefix, name);
|
||||
const children = [];
|
||||
for (const child of (tree.children || [])) {
|
||||
const dep = asYarnDependency(path.join(prefix, name, 'node_modules'), child);
|
||||
if (dep) {
|
||||
children.push(dep);
|
||||
const regex = /^npm ERR! .*$/gm;
|
||||
let match;
|
||||
while (match = regex.exec(err.message)) {
|
||||
if (/ELSPROBLEMS/.test(match[0])) {
|
||||
continue;
|
||||
}
|
||||
else if (/invalid: xterm/.test(match[0])) {
|
||||
continue;
|
||||
}
|
||||
else if (/A complete log of this run/.test(match[0])) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
raw = err.stdout;
|
||||
}
|
||||
return { name, version, path: dependencyPath, children };
|
||||
}
|
||||
function getYarnProductionDependencies(folderPath) {
|
||||
const raw = cp.execSync('yarn list --json', { cwd: folderPath, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' }, stdio: [null, null, 'inherit'] });
|
||||
const match = /^{"type":"tree".*$/m.exec(raw);
|
||||
if (!match || match.length !== 1) {
|
||||
throw new Error('Could not parse result of `yarn list --json`');
|
||||
}
|
||||
const trees = JSON.parse(match[0]).data.trees;
|
||||
return trees
|
||||
.map(tree => asYarnDependency(path.join(folderPath, 'node_modules'), tree))
|
||||
.filter((dep) => !!dep);
|
||||
return raw.split(/\r?\n/).filter(line => {
|
||||
return !!line.trim() && path.relative(root, line) !== path.relative(root, folder);
|
||||
});
|
||||
}
|
||||
function getProductionDependencies(folderPath) {
|
||||
const result = [];
|
||||
const deps = getYarnProductionDependencies(folderPath);
|
||||
const flatten = (dep) => { result.push({ name: dep.name, version: dep.version, path: dep.path }); dep.children.forEach(flatten); };
|
||||
deps.forEach(flatten);
|
||||
const result = getNpmProductionDependencies(folderPath);
|
||||
// Account for distro npm dependencies
|
||||
const realFolderPath = fs.realpathSync(folderPath);
|
||||
const relativeFolderPath = path.relative(root, realFolderPath);
|
||||
const distroPackageJsonPath = `${root}/.build/distro/npm/${relativeFolderPath}/package.json`;
|
||||
if (fs.existsSync(distroPackageJsonPath)) {
|
||||
const distroPackageJson = JSON.parse(fs.readFileSync(distroPackageJsonPath, 'utf8'));
|
||||
const distroDependencyNames = Object.keys(distroPackageJson.dependencies ?? {});
|
||||
for (const name of distroDependencyNames) {
|
||||
result.push({
|
||||
name,
|
||||
version: distroPackageJson.dependencies[name],
|
||||
path: path.join(realFolderPath, 'node_modules', name)
|
||||
});
|
||||
}
|
||||
const distroFolderPath = `${root}/.build/distro/npm/${relativeFolderPath}`;
|
||||
if (fs.existsSync(distroFolderPath)) {
|
||||
result.push(...getNpmProductionDependencies(distroFolderPath));
|
||||
}
|
||||
return [...new Set(result)];
|
||||
}
|
||||
|
||||
+25
-72
@@ -6,93 +6,46 @@
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as cp from 'child_process';
|
||||
const parseSemver = require('parse-semver');
|
||||
const root = fs.realpathSync(path.dirname(path.dirname(__dirname)));
|
||||
|
||||
interface Tree {
|
||||
readonly name: string;
|
||||
readonly children?: Tree[];
|
||||
}
|
||||
|
||||
interface FlatDependency {
|
||||
readonly name: string;
|
||||
readonly version: string;
|
||||
readonly path: string;
|
||||
}
|
||||
|
||||
interface Dependency extends FlatDependency {
|
||||
readonly children: Dependency[];
|
||||
}
|
||||
|
||||
function asYarnDependency(prefix: string, tree: Tree): Dependency | null {
|
||||
let parseResult;
|
||||
function getNpmProductionDependencies(folder: string): string[] {
|
||||
let raw: string;
|
||||
|
||||
try {
|
||||
parseResult = parseSemver(tree.name);
|
||||
raw = cp.execSync('npm ls --all --omit=dev --parseable', { cwd: folder, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' }, stdio: [null, null, null] });
|
||||
} catch (err) {
|
||||
err.message += `: ${tree.name}`;
|
||||
console.warn(`Could not parse semver: ${tree.name}`);
|
||||
return null;
|
||||
}
|
||||
const regex = /^npm ERR! .*$/gm;
|
||||
let match: RegExpExecArray | null;
|
||||
|
||||
// not an actual dependency in disk
|
||||
if (parseResult.version !== parseResult.range) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const name = parseResult.name;
|
||||
const version = parseResult.version;
|
||||
const dependencyPath = path.join(prefix, name);
|
||||
const children = [];
|
||||
|
||||
for (const child of (tree.children || [])) {
|
||||
const dep = asYarnDependency(path.join(prefix, name, 'node_modules'), child);
|
||||
|
||||
if (dep) {
|
||||
children.push(dep);
|
||||
while (match = regex.exec(err.message)) {
|
||||
if (/ELSPROBLEMS/.test(match[0])) {
|
||||
continue;
|
||||
} else if (/invalid: xterm/.test(match[0])) {
|
||||
continue;
|
||||
} else if (/A complete log of this run/.test(match[0])) {
|
||||
continue;
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
raw = err.stdout;
|
||||
}
|
||||
|
||||
return { name, version, path: dependencyPath, children };
|
||||
return raw.split(/\r?\n/).filter(line => {
|
||||
return !!line.trim() && path.relative(root, line) !== path.relative(root, folder);
|
||||
});
|
||||
}
|
||||
|
||||
function getYarnProductionDependencies(folderPath: string): Dependency[] {
|
||||
const raw = cp.execSync('yarn list --json', { cwd: folderPath, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' }, stdio: [null, null, 'inherit'] });
|
||||
const match = /^{"type":"tree".*$/m.exec(raw);
|
||||
|
||||
if (!match || match.length !== 1) {
|
||||
throw new Error('Could not parse result of `yarn list --json`');
|
||||
}
|
||||
|
||||
const trees = JSON.parse(match[0]).data.trees as Tree[];
|
||||
|
||||
return trees
|
||||
.map(tree => asYarnDependency(path.join(folderPath, 'node_modules'), tree))
|
||||
.filter<Dependency>((dep): dep is Dependency => !!dep);
|
||||
}
|
||||
|
||||
export function getProductionDependencies(folderPath: string): FlatDependency[] {
|
||||
const result: FlatDependency[] = [];
|
||||
const deps = getYarnProductionDependencies(folderPath);
|
||||
const flatten = (dep: Dependency) => { result.push({ name: dep.name, version: dep.version, path: dep.path }); dep.children.forEach(flatten); };
|
||||
deps.forEach(flatten);
|
||||
|
||||
export function getProductionDependencies(folderPath: string): string[] {
|
||||
const result = getNpmProductionDependencies(folderPath);
|
||||
// Account for distro npm dependencies
|
||||
const realFolderPath = fs.realpathSync(folderPath);
|
||||
const relativeFolderPath = path.relative(root, realFolderPath);
|
||||
const distroPackageJsonPath = `${root}/.build/distro/npm/${relativeFolderPath}/package.json`;
|
||||
const distroFolderPath = `${root}/.build/distro/npm/${relativeFolderPath}`;
|
||||
|
||||
if (fs.existsSync(distroPackageJsonPath)) {
|
||||
const distroPackageJson = JSON.parse(fs.readFileSync(distroPackageJsonPath, 'utf8'));
|
||||
const distroDependencyNames = Object.keys(distroPackageJson.dependencies ?? {});
|
||||
|
||||
for (const name of distroDependencyNames) {
|
||||
result.push({
|
||||
name,
|
||||
version: distroPackageJson.dependencies[name],
|
||||
path: path.join(realFolderPath, 'node_modules', name)
|
||||
});
|
||||
}
|
||||
if (fs.existsSync(distroFolderPath)) {
|
||||
result.push(...getNpmProductionDependencies(distroFolderPath));
|
||||
}
|
||||
|
||||
return [...new Set(result)];
|
||||
|
||||
@@ -97,7 +97,12 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName, disableMangle) {
|
||||
}
|
||||
}
|
||||
}
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => {
|
||||
// TODO: add prune support based on packagedDependencies to vsce.PackageManager.Npm similar
|
||||
// to vsce.PackageManager.Yarn.
|
||||
// A static analysis showed there are no webpack externals that are dependencies of the current
|
||||
// local extensions so we can use the vsce.PackageManager.None config to ignore dependencies list
|
||||
// as a temporary workaround.
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.None, packagedDependencies }).then(fileNames => {
|
||||
const files = fileNames
|
||||
.map(fileName => path.join(extensionPath, fileName))
|
||||
.map(filePath => new File({
|
||||
@@ -178,7 +183,7 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName, disableMangle) {
|
||||
function fromLocalNormal(extensionPath) {
|
||||
const vsce = require('@vscode/vsce');
|
||||
const result = es.through();
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn })
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Npm })
|
||||
.then(fileNames => {
|
||||
const files = fileNames
|
||||
.map(fileName => path.join(extensionPath, fileName))
|
||||
@@ -303,7 +308,7 @@ function packageLocalExtensionsStream(forWeb, disableMangle) {
|
||||
else {
|
||||
// also include shared production node modules
|
||||
const productionDependencies = (0, dependencies_1.getProductionDependencies)('extensions/');
|
||||
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();
|
||||
result = es.merge(localExtensionsStream, gulp.src(dependenciesSrc, { base: '.' })
|
||||
.pipe(util2.cleanNodeModules(path.join(root, 'build', '.moduleignore')))
|
||||
.pipe(util2.cleanNodeModules(path.join(root, 'build', `.moduleignore.${process.platform}`))));
|
||||
|
||||
@@ -101,7 +101,12 @@ function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string,
|
||||
}
|
||||
}
|
||||
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => {
|
||||
// TODO: add prune support based on packagedDependencies to vsce.PackageManager.Npm similar
|
||||
// to vsce.PackageManager.Yarn.
|
||||
// A static analysis showed there are no webpack externals that are dependencies of the current
|
||||
// local extensions so we can use the vsce.PackageManager.None config to ignore dependencies list
|
||||
// as a temporary workaround.
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.None, packagedDependencies }).then(fileNames => {
|
||||
const files = fileNames
|
||||
.map(fileName => path.join(extensionPath, fileName))
|
||||
.map(filePath => new File({
|
||||
@@ -196,7 +201,7 @@ function fromLocalNormal(extensionPath: string): Stream {
|
||||
const vsce = require('@vscode/vsce') as typeof import('@vscode/vsce');
|
||||
const result = es.through();
|
||||
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn })
|
||||
vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Npm })
|
||||
.then(fileNames => {
|
||||
const files = fileNames
|
||||
.map(fileName => path.join(extensionPath, fileName))
|
||||
@@ -354,7 +359,7 @@ export function packageLocalExtensionsStream(forWeb: boolean, disableMangle: boo
|
||||
} else {
|
||||
// also include shared production node modules
|
||||
const productionDependencies = getProductionDependencies('extensions/');
|
||||
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();
|
||||
|
||||
result = es.merge(
|
||||
localExtensionsStream,
|
||||
|
||||
@@ -235,6 +235,22 @@ const RULES = [
|
||||
'@types/node' // no node.js
|
||||
]
|
||||
},
|
||||
// Electron (utility)
|
||||
{
|
||||
target: '**/vs/**/electron-utility/**',
|
||||
allowedTypes: [
|
||||
...CORE_TYPES,
|
||||
// --> types from electron.d.ts that duplicate from lib.dom.d.ts
|
||||
'Event',
|
||||
'Request'
|
||||
],
|
||||
disallowedTypes: [
|
||||
'ipcMain' // not allowed, use validatedIpcMain instead
|
||||
],
|
||||
disallowedDefinitions: [
|
||||
'lib.dom.d.ts' // no DOM
|
||||
]
|
||||
},
|
||||
// Electron (main)
|
||||
{
|
||||
target: '**/vs/**/electron-main/**',
|
||||
|
||||
@@ -257,6 +257,24 @@ const RULES: IRule[] = [
|
||||
]
|
||||
},
|
||||
|
||||
// Electron (utility)
|
||||
{
|
||||
target: '**/vs/**/electron-utility/**',
|
||||
allowedTypes: [
|
||||
...CORE_TYPES,
|
||||
|
||||
// --> types from electron.d.ts that duplicate from lib.dom.d.ts
|
||||
'Event',
|
||||
'Request'
|
||||
],
|
||||
disallowedTypes: [
|
||||
'ipcMain' // not allowed, use validatedIpcMain instead
|
||||
],
|
||||
disallowedDefinitions: [
|
||||
'lib.dom.d.ts' // no DOM
|
||||
]
|
||||
},
|
||||
|
||||
// Electron (main)
|
||||
{
|
||||
target: '**/vs/**/electron-main/**',
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const yarnrcPath = path.join(root, 'remote', '.yarnrc');
|
||||
const yarnrc = fs.readFileSync(yarnrcPath, 'utf8');
|
||||
const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)[1];
|
||||
const npmrcPath = path.join(root, 'remote', '.npmrc');
|
||||
const npmrc = fs.readFileSync(npmrcPath, 'utf8');
|
||||
const version = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
const platform = process.platform;
|
||||
const arch = process.arch;
|
||||
const node = platform === 'win32' ? 'node.exe' : 'node';
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const yarnrcPath = path.join(root, 'remote', '.yarnrc');
|
||||
const yarnrc = fs.readFileSync(yarnrcPath, 'utf8');
|
||||
const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)![1];
|
||||
const npmrcPath = path.join(root, 'remote', '.npmrc');
|
||||
const npmrc = fs.readFileSync(npmrcPath, 'utf8');
|
||||
const version = /^target="(.*)"$/m.exec(npmrc)![1];
|
||||
|
||||
const platform = process.platform;
|
||||
const arch = process.arch;
|
||||
|
||||
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = require("path");
|
||||
const child_process_1 = require("child_process");
|
||||
const fs_1 = require("fs");
|
||||
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
const rootDir = path.resolve(__dirname, '..', '..');
|
||||
function runProcess(command, args = []) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -28,15 +28,15 @@ async function exists(subdir) {
|
||||
}
|
||||
async function ensureNodeModules() {
|
||||
if (!(await exists('node_modules'))) {
|
||||
await runProcess(yarn);
|
||||
await runProcess(npm, ['ci']);
|
||||
}
|
||||
}
|
||||
async function getElectron() {
|
||||
await runProcess(yarn, ['electron']);
|
||||
await runProcess(npm, ['run', 'electron']);
|
||||
}
|
||||
async function ensureCompiled() {
|
||||
if (!(await exists('out'))) {
|
||||
await runProcess(yarn, ['compile']);
|
||||
await runProcess(npm, ['run', 'compile']);
|
||||
}
|
||||
}
|
||||
async function main() {
|
||||
|
||||
@@ -9,7 +9,7 @@ import * as path from 'path';
|
||||
import { spawn } from 'child_process';
|
||||
import { promises as fs } from 'fs';
|
||||
|
||||
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
const rootDir = path.resolve(__dirname, '..', '..');
|
||||
|
||||
function runProcess(command: string, args: ReadonlyArray<string> = []) {
|
||||
@@ -31,17 +31,17 @@ async function exists(subdir: string) {
|
||||
|
||||
async function ensureNodeModules() {
|
||||
if (!(await exists('node_modules'))) {
|
||||
await runProcess(yarn);
|
||||
await runProcess(npm, ['ci']);
|
||||
}
|
||||
}
|
||||
|
||||
async function getElectron() {
|
||||
await runProcess(yarn, ['electron']);
|
||||
await runProcess(npm, ['run', 'electron']);
|
||||
}
|
||||
|
||||
async function ensureCompiled() {
|
||||
if (!(await exists('out'))) {
|
||||
await runProcess(yarn, ['compile']);
|
||||
await runProcess(npm, ['run', 'compile']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-53
@@ -79,13 +79,7 @@ function extractEditor(options) {
|
||||
const info = ts.preProcessFile(fileContents);
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importedFileName = info.importedFiles[i].fileName;
|
||||
let importedFilePath;
|
||||
if (/^vs\/css!/.test(importedFileName)) {
|
||||
importedFilePath = importedFileName.substr('vs/css!'.length) + '.css';
|
||||
}
|
||||
else {
|
||||
importedFilePath = importedFileName;
|
||||
}
|
||||
let importedFilePath = importedFileName;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedFilePath)) {
|
||||
importedFilePath = path.join(path.dirname(fileName), importedFilePath);
|
||||
}
|
||||
@@ -93,8 +87,9 @@ function extractEditor(options) {
|
||||
transportCSS(importedFilePath, copyFile, writeOutputFile);
|
||||
}
|
||||
else {
|
||||
if (fs.existsSync(path.join(options.sourcesRoot, importedFilePath + '.js'))) {
|
||||
copyFile(importedFilePath + '.js');
|
||||
const pathToCopy = path.join(options.sourcesRoot, importedFilePath);
|
||||
if (fs.existsSync(pathToCopy) && !fs.statSync(pathToCopy).isDirectory()) {
|
||||
copyFile(importedFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,7 +105,6 @@ function extractEditor(options) {
|
||||
].forEach(copyFile);
|
||||
}
|
||||
function createESMSourcesAndResources2(options) {
|
||||
const ts = require('typescript');
|
||||
const SRC_FOLDER = path.join(REPO_ROOT, options.srcFolder);
|
||||
const OUT_FOLDER = path.join(REPO_ROOT, options.outFolder);
|
||||
const OUT_RESOURCES_FOLDER = path.join(REPO_ROOT, options.outResourcesFolder);
|
||||
@@ -136,53 +130,11 @@ function createESMSourcesAndResources2(options) {
|
||||
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
|
||||
continue;
|
||||
}
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
if (/\.ts$/.test(file) || /\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
// Transport the files directly
|
||||
write(getDestAbsoluteFilePath(file), fs.readFileSync(path.join(SRC_FOLDER, file)));
|
||||
continue;
|
||||
}
|
||||
if (/\.ts$/.test(file)) {
|
||||
// Transform the .ts file
|
||||
let fileContents = fs.readFileSync(path.join(SRC_FOLDER, file)).toString();
|
||||
const info = ts.preProcessFile(fileContents);
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importedFilename = info.importedFiles[i].fileName;
|
||||
const pos = info.importedFiles[i].pos;
|
||||
const end = info.importedFiles[i].end;
|
||||
let importedFilepath;
|
||||
if (/^vs\/css!/.test(importedFilename)) {
|
||||
importedFilepath = importedFilename.substr('vs/css!'.length) + '.css';
|
||||
}
|
||||
else {
|
||||
importedFilepath = importedFilename;
|
||||
}
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedFilepath)) {
|
||||
importedFilepath = path.join(path.dirname(file), importedFilepath);
|
||||
}
|
||||
let relativePath;
|
||||
if (importedFilepath === path.dirname(file).replace(/\\/g, '/')) {
|
||||
relativePath = '../' + path.basename(path.dirname(file));
|
||||
}
|
||||
else if (importedFilepath === path.dirname(path.dirname(file)).replace(/\\/g, '/')) {
|
||||
relativePath = '../../' + path.basename(path.dirname(path.dirname(file)));
|
||||
}
|
||||
else {
|
||||
relativePath = path.relative(path.dirname(file), importedFilepath);
|
||||
}
|
||||
relativePath = relativePath.replace(/\\/g, '/');
|
||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||
relativePath = './' + relativePath;
|
||||
}
|
||||
fileContents = (fileContents.substring(0, pos + 1)
|
||||
+ relativePath
|
||||
+ fileContents.substring(end + 1));
|
||||
}
|
||||
fileContents = fileContents.replace(/import ([a-zA-Z0-9]+) = require\(('[^']+')\);/g, function (_, m1, m2) {
|
||||
return `import * as ${m1} from ${m2};`;
|
||||
});
|
||||
write(getDestAbsoluteFilePath(file), fileContents);
|
||||
continue;
|
||||
}
|
||||
console.log(`UNKNOWN FILE: ${file}`);
|
||||
}
|
||||
function walkDirRecursive(dir) {
|
||||
|
||||
+5
-58
@@ -90,12 +90,7 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importedFileName = info.importedFiles[i].fileName;
|
||||
|
||||
let importedFilePath: string;
|
||||
if (/^vs\/css!/.test(importedFileName)) {
|
||||
importedFilePath = importedFileName.substr('vs/css!'.length) + '.css';
|
||||
} else {
|
||||
importedFilePath = importedFileName;
|
||||
}
|
||||
let importedFilePath = importedFileName;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedFilePath)) {
|
||||
importedFilePath = path.join(path.dirname(fileName), importedFilePath);
|
||||
}
|
||||
@@ -103,8 +98,9 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
||||
if (/\.css$/.test(importedFilePath)) {
|
||||
transportCSS(importedFilePath, copyFile, writeOutputFile);
|
||||
} else {
|
||||
if (fs.existsSync(path.join(options.sourcesRoot, importedFilePath + '.js'))) {
|
||||
copyFile(importedFilePath + '.js');
|
||||
const pathToCopy = path.join(options.sourcesRoot, importedFilePath);
|
||||
if (fs.existsSync(pathToCopy) && !fs.statSync(pathToCopy).isDirectory()) {
|
||||
copyFile(importedFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +127,6 @@ export interface IOptions2 {
|
||||
}
|
||||
|
||||
export function createESMSourcesAndResources2(options: IOptions2): void {
|
||||
const ts = require('typescript') as typeof import('typescript');
|
||||
|
||||
const SRC_FOLDER = path.join(REPO_ROOT, options.srcFolder);
|
||||
const OUT_FOLDER = path.join(REPO_ROOT, options.outFolder);
|
||||
@@ -163,60 +158,12 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
if (/\.ts$/.test(file) || /\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
|
||||
// Transport the files directly
|
||||
write(getDestAbsoluteFilePath(file), fs.readFileSync(path.join(SRC_FOLDER, file)));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/\.ts$/.test(file)) {
|
||||
// Transform the .ts file
|
||||
let fileContents = fs.readFileSync(path.join(SRC_FOLDER, file)).toString();
|
||||
|
||||
const info = ts.preProcessFile(fileContents);
|
||||
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importedFilename = info.importedFiles[i].fileName;
|
||||
const pos = info.importedFiles[i].pos;
|
||||
const end = info.importedFiles[i].end;
|
||||
|
||||
let importedFilepath: string;
|
||||
if (/^vs\/css!/.test(importedFilename)) {
|
||||
importedFilepath = importedFilename.substr('vs/css!'.length) + '.css';
|
||||
} else {
|
||||
importedFilepath = importedFilename;
|
||||
}
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedFilepath)) {
|
||||
importedFilepath = path.join(path.dirname(file), importedFilepath);
|
||||
}
|
||||
|
||||
let relativePath: string;
|
||||
if (importedFilepath === path.dirname(file).replace(/\\/g, '/')) {
|
||||
relativePath = '../' + path.basename(path.dirname(file));
|
||||
} else if (importedFilepath === path.dirname(path.dirname(file)).replace(/\\/g, '/')) {
|
||||
relativePath = '../../' + path.basename(path.dirname(path.dirname(file)));
|
||||
} else {
|
||||
relativePath = path.relative(path.dirname(file), importedFilepath);
|
||||
}
|
||||
relativePath = relativePath.replace(/\\/g, '/');
|
||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||
relativePath = './' + relativePath;
|
||||
}
|
||||
fileContents = (
|
||||
fileContents.substring(0, pos + 1)
|
||||
+ relativePath
|
||||
+ fileContents.substring(end + 1)
|
||||
);
|
||||
}
|
||||
|
||||
fileContents = fileContents.replace(/import ([a-zA-Z0-9]+) = require\(('[^']+')\);/g, function (_, m1, m2) {
|
||||
return `import * as ${m1} from ${m2};`;
|
||||
});
|
||||
|
||||
write(getDestAbsoluteFilePath(file), fileContents);
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(`UNKNOWN FILE: ${file}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,10 @@
|
||||
"--vscode-editor-wordHighlightStrongBorder",
|
||||
"--vscode-editor-wordHighlightTextBackground",
|
||||
"--vscode-editor-wordHighlightTextBorder",
|
||||
"--vscode-editorActionList-background",
|
||||
"--vscode-editorActionList-focusBackground",
|
||||
"--vscode-editorActionList-focusForeground",
|
||||
"--vscode-editorActionList-foreground",
|
||||
"--vscode-editorActiveLineNumber-foreground",
|
||||
"--vscode-editorBracketHighlight-foreground1",
|
||||
"--vscode-editorBracketHighlight-foreground2",
|
||||
@@ -255,10 +259,6 @@
|
||||
"--vscode-editorLightBulb-foreground",
|
||||
"--vscode-editorLightBulbAi-foreground",
|
||||
"--vscode-editorLightBulbAutoFix-foreground",
|
||||
"--vscode-editorActionList-background",
|
||||
"--vscode-editorActionList-foreground",
|
||||
"--vscode-editorActionList-focusForeground",
|
||||
"--vscode-editorActionList-focusBackground",
|
||||
"--vscode-editorLineNumber-activeForeground",
|
||||
"--vscode-editorLineNumber-dimmedForeground",
|
||||
"--vscode-editorLineNumber-foreground",
|
||||
@@ -543,17 +543,17 @@
|
||||
"--vscode-radio-inactiveForeground",
|
||||
"--vscode-radio-inactiveHoverBackground",
|
||||
"--vscode-sash-hoverBorder",
|
||||
"--vscode-scm-historyGraph-green",
|
||||
"--vscode-scm-historyGraph-historyItemGroupBase",
|
||||
"--vscode-scm-historyGraph-historyItemGroupHoverLabelForeground",
|
||||
"--vscode-scm-historyGraph-historyItemGroupLocal",
|
||||
"--vscode-scm-historyGraph-historyItemGroupRemote",
|
||||
"--vscode-scm-historyGraph-red",
|
||||
"--vscode-scm-historyGraph-yellow",
|
||||
"--vscode-scm-historyItemAdditionsForeground",
|
||||
"--vscode-scm-historyItemDeletionsForeground",
|
||||
"--vscode-scm-historyItemDefaultLabelBackground",
|
||||
"--vscode-scm-historyItemDefaultLabelForeground",
|
||||
"--vscode-scmGraph-foreground1",
|
||||
"--vscode-scmGraph-foreground2",
|
||||
"--vscode-scmGraph-foreground3",
|
||||
"--vscode-scmGraph-historyItemGroupBase",
|
||||
"--vscode-scmGraph-historyItemGroupLocal",
|
||||
"--vscode-scmGraph-historyItemGroupRemote",
|
||||
"--vscode-scmGraph-historyItemHoverAdditionsForeground",
|
||||
"--vscode-scmGraph-historyItemHoverDefaultLabelBackground",
|
||||
"--vscode-scmGraph-historyItemHoverDefaultLabelForeground",
|
||||
"--vscode-scmGraph-historyItemHoverDeletionsForeground",
|
||||
"--vscode-scmGraph-historyItemHoverLabelForeground",
|
||||
"--vscode-scrollbar-shadow",
|
||||
"--vscode-scrollbarSlider-activeBackground",
|
||||
"--vscode-scrollbarSlider-background",
|
||||
@@ -881,4 +881,4 @@
|
||||
"--widget-color",
|
||||
"--text-link-decoration"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -121,12 +121,15 @@ function discoverAndReadFiles(ts, options) {
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importedFileName = info.importedFiles[i].fileName;
|
||||
if (options.importIgnorePattern.test(importedFileName)) {
|
||||
// Ignore vs/css! imports
|
||||
// Ignore *.css imports
|
||||
continue;
|
||||
}
|
||||
let importedModuleId = importedFileName;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedModuleId)) {
|
||||
importedModuleId = path.join(path.dirname(moduleId), importedModuleId);
|
||||
if (importedModuleId.endsWith('.js')) { // ESM: code imports require to be relative and have a '.js' file extension
|
||||
importedModuleId = importedModuleId.substr(0, importedModuleId.length - 3);
|
||||
}
|
||||
}
|
||||
enqueue(importedModuleId);
|
||||
}
|
||||
@@ -453,6 +456,9 @@ function markNodes(ts, languageService, options) {
|
||||
const nodeSourceFile = node.getSourceFile();
|
||||
let fullPath;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importText)) {
|
||||
if (importText.endsWith('.js')) { // ESM: code imports require to be relative and to have a '.js' file extension
|
||||
importText = importText.substr(0, importText.length - 3);
|
||||
}
|
||||
fullPath = path.join(path.dirname(nodeSourceFile.fileName), importText) + '.ts';
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface ITreeShakingOptions {
|
||||
*/
|
||||
shakeLevel: ShakeLevel;
|
||||
/**
|
||||
* regex pattern to ignore certain imports e.g. `vs/css!` imports
|
||||
* regex pattern to ignore certain imports e.g. `.css` imports
|
||||
*/
|
||||
importIgnorePattern: RegExp;
|
||||
|
||||
@@ -182,13 +182,16 @@ function discoverAndReadFiles(ts: typeof import('typescript'), options: ITreeSha
|
||||
const importedFileName = info.importedFiles[i].fileName;
|
||||
|
||||
if (options.importIgnorePattern.test(importedFileName)) {
|
||||
// Ignore vs/css! imports
|
||||
// Ignore *.css imports
|
||||
continue;
|
||||
}
|
||||
|
||||
let importedModuleId = importedFileName;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importedModuleId)) {
|
||||
importedModuleId = path.join(path.dirname(moduleId), importedModuleId);
|
||||
if (importedModuleId.endsWith('.js')) { // ESM: code imports require to be relative and have a '.js' file extension
|
||||
importedModuleId = importedModuleId.substr(0, importedModuleId.length - 3);
|
||||
}
|
||||
}
|
||||
enqueue(importedModuleId);
|
||||
}
|
||||
@@ -567,6 +570,9 @@ function markNodes(ts: typeof import('typescript'), languageService: ts.Language
|
||||
const nodeSourceFile = node.getSourceFile();
|
||||
let fullPath: string;
|
||||
if (/(^\.\/)|(^\.\.\/)/.test(importText)) {
|
||||
if (importText.endsWith('.js')) { // ESM: code imports require to be relative and to have a '.js' file extension
|
||||
importText = importText.substr(0, importText.length - 3);
|
||||
}
|
||||
fullPath = path.join(path.dirname(nodeSourceFile.fileName), importText) + '.ts';
|
||||
} else {
|
||||
fullPath = importText + '.ts';
|
||||
|
||||
@@ -355,7 +355,7 @@ function createTypeScriptBuilder(config, projectFile, cmd) {
|
||||
// print stats
|
||||
const headNow = process.memoryUsage().heapUsed;
|
||||
const MB = 1024 * 1024;
|
||||
_log('[tsb]', `time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgCyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`);
|
||||
_log('[tsb]', `time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgcyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`);
|
||||
headUsed = headNow;
|
||||
});
|
||||
}
|
||||
@@ -550,7 +550,10 @@ class LanguageServiceHost {
|
||||
let found = false;
|
||||
while (!found && dirname.indexOf(stopDirname) === 0) {
|
||||
dirname = path.dirname(dirname);
|
||||
const resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
let resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
if (resolvedPath.endsWith('.js')) {
|
||||
resolvedPath = resolvedPath.slice(0, -3);
|
||||
}
|
||||
const normalizedPath = normalize(resolvedPath);
|
||||
if (this.getScriptSnapshot(normalizedPath + '.ts')) {
|
||||
this._dependencies.inertEdge(filename, normalizedPath + '.ts');
|
||||
|
||||
@@ -427,7 +427,7 @@ export function createTypeScriptBuilder(config: IConfiguration, projectFile: str
|
||||
const MB = 1024 * 1024;
|
||||
_log(
|
||||
'[tsb]',
|
||||
`time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgCyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`
|
||||
`time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgcyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`
|
||||
);
|
||||
headUsed = headNow;
|
||||
});
|
||||
@@ -660,7 +660,10 @@ class LanguageServiceHost implements ts.LanguageServiceHost {
|
||||
|
||||
while (!found && dirname.indexOf(stopDirname) === 0) {
|
||||
dirname = path.dirname(dirname);
|
||||
const resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
let resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
if (resolvedPath.endsWith('.js')) {
|
||||
resolvedPath = resolvedPath.slice(0, -3);
|
||||
}
|
||||
const normalizedPath = normalize(resolvedPath);
|
||||
|
||||
if (this.getScriptSnapshot(normalizedPath + '.ts')) {
|
||||
|
||||
+3
-3
@@ -315,9 +315,9 @@ function streamToPromise(stream) {
|
||||
});
|
||||
}
|
||||
function getElectronVersion() {
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const electronVersion = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
const msBuildId = /^ms_build_id "(.*)"$/m.exec(yarnrc)[1];
|
||||
const npmrc = fs.readFileSync(path.join(root, '.npmrc'), 'utf8');
|
||||
const electronVersion = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
const msBuildId = /^ms_build_id="(.*)"$/m.exec(npmrc)[1];
|
||||
return { electronVersion, msBuildId };
|
||||
}
|
||||
function acquireWebNodePaths() {
|
||||
|
||||
+3
-3
@@ -385,9 +385,9 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
|
||||
}
|
||||
|
||||
export function getElectronVersion(): Record<string, string> {
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const electronVersion = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||
const msBuildId = /^ms_build_id "(.*)"$/m.exec(yarnrc)![1];
|
||||
const npmrc = fs.readFileSync(path.join(root, '.npmrc'), 'utf8');
|
||||
const electronVersion = /^target="(.*)"$/m.exec(npmrc)![1];
|
||||
const msBuildId = /^ms_build_id="(.*)"$/m.exec(npmrc)![1];
|
||||
return { electronVersion, msBuildId };
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ const ghDownloadHeaders = {
|
||||
Accept: 'application/octet-stream',
|
||||
};
|
||||
function getElectronVersion() {
|
||||
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, '.yarnrc'), 'utf8');
|
||||
const electronVersion = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
const msBuildId = /^ms_build_id "(.*)"$/m.exec(yarnrc)[1];
|
||||
const npmrc = fs.readFileSync(path.join(REPO_ROOT, '.npmrc'), 'utf8');
|
||||
const electronVersion = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
const msBuildId = /^ms_build_id="(.*)"$/m.exec(npmrc)[1];
|
||||
return { electronVersion, msBuildId };
|
||||
}
|
||||
function getSha(filename) {
|
||||
|
||||
@@ -38,9 +38,9 @@ interface IFetchOptions {
|
||||
}
|
||||
|
||||
function getElectronVersion(): Record<string, string> {
|
||||
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, '.yarnrc'), 'utf8');
|
||||
const electronVersion = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||
const msBuildId = /^ms_build_id "(.*)"$/m.exec(yarnrc)![1];
|
||||
const npmrc = fs.readFileSync(path.join(REPO_ROOT, '.npmrc'), 'utf8');
|
||||
const electronVersion = /^target="(.*)"$/m.exec(npmrc)![1];
|
||||
const msBuildId = /^ms_build_id="(.*)"$/m.exec(npmrc)![1];
|
||||
return { electronVersion, msBuildId };
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
// Complete list of directories where yarn should be executed to install node modules
|
||||
// Complete list of directories where npm should be executed to install node modules
|
||||
const dirs = [
|
||||
'',
|
||||
'build',
|
||||
@@ -51,6 +51,7 @@ const dirs = [
|
||||
'test/integration/browser',
|
||||
'test/monaco',
|
||||
'test/smoke',
|
||||
'.vscode/extensions/vscode-selfhost-import-aid',
|
||||
'.vscode/extensions/vscode-selfhost-test-provider',
|
||||
];
|
||||
|
||||
|
||||
Generated
+1321
File diff suppressed because it is too large
Load Diff
@@ -1,657 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@isaacs/cliui@^8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
|
||||
integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==
|
||||
dependencies:
|
||||
string-width "^5.1.2"
|
||||
string-width-cjs "npm:string-width@^4.2.0"
|
||||
strip-ansi "^7.0.1"
|
||||
strip-ansi-cjs "npm:strip-ansi@^6.0.1"
|
||||
wrap-ansi "^8.1.0"
|
||||
wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
|
||||
|
||||
"@npmcli/agent@^2.0.0":
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5"
|
||||
integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==
|
||||
dependencies:
|
||||
agent-base "^7.1.0"
|
||||
http-proxy-agent "^7.0.0"
|
||||
https-proxy-agent "^7.0.1"
|
||||
lru-cache "^10.0.1"
|
||||
socks-proxy-agent "^8.0.3"
|
||||
|
||||
"@npmcli/fs@^3.1.0":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726"
|
||||
integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==
|
||||
dependencies:
|
||||
semver "^7.3.5"
|
||||
|
||||
"@pkgjs/parseargs@^0.11.0":
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
|
||||
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
|
||||
|
||||
abbrev@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf"
|
||||
integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==
|
||||
|
||||
agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317"
|
||||
integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==
|
||||
dependencies:
|
||||
debug "^4.3.4"
|
||||
|
||||
aggregate-error@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
|
||||
integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
|
||||
dependencies:
|
||||
clean-stack "^2.0.0"
|
||||
indent-string "^4.0.0"
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-regex@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
|
||||
integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
ansi-styles@^6.1.0:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
|
||||
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
|
||||
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
|
||||
cacache@^18.0.0:
|
||||
version "18.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.3.tgz#864e2c18414e1e141ae8763f31e46c2cb96d1b21"
|
||||
integrity sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==
|
||||
dependencies:
|
||||
"@npmcli/fs" "^3.1.0"
|
||||
fs-minipass "^3.0.0"
|
||||
glob "^10.2.2"
|
||||
lru-cache "^10.0.1"
|
||||
minipass "^7.0.3"
|
||||
minipass-collect "^2.0.1"
|
||||
minipass-flush "^1.0.5"
|
||||
minipass-pipeline "^1.2.4"
|
||||
p-map "^4.0.0"
|
||||
ssri "^10.0.0"
|
||||
tar "^6.1.11"
|
||||
unique-filename "^3.0.0"
|
||||
|
||||
chownr@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
|
||||
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
|
||||
|
||||
clean-stack@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
|
||||
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
cross-spawn@^7.0.0:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
|
||||
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
||||
dependencies:
|
||||
path-key "^3.1.0"
|
||||
shebang-command "^2.0.0"
|
||||
which "^2.0.1"
|
||||
|
||||
debug@4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^4.3.4:
|
||||
version "4.3.5"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
|
||||
integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
eastasianwidth@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
|
||||
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
emoji-regex@^9.2.2:
|
||||
version "9.2.2"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||
|
||||
encoding@^0.1.13:
|
||||
version "0.1.13"
|
||||
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9"
|
||||
integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==
|
||||
dependencies:
|
||||
iconv-lite "^0.6.2"
|
||||
|
||||
env-paths@^2.2.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
|
||||
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
|
||||
|
||||
err-code@^2.0.2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
|
||||
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
|
||||
|
||||
exponential-backoff@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6"
|
||||
integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==
|
||||
|
||||
foreground-child@^3.1.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7"
|
||||
integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==
|
||||
dependencies:
|
||||
cross-spawn "^7.0.0"
|
||||
signal-exit "^4.0.1"
|
||||
|
||||
fs-minipass@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
|
||||
integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
fs-minipass@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54"
|
||||
integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
|
||||
glob@^10.2.2, glob@^10.3.10:
|
||||
version "10.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5"
|
||||
integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==
|
||||
dependencies:
|
||||
foreground-child "^3.1.0"
|
||||
jackspeak "^3.1.2"
|
||||
minimatch "^9.0.4"
|
||||
minipass "^7.1.2"
|
||||
package-json-from-dist "^1.0.0"
|
||||
path-scurry "^1.11.1"
|
||||
|
||||
graceful-fs@^4.2.6:
|
||||
version "4.2.10"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
||||
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
|
||||
|
||||
http-cache-semantics@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a"
|
||||
integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==
|
||||
|
||||
http-proxy-agent@^7.0.0:
|
||||
version "7.0.2"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e"
|
||||
integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==
|
||||
dependencies:
|
||||
agent-base "^7.1.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
https-proxy-agent@^7.0.1:
|
||||
version "7.0.5"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2"
|
||||
integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==
|
||||
dependencies:
|
||||
agent-base "^7.0.2"
|
||||
debug "4"
|
||||
|
||||
iconv-lite@^0.6.2:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
|
||||
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
|
||||
dependencies:
|
||||
safer-buffer ">= 2.1.2 < 3.0.0"
|
||||
|
||||
imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
|
||||
|
||||
indent-string@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
|
||||
integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
|
||||
|
||||
ip-address@^9.0.5:
|
||||
version "9.0.5"
|
||||
resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a"
|
||||
integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==
|
||||
dependencies:
|
||||
jsbn "1.1.0"
|
||||
sprintf-js "^1.1.3"
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
is-lambda@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
|
||||
integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==
|
||||
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||
|
||||
isexe@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d"
|
||||
integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==
|
||||
|
||||
jackspeak@^3.1.2:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a"
|
||||
integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==
|
||||
dependencies:
|
||||
"@isaacs/cliui" "^8.0.2"
|
||||
optionalDependencies:
|
||||
"@pkgjs/parseargs" "^0.11.0"
|
||||
|
||||
jsbn@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040"
|
||||
integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==
|
||||
|
||||
lru-cache@^10.0.1, lru-cache@^10.2.0:
|
||||
version "10.3.0"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.3.0.tgz#4a4aaf10c84658ab70f79a85a9a3f1e1fb11196b"
|
||||
integrity sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==
|
||||
|
||||
lru-cache@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
make-fetch-happen@^13.0.0:
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36"
|
||||
integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==
|
||||
dependencies:
|
||||
"@npmcli/agent" "^2.0.0"
|
||||
cacache "^18.0.0"
|
||||
http-cache-semantics "^4.1.1"
|
||||
is-lambda "^1.0.1"
|
||||
minipass "^7.0.2"
|
||||
minipass-fetch "^3.0.0"
|
||||
minipass-flush "^1.0.5"
|
||||
minipass-pipeline "^1.2.4"
|
||||
negotiator "^0.6.3"
|
||||
proc-log "^4.2.0"
|
||||
promise-retry "^2.0.1"
|
||||
ssri "^10.0.0"
|
||||
|
||||
minimatch@^9.0.4:
|
||||
version "9.0.5"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
|
||||
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minipass-collect@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863"
|
||||
integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
|
||||
minipass-fetch@^3.0.0:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c"
|
||||
integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
minipass-sized "^1.0.3"
|
||||
minizlib "^2.1.2"
|
||||
optionalDependencies:
|
||||
encoding "^0.1.13"
|
||||
|
||||
minipass-flush@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373"
|
||||
integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
minipass-pipeline@^1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c"
|
||||
integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
minipass-sized@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70"
|
||||
integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
minipass@^3.0.0:
|
||||
version "3.3.6"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a"
|
||||
integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
minipass@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
|
||||
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
|
||||
|
||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2:
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
|
||||
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
|
||||
|
||||
minizlib@^2.1.1, minizlib@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
|
||||
integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
yallist "^4.0.0"
|
||||
|
||||
mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
ms@2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
negotiator@^0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||
|
||||
node-gyp@^10.1.0:
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.1.0.tgz#75e6f223f2acb4026866c26a2ead6aab75a8ca7e"
|
||||
integrity sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==
|
||||
dependencies:
|
||||
env-paths "^2.2.0"
|
||||
exponential-backoff "^3.1.1"
|
||||
glob "^10.3.10"
|
||||
graceful-fs "^4.2.6"
|
||||
make-fetch-happen "^13.0.0"
|
||||
nopt "^7.0.0"
|
||||
proc-log "^3.0.0"
|
||||
semver "^7.3.5"
|
||||
tar "^6.1.2"
|
||||
which "^4.0.0"
|
||||
|
||||
nopt@^7.0.0:
|
||||
version "7.2.1"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7"
|
||||
integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==
|
||||
dependencies:
|
||||
abbrev "^2.0.0"
|
||||
|
||||
p-map@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"
|
||||
integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
|
||||
dependencies:
|
||||
aggregate-error "^3.0.0"
|
||||
|
||||
package-json-from-dist@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00"
|
||||
integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==
|
||||
|
||||
path-key@^3.1.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
|
||||
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
|
||||
|
||||
path-scurry@^1.11.1:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2"
|
||||
integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==
|
||||
dependencies:
|
||||
lru-cache "^10.2.0"
|
||||
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
|
||||
proc-log@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8"
|
||||
integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==
|
||||
|
||||
proc-log@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034"
|
||||
integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==
|
||||
|
||||
promise-retry@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22"
|
||||
integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==
|
||||
dependencies:
|
||||
err-code "^2.0.2"
|
||||
retry "^0.12.0"
|
||||
|
||||
retry@^0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
|
||||
integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==
|
||||
|
||||
"safer-buffer@>= 2.1.2 < 3.0.0":
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
semver@^7.3.5:
|
||||
version "7.5.4"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
|
||||
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
shebang-command@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
|
||||
dependencies:
|
||||
shebang-regex "^3.0.0"
|
||||
|
||||
shebang-regex@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
signal-exit@^4.0.1:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
|
||||
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
|
||||
|
||||
smart-buffer@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae"
|
||||
integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==
|
||||
|
||||
socks-proxy-agent@^8.0.3:
|
||||
version "8.0.4"
|
||||
resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c"
|
||||
integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==
|
||||
dependencies:
|
||||
agent-base "^7.1.1"
|
||||
debug "^4.3.4"
|
||||
socks "^2.8.3"
|
||||
|
||||
socks@^2.8.3:
|
||||
version "2.8.3"
|
||||
resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5"
|
||||
integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==
|
||||
dependencies:
|
||||
ip-address "^9.0.5"
|
||||
smart-buffer "^4.2.0"
|
||||
|
||||
sprintf-js@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a"
|
||||
integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==
|
||||
|
||||
ssri@^10.0.0:
|
||||
version "10.0.6"
|
||||
resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5"
|
||||
integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==
|
||||
dependencies:
|
||||
minipass "^7.0.3"
|
||||
|
||||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
string-width@^5.0.1, string-width@^5.1.2:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
|
||||
integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
|
||||
dependencies:
|
||||
eastasianwidth "^0.2.0"
|
||||
emoji-regex "^9.2.2"
|
||||
strip-ansi "^7.0.1"
|
||||
|
||||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
name strip-ansi-cjs
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
strip-ansi@^7.0.1:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
|
||||
integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
|
||||
dependencies:
|
||||
ansi-regex "^6.0.1"
|
||||
|
||||
tar@^6.1.11, tar@^6.1.2:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
|
||||
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
|
||||
dependencies:
|
||||
chownr "^2.0.0"
|
||||
fs-minipass "^2.0.0"
|
||||
minipass "^5.0.0"
|
||||
minizlib "^2.1.1"
|
||||
mkdirp "^1.0.3"
|
||||
yallist "^4.0.0"
|
||||
|
||||
unique-filename@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea"
|
||||
integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==
|
||||
dependencies:
|
||||
unique-slug "^4.0.0"
|
||||
|
||||
unique-slug@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3"
|
||||
integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==
|
||||
dependencies:
|
||||
imurmurhash "^0.1.4"
|
||||
|
||||
which@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
|
||||
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
which@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a"
|
||||
integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==
|
||||
dependencies:
|
||||
isexe "^3.1.1"
|
||||
|
||||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrap-ansi@^8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
|
||||
integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==
|
||||
dependencies:
|
||||
ansi-styles "^6.1.0"
|
||||
string-width "^5.0.1"
|
||||
strip-ansi "^7.0.1"
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
+65
-51
@@ -8,12 +8,19 @@ const path = require('path');
|
||||
const os = require('os');
|
||||
const cp = require('child_process');
|
||||
const { dirs } = require('./dirs');
|
||||
const { setupBuildYarnrc } = require('./setupBuildYarnrc');
|
||||
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
function log(dir, message) {
|
||||
if (process.stdout.isTTY) {
|
||||
console.log(`\x1b[34m[${dir}]\x1b[0m`, message);
|
||||
} else {
|
||||
console.log(`[${dir}]`, message);
|
||||
}
|
||||
}
|
||||
|
||||
function run(command, args, opts) {
|
||||
console.log('$ ' + command + ' ' + args.join(' '));
|
||||
log(opts.cwd || '.', '$ ' + command + ' ' + args.join(' '));
|
||||
|
||||
const result = cp.spawnSync(command, args, opts);
|
||||
|
||||
@@ -30,7 +37,7 @@ function run(command, args, opts) {
|
||||
* @param {string} dir
|
||||
* @param {*} [opts]
|
||||
*/
|
||||
function yarnInstall(dir, opts) {
|
||||
function npmInstall(dir, opts) {
|
||||
opts = {
|
||||
env: { ...process.env },
|
||||
...(opts ?? {}),
|
||||
@@ -39,88 +46,95 @@ function yarnInstall(dir, opts) {
|
||||
shell: true
|
||||
};
|
||||
|
||||
const raw = process.env['npm_config_argv'] || '{}';
|
||||
const argv = JSON.parse(raw);
|
||||
const original = argv.original || [];
|
||||
const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files');
|
||||
|
||||
if (opts.ignoreEngines) {
|
||||
args.push('--ignore-engines');
|
||||
delete opts.ignoreEngines;
|
||||
}
|
||||
const command = process.env['npm_command'] || 'install';
|
||||
|
||||
if (process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'] && /^(.build\/distro\/npm\/)?remote$/.test(dir)) {
|
||||
const userinfo = os.userInfo();
|
||||
console.log(`Installing dependencies in ${dir} inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
|
||||
log(dir, `Installing dependencies inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
|
||||
|
||||
opts.cwd = root;
|
||||
if (process.env['npm_config_arch'] === 'arm64') {
|
||||
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
|
||||
}
|
||||
run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/root/vscode`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/root/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
|
||||
run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${dir}/node_modules`], opts);
|
||||
run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/root/vscode`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/root/.netrc`, '-w', path.resolve('/root/vscode', dir), process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'sh', '-c', `\"chown -R root:root ${path.resolve('/root/vscode', dir)} && npm i -g node-gyp-build && npm ci\"`], opts);
|
||||
run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${path.resolve(root, dir)}`], opts);
|
||||
} else {
|
||||
console.log(`Installing dependencies in ${dir}...`);
|
||||
run(yarn, args, opts);
|
||||
log(dir, 'Installing dependencies...');
|
||||
run(npm, [command], opts);
|
||||
}
|
||||
}
|
||||
|
||||
function setNpmrcConfig(dir, env) {
|
||||
const npmrcPath = path.join(root, dir, '.npmrc');
|
||||
const lines = fs.readFileSync(npmrcPath, 'utf8').split('\n');
|
||||
|
||||
for (const line of lines) {
|
||||
const trimmedLine = line.trim();
|
||||
if (trimmedLine && !trimmedLine.startsWith('#')) {
|
||||
const [key, value] = trimmedLine.split('=');
|
||||
env[`npm_config_${key}`] = value.replace(/^"(.*)"$/, '$1');
|
||||
}
|
||||
}
|
||||
|
||||
if (dir === 'build') {
|
||||
env['npm_config_target'] = process.versions.node;
|
||||
env['npm_config_arch'] = process.arch;
|
||||
}
|
||||
}
|
||||
|
||||
for (let dir of dirs) {
|
||||
|
||||
if (dir === '') {
|
||||
// `yarn` already executed in root
|
||||
// already executed in root
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/^.build\/distro\/npm(\/?)/.test(dir)) {
|
||||
const ossPath = path.relative('.build/distro/npm', dir);
|
||||
const ossYarnRc = path.join(ossPath, '.yarnrc');
|
||||
|
||||
if (fs.existsSync(ossYarnRc)) {
|
||||
fs.cpSync(ossYarnRc, path.join(dir, '.yarnrc'));
|
||||
}
|
||||
}
|
||||
|
||||
let opts;
|
||||
|
||||
if (dir === 'build') {
|
||||
const env = { ...process.env };
|
||||
setupBuildYarnrc();
|
||||
opts = { env };
|
||||
if (process.env['CC']) { env['CC'] = 'gcc'; }
|
||||
if (process.env['CXX']) { env['CXX'] = 'g++'; }
|
||||
if (process.env['CXXFLAGS']) { env['CXXFLAGS'] = ''; }
|
||||
if (process.env['LDFLAGS']) { env['LDFLAGS'] = ''; }
|
||||
yarnInstall('build', opts);
|
||||
opts = {
|
||||
env: {
|
||||
...process.env
|
||||
},
|
||||
}
|
||||
if (process.env['CC']) { opts.env['CC'] = 'gcc'; }
|
||||
if (process.env['CXX']) { opts.env['CXX'] = 'g++'; }
|
||||
if (process.env['CXXFLAGS']) { opts.env['CXXFLAGS'] = ''; }
|
||||
if (process.env['LDFLAGS']) { opts.env['LDFLAGS'] = ''; }
|
||||
|
||||
setNpmrcConfig('build', opts.env);
|
||||
npmInstall('build', opts);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/^(.build\/distro\/npm\/)?remote$/.test(dir)) {
|
||||
// node modules used by vscode server
|
||||
const env = { ...process.env };
|
||||
opts = {
|
||||
env: {
|
||||
...process.env
|
||||
},
|
||||
}
|
||||
if (process.env['VSCODE_REMOTE_CC']) {
|
||||
env['CC'] = process.env['VSCODE_REMOTE_CC'];
|
||||
opts.env['CC'] = process.env['VSCODE_REMOTE_CC'];
|
||||
} else {
|
||||
delete env['CC'];
|
||||
delete opts.env['CC'];
|
||||
}
|
||||
if (process.env['VSCODE_REMOTE_CXX']) {
|
||||
env['CXX'] = process.env['VSCODE_REMOTE_CXX'];
|
||||
opts.env['CXX'] = process.env['VSCODE_REMOTE_CXX'];
|
||||
} else {
|
||||
delete env['CXX'];
|
||||
delete opts.env['CXX'];
|
||||
}
|
||||
if (process.env['CXXFLAGS']) { delete env['CXXFLAGS']; }
|
||||
if (process.env['CFLAGS']) { delete env['CFLAGS']; }
|
||||
if (process.env['LDFLAGS']) { delete env['LDFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_CXXFLAGS']) { env['CXXFLAGS'] = process.env['VSCODE_REMOTE_CXXFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_LDFLAGS']) { env['LDFLAGS'] = process.env['VSCODE_REMOTE_LDFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_NODE_GYP']) { env['npm_config_node_gyp'] = process.env['VSCODE_REMOTE_NODE_GYP']; }
|
||||
if (process.env['CXXFLAGS']) { delete opts.env['CXXFLAGS']; }
|
||||
if (process.env['CFLAGS']) { delete opts.env['CFLAGS']; }
|
||||
if (process.env['LDFLAGS']) { delete opts.env['LDFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_CXXFLAGS']) { opts.env['CXXFLAGS'] = process.env['VSCODE_REMOTE_CXXFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_LDFLAGS']) { opts.env['LDFLAGS'] = process.env['VSCODE_REMOTE_LDFLAGS']; }
|
||||
if (process.env['VSCODE_REMOTE_NODE_GYP']) { opts.env['npm_config_node_gyp'] = process.env['VSCODE_REMOTE_NODE_GYP']; }
|
||||
|
||||
opts = { env };
|
||||
} else if (/^extensions\//.test(dir)) {
|
||||
opts = { ignoreEngines: true };
|
||||
setNpmrcConfig('remote', opts.env);
|
||||
}
|
||||
|
||||
yarnInstall(dir, opts);
|
||||
npmInstall(dir, opts);
|
||||
}
|
||||
|
||||
cp.execSync('git config pull.rebase merges');
|
||||
|
||||
+15
-46
@@ -2,7 +2,6 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
let err = false;
|
||||
|
||||
const nodeVersion = /^(\d+)\.(\d+)\.(\d+)/.exec(process.versions.node);
|
||||
const majorNodeVersion = parseInt(nodeVersion[1]);
|
||||
@@ -12,48 +11,25 @@ const patchNodeVersion = parseInt(nodeVersion[3]);
|
||||
if (!process.env['VSCODE_SKIP_NODE_VERSION_CHECK']) {
|
||||
if (majorNodeVersion < 20) {
|
||||
console.error('\x1b[1;31m*** Please use latest Node.js v20 LTS for development.\x1b[0;0m');
|
||||
err = true;
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env['npm_execpath'].includes('yarn')) {
|
||||
console.error('\x1b[1;31m*** Seems like you are using `yarn` which is not supported in this repo any more, please use `npm i` instead. ***\x1b[0;0m');
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const cp = require('child_process');
|
||||
const yarnVersion = cp.execSync('yarn -v', { encoding: 'utf8' }).trim();
|
||||
const parsedYarnVersion = /^(\d+)\.(\d+)\.(\d+)/.exec(yarnVersion);
|
||||
const majorYarnVersion = parseInt(parsedYarnVersion[1]);
|
||||
const minorYarnVersion = parseInt(parsedYarnVersion[2]);
|
||||
const patchYarnVersion = parseInt(parsedYarnVersion[3]);
|
||||
|
||||
if (
|
||||
majorYarnVersion < 1 ||
|
||||
majorYarnVersion === 1 && (
|
||||
minorYarnVersion < 10 || (minorYarnVersion === 10 && patchYarnVersion < 1)
|
||||
) ||
|
||||
majorYarnVersion >= 2
|
||||
) {
|
||||
console.error('\x1b[1;31m*** Please use yarn >=1.10.1 and <2.\x1b[0;0m');
|
||||
err = true;
|
||||
}
|
||||
|
||||
if (!/yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) {
|
||||
console.error('\x1b[1;31m*** Please use yarn to install dependencies.\x1b[0;0m');
|
||||
err = true;
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
if (!hasSupportedVisualStudioVersion()) {
|
||||
console.error('\x1b[1;31m*** Invalid C/C++ Compiler Toolchain. Please check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites.\x1b[0;0m');
|
||||
err = true;
|
||||
throw new Error();
|
||||
}
|
||||
if (!err) {
|
||||
installHeaders();
|
||||
}
|
||||
}
|
||||
|
||||
if (err) {
|
||||
console.error('');
|
||||
process.exit(1);
|
||||
installHeaders();
|
||||
}
|
||||
|
||||
function hasSupportedVisualStudioVersion() {
|
||||
@@ -94,28 +70,21 @@ function hasSupportedVisualStudioVersion() {
|
||||
}
|
||||
|
||||
function installHeaders() {
|
||||
const yarn = 'yarn.cmd';
|
||||
const yarnResult = cp.spawnSync(yarn, ['install'], {
|
||||
cp.execSync(`npm.cmd ${process.env['npm_command'] || 'ci'}`, {
|
||||
env: process.env,
|
||||
cwd: path.join(__dirname, 'gyp'),
|
||||
stdio: 'inherit',
|
||||
shell: true
|
||||
stdio: 'inherit'
|
||||
});
|
||||
if (yarnResult.error || yarnResult.status !== 0) {
|
||||
console.error(`Installing node-gyp failed`);
|
||||
err = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// The node gyp package got installed using the above yarn command using the gyp/package.json
|
||||
// The node gyp package got installed using the above npm command using the gyp/package.json
|
||||
// file checked into our repository. So from that point it is save to construct the path
|
||||
// to that executable
|
||||
const node_gyp = path.join(__dirname, 'gyp', 'node_modules', '.bin', 'node-gyp.cmd');
|
||||
const result = cp.execFileSync(node_gyp, ['list'], { encoding: 'utf8', shell: true });
|
||||
const versions = new Set(result.split(/\n/g).filter(line => !line.startsWith('gyp info')).map(value => value));
|
||||
|
||||
const local = getHeaderInfo(path.join(__dirname, '..', '..', '.yarnrc'));
|
||||
const remote = getHeaderInfo(path.join(__dirname, '..', '..', 'remote', '.yarnrc'));
|
||||
const local = getHeaderInfo(path.join(__dirname, '..', '..', '.npmrc'));
|
||||
const remote = getHeaderInfo(path.join(__dirname, '..', '..', 'remote', '.npmrc'));
|
||||
|
||||
if (local !== undefined && !versions.has(local.target)) {
|
||||
// Both disturl and target come from a file checked into our repository
|
||||
@@ -136,11 +105,11 @@ function getHeaderInfo(rcFile) {
|
||||
const lines = fs.readFileSync(rcFile, 'utf8').split(/\r\n?/g);
|
||||
let disturl, target;
|
||||
for (const line of lines) {
|
||||
let match = line.match(/\s*disturl\s*\"(.*)\"\s*$/);
|
||||
let match = line.match(/\s*disturl=*\"(.*)\"\s*$/);
|
||||
if (match !== null && match.length >= 1) {
|
||||
disturl = match[1];
|
||||
}
|
||||
match = line.match(/\s*target\s*\"(.*)\"\s*$/);
|
||||
match = line.match(/\s*target=*\"(.*)\"\s*$/);
|
||||
if (match !== null && match.length >= 1) {
|
||||
target = match[1];
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// make sure we install the deps of build for the system installed
|
||||
// node, since that is the driver of gulp
|
||||
function setupBuildYarnrc() {
|
||||
const yarnrcPath = path.join(path.dirname(__dirname), '.yarnrc');
|
||||
const yarnrc = `disturl "https://nodejs.org/download/release"
|
||||
target "${process.versions.node}"
|
||||
runtime "node"
|
||||
arch "${process.arch}"`;
|
||||
|
||||
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
|
||||
}
|
||||
|
||||
exports.setupBuildYarnrc = setupBuildYarnrc;
|
||||
|
||||
if (require.main === module) {
|
||||
setupBuildYarnrc();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user