Skip to content

Commit ee0a369

Browse files
committed
Merge remote-tracking branch 'origin/master' into joao/markers-tree
2 parents 9ef5f08 + 6636ad9 commit ee0a369

File tree

477 files changed

+4181
-4584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+4181
-4584
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ Do not add your issue as a comment to an existing issue unless it's for the iden
4848

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

51+
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.
52+
5153
Please include the following with each issue:
5254

5355
* Version of VS Code
5456

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

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

build/gulpfile.editor.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var editorEntryPoints = [
2828
name: 'vs/editor/editor.main',
2929
include: [],
3030
exclude: ['vs/css', 'vs/nls'],
31-
prepend: ['out-build/vs/css.js', 'out-build/vs/nls.js'],
31+
prepend: ['out-editor-build/vs/css.js', 'out-editor-build/vs/nls.js'],
3232
},
3333
{
3434
name: 'vs/base/common/worker/simpleWorker',
@@ -79,16 +79,21 @@ gulp.task('extract-editor-src', ['clean-editor-src'], function () {
7979
apiusages,
8080
extrausages
8181
],
82+
typings: [
83+
'typings/lib.ie11_safe_es6.d.ts',
84+
'typings/thenable.d.ts',
85+
'typings/es6-promise.d.ts',
86+
'typings/require-monaco.d.ts',
87+
'vs/monaco.d.ts'
88+
],
8289
libs: [
83-
`lib.d.ts`,
84-
`lib.es2015.collection.d.ts`
90+
`lib.es5.d.ts`,
91+
`lib.dom.d.ts`,
92+
`lib.webworker.importscripts.d.ts`
8593
],
8694
redirects: {
8795
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
8896
},
89-
compilerOptions: {
90-
module: 2, // ModuleKind.AMD
91-
},
9297
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
9398
importIgnorePattern: /^vs\/css!/,
9499
destRoot: path.join(root, 'out-editor-src')
@@ -108,6 +113,8 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-editor-build'],
108113
loaderConfig: {
109114
paths: {
110115
'vs': 'out-editor-build/vs',
116+
'vs/css': 'out-editor-build/vs/css.build',
117+
'vs/nls': 'out-editor-build/vs/nls.build',
111118
'vscode': 'empty:'
112119
}
113120
},
@@ -125,7 +132,7 @@ gulp.task('clean-editor-esm', util.rimraf('out-editor-esm'));
125132
gulp.task('extract-editor-esm', ['clean-editor-esm', 'clean-editor-distro', 'extract-editor-src'], function () {
126133
standalone.createESMSourcesAndResources2({
127134
srcFolder: './out-editor-src',
128-
outFolder: './out-editor-esm/src',
135+
outFolder: './out-editor-esm',
129136
outResourcesFolder: './out-monaco-editor-core/esm',
130137
ignores: [
131138
'inlineEntryPoint:0.ts',

build/lib/bundle.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ function bundle(entryPoints, config, callback) {
3232
var loader = loaderModule.exports;
3333
config.isBuild = true;
3434
config.paths = config.paths || {};
35-
config.paths['vs/nls'] = 'out-build/vs/nls.build';
36-
config.paths['vs/css'] = 'out-build/vs/css.build';
35+
if (!config.paths['vs/nls']) {
36+
config.paths['vs/nls'] = 'out-build/vs/nls.build';
37+
}
38+
if (!config.paths['vs/css']) {
39+
config.paths['vs/css'] = 'out-build/vs/css.build';
40+
}
3741
loader.config(config);
3842
loader(['require'], function (localRequire) {
3943
var resolvePath = function (path) {

build/lib/bundle.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
123123
const loader: any = loaderModule.exports;
124124
config.isBuild = true;
125125
config.paths = config.paths || {};
126-
config.paths['vs/nls'] = 'out-build/vs/nls.build';
127-
config.paths['vs/css'] = 'out-build/vs/css.build';
126+
if (!config.paths['vs/nls']) {
127+
config.paths['vs/nls'] = 'out-build/vs/nls.build';
128+
}
129+
if (!config.paths['vs/css']) {
130+
config.paths['vs/css'] = 'out-build/vs/css.build';
131+
}
128132
loader.config(config);
129133

130134
loader(['require'], (localRequire: any) => {

build/lib/compilation.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@
44
*--------------------------------------------------------------------------------------------*/
55
'use strict';
66
Object.defineProperty(exports, "__esModule", { value: true });
7-
var gulp = require("gulp");
8-
var tsb = require("gulp-tsb");
97
var es = require("event-stream");
10-
var watch = require('./watch');
11-
var nls = require("./nls");
12-
var util = require("./util");
13-
var reporter_1 = require("./reporter");
14-
var path = require("path");
8+
var fs = require("fs");
9+
var gulp = require("gulp");
1510
var bom = require("gulp-bom");
1611
var sourcemaps = require("gulp-sourcemaps");
12+
var tsb = require("gulp-tsb");
13+
var path = require("path");
1714
var _ = require("underscore");
1815
var monacodts = require("../monaco/api");
19-
var fs = require("fs");
16+
var nls = require("./nls");
17+
var reporter_1 = require("./reporter");
18+
var util = require("./util");
19+
var watch = require('./watch');
20+
var assign = require("object-assign");
2021
var reporter = reporter_1.createReporter();
2122
function getTypeScriptCompilerOptions(src) {
2223
var rootDir = path.join(__dirname, "../../" + src);
23-
var options = require("../../" + src + "/tsconfig.json").compilerOptions;
24+
var tsconfig = require("../../" + src + "/tsconfig.json");
25+
var options;
26+
if (tsconfig.extends) {
27+
options = assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
28+
}
29+
else {
30+
options = tsconfig.compilerOptions;
31+
}
2432
options.verbose = false;
2533
options.sourceMap = true;
2634
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry

build/lib/compilation.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,32 @@
55

66
'use strict';
77

8-
import * as gulp from 'gulp';
9-
import * as tsb from 'gulp-tsb';
108
import * as es from 'event-stream';
11-
const watch = require('./watch');
12-
import * as nls from './nls';
13-
import * as util from './util';
14-
import { createReporter } from './reporter';
15-
import * as path from 'path';
9+
import * as fs from 'fs';
10+
import * as gulp from 'gulp';
1611
import * as bom from 'gulp-bom';
1712
import * as sourcemaps from 'gulp-sourcemaps';
13+
import * as tsb from 'gulp-tsb';
14+
import * as path from 'path';
1815
import * as _ from 'underscore';
1916
import * as monacodts from '../monaco/api';
20-
import * as fs from 'fs';
17+
import * as nls from './nls';
18+
import { createReporter } from './reporter';
19+
import * as util from './util';
20+
const watch = require('./watch');
21+
import assign = require('object-assign');
2122

2223
const reporter = createReporter();
2324

2425
function getTypeScriptCompilerOptions(src: string) {
2526
const rootDir = path.join(__dirname, `../../${src}`);
26-
const options = require(`../../${src}/tsconfig.json`).compilerOptions;
27+
const tsconfig = require(`../../${src}/tsconfig.json`);
28+
let options: { [key: string]: any };
29+
if (tsconfig.extends) {
30+
options = assign({}, require(path.join(rootDir, tsconfig.extends)).compilerOptions, tsconfig.compilerOptions);
31+
} else {
32+
options = tsconfig.compilerOptions;
33+
}
2734
options.verbose = false;
2835
options.sourceMap = true;
2936
if (process.env['VSCODE_NO_SOURCEMAP']) { // To be used by developers in a hurry

build/lib/i18n.resources.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@
7878
"name": "vs/workbench/parts/logs",
7979
"project": "vscode-workbench"
8080
},
81-
{
82-
"name": "vs/workbench/parts/navigation",
83-
"project": "vscode-workbench"
84-
},
8581
{
8682
"name": "vs/workbench/parts/output",
8783
"project": "vscode-workbench"

build/lib/standalone.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ function writeFile(filePath, contents) {
2727
fs.writeFileSync(filePath, contents);
2828
}
2929
function extractEditor(options) {
30+
var tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
31+
tsConfig.compilerOptions.noUnusedLocals = false;
32+
tsConfig.compilerOptions.preserveConstEnums = false;
33+
tsConfig.compilerOptions.declaration = false;
34+
delete tsConfig.compilerOptions.types;
35+
tsConfig.exclude = [];
36+
options.compilerOptions = tsConfig.compilerOptions;
3037
var result = tss.shake(options);
3138
for (var fileName in result) {
3239
if (result.hasOwnProperty(fileName)) {
@@ -73,25 +80,16 @@ function extractEditor(options) {
7380
}
7481
}
7582
}
76-
var tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
77-
tsConfig.compilerOptions.noUnusedLocals = false;
78-
tsConfig.compilerOptions.preserveConstEnums = false;
79-
tsConfig.compilerOptions.declaration = false;
8083
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
8184
[
8285
'vs/css.build.js',
8386
'vs/css.d.ts',
8487
'vs/css.js',
8588
'vs/loader.js',
86-
'vs/monaco.d.ts',
8789
'vs/nls.build.js',
8890
'vs/nls.d.ts',
8991
'vs/nls.js',
9092
'vs/nls.mock.ts',
91-
'typings/lib.ie11_safe_es6.d.ts',
92-
'typings/thenable.d.ts',
93-
'typings/es6-promise.d.ts',
94-
'typings/require.d.ts',
9593
].forEach(copyFile);
9694
}
9795
exports.extractEditor = extractEditor;
@@ -102,7 +100,7 @@ function createESMSourcesAndResources2(options) {
102100
var getDestAbsoluteFilePath = function (file) {
103101
var dest = options.renames[file.replace(/\\/g, '/')] || file;
104102
if (dest === 'tsconfig.json') {
105-
return path.join(OUT_FOLDER, "../tsconfig.json");
103+
return path.join(OUT_FOLDER, "tsconfig.json");
106104
}
107105
if (/\.ts$/.test(dest)) {
108106
return path.join(OUT_FOLDER, dest);
@@ -117,11 +115,8 @@ function createESMSourcesAndResources2(options) {
117115
}
118116
if (file === 'tsconfig.json') {
119117
var tsConfig = JSON.parse(fs.readFileSync(path.join(SRC_FOLDER, file)).toString());
120-
tsConfig.compilerOptions.moduleResolution = undefined;
121-
tsConfig.compilerOptions.baseUrl = undefined;
122118
tsConfig.compilerOptions.module = 'es6';
123-
tsConfig.compilerOptions.rootDir = 'src';
124-
tsConfig.compilerOptions.outDir = path.relative(path.dirname(OUT_FOLDER), OUT_RESOURCES_FOLDER);
119+
tsConfig.compilerOptions.outDir = path.join(path.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs');
125120
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
126121
continue;
127122
}

build/lib/standalone.ts

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ function writeFile(filePath: string, contents: Buffer | string): void {
3131
}
3232

3333
export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: string }): void {
34+
const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
35+
tsConfig.compilerOptions.noUnusedLocals = false;
36+
tsConfig.compilerOptions.preserveConstEnums = false;
37+
tsConfig.compilerOptions.declaration = false;
38+
delete tsConfig.compilerOptions.types;
39+
tsConfig.exclude = [];
40+
41+
options.compilerOptions = tsConfig.compilerOptions;
42+
3443
let result = tss.shake(options);
3544
for (let fileName in result) {
3645
if (result.hasOwnProperty(fileName)) {
@@ -79,26 +88,17 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
7988
}
8089
}
8190

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

8893
[
8994
'vs/css.build.js',
9095
'vs/css.d.ts',
9196
'vs/css.js',
9297
'vs/loader.js',
93-
'vs/monaco.d.ts',
9498
'vs/nls.build.js',
9599
'vs/nls.d.ts',
96100
'vs/nls.js',
97101
'vs/nls.mock.ts',
98-
'typings/lib.ie11_safe_es6.d.ts',
99-
'typings/thenable.d.ts',
100-
'typings/es6-promise.d.ts',
101-
'typings/require.d.ts',
102102
].forEach(copyFile);
103103
}
104104

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

137137
if (file === 'tsconfig.json') {
138138
const tsConfig = JSON.parse(fs.readFileSync(path.join(SRC_FOLDER, file)).toString());
139-
tsConfig.compilerOptions.moduleResolution = undefined;
140-
tsConfig.compilerOptions.baseUrl = undefined;
141139
tsConfig.compilerOptions.module = 'es6';
142-
tsConfig.compilerOptions.rootDir = 'src';
143-
tsConfig.compilerOptions.outDir = path.relative(path.dirname(OUT_FOLDER), OUT_RESOURCES_FOLDER);
140+
tsConfig.compilerOptions.outDir = path.join(path.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs');
144141
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
145142
continue;
146143
}

0 commit comments

Comments
 (0)