Skip to content

Commit

Permalink
Merge branch 'main' into terminal-quickpick-index
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar authored Jun 21, 2022
2 parents 5761e83 + ebd5e3c commit 635bc9e
Show file tree
Hide file tree
Showing 415 changed files with 8,108 additions and 5,354 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@
**/src/vs/*/**/*.d.ts
**/src/vs/base/test/common/filters.perf.data.js
**/src/vs/loader.js
**/src/vs/nls.build.js
**/src/vs/nls.js
**/test/unit/assert.js
**/typings/**
16 changes: 8 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@
// - electron-browser
"when": "hasBrowser",
"allow": [
"vs/css!./**/*"
"vs/css!./**/*",
"@microsoft/applicationinsights-web"
]
},
{
Expand All @@ -220,15 +221,12 @@
// - electron-main
"when": "hasNode",
"allow": [
"@microsoft/applicationinsights-web",
"@parcel/watcher",
"@vscode/sqlite3",
"@vscode/vscode-languagedetection",
"@vscode/ripgrep",
"@vscode/iconv-lite-umd",
"applicationinsights",
"@microsoft/1ds-core-js",
"@microsoft/1ds-post-js",
"assert",
"child_process",
"console",
Expand Down Expand Up @@ -277,6 +275,7 @@
// imports that are allowed in all /test/ files
"when": "test",
"allow": [
"vs/css.build",
"assert",
"sinon",
"sinon-test"
Expand Down Expand Up @@ -331,7 +330,9 @@
"vs/base/~",
"vs/base/parts/*/~",
"vs/platform/*/~",
"tas-client-umd" // node module allowed even in /common/
"tas-client-umd", // node module allowed even in /common/
"@microsoft/1ds-core-js",// node module allowed even in /common/
"@microsoft/1ds-post-js" // node module allowed even in /common/
]
},
{
Expand Down Expand Up @@ -445,8 +446,7 @@
}, // TODO@layers
"tas-client-umd", // node module allowed even in /common/
"vscode-textmate", // node module allowed even in /common/
"@vscode/vscode-languagedetection", // node module allowed even in /common/
"@microsoft/applicationinsights-web" // node module allowed even in /common/
"@vscode/vscode-languagedetection" // node module allowed even in /common/
]
},
{
Expand Down Expand Up @@ -577,7 +577,7 @@
"restrictions": []
},
{
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.d.ts,nls.mock.ts}",
"target": "src/vs/{loader.d.ts,css.ts,css.build.ts,monaco.d.ts,nls.ts,nls.build.ts,nls.mock.ts}",
"restrictions": []
},
{
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: yarn --frozen-lockfile --network-timeout 180000

- name: Compile and Download
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64"

- name: Run Unit Tests
id: electron-unit-tests
Expand Down Expand Up @@ -114,9 +114,6 @@ jobs:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: yarn --frozen-lockfile --network-timeout 180000

- name: Download Playwright
run: yarn playwright-install

- name: Run Hygiene Checks
run: yarn gulp hygiene

Expand Down
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
target "18.3.3"
target "18.3.4"
runtime "electron"
build_from_source "true"
4 changes: 0 additions & 4 deletions build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ vscode-windows-ca-certs/**/*
node-addon-api/**/*
prebuild-install/**/*

@microsoft/applicationinsights*/**
@microsoft/dynamicproto-js/**
!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js

# other node modules

**/docs/**
Expand Down
3 changes: 0 additions & 3 deletions build/.webignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ xterm-addon-webgl/out/**
# This makes sure the model is included in the package
!@vscode/vscode-languagedetection/model/**

@microsoft/applicationinsights*/**
@microsoft/dynamicproto-js/**
!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js
35 changes: 17 additions & 18 deletions build/azure-pipelines/linux/product-build-linux-client-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,23 @@ steps:
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)
# TODO enable again after https://github.com/microsoft/vscode/issues/152143 is fixed
# - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
# - script: |
# set -e
# APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
# yarn smoketest-no-compile --tracing --build "$APP_PATH"
# timeoutInMinutes: 20
# displayName: Run smoke tests (Electron)

# - ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
# - script: |
# set -e
# yarn gulp compile-extension:vscode-test-resolver
# APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
# VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
# yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
# timeoutInMinutes: 20
# displayName: Run smoke tests (Remote)
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
yarn smoketest-no-compile --tracing --build "$APP_PATH"
timeoutInMinutes: 20
displayName: Run smoke tests (Electron)
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
yarn gulp compile-extension:vscode-test-resolver
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
displayName: Run smoke tests (Remote)
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
Expand Down
2 changes: 0 additions & 2 deletions build/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ module.exports.indentationFilter = [
'!**/LICENSE.{txt,rtf}',
'!LICENSES.chromium.html',
'!**/LICENSE',
'!src/vs/nls.js',
'!src/vs/nls.build.js',
'!src/vs/loader.js',
'!src/vs/base/browser/dompurify/*',
'!src/vs/base/common/marked/marked.js',
Expand Down
12 changes: 6 additions & 6 deletions build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ const editorEntryPoints = [
name: 'vs/editor/editor.main',
include: [],
exclude: ['vs/css', 'vs/nls'],
prepend: ['out-editor-build/vs/css.js', 'out-editor-build/vs/nls.js'],
prepend: [
{ path: 'out-editor-build/vs/css.js', amdModuleId: 'vs/css' },
{ path: 'out-editor-build/vs/nls.js', amdModuleId: 'vs/nls' }
],
},
{
name: 'vs/base/common/worker/simpleWorker',
include: ['vs/editor/common/services/editorSimpleWorker'],
exclude: ['vs/nls'],
prepend: ['vs/loader.js'],
append: ['vs/base/worker/workerMain'],
prepend: [{ path: 'vs/loader.js' }],
append: [{ path: 'vs/base/worker/workerMain' }],
dest: 'vs/base/worker/workerMain.js'
}
];
Expand Down Expand Up @@ -110,9 +113,6 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
'inlineEntryPoint:0.ts',
'inlineEntryPoint:1.ts',
'vs/loader.js',
'vs/nls.ts',
'vs/nls.build.js',
'vs/nls.d.ts',
'vs/base/worker/workerMain.ts',
],
renames: {
Expand Down
25 changes: 17 additions & 8 deletions build/lib/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ function bundle(entryPoints, config, callback) {
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
config.buildForceInvokeFactory['vs/nls'] = true;
config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);
loader(['require'], (localRequire) => {
const resolvePath = (path) => {
const r = localRequire.toUrl(path);
if (!/\.js/.test(r)) {
return r + '.js';
const resolvePath = (entry) => {
let r = localRequire.toUrl(entry.path);
if (!r.endsWith('.js')) {
r += '.js';
}
return r;
// avoid packaging the build version of plugins:
r = r.replace('vs/nls.build.js', 'vs/nls.js');
r = r.replace('vs/css.build.js', 'vs/css.js');
return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
Expand Down Expand Up @@ -330,10 +336,13 @@ function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend,
plugin.writeFile(pluginName, entryPoint, req, write, {});
}
});
const toIFile = (path) => {
const contents = readFileAndRemoveBOM(path);
const toIFile = (entry) => {
let contents = readFileAndRemoveBOM(entry.path);
if (entry.amdModuleId) {
contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
}
return {
path: path,
path: entry.path,
contents: contents
};
};
Expand Down
45 changes: 33 additions & 12 deletions build/lib/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ interface ILoaderPluginReqFunc {
toUrl(something: string): string;
}

export interface IExtraFile {
path: string;
amdModuleId?: string;
}

export interface IEntryPoint {
name: string;
include?: string[];
exclude?: string[];
prepend?: string[];
append?: string[];
prepend?: IExtraFile[];
append?: IExtraFile[];
dest?: string;
}

Expand Down Expand Up @@ -92,6 +97,13 @@ interface IPartialBundleResult {
export interface ILoaderConfig {
isBuild?: boolean;
paths?: { [path: string]: any };
/*
* Normally, during a build, no module factories are invoked. This can be used
* to forcefully execute a module's factory.
*/
buildForceInvokeFactory: {
[moduleId: string]: boolean;
};
}

/**
Expand Down Expand Up @@ -132,15 +144,21 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
config.buildForceInvokeFactory['vs/nls'] = true;
config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);

loader(['require'], (localRequire: any) => {
const resolvePath = (path: string) => {
const r = localRequire.toUrl(path);
if (!/\.js/.test(r)) {
return r + '.js';
const resolvePath = (entry: IExtraFile) => {
let r = localRequire.toUrl(entry.path);
if (!r.endsWith('.js')) {
r += '.js';
}
return r;
// avoid packaging the build version of plugins:
r = r.replace('vs/nls.build.js', 'vs/nls.js');
r = r.replace('vs/css.build.js', 'vs/css.js');
return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
Expand Down Expand Up @@ -403,8 +421,8 @@ function emitEntryPoint(
deps: IGraph,
entryPoint: string,
includedModules: string[],
prepend: string[],
append: string[],
prepend: IExtraFile[],
append: IExtraFile[],
dest: string | undefined
): IEmitEntryPointResult {
if (!dest) {
Expand Down Expand Up @@ -478,10 +496,13 @@ function emitEntryPoint(
}
});

const toIFile = (path: string): IFile => {
const contents = readFileAndRemoveBOM(path);
const toIFile = (entry: IExtraFile): IFile => {
let contents = readFileAndRemoveBOM(entry.path);
if (entry.amdModuleId) {
contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
}
return {
path: path,
path: entry.path,
contents: contents
};
};
Expand Down
Loading

0 comments on commit 635bc9e

Please sign in to comment.