Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into joao/markers-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Oct 12, 2018
2 parents 9ef5f08 + 6636ad9 commit ee0a369
Show file tree
Hide file tree
Showing 477 changed files with 4,181 additions and 4,584 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ Do not add your issue as a comment to an existing issue unless it's for the iden

The more information you can provide, the more likely someone will be successful at reproducing the issue and finding a fix.

The built-in tool for reporting an issue, which you can access by using `Report Issue` in VS Code's Help menu, can help streamline this process by automatically providing the version of VS Code, all your installed extensions, and your system info. Additionally, the tool will search among existing issues to see if a similar issue already exists.

Please include the following with each issue:

* Version of VS Code

* List of extensions that you have installed.
* **Tip:** You can easily add the list of extensions by creating the issue using `Report Issues` from VS Code's Help menu

* Reproducible steps (1... 2... 3...) that cause the issue

Expand Down
21 changes: 14 additions & 7 deletions build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var editorEntryPoints = [
name: 'vs/editor/editor.main',
include: [],
exclude: ['vs/css', 'vs/nls'],
prepend: ['out-build/vs/css.js', 'out-build/vs/nls.js'],
prepend: ['out-editor-build/vs/css.js', 'out-editor-build/vs/nls.js'],
},
{
name: 'vs/base/common/worker/simpleWorker',
Expand Down Expand Up @@ -79,16 +79,21 @@ gulp.task('extract-editor-src', ['clean-editor-src'], function () {
apiusages,
extrausages
],
typings: [
'typings/lib.ie11_safe_es6.d.ts',
'typings/thenable.d.ts',
'typings/es6-promise.d.ts',
'typings/require-monaco.d.ts',
'vs/monaco.d.ts'
],
libs: [
`lib.d.ts`,
`lib.es2015.collection.d.ts`
`lib.es5.d.ts`,
`lib.dom.d.ts`,
`lib.webworker.importscripts.d.ts`
],
redirects: {
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
},
compilerOptions: {
module: 2, // ModuleKind.AMD
},
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /^vs\/css!/,
destRoot: path.join(root, 'out-editor-src')
Expand All @@ -108,6 +113,8 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-editor-build'],
loaderConfig: {
paths: {
'vs': 'out-editor-build/vs',
'vs/css': 'out-editor-build/vs/css.build',
'vs/nls': 'out-editor-build/vs/nls.build',
'vscode': 'empty:'
}
},
Expand All @@ -125,7 +132,7 @@ gulp.task('clean-editor-esm', util.rimraf('out-editor-esm'));
gulp.task('extract-editor-esm', ['clean-editor-esm', 'clean-editor-distro', 'extract-editor-src'], function () {
standalone.createESMSourcesAndResources2({
srcFolder: './out-editor-src',
outFolder: './out-editor-esm/src',
outFolder: './out-editor-esm',
outResourcesFolder: './out-monaco-editor-core/esm',
ignores: [
'inlineEntryPoint:0.ts',
Expand Down
8 changes: 6 additions & 2 deletions build/lib/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ function bundle(entryPoints, config, callback) {
var loader = loaderModule.exports;
config.isBuild = true;
config.paths = config.paths || {};
config.paths['vs/nls'] = 'out-build/vs/nls.build';
config.paths['vs/css'] = 'out-build/vs/css.build';
if (!config.paths['vs/nls']) {
config.paths['vs/nls'] = 'out-build/vs/nls.build';
}
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
loader.config(config);
loader(['require'], function (localRequire) {
var resolvePath = function (path) {
Expand Down
8 changes: 6 additions & 2 deletions build/lib/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
const loader: any = loaderModule.exports;
config.isBuild = true;
config.paths = config.paths || {};
config.paths['vs/nls'] = 'out-build/vs/nls.build';
config.paths['vs/css'] = 'out-build/vs/css.build';
if (!config.paths['vs/nls']) {
config.paths['vs/nls'] = 'out-build/vs/nls.build';
}
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
loader.config(config);

loader(['require'], (localRequire: any) => {
Expand Down
26 changes: 17 additions & 9 deletions build/lib/compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,31 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var gulp = require("gulp");
var tsb = require("gulp-tsb");
var es = require("event-stream");
var watch = require('./watch');
var nls = require("./nls");
var util = require("./util");
var reporter_1 = require("./reporter");
var path = require("path");
var fs = require("fs");
var gulp = require("gulp");
var bom = require("gulp-bom");
var sourcemaps = require("gulp-sourcemaps");
var tsb = require("gulp-tsb");
var path = require("path");
var _ = require("underscore");
var monacodts = require("../monaco/api");
var fs = require("fs");
var nls = require("./nls");
var reporter_1 = require("./reporter");
var util = require("./util");
var watch = require('./watch');
var assign = require("object-assign");
var reporter = reporter_1.createReporter();
function getTypeScriptCompilerOptions(src) {
var rootDir = path.join(__dirname, "../../" + src);
var options = require("../../" + src + "/tsconfig.json").compilerOptions;
var tsconfig = require("../../" + src + "/tsconfig.json");
var options;
if (tsconfig.extends) {
options = assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
}
else {
options = tsconfig.compilerOptions;
}
options.verbose = false;
options.sourceMap = true;
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
Expand Down
25 changes: 16 additions & 9 deletions build/lib/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,32 @@

'use strict';

import * as gulp from 'gulp';
import * as tsb from 'gulp-tsb';
import * as es from 'event-stream';
const watch = require('./watch');
import * as nls from './nls';
import * as util from './util';
import { createReporter } from './reporter';
import * as path from 'path';
import * as fs from 'fs';
import * as gulp from 'gulp';
import * as bom from 'gulp-bom';
import * as sourcemaps from 'gulp-sourcemaps';
import * as tsb from 'gulp-tsb';
import * as path from 'path';
import * as _ from 'underscore';
import * as monacodts from '../monaco/api';
import * as fs from 'fs';
import * as nls from './nls';
import { createReporter } from './reporter';
import * as util from './util';
const watch = require('./watch');
import assign = require('object-assign');

const reporter = createReporter();

function getTypeScriptCompilerOptions(src: string) {
const rootDir = path.join(__dirname, `../../${src}`);
const options = require(`../../${src}/tsconfig.json`).compilerOptions;
const tsconfig = require(`../../${src}/tsconfig.json`);
let options: { [key: string]: any };
if (tsconfig.extends) {
options = assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
} else {
options = tsconfig.compilerOptions;
}
options.verbose = false;
options.sourceMap = true;
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry
Expand Down
4 changes: 0 additions & 4 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
"name": "vs/workbench/parts/logs",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/parts/navigation",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/parts/output",
"project": "vscode-workbench"
Expand Down
23 changes: 9 additions & 14 deletions build/lib/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ function writeFile(filePath, contents) {
fs.writeFileSync(filePath, contents);
}
function extractEditor(options) {
var tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
tsConfig.compilerOptions.noUnusedLocals = false;
tsConfig.compilerOptions.preserveConstEnums = false;
tsConfig.compilerOptions.declaration = false;
delete tsConfig.compilerOptions.types;
tsConfig.exclude = [];
options.compilerOptions = tsConfig.compilerOptions;
var result = tss.shake(options);
for (var fileName in result) {
if (result.hasOwnProperty(fileName)) {
Expand Down Expand Up @@ -73,25 +80,16 @@ function extractEditor(options) {
}
}
}
var tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
tsConfig.compilerOptions.noUnusedLocals = false;
tsConfig.compilerOptions.preserveConstEnums = false;
tsConfig.compilerOptions.declaration = false;
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
[
'vs/css.build.js',
'vs/css.d.ts',
'vs/css.js',
'vs/loader.js',
'vs/monaco.d.ts',
'vs/nls.build.js',
'vs/nls.d.ts',
'vs/nls.js',
'vs/nls.mock.ts',
'typings/lib.ie11_safe_es6.d.ts',
'typings/thenable.d.ts',
'typings/es6-promise.d.ts',
'typings/require.d.ts',
].forEach(copyFile);
}
exports.extractEditor = extractEditor;
Expand All @@ -102,7 +100,7 @@ function createESMSourcesAndResources2(options) {
var getDestAbsoluteFilePath = function (file) {
var dest = options.renames[file.replace(/\\/g, '/')] || file;
if (dest === 'tsconfig.json') {
return path.join(OUT_FOLDER, "../tsconfig.json");
return path.join(OUT_FOLDER, "tsconfig.json");
}
if (/\.ts$/.test(dest)) {
return path.join(OUT_FOLDER, dest);
Expand All @@ -117,11 +115,8 @@ function createESMSourcesAndResources2(options) {
}
if (file === 'tsconfig.json') {
var tsConfig = JSON.parse(fs.readFileSync(path.join(SRC_FOLDER, file)).toString());
tsConfig.compilerOptions.moduleResolution = undefined;
tsConfig.compilerOptions.baseUrl = undefined;
tsConfig.compilerOptions.module = 'es6';
tsConfig.compilerOptions.rootDir = 'src';
tsConfig.compilerOptions.outDir = path.relative(path.dirname(OUT_FOLDER), OUT_RESOURCES_FOLDER);
tsConfig.compilerOptions.outDir = path.join(path.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs');
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
continue;
}
Expand Down
25 changes: 11 additions & 14 deletions build/lib/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ function writeFile(filePath: string, contents: Buffer | string): void {
}

export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: string }): void {
const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
tsConfig.compilerOptions.noUnusedLocals = false;
tsConfig.compilerOptions.preserveConstEnums = false;
tsConfig.compilerOptions.declaration = false;
delete tsConfig.compilerOptions.types;
tsConfig.exclude = [];

options.compilerOptions = tsConfig.compilerOptions;

let result = tss.shake(options);
for (let fileName in result) {
if (result.hasOwnProperty(fileName)) {
Expand Down Expand Up @@ -79,26 +88,17 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
}
}

const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
tsConfig.compilerOptions.noUnusedLocals = false;
tsConfig.compilerOptions.preserveConstEnums = false;
tsConfig.compilerOptions.declaration = false;
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));

[
'vs/css.build.js',
'vs/css.d.ts',
'vs/css.js',
'vs/loader.js',
'vs/monaco.d.ts',
'vs/nls.build.js',
'vs/nls.d.ts',
'vs/nls.js',
'vs/nls.mock.ts',
'typings/lib.ie11_safe_es6.d.ts',
'typings/thenable.d.ts',
'typings/es6-promise.d.ts',
'typings/require.d.ts',
].forEach(copyFile);
}

Expand All @@ -118,7 +118,7 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
const getDestAbsoluteFilePath = (file: string): string => {
let dest = options.renames[file.replace(/\\/g, '/')] || file;
if (dest === 'tsconfig.json') {
return path.join(OUT_FOLDER, `../tsconfig.json`);
return path.join(OUT_FOLDER, `tsconfig.json`);
}
if (/\.ts$/.test(dest)) {
return path.join(OUT_FOLDER, dest);
Expand All @@ -136,11 +136,8 @@ export function createESMSourcesAndResources2(options: IOptions2): void {

if (file === 'tsconfig.json') {
const tsConfig = JSON.parse(fs.readFileSync(path.join(SRC_FOLDER, file)).toString());
tsConfig.compilerOptions.moduleResolution = undefined;
tsConfig.compilerOptions.baseUrl = undefined;
tsConfig.compilerOptions.module = 'es6';
tsConfig.compilerOptions.rootDir = 'src';
tsConfig.compilerOptions.outDir = path.relative(path.dirname(OUT_FOLDER), OUT_RESOURCES_FOLDER);
tsConfig.compilerOptions.outDir = path.join(path.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs');
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
continue;
}
Expand Down
Loading

0 comments on commit ee0a369

Please sign in to comment.