Skip to content

Commit 66d9c92

Browse files
committed
Merge branches 'master' and 'master' of https://github.com/Microsoft/vscode
2 parents 8911045 + f1989c5 commit 66d9c92

File tree

191 files changed

+4646
-3422
lines changed

Some content is hidden

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

191 files changed

+4646
-3422
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
environment:
2-
ELECTRON_RUN_AS_NODE: 1
2+
ATOM_SHELL_INTERNAL_RUN_AS_NODE: 1
33

44
install:
55
- ps: Install-Product node 4.1.1 x64

build/gulpfile.common.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ var File = require('vinyl');
1515
var underscore = require('underscore');
1616
var bundle = require('./lib/bundle');
1717
var util = require('./lib/util');
18+
var root = path.dirname(__dirname);
19+
var commit = util.getVersion(root);
1820

1921
var tsOptions = {
2022
target: 'ES5',
@@ -243,6 +245,9 @@ exports.minifyTask = function (src, addSourceMapsComment) {
243245
.pipe(minifyCSS())
244246
.pipe(cssFilter.restore)
245247
.pipe(sourcemaps.write('./', {
248+
sourceMappingURL: function (file) {
249+
return 'https://ticino.blob.core.windows.net/sourcemaps/' + commit + '/' + file.relative + '.map';
250+
},
246251
sourceRoot: null,
247252
includeContent: true,
248253
addComment: addSourceMapsComment

build/gulpfile.vscode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
9595
}));
9696

9797
gulp.task('clean-minified-vscode', util.rimraf('out-vscode-min'));
98-
gulp.task('minify-vscode', ['clean-minified-vscode', 'optimize-vscode'], common.minifyTask('out-vscode', false));
98+
gulp.task('minify-vscode', ['clean-minified-vscode', 'optimize-vscode'], common.minifyTask('out-vscode', true));
9999

100100
// Package
101101
var product = require('../product.json');
@@ -341,7 +341,7 @@ gulp.task('vscode-linux-packages', ['vscode-linux-ia32-build-deb', 'vscode-linux
341341

342342
// Sourcemaps
343343

344-
gulp.task('vscode-sourcemaps', ['minify-vscode'], function () {
344+
gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], function () {
345345
return gulp.src('out-vscode-min/**/*.map')
346346
.pipe(azure.upload({
347347
account: process.env.AZURE_STORAGE_ACCOUNT,

extensions/json/src/jsonMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function activate(context: ExtensionContext) {
3030
// The server is implemented in node
3131
let serverModule = context.asAbsolutePath(path.join('server', 'out', 'server.js'));
3232
// The debug options for the server
33-
let debugOptions = { execArgv: ["--nolazy", "--debug=6004"] };
33+
let debugOptions = { execArgv: ['--nolazy', '--debug=6004'] };
3434

3535
// If the extension is launch in debug mode the debug server options are use
3636
// Otherwise the run options are used
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"account": "monacobuild",
33
"container": "debuggers",
4-
"zip": "e740544/node-debug.zip",
4+
"zip": "9105842/node-debug.zip",
55
"output": ""
66
}

extensions/powershell/powershell.configuration.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
["(", ")"]
1010
]
1111

12-
/*
13-
enhancedBrackets: [
14-
{ tokenType:'string', openTrigger: '"', open: /@"$/, closeComplete: '"@' },
15-
{ tokenType:'string', openTrigger: '\'', open: /@'$/, closeComplete: '\'@' },
16-
{ tokenType:'string', openTrigger: '"', open: /"$/, closeComplete: '"' },
17-
{ tokenType: 'string', openTrigger: '\'', open: /'$/, closeComplete: '\'' }
18-
],
12+
// enhancedBrackets: [
13+
// { tokenType:'string', openTrigger: '"', open: /@"$/, closeComplete: '"@' },
14+
// { tokenType:'string', openTrigger: '\'', open: /@'$/, closeComplete: '\'@' },
15+
// { tokenType:'string', openTrigger: '"', open: /"$/, closeComplete: '"' },
16+
// { tokenType: 'string', openTrigger: '\'', open: /'$/, closeComplete: '\'' }
17+
// ],
1918

20-
autoClosingPairs: [['{', '}'], ['[', ']'], ['(', ')']], // Defined explicitly, to suppress the
21-
// default auto-closing of ' and " which is
22-
// override above by enhancedBrackets
23-
*/
19+
// autoClosingPairs: [['{', '}'], ['[', ']'], ['(', ')']], // Defined explicitly, to suppress the
20+
// // default auto-closing of ' and " which is
21+
// // override above by enhancedBrackets
2422
}

extensions/shellscript/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
"languages": [{
88
"id": "shellscript",
99
"aliases": ["Shell Script (Bash)", "shellscript"],
10-
"extensions": [".sh", ".bash", ".zsh", ".bashrc", ".bash_profile", ".bash_login", ".profile", ".bash_logout"],
10+
"extensions": [".sh", ".bash", ".bashrc", ".bash_profile", ".bash_login", ".profile", ".bash_logout", ".zsh", ".zshrc"],
1111
"firstLine": "^#!.*\\b(bash|zsh|sh|tcsh)|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",
12-
"configuration": "./shellscript.configuration.json"
12+
"configuration": "./shellscript.configuration.json",
13+
"mimetypes": ["text/x-shellscript"]
1314
}],
1415
"grammars": [{
1516
"language": "shellscript",

extensions/sql/sql.configuration.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
["[", "]"],
99
["(", ")"]
1010
]
11-
/*
12-
enhancedBrackets:[
13-
{ openTrigger: 'n', open: /begin$/i, closeComplete: 'end', matchCase: true },
14-
{ openTrigger: 'e', open: /case$/i, closeComplete: 'end', matchCase: true },
15-
{ openTrigger: 'n', open: /when$/i, closeComplete: 'then', matchCase: true }
16-
],
17-
noindentBrackets: '()',
18-
*/
11+
12+
// enhancedBrackets:[
13+
// { openTrigger: 'n', open: /begin$/i, closeComplete: 'end', matchCase: true },
14+
// { openTrigger: 'e', open: /case$/i, closeComplete: 'end', matchCase: true },
15+
// { openTrigger: 'n', open: /when$/i, closeComplete: 'then', matchCase: true }
16+
// ],
17+
// noindentBrackets: '()',
1918
}

extensions/typescript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@
5656
],
5757
"configuration": {
5858
"type": "object",
59-
"title": "TypeScript configuration",
59+
"title": "%configuration.typescript%",
6060
"properties": {
6161
"typescript.useCodeSnippetsOnMethodSuggest": {
6262
"type": "boolean",
6363
"default": false,
64-
"description": "Complete functions with their parameter signature."
64+
"description": "%typescript.useCodeSnippetsOnMethodSuggest.dec%"
6565
},
6666
"typescript.tsdk": {
6767
"type": ["string", "null"],
6868
"default": null,
69-
"description": "Specifies the folder path containing the tsserver and lib*.d.ts files to use."
69+
"description": "%typescript.tsdk.desc%"
7070
}
7171
}
7272
},
@@ -78,7 +78,7 @@
7878
"commands": [
7979
{
8080
"command": "typescript.reloadProjects",
81-
"title": "Reload Projects",
81+
"title": "%typescript.reloadProjects.title%",
8282
"category": "TypeScript"
8383
}
8484
],
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"typescript.reloadProjects.title": "Reload Project",
3+
"configuration.typescript": "TypeScript configuration",
4+
"typescript.useCodeSnippetsOnMethodSuggest.dec": "Complete functions with their parameter signature.",
5+
"typescript.tsdk.desc": "Specifies the folder path containing the tsserver and lib*.d.ts files to use."
6+
}

extensions/typescript/src/utils/electron.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function generatePatchedEnv(env:any, stdInPipeName:string, stdOutPipeName:string
4747

4848
newEnv['STDIN_PIPE_NAME'] = stdInPipeName;
4949
newEnv['STDOUT_PIPE_NAME'] = stdOutPipeName;
50-
newEnv['ELECTRON_RUN_AS_NODE'] = '1';
50+
newEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1';
5151

5252
return newEnv;
5353
}

extensions/typescript/src/utils/electronForkStart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var stdOutPipeName = process.env['STDOUT_PIPE_NAME'];
2929

3030
log('STDIN_PIPE_NAME: ' + stdInPipeName);
3131
log('STDOUT_PIPE_NAME: ' + stdOutPipeName);
32-
log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
32+
log('ATOM_SHELL_INTERNAL_RUN_AS_NODE: ' + process.env['ATOM_SHELL_INTERNAL_RUN_AS_NODE']);
3333

3434
// stdout redirection to named pipe
3535
(function() {
@@ -134,7 +134,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
134134
// Unset the custom environmental variables that should not get inherited
135135
delete process.env['STDIN_PIPE_NAME'];
136136
delete process.env['STDOUT_PIPE_NAME'];
137-
delete process.env['ELECTRON_RUN_AS_NODE'];
137+
delete process.env['ATOM_SHELL_INTERNAL_RUN_AS_NODE'];
138138

139139
require(program);
140140

extensions/xml/xml.configuration.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"brackets": [
77
["<", ">"]
88
]
9-
/*
10-
enhancedBrackets: [{
11-
tokenType: 'tag.tag-$1.xml',
12-
openTrigger: '>',
13-
open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
14-
closeComplete: '</$1>',
15-
closeTrigger: '>',
16-
close: /<\/(\w[\w\d]*)\s*>$/i
17-
}],
189

19-
autoClosingPairs: [['\'', '\''], ['"', '"'] ]
20-
*/
10+
// enhancedBrackets: [{
11+
// tokenType: 'tag.tag-$1.xml',
12+
// openTrigger: '>',
13+
// open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
14+
// closeComplete: '</$1>',
15+
// closeTrigger: '>',
16+
// close: /<\/(\w[\w\d]*)\s*>$/i
17+
// }],
18+
19+
// autoClosingPairs: [['\'', '\''], ['"', '"'] ]
20+
2121
}

extensions/xml/xsl.configuration.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
"brackets": [
77
["<", ">"]
88
]
9-
/*
10-
enhancedBrackets: [{
11-
tokenType: 'tag.tag-$1.xml',
12-
openTrigger: '>',
13-
open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
14-
closeComplete: '</$1>',
15-
closeTrigger: '>',
16-
close: /<\/(\w[\w\d]*)\s*>$/i
17-
}],
189

19-
autoClosingPairs: [['\'', '\''], ['"', '"'] ]
20-
*/
10+
// enhancedBrackets: [{
11+
// tokenType: 'tag.tag-$1.xml',
12+
// openTrigger: '>',
13+
// open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
14+
// closeComplete: '</$1>',
15+
// closeTrigger: '>',
16+
// close: /<\/(\w[\w\d]*)\s*>$/i
17+
// }],
18+
19+
// autoClosingPairs: [['\'', '\''], ['"', '"'] ]
2120
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"glob": "^5.0.13",
4747
"gulp": "^3.8.9",
4848
"gulp-atom-electron": "^1.4.0",
49-
"gulp-azure-storage": "^0.3.0",
49+
"gulp-azure-storage": "^0.6.0",
5050
"gulp-bom": "^1.0.0",
5151
"gulp-buffer": "0.0.2",
5252
"gulp-concat": "^2.6.0",

resources/darwin/bin/code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ function realpath() { python -c "import os,sys; print os.path.realpath(sys.argv[
77
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
88
ELECTRON="$CONTENTS/MacOS/Electron"
99
CLI="$CONTENTS/Resources/app/out/cli.js"
10-
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
10+
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
1111
exit $?

resources/linux/bin/code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ NAME="@@NAME@@"
77
VSCODE_PATH="/usr/share/$NAME"
88
ELECTRON="$VSCODE_PATH/$NAME"
99
CLI="$VSCODE_PATH/resources/app/out/cli.js"
10-
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
10+
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
1111
exit $?

resources/win32/bin/code.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
22
setlocal
33
set VSCODE_DEV=
4-
set ELECTRON_RUN_AS_NODE=1
4+
set ATOM_SHELL_INTERNAL_RUN_AS_NODE=1
55
"%~dp0..\\Code.exe" "%~dp0code.js" %*
66
endlocal

resources/win32/bin/code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
delete process.env['ELECTRON_RUN_AS_NODE'];
1+
delete process.env['ATOM_SHELL_INTERNAL_RUN_AS_NODE'];
22
require('child_process').spawn(require('path').resolve(__dirname, '..', 'Code.exe'), process.argv.slice(2), { detached: true, stdio: 'ignore' });
33
process.exit(0);

scripts/test.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
22

3-
set ELECTRON_RUN_AS_NODE=1
3+
set ATOM_SHELL_INTERNAL_RUN_AS_NODE=1
44

55
pushd %~dp0\..
66
.\.build\electron\electron.exe .\node_modules\mocha\bin\_mocha %*

scripts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ fi
1010

1111
# Unit Tests
1212
if [[ "$OSTYPE" == "darwin"* ]]; then
13-
cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \
13+
cd $ROOT ; ulimit -n 4096 ; ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 \
1414
./.build/electron/Electron.app/Contents/MacOS/Electron \
1515
node_modules/mocha/bin/_mocha $*
1616
else
17-
cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \
17+
cd $ROOT ; ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 \
1818
./.build/electron/electron \
1919
node_modules/mocha/bin/_mocha $*
2020
fi

src/main.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ function getNLSConfiguration() {
2424
}
2525

2626
if (locale === 'pseudo') {
27-
return { availableLanguages: {}, pseudo: true }
27+
return { locale: locale, availableLanguages: {}, pseudo: true }
2828
}
29+
locale = locale || app.getLocale();
30+
var initialLocale = locale;
2931
if (process.env.VSCODE_DEV) {
30-
return { availableLanguages: {} };
32+
return { locale: locale, availableLanguages: {} };
3133
}
3234
// We have a built version so we have extracted nls file. Try to find
3335
// the right file to use.
34-
locale = locale || app.getLocale();
3536
while (locale) {
3637
var candidate = path.join(__dirname, 'main.nls.') + locale + '.js';
3738
if (fs.existsSync(candidate)) {
38-
return { availableLanguages: { '*': locale } };
39+
return { locale: initialLocale, availableLanguages: { '*': locale } };
3940
} else {
4041
var index = locale.lastIndexOf('-');
4142
if (index > 0) {
@@ -46,7 +47,7 @@ function getNLSConfiguration() {
4647
}
4748
}
4849

49-
return { availableLanguages: {} };
50+
return { locale: initialLocale, availableLanguages: {} };
5051
}
5152

5253
// Change cwd if given via env variable

src/typings/node.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ declare module "os" {
496496
export function freemem(): number;
497497
export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[];
498498
export function networkInterfaces(): any;
499+
export function homedir(): string;
499500
export var EOL: string;
500501
}
501502

src/vs/base/browser/keyboardEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
"use strict";
6+
'use strict';
77

88
import * as Platform from 'vs/base/common/platform';
99
import * as Browser from 'vs/base/browser/browser';

src/vs/base/common/keyCodes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
"use strict";
6+
'use strict';
77

88
import * as nls from 'vs/nls';
99
import * as defaultPlatform from 'vs/base/common/platform';
@@ -561,10 +561,10 @@ export class Keybinding {
561561
private static _cachedKeybindingRegex: string = null;
562562
public static getUserSettingsKeybindingRegex(): string {
563563
if (!this._cachedKeybindingRegex) {
564-
let numpadKey = "numpad(0|1|2|3|4|5|6|7|8|9|_multiply|_add|_subtract|_decimal|_divide|_separator)";
565-
let oemKey = "`|\\-|=|\\[|\\]|\\\\\\\\|;|'|,|\\.|\\/|oem_8|oem_102";
566-
let specialKey = "left|up|right|down|pageup|pagedown|end|home|tab|enter|escape|space|backspace|delete|pausebreak|capslock|insert|contextmenu|numlock|scrolllock";
567-
let casualKey = "[a-z]|[0-9]|f(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19)";
564+
let numpadKey = 'numpad(0|1|2|3|4|5|6|7|8|9|_multiply|_add|_subtract|_decimal|_divide|_separator)';
565+
let oemKey = '`|\\-|=|\\[|\\]|\\\\\\\\|;|\'|,|\\.|\\/|oem_8|oem_102';
566+
let specialKey = 'left|up|right|down|pageup|pagedown|end|home|tab|enter|escape|space|backspace|delete|pausebreak|capslock|insert|contextmenu|numlock|scrolllock';
567+
let casualKey = '[a-z]|[0-9]|f(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19)';
568568
let key = '((' + [numpadKey, oemKey, specialKey, casualKey].join(')|(') + '))';
569569
let mod = '((ctrl|shift|alt|cmd|win|meta)\\+)*';
570570
let keybinding = '(' + mod + key + ')';

0 commit comments

Comments
 (0)