This commit is contained in:
Alex Dima 2022-02-02 13:18:12 +01:00
Родитель de1ae9e2cc
Коммит cab9713422
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 39563C1504FDD0C9
22 изменённых файлов: 2149 добавлений и 2117 удалений

Просмотреть файл

@ -1,8 +1,11 @@
**/build/*/**/*.js
**/dist/**/*.js
**/extensions/**/*.d.ts
**/extensions/**/build/**
**/extensions/**/colorize-fixtures/**
**/extensions/css-language-features/server/test/pathCompletionFixtures/**
**/extensions/html-language-features/server/lib/jquery.d.ts
**/extensions/html-language-features/server/src/test/pathCompletionFixtures/**
**/extensions/markdown-language-features/media/**
**/extensions/markdown-language-features/notebook-out/**
**/extensions/markdown-math/notebook-out/**
@ -12,21 +15,19 @@
**/extensions/vscode-api-tests/testWorkspace2/**
**/fixtures/**
**/node_modules/**
**/out-*/**/*.js
**/out-editor-*/**
**/out/**/*.js
**/src/**/dompurify.js
**/src/**/marked.js
**/src/**/semver.js
**/src/typings/**/*.d.ts
**/src/vs/*/**/*.d.ts
**/src/vs/base/test/common/filters.perf.data.js
**/src/vs/css.build.js
**/src/vs/css.js
**/src/vs/loader.js
**/src/vs/nls.build.js
**/src/vs/nls.js
**/test/unit/assert.js
**/typings/**
# todo - fix these
**/test/**/*.js
**/build/*/**/*.ts
**/scripts/**/*.js
**/extensions/search-result/syntaxes/generateTMLanguage.js

Просмотреть файл

@ -20,7 +20,7 @@ function getPlatform(product, os, arch, type) {
switch (os) {
case 'win32':
switch (product) {
case 'client':
case 'client': {
const asset = arch === 'ia32' ? 'win32' : `win32-${arch}`;
switch (type) {
case 'archive':
@ -32,6 +32,7 @@ function getPlatform(product, os, arch, type) {
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
}
case 'server':
if (arch === 'arm64') {
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);

Просмотреть файл

@ -35,7 +35,7 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
switch (os) {
case 'win32':
switch (product) {
case 'client':
case 'client': {
const asset = arch === 'ia32' ? 'win32' : `win32-${arch}`;
switch (type) {
case 'archive':
@ -47,6 +47,7 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
}
case 'server':
if (arch === 'arm64') {
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);

Просмотреть файл

@ -47,7 +47,7 @@ function main() {
case 'nls.metadata.header.json':
parsedJson = { header: parsedJson };
break;
case 'nls.metadata.json':
case 'nls.metadata.json': {
// put nls.metadata.json content in Core NlsMetadata format
const modules = Object.keys(parsedJson);
const json = {
@ -64,6 +64,7 @@ function main() {
}
parsedJson = json;
break;
}
}
key = 'vscode.' + file.relative.split('/')[0];
return { [key]: parsedJson };

Просмотреть файл

@ -65,7 +65,7 @@ function main(): Promise<void> {
parsedJson = { header: parsedJson };
break;
case 'nls.metadata.json':
case 'nls.metadata.json': {
// put nls.metadata.json content in Core NlsMetadata format
const modules = Object.keys(parsedJson);
@ -83,6 +83,7 @@ function main(): Promise<void> {
}
parsedJson = json;
break;
}
}
key = 'vscode.' + file.relative.split('/')[0];
return { [key]: parsedJson };

Просмотреть файл

@ -45,8 +45,8 @@ async function main() {
await fs.writeJson(productJsonPath, productJson);
// Verify if native module architecture is correct
const findOutput = await (0, cross_spawn_promise_1.spawn)('find', [outAppPath, '-name', 'keytar.node']);
const lipoOutput = await (0, cross_spawn_promise_1.spawn)('lipo', ['-archs', findOutput.replace(/\n$/, "")]);
if (lipoOutput.replace(/\n$/, "") !== 'x86_64 arm64') {
const lipoOutput = await (0, cross_spawn_promise_1.spawn)('lipo', ['-archs', findOutput.replace(/\n$/, '')]);
if (lipoOutput.replace(/\n$/, '') !== 'x86_64 arm64') {
throw new Error(`Invalid arch, got : ${lipoOutput}`);
}
}

Просмотреть файл

@ -51,10 +51,10 @@ async function main() {
await fs.writeJson(productJsonPath, productJson);
// Verify if native module architecture is correct
const findOutput = await spawn('find', [outAppPath, '-name', 'keytar.node'])
const lipoOutput = await spawn('lipo', ['-archs', findOutput.replace(/\n$/, "")]);
if (lipoOutput.replace(/\n$/, "") !== 'x86_64 arm64') {
throw new Error(`Invalid arch, got : ${lipoOutput}`)
const findOutput = await spawn('find', [outAppPath, '-name', 'keytar.node']);
const lipoOutput = await spawn('lipo', ['-archs', findOutput.replace(/\n$/, '')]);
if (lipoOutput.replace(/\n$/, '') !== 'x86_64 arm64') {
throw new Error(`Invalid arch, got : ${lipoOutput}`);
}
}

Просмотреть файл

@ -1,3 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Can be removed once https://github.com/electron/electron-rebuild/pull/703 is available.
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
@ -10,10 +14,12 @@ const packageJSON = require("../../package.json");
const get_1 = require("@electron/get");
const d = debug('libcxx-fetcher');
async function downloadLibcxxHeaders(outDir, electronVersion, lib_name) {
if (await fs.pathExists(path.resolve(outDir, 'include')))
if (await fs.pathExists(path.resolve(outDir, 'include'))) {
return;
if (!await fs.pathExists(outDir))
}
if (!await fs.pathExists(outDir)) {
await fs.mkdirp(outDir);
}
d(`downloading ${lib_name}_headers`);
const headers = await (0, get_1.downloadArtifact)({
version: electronVersion,
@ -25,10 +31,12 @@ async function downloadLibcxxHeaders(outDir, electronVersion, lib_name) {
}
exports.downloadLibcxxHeaders = downloadLibcxxHeaders;
async function downloadLibcxxObjects(outDir, electronVersion, targetArch = 'x64') {
if (await fs.pathExists(path.resolve(outDir, 'libc++.a')))
if (await fs.pathExists(path.resolve(outDir, 'libc++.a'))) {
return;
if (!await fs.pathExists(outDir))
}
if (!await fs.pathExists(outDir)) {
await fs.mkdirp(outDir);
}
d(`downloading libcxx-objects-linux-${targetArch}`);
const objects = await (0, get_1.downloadArtifact)({
version: electronVersion,

Просмотреть файл

@ -1,3 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Can be removed once https://github.com/electron/electron-rebuild/pull/703 is available.
'use strict';
@ -12,8 +17,12 @@ import { downloadArtifact } from '@electron/get';
const d = debug('libcxx-fetcher');
export async function downloadLibcxxHeaders(outDir: string, electronVersion: string, lib_name: string): Promise<void> {
if (await fs.pathExists(path.resolve(outDir, 'include'))) return;
if (!await fs.pathExists(outDir)) await fs.mkdirp(outDir);
if (await fs.pathExists(path.resolve(outDir, 'include'))) {
return;
}
if (!await fs.pathExists(outDir)) {
await fs.mkdirp(outDir);
}
d(`downloading ${lib_name}_headers`);
const headers = await downloadArtifact({
@ -27,8 +36,12 @@ export async function downloadLibcxxHeaders(outDir: string, electronVersion: str
}
export async function downloadLibcxxObjects(outDir: string, electronVersion: string, targetArch: string = 'x64'): Promise<void> {
if (await fs.pathExists(path.resolve(outDir, 'libc++.a'))) return;
if (!await fs.pathExists(outDir)) await fs.mkdirp(outDir);
if (await fs.pathExists(path.resolve(outDir, 'libc++.a'))) {
return;
}
if (!await fs.pathExists(outDir)) {
await fs.mkdirp(outDir);
}
d(`downloading libcxx-objects-linux-${targetArch}`);
const objects = await downloadArtifact({

Просмотреть файл

@ -1,3 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
const mappings = [

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -9,7 +9,7 @@ self.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
return './editor.worker.bundle.js';
}
}
};
window.instance = monaco.editor.create(document.getElementById('container'), {
value: [

Просмотреть файл

@ -52,7 +52,7 @@ async function run() {
console.error(`[esm-check] Response status ${response.status()} is not 200 .`);
process.exit(1);
}
console.log(`[esm-check] All appears good.`)
console.log(`[esm-check] All appears good.`);
await page.close();
await browser.close();

Просмотреть файл

@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// eslint-disable-next-line code-no-standalone-editor
import * as monaco from './out/vs/editor/editor.main.js';
monaco.editor.create(document.getElementById('container'), {

Просмотреть файл

@ -22,7 +22,7 @@ yaserver.createServer({
}, (err) => {
console.error(err);
process.exit(1);
})
});
});
});
@ -48,5 +48,5 @@ function runTest(browser) {
reject(code);
}
});
})
});
}

Просмотреть файл

@ -9,8 +9,8 @@ const WarningsToErrorsPlugin = require('warnings-to-errors-webpack-plugin');
module.exports = {
mode: 'production',
entry: {
"core": './core.js',
"editor.worker": '../../out-monaco-editor-core/esm/vs/editor/editor.worker.js',
'core': './core.js',
'editor.worker': '../../out-monaco-editor-core/esm/vs/editor/editor.worker.js',
},
output: {
globalObject: 'self',

Просмотреть файл

@ -50,12 +50,12 @@ const withReporter = (function () {
mochaFile: process.env.BUILD_ARTIFACTSTAGINGDIRECTORY ? path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${browserType}-${argv.tfs.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`) : undefined
}
});
}
};
}
} else {
return (_, runner) => applyReporter(runner, argv);
}
})()
})();
const outdir = argv.build ? 'out-build' : 'out';
const out = path.join(__dirname, `../../../${outdir}`);
@ -82,7 +82,7 @@ const testModules = (async function () {
} else {
// glob patterns (--glob)
const defaultGlob = '**/*.test.js';
const pattern = argv.run || defaultGlob
const pattern = argv.run || defaultGlob;
isDefaultModules = pattern === defaultGlob;
promise = new Promise((resolve, reject) => {
@ -90,7 +90,7 @@ const testModules = (async function () {
if (err) {
reject(err);
} else {
resolve(files)
resolve(files);
}
});
});
@ -107,7 +107,7 @@ const testModules = (async function () {
}
}
return modules;
})
});
})();
function consoleLogFn(msg) {
@ -136,7 +136,7 @@ async function runTestsInBrowser(testModules, browserType) {
const emitter = new events.EventEmitter();
await page.exposeFunction('mocha_report', (type, data1, data2) => {
emitter.emit(type, data1, data2)
emitter.emit(type, data1, data2);
});
page.on('console', async msg => {

Просмотреть файл

@ -56,7 +56,7 @@
['rmdir', 1],
].forEach((element) => {
intercept(element[0], element[1]);
})
});
})();
const { ipcRenderer } = require('electron');
@ -112,7 +112,7 @@ function createCoverageReport(opts) {
function loadWorkbenchTestingUtilsModule() {
return new Promise((resolve, reject) => {
loader.require(['vs/workbench/test/common/utils'], resolve, reject);
})
});
}
function loadTestModules(opts) {
@ -199,7 +199,7 @@ function loadTests(opts) {
});
});
});
})
});
}
function serializeSuite(suite) {

Просмотреть файл

@ -42,7 +42,7 @@ module.exports = class FullJsonStreamReporter extends BaseRunner {
writeEvent(['fail', test]);
});
}
}
};
function writeEvent(event) {
process.stdout.write(JSON.stringify(event) + '\n');

Просмотреть файл

@ -29,7 +29,7 @@ const excludeModules = [
'vs/platform/environment/test/node/nativeModules.test.js', // native modules are compiled against Electron and this test would fail with node.js
'vs/base/parts/storage/test/node/storage.test.js', // same as above, due to direct dependency to sqlite native module
'vs/platform/files/test/common/files.test.js' // TODO@bpasero enable once we ship Electron 16
]
];
/**
* @type {{ build: boolean; run: string; runGlob: string; coverage: boolean; help: boolean; }}

Просмотреть файл

@ -19,7 +19,7 @@ exports.importMochaReporter = name => {
const reporterPath = path.join(path.dirname(require.resolve('mocha')), 'lib', 'reporters', name);
return require(reporterPath);
}
};
exports.applyReporter = (runner, argv) => {
let Reporter;
@ -39,4 +39,4 @@ exports.applyReporter = (runner, argv) => {
reporterOptions = reporterOptions.reduce((r, o) => Object.assign(r, parseReporterOption(o)), {});
return new Reporter(runner, { reporterOptions });
}
};