Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f #7282

Merged
merged 3 commits into from Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .yarnrc
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "4.2.10"
target "6.0.9"
runtime "electron"
8 changes: 2 additions & 6 deletions build/azure-pipelines/exploration-build.yml
@@ -1,12 +1,8 @@
pool:
vmImage: 'Ubuntu-16.04'

trigger:
branches:
include: ['master']
pr:
branches:
include: ['master']
trigger: none
pr: none

steps:
- task: NodeTool@0
Expand Down
2 changes: 2 additions & 0 deletions build/gulpfile.editor.js
Expand Up @@ -45,6 +45,7 @@ var editorResources = [
'!out-build/vs/base/browser/ui/splitview/**/*',
'!out-build/vs/base/browser/ui/toolbar/**/*',
'!out-build/vs/base/browser/ui/octiconLabel/**/*',
'!out-build/vs/base/browser/ui/codiconLabel/**/*',
'!out-build/vs/workbench/**',
'!**/test/**'
];
Expand Down Expand Up @@ -91,6 +92,7 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
],
redirects: {
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
'vs/base/browser/ui/codiconLabel/codiconLabel': 'vs/base/browser/ui/codiconLabel/codiconLabel.mock',
},
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
Expand Down
3 changes: 1 addition & 2 deletions build/gulpfile.hygiene.js
Expand Up @@ -72,6 +72,7 @@ const indentationFilter = [

// except multiple specific folders
'!**/octicons/**',
'!**/codicon/**',
'!**/fixtures/**',
'!**/lib/**',
'!extensions/**/out/**',
Expand Down Expand Up @@ -381,8 +382,6 @@ function hygiene(some) {
const sqlTsl = es.through(function (file) { //TODO restore
const contents = file.contents.toString('utf8');
sqlTsLinter.lint(file.relative, contents, tslintSqlConfiguration.results);

this.emit('data', file);
});

const productJsonFilter = filter('product.json', { restore: true });
Expand Down
2 changes: 1 addition & 1 deletion build/gulpfile.vscode.js
Expand Up @@ -79,14 +79,14 @@ const vscodeResources = [
'out-build/vs/base/node/languagePacks.js',
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
'out-build/vs/base/browser/ui/codiconLabel/codicon/**',
'out-build/vs/workbench/browser/media/*-theme.css',
'out-build/vs/workbench/contrib/debug/**/*.json',
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
'out-build/vs/**/markdown.css',
'out-build/vs/workbench/contrib/tasks/**/*.json',
'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
'out-build/vs/platform/files/**/*.exe',
'out-build/vs/platform/files/**/*.md',
'out-build/vs/code/electron-browser/workbench/**',
Expand Down
151 changes: 6 additions & 145 deletions build/gulpfile.vscode.web.js
Expand Up @@ -6,150 +6,11 @@
'use strict';

const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
const common = require('./lib/optimize');
const product = require('../product.json');
const rename = require('gulp-rename');
const filter = require('gulp-filter');
const json = require('gulp-json-editor');
const _ = require('underscore');
const deps = require('./dependencies');
const vfs = require('vinyl-fs');
const packageJson = require('../package.json');
const { compileBuildTask } = require('./gulpfile.compile');

const REPO_ROOT = path.dirname(__dirname);
const commit = util.getVersion(REPO_ROOT);
const BUILD_ROOT = path.dirname(REPO_ROOT);
const WEB_FOLDER = path.join(REPO_ROOT, 'remote', 'web');
const noop = () => { return Promise.resolve(); };

const productionDependencies = deps.getProductionDependencies(WEB_FOLDER);

const nodeModules = Object.keys(product.dependencies || {})
.concat(_.uniq(productionDependencies.map(d => d.name)));

const vscodeWebResources = [

// Workbench
'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,html}',
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
'out-build/vs/**/markdown.css',

// Webview
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',

// Extension Worker
'out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js',

// Excludes
'!out-build/vs/**/{node,electron-browser,electron-main}/**',
'!out-build/vs/editor/standalone/**',
'!out-build/vs/workbench/**/*-tb.png',
'!**/test/**'
];

const buildfile = require('../src/buildfile');

const vscodeWebEntryPoints = [
buildfile.workbenchWeb,
buildfile.serviceWorker,
buildfile.workerExtensionHost,
buildfile.keyboardMaps,
buildfile.base
];

const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
util.rimraf('out-vscode-web'),
common.optimizeTask({
src: 'out-build',
entryPoints: _.flatten(vscodeWebEntryPoints),
otherSources: [],
resources: vscodeWebResources,
loaderConfig: common.loaderConfig(nodeModules),
out: 'out-vscode-web',
bundleInfo: undefined
})
));

const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
optimizeVSCodeWebTask,
util.rimraf('out-vscode-web-min'),
common.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
));
gulp.task(minifyVSCodeWebTask);

function packageTask(sourceFolderName, destinationFolderName) {
const destination = path.join(BUILD_ROOT, destinationFolderName);

return () => {
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
.pipe(filter(['**', '!**/*.js.map']));

const sources = es.merge(src);

let version = packageJson.version;
const quality = product.quality;

if (quality && quality !== 'stable') {
version += '-' + quality;
}

const name = product.nameShort;
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })
.pipe(json({ name, version }));

const date = new Date().toISOString();

const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json({ commit, date }));

const license = gulp.src(['remote/LICENSE'], { base: 'remote' });

const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(REPO_ROOT, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`, `!${d}/.bin/**`]));

const deps = gulp.src(dependenciesSrc, { base: 'remote/web', dot: true })
.pipe(filter(['**', '!**/package-lock.json']))
.pipe(util.cleanNodeModules(path.join(__dirname, '.nativeignore')));

const favicon = gulp.src('resources/server/favicon.ico', { base: 'resources/server' });

let all = es.merge(
packageJsonStream,
productJsonStream,
license,
sources,
deps,
favicon
);

let result = all
.pipe(util.skipDirectories())
.pipe(util.fixWin32DirectoryPermissions());

return result.pipe(vfs.dest(destination));
};
}

const dashed = (str) => (str ? `-${str}` : ``);

['', 'min'].forEach(minified => {
const sourceFolderName = `out-vscode-web${dashed(minified)}`;
const destinationFolderName = `vscode-web`;

const vscodeWebTaskCI = task.define(`vscode-web${dashed(minified)}-ci`, task.series(
minified ? minifyVSCodeWebTask : optimizeVSCodeWebTask,
util.rimraf(path.join(BUILD_ROOT, destinationFolderName)),
packageTask(sourceFolderName, destinationFolderName)
));
gulp.task(vscodeWebTaskCI);

const vscodeWebTask = task.define(`vscode-web${dashed(minified)}`, task.series(
compileBuildTask,
vscodeWebTaskCI
));
gulp.task(vscodeWebTask);
});
gulp.task('minify-vscode-web', noop);
gulp.task('vscode-web', noop);
gulp.task('vscode-web-min', noop);
gulp.task('vscode-web-ci', noop);
gulp.task('vscode-web-min-ci', noop);
2 changes: 1 addition & 1 deletion build/lib/i18n.js
Expand Up @@ -1086,7 +1086,7 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' });
this.queue(translatedMainFile);
for (let extension in extensionsPacks) {
const translatedExtFile = createI18nFile(`.build/extensions/${extension}`, extensionsPacks[extension]);
const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
this.queue(translatedExtFile);
const externalExtensionId = externalExtensions[extension];
if (externalExtensionId) {
Expand Down
12 changes: 12 additions & 0 deletions build/lib/i18n.resources.json
Expand Up @@ -106,6 +106,10 @@
"name": "vs/workbench/contrib/quickopen",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/userData",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/remote",
"project": "vscode-workbench"
Expand Down Expand Up @@ -182,6 +186,10 @@
"name": "vs/workbench/contrib/outline",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/userDataSync",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/actions",
"project": "vscode-workbench"
Expand Down Expand Up @@ -277,6 +285,10 @@
{
"name": "vs/workbench/services/notification",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/userData",
"project": "vscode-workbench"
}
]
}
2 changes: 1 addition & 1 deletion build/lib/i18n.ts
Expand Up @@ -1253,7 +1253,7 @@ export function prepareI18nPackFiles(externalExtensions: Map<string>, resultingT

this.queue(translatedMainFile);
for (let extension in extensionsPacks) {
const translatedExtFile = createI18nFile(`.build/extensions/${extension}`, extensionsPacks[extension]);
const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
this.queue(translatedExtFile);

const externalExtensionId = externalExtensions[extension];
Expand Down
2 changes: 1 addition & 1 deletion build/npm/preinstall.js
Expand Up @@ -31,4 +31,4 @@ if (!/yarn\.js$|yarnpkg$/.test(process.env['npm_execpath'])) {
if (err) {
console.error('');
process.exit(1);
}
}
52 changes: 0 additions & 52 deletions cglicenses.json
Expand Up @@ -46,58 +46,6 @@
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
},
{
// Reason: The npm module does not contain a repository field.
// waiting for https://github.com/xtermjs/xterm.js/issues/2395
"name": "xterm-addon-search",
"fullLicenseText": [
"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
"THE SOFTWARE."
]
},
{
// Reason: The npm module does not contain a repository field.
// waiting for https://github.com/xtermjs/xterm.js/issues/2395
"name": "xterm-addon-web-links",
"fullLicenseText": [
"Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
"THE SOFTWARE."
]
},
{
// Reason: The license at https://git.coolaj86.com/coolaj86/atob.js/src/branch/master/LICENSE
// cannot be found by the OSS tool automatically.
Expand Down
12 changes: 6 additions & 6 deletions cgmanifest.json
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "chromium",
"repositoryUrl": "https://chromium.googlesource.com/chromium/src",
"commitHash": "c6a08e5368de4352903e702cde750b33239a50ab"
"commitHash": "91f08db83c2ce8c722ddf0911ead8f7c473bedfa"
}
},
"licenseDetail": [
Expand Down Expand Up @@ -40,32 +40,32 @@
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
],
"isOnlyProductionDependency": true,
"version": "69.0.3497.128"
"version": "76.0.3809.146"
},
{
"component": {
"type": "git",
"git": {
"name": "nodejs",
"repositoryUrl": "https://github.com/nodejs/node",
"commitHash": "8c70b2084ce5f76ea1e3b3c4ccdeee4483fe338b"
"commitHash": "64219741218aa87e259cf8257596073b8e747f0a"
}
},
"isOnlyProductionDependency": true,
"version": "10.11.0"
"version": "12.4.0"
},
{
"component": {
"type": "git",
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "4e4c7527c63fcf27dffaeb58bde996b8d859c0ed"
"commitHash": "407747b48c47cdeed156a73dde1c47609470c95a"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "4.2.10"
"version": "6.0.9"
},
{
"component": {
Expand Down
Expand Up @@ -54,6 +54,7 @@ export class SettingsDocument {
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "name of the workspace folder the file is contained in (e.g. myFolder)")));
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)")));
completions.push(this.newSimpleCompletionItem('${appName}', range, localize('appName', "e.g. VS Code")));
completions.push(this.newSimpleCompletionItem('${remoteName}', range, localize('remoteName', "e.g. SSH")));
completions.push(this.newSimpleCompletionItem('${dirty}', range, localize('dirty', "a dirty indicator if the active editor is dirty")));
completions.push(this.newSimpleCompletionItem('${separator}', range, localize('separator', "a conditional separator (' - ') that only shows when surrounded by variables with values")));

Expand Down