Skip to content

Commit

Permalink
Merge commit '08a27fe3b331c7947def0c08092c688240198caf' into alex/asar
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Jan 29, 2018
2 parents a87eb48 + 08a27fe commit e4d6731
Show file tree
Hide file tree
Showing 4,620 changed files with 32,955 additions and 23,238 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"name": "VS Code API Tests (workspace)",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/extensions/vscode-api-tests/testWorkspace.code-workspace",
"${workspaceFolder}/extensions/vscode-api-tests/testworkspace.code-workspace",
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode-api-tests",
"--extensionTestsPath=${workspaceFolder}/extensions/vscode-api-tests/out/workspace-tests"
],
Expand Down
4 changes: 2 additions & 2 deletions build/builtInExtensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"name": "ms-vscode.node-debug",
"version": "1.20.6",
"version": "1.20.7",
"repo": "https://github.com/Microsoft/vscode-node-debug"
},
{
"name": "ms-vscode.node-debug2",
"version": "1.20.2",
"version": "1.20.3",
"repo": "https://github.com/Microsoft/vscode-node-debug2"
}
]
43 changes: 42 additions & 1 deletion extensions/configuration-editing/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
import * as vscode from 'vscode';
import { getLocation, visit, parse } from 'jsonc-parser';
import { getLocation, visit, parse, ParseError, ParseErrorCode } from 'jsonc-parser';
import * as path from 'path';
import { SettingsDocument } from './settingsDocumentHelper';

Expand Down Expand Up @@ -42,6 +42,47 @@ export function activate(context: vscode.ExtensionContext): void {
}
}, null, context.subscriptions));
updateLaunchJsonDecorations(vscode.window.activeTextEditor);

context.subscriptions.push(vscode.workspace.onWillSaveTextDocument(e => {
if (!e.document.fileName.endsWith('/settings.json')) {
return;
}

autoFixSettingsJSON(e);
}));
}

function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): void {
const document = willSaveEvent.document;
const text = document.getText();
const edit = new vscode.WorkspaceEdit();

let lastEndOfSomething = -1;
visit(text, {
onArrayEnd(offset: number, length: number): void {
lastEndOfSomething = offset + length;
},

onLiteralValue(value: any, offset: number, length: number): void {
lastEndOfSomething = offset + length;
},

onObjectEnd(offset: number, length: number): void {
lastEndOfSomething = offset + length;
},

onError(error: ParseErrorCode, offset: number, length: number): void {
if (error === ParseErrorCode.CommaExpected && lastEndOfSomething > -1) {
const errorPosition = document.positionAt(offset);

const fixPosition = document.positionAt(lastEndOfSomething);
edit.insert(document.uri, fixPosition, ',');
}
}
});

willSaveEvent.waitUntil(
vscode.workspace.applyEdit(edit));
}

function registerKeybindingsCompletions(): vscode.Disposable {
Expand Down
2 changes: 1 addition & 1 deletion extensions/emmet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
"@emmetio/html-matcher": "^0.3.3",
"@emmetio/css-parser": "ramya-rao-a/css-parser#vscode",
"@emmetio/math-expression": "^0.1.1",
"vscode-emmet-helper": "^1.1.21",
"vscode-emmet-helper": "^1.1.22",
"vscode-languageserver-types": "^3.5.0",
"image-size": "^0.5.2",
"vscode-nls": "3.1.2"
Expand Down
8 changes: 8 additions & 0 deletions extensions/emmet/src/abbreviationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen
return true;
}

// Fix for upstream issue https://github.com/emmetio/css-parser/issues/3
if (currentNode.type === 'property'
&& currentNode.parent
&& currentNode.parent.type !== 'rule'
&& currentNode.parent.type !== 'at-rule') {
return false;
}

// Fix for https://github.com/Microsoft/vscode/issues/34162
// Other than sass, stylus, we can make use of the terminator tokens to validate position
if (syntax !== 'sass' && syntax !== 'stylus' && currentNode.type === 'property') {
Expand Down
23 changes: 23 additions & 0 deletions extensions/emmet/src/test/cssAbbreviationAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,29 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
});
});

test('No emmet when cursor in selector of a rule (CSS)', () => {
const testContent = `
.foo {
margin: 10px;
}
nav#
`;

return withRandomFileEditor(testContent, 'css', (editor, doc) => {
editor.selection = new Selection(5, 4, 5, 4);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token);
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
});
});

test('Skip when typing property values when there is a property in the next line (CSS)', () => {
const testContent = `
.foo {
Expand Down
16 changes: 8 additions & 8 deletions extensions/emmet/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"@emmetio/stream-reader" "^2.2.0"
"@emmetio/stream-reader-utils" "^0.1.0"

"@emmetio/extract-abbreviation@^0.1.1":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.3.tgz#dc00bf488ddf86a2a82ca95fb2ccb575bd832f68"
"@emmetio/extract-abbreviation@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.4.tgz#f5be070db97901ecc37e5204f2ace68242cdcefa"

"@emmetio/html-matcher@^0.3.3":
version "0.3.3"
Expand Down Expand Up @@ -2052,11 +2052,11 @@ vinyl@~2.0.1:
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"

vscode-emmet-helper@^1.1.21:
version "1.1.21"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.21.tgz#4c77c2c5f5acc316d9a47cc564a51a732609ef7b"
vscode-emmet-helper@^1.1.22:
version "1.1.22"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.22.tgz#3ba407f98e60d1153a8f1ed073ccaaa2587d2771"
dependencies:
"@emmetio/extract-abbreviation" "^0.1.1"
"@emmetio/extract-abbreviation" "^0.1.4"
jsonc-parser "^1.0.0"
vscode-languageserver-types "^3.0.3"

Expand All @@ -2070,7 +2070,7 @@ vscode-languageserver-types@^3.5.0:

vscode-nls@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.0.tgz#a8a264c0d4bd3e1ed4746a9883235fec5b62968a"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.1.2.tgz#c1b63f4338ac49c852267633dd99717916424a74"

vscode@1.0.1:
version "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "Dependencies shared by all extensions",
"dependencies": {
"typescript": "2.7.0-insiders.20180119"
"typescript": "2.7.1-insiders.20180127"
},
"scripts": {
"postinstall": "node ./postinstall"
Expand Down
8 changes: 4 additions & 4 deletions extensions/rust/syntaxes/rust.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/zargony/atom-language-rust/commit/59893b659a6d674d0d1f6c4158d0f60cea20d190",
"version": "https://github.com/zargony/atom-language-rust/commit/179f449a69182cae4fcdf644d59d842b7e445f89",
"name": "Rust",
"scopeName": "source.rust",
"fileTypes": [
Expand Down Expand Up @@ -446,17 +446,17 @@
{
"comment": "Built-in macro",
"name": "support.function.builtin.rust",
"match": "\\b(macro_rules|format_args|env|option_env|concat_idents|concat|log_syntax|line|column|file|stringify|include|include_str|include_bytes|module_path|asm|cfg|trace_macros)!"
"match": "\\b(macro_rules|compile_error|format_args|env|option_env|concat_idents|concat|line|column|file|stringify|include|include_str|include_bytes|module_path|cfg)!"
},
{
"comment": "Core macro",
"name": "support.function.core.rust",
"match": "\\b(panic|assert|assert_eq|debug_assert|debug_assert_eq|try|write|writeln|unreachable|unimplemented)!"
"match": "\\b(panic|assert|assert_eq|assert_ne|debug_assert|debug_assert_eq|debug_assert_ne|try|write|writeln|unreachable|unimplemented)!"
},
{
"comment": "Standard library macro",
"name": "support.function.std.rust",
"match": "\\b(format|print|println|select|vec)!"
"match": "\\b(format|print|println|eprint|eprintln|select|vec)!"
},
{
"comment": "Logging macro",
Expand Down
6 changes: 3 additions & 3 deletions extensions/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# yarn lockfile v1


typescript@2.7.0-insiders.20180119:
version "2.7.0-insiders.20180119"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.0-insiders.20180119.tgz#556c59eaabb0758dd1a2f0b0602a355746d33277"
typescript@2.7.1-insiders.20180127:
version "2.7.1-insiders.20180127"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1-insiders.20180127.tgz#db1f0d903e86c0867ec5c6e04ef10ded9ad9399b"
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"exampleExtension": "示例"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"activeEditorShort": "文件名 (例如 myFile.txt)",
"activeEditorMedium": "相对于工作区文件夹的文件路径 (例如 myFolder/myFile.txt)",
"activeEditorLong": "文件的完整路径 (例如 /Users/Development/myProject/myFolder/myFile.txt)",
Expand Down
12 changes: 7 additions & 5 deletions i18n/chs/extensions/css/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"css.title": "CSS",
"css.lint.argumentsInColorFunction.desc": "参数数量无效",
"css.lint.boxModel.desc": "使用边距或边框时,不要使用宽度或高度",
Expand Down
12 changes: 7 additions & 5 deletions i18n/chs/extensions/emmet/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"command.wrapWithAbbreviation": "使用缩写包围",
"command.wrapIndividualLinesWithAbbreviation": "输入缩写包围个别行",
"command.removeTag": "移除标签",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"httpsRequired": "图像必须使用 HTTPS 协议。",
"svgsNotValid": "SVG 不是有效的图像源。",
"embeddedSvgsNotValid": "嵌入的 SVG 不是有效的图像源。",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"languageSpecificEditorSettings": "特定语言编辑器设置",
"languageSpecificEditorSettingsDescription": "替代语言编辑器设置"
}
12 changes: 7 additions & 5 deletions i18n/chs/extensions/git/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"command.clone": "克隆",
"command.init": "初始化存储库",
"command.close": "关闭存储库",
Expand Down
12 changes: 7 additions & 5 deletions i18n/chs/extensions/grunt/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"config.grunt.autoDetect": "控制自动检测 Grunt 任务是否打开。默认开启。"
}
12 changes: 7 additions & 5 deletions i18n/chs/extensions/gulp/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"config.gulp.autoDetect": "控制自动检测 Gulp 任务是否打开。默认开启。"
}
12 changes: 7 additions & 5 deletions i18n/chs/extensions/html/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"html.format.enable.desc": "启用/禁用默认 HTML 格式化程序",
"html.format.wrapLineLength.desc": "每行最大字符数(0 = 禁用)。",
"html.format.unformatted.desc": "以逗号分隔的标记列表不应重设格式。\"null\" 默认为所有列于 https://www.w3.org/TR/html5/dom.html#phrasing-content 的标记。",
Expand Down
Loading

0 comments on commit e4d6731

Please sign in to comment.