chore(vscode): update to 1.56.0

This commit is contained in:
Akash Satheesan
2021-04-30 20:25:17 +05:30
1749 changed files with 88014 additions and 43316 deletions

View File

@@ -1,5 +1,5 @@
{
"extends": "../../shared.tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"resolveJsonModule": true,
"outDir": "./out"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -8,6 +8,7 @@
"engines": {
"vscode": "^1.0.0"
},
"icon": "images/icon.png",
"activationEvents": [
"onLanguage:json",
"onLanguage:jsonc"
@@ -22,6 +23,12 @@
"jsonc-parser": "^2.2.1",
"vscode-nls": "^4.1.1"
},
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"languages": [
{

View File

@@ -33,3 +33,28 @@ export function provideInstalledExtensionProposals(existing: string[], additiona
return undefined;
}
export function provideWorkspaceTrustExtensionProposals(existing: string[], range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
if (Array.isArray(existing)) {
const extensions = vscode.extensions.all.filter(e => e.packageJSON.main);
const extensionProposals = extensions.filter(e => existing.indexOf(e.id) === -1);
if (extensionProposals.length) {
return extensionProposals.map(e => {
const item = new vscode.CompletionItem(e.id);
const insertText = `"${e.id}": {\n\t"supported": false,\n\t"version": "${e.packageJSON.version}"\n}`;
item.kind = vscode.CompletionItemKind.Value;
item.insertText = insertText;
item.range = range;
item.filterText = insertText;
return item;
});
} else {
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
example.insertText = '"vscode.csharp: {\n\t"supported": false,\n\t"version": "0.0.0"\n}`;"';
example.kind = vscode.CompletionItemKind.Value;
example.range = range;
return [example];
}
}
return undefined;
}

View File

@@ -6,7 +6,7 @@
import * as vscode from 'vscode';
import { getLocation, Location, parse } from 'jsonc-parser';
import * as nls from 'vscode-nls';
import { provideInstalledExtensionProposals } from './extensionsProposals';
import { provideInstalledExtensionProposals, provideWorkspaceTrustExtensionProposals } from './extensionsProposals';
const localize = nls.loadMessageBundle();
@@ -60,6 +60,15 @@ export class SettingsDocument {
return provideInstalledExtensionProposals(alreadyConfigured, `: [\n\t"ui"\n]`, range, true);
}
// extensions.supportUntrustedWorkspaces
if (location.path[0] === 'extensions.supportUntrustedWorkspaces' && location.path.length === 2 && location.isAtPropertyKey) {
let alreadyConfigured: string[] = [];
try {
alreadyConfigured = Object.keys(parse(this.document.getText())['extensions.supportUntrustedWorkspaces']);
} catch (e) {/* ignore error */ }
return provideWorkspaceTrustExtensionProposals(alreadyConfigured, range);
}
return this.provideLanguageOverridesCompletionItems(location, position);
}

View File

@@ -1,9 +1,9 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -10,6 +10,8 @@ updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/c.tmLanguage.j
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.tmLanguage.json', './syntaxes/cpp.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.embedded.macro.tmLanguage.json', './syntaxes/cpp.embedded.macro.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
updateGrammar.update('NVIDIA/cuda-cpp-grammar', 'syntaxes/cuda-cpp.tmLanguage.json', './syntaxes/cuda-cpp.tmLanguage.json', undefined, 'master');
// `source.c.platform` which is still included by other grammars
updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json');

View File

@@ -39,6 +39,19 @@
],
"license": "TextMate Bundle License",
"version": "0.0.0"
},
{
"component": {
"type": "git",
"git": {
"name": "NVIDIA/cuda-cpp-grammar",
"repositoryUrl": "https://github.com/NVIDIA/cuda-cpp-grammar",
"commitHash": "81e88eaec5170aa8585736c63627c73e3589998c"
}
},
"license": "MIT",
"version": "0.0.0",
"description": "The file syntaxes/cuda-cpp.tmLanguage.json was derived from https://github.com/jeff-hykin/cpp-textmate-grammar, which was derived from https://github.com/atom/language-c, which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
}
],
"version": 1

View File

@@ -23,6 +23,7 @@
["'", "'"],
["<", ">"]
],
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
"folding": {
"markers": {
"start": "^\\s*#pragma\\s+region\\b",

View File

@@ -50,6 +50,17 @@
"cpp"
],
"configuration": "./language-configuration.json"
},
{
"id": "cuda-cpp",
"extensions": [
".cu",
".cuh"
],
"aliases": [
"CUDA C++"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
@@ -71,8 +82,35 @@
{
"scopeName": "source.c.platform",
"path": "./syntaxes/platform.tmLanguage.json"
},
{
"language": "cuda-cpp",
"scopeName": "source.cuda-cpp",
"path": "./syntaxes/cuda-cpp.tmLanguage.json"
}
],
"problemPatterns": [
{
"name": "nvcc-location",
"regexp": "^(.*)\\((\\d+)\\):\\s+(warning|error):\\s+(.*)",
"kind": "location",
"file": 1,
"location": 2,
"severity": 3,
"message": 4
}
],
"problemMatchers": [
{
"name": "nvcc",
"owner": "cuda-cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": "$nvcc-location"
}
],
"snippets": [
{
"language": "c",

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "572697a2c2267430010b3534281f73337144e94f"
"commitHash": "4d14854c9bfc9d84cce625d2bfebaac9741b9db8"
}
},
"license": "MIT",

View File

@@ -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/dotnet/csharp-tmLanguage/commit/572697a2c2267430010b3534281f73337144e94f",
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d14854c9bfc9d84cce625d2bfebaac9741b9db8",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
@@ -286,6 +286,9 @@
{
"include": "#this-or-base-expression"
},
{
"include": "#switch-expression"
},
{
"include": "#conditional-operator"
},
@@ -616,7 +619,7 @@
]
},
"delegate-declaration": {
"begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"beginCaptures": {
"1": {
"name": "keyword.other.delegate.cs"
@@ -967,7 +970,7 @@
]
},
"field-declaration": {
"begin": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)",
"begin": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)",
"beginCaptures": {
"1": {
"patterns": [
@@ -1001,7 +1004,7 @@
]
},
"property-declaration": {
"begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<property-name>\\g<identifier>)\\s*\n(?=\\{|=>|$)",
"begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<property_name>\\g<identifier>)\\s*\n(?=\\{|=>|$)",
"beginCaptures": {
"1": {
"patterns": [
@@ -1044,7 +1047,7 @@
]
},
"indexer-declaration": {
"begin": "(?x)\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<indexer-name>this)\\s*\n(?=\\[)",
"begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<indexer_name>this)\\s*\n(?=\\[)",
"beginCaptures": {
"1": {
"patterns": [
@@ -1087,7 +1090,7 @@
]
},
"event-declaration": {
"begin": "(?x)\n\\b(event)\\b\\s*\n(?<return-type>\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<event-names>\\g<identifier>(?:\\s*,\\s*\\g<identifier>)*)\\s*\n(?=\\{|;|$)",
"begin": "(?x)\n\\b(event)\\b\\s*\n(?<return_type>\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<event_names>\\g<identifier>(?:\\s*,\\s*\\g<identifier>)*)\\s*\n(?=\\{|;|$)",
"beginCaptures": {
"1": {
"name": "keyword.other.event.cs"
@@ -1217,7 +1220,7 @@
]
},
"method-declaration": {
"begin": "(?x)\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"beginCaptures": {
"1": {
"patterns": [
@@ -1353,7 +1356,7 @@
]
},
"operator-declaration": {
"begin": "(?x)\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?<operator-keyword>(?:\\b(?:operator)))\\s*\n(?<operator>(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()",
"begin": "(?x)\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<operator>(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()",
"beginCaptures": {
"1": {
"patterns": [
@@ -1386,7 +1389,7 @@
]
},
"conversion-operator-declaration": {
"begin": "(?x)\n(?<explicit-or-implicit-keyword>(?:\\b(?:explicit|implicit)))\\s*\n(?<operator-keyword>(?:\\b(?:operator)))\\s*\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()",
"begin": "(?x)\n(?<explicit_or_implicit_keyword>(?:\\b(?:explicit|implicit)))\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
"beginCaptures": {
"1": {
"patterns": [
@@ -1615,7 +1618,7 @@
"end": "(?=;)",
"patterns": [
{
"include": "#expression"
"include": "#statement"
}
]
},
@@ -1718,6 +1721,178 @@
}
]
},
"switch-expression": {
"begin": "(?x) (?<!\\.)\\b(switch)",
"beginCaptures": {
"1": {
"name": "keyword.control.switch.cs"
}
},
"end": "(?<=\\})",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.curlybrace.open.cs"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#literal"
},
{
"include": "#switch-var-pattern"
},
{
"include": "#switch-property-expression"
},
{
"include": "#member-access-expression"
},
{
"include": "#switch-pattern"
},
{
"include": "#expression-body"
},
{
"include": "#punctuation-comma"
}
]
}
]
},
"switch-pattern": {
"begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\b\\s*",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type"
}
]
},
"2": {
"name": "entity.name.variable.local.cs"
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#switch-when-clause"
}
]
},
"switch-property-expression": {
"begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(\\{)",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type"
}
]
},
"6": {
"name": "punctuation.curlybrace.open.cs"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"include": "#expression"
},
{
"include": "#punctuation-comma"
}
]
},
"switch-var-pattern": {
"begin": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*",
"beginCaptures": {
"1": {
"name": "keyword.other.var.cs"
},
"2": {
"patterns": [
{
"include": "#tuple-declaration-deconstruction-element-list"
}
]
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#switch-when-clause"
}
]
},
"switch-when-clause": {
"begin": "(?<!\\.)\\b(when)\\b\\s*(\\()?",
"beginCaptures": {
"1": {
"name": "keyword.control.try.when.cs"
},
"2": {
"name": "punctuation.parenthesis.open.cs"
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#expression"
},
{
"include": "#punctuation-comma"
},
{
"match": "\\(",
"captures": {
"0": {
"name": "punctuation.parenthesis.open.cs"
}
}
},
{
"match": "\\)",
"captures": {
"0": {
"name": "punctuation.parenthesis.close.cs"
}
}
}
]
},
"switch-label": {
"patterns": [
{
@@ -1865,7 +2040,7 @@
},
"patterns": [
{
"match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b",
"match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b",
"captures": {
"1": {
"name": "keyword.other.var.cs"
@@ -1984,7 +2159,7 @@
},
"patterns": [
{
"match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?",
"match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?",
"captures": {
"1": {
"patterns": [
@@ -2144,31 +2319,37 @@
{
"include": "#local-variable-declaration"
},
{
"include": "#local-function-declaration"
},
{
"include": "#local-tuple-var-deconstruction"
}
]
},
"local-variable-declaration": {
"begin": "(?x)\n(?:\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?!=>)\n(?=,|;|=|\\))",
"begin": "(?x)\n(?:\n (?:(\\busing)\\s+)?\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?!=>)\n(?=,|;|=|\\))",
"beginCaptures": {
"1": {
"name": "storage.modifier.cs"
"name": "keyword.other.using.cs"
},
"2": {
"name": "storage.modifier.cs"
},
"3": {
"name": "keyword.other.var.cs"
"name": "storage.modifier.cs"
},
"4": {
"name": "keyword.other.var.cs"
},
"5": {
"patterns": [
{
"include": "#type"
}
]
},
"9": {
"10": {
"name": "entity.name.variable.local.cs"
}
},
@@ -2190,7 +2371,7 @@
]
},
"local-constant-declaration": {
"begin": "(?x)\n(?<const-keyword>\\b(?:const)\\b)\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?=,|;|=)",
"begin": "(?x)\n(?<const_keyword>\\b(?:const)\\b)\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?=,|;|=)",
"beginCaptures": {
"1": {
"name": "storage.modifier.cs"
@@ -2223,6 +2404,13 @@
}
]
},
"local-function-declaration": {
"patterns": [
{
"include": "#method-declaration"
}
]
},
"local-tuple-var-deconstruction": {
"begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*\n(?=;|=|\\))",
"beginCaptures": {
@@ -2332,7 +2520,7 @@
]
},
"declaration-expression-local": {
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)\\]])",
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)\\]])",
"captures": {
"1": {
"name": "keyword.other.var.cs"
@@ -2350,7 +2538,7 @@
}
},
"declaration-expression-tuple": {
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"captures": {
"1": {
"name": "keyword.other.var.cs"
@@ -2475,7 +2663,7 @@
},
"verbatim-interpolated-string": {
"name": "string.quoted.double.cs",
"begin": "\\$@\"",
"begin": "(?:\\$@|@\\$)\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.cs"
@@ -2712,7 +2900,7 @@
"patterns": [
{
"name": "keyword.operator.assignment.compound.cs",
"match": "\\*=|/=|%=|\\+=|-="
"match": "\\*=|/=|%=|\\+=|-=|\\?\\?="
},
{
"name": "keyword.operator.assignment.compound.bitwise.cs",
@@ -2760,6 +2948,26 @@
}
]
},
"switch-literal": {
"name": "constant.language.null.cs",
"match": "(?<!\\.)\\bnull\\b",
"beginCaptures": {
"1": {
"name": "constant.language.null.cs"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#punctuation-comma"
},
{
"include": "#expression-body"
}
]
},
"conditional-operator": {
"begin": "(?<!\\?)\\?(?!\\?|\\.|\\[)",
"beginCaptures": {
@@ -2829,7 +3037,7 @@
"match": "@?[_[:alpha:]][_[:alnum:]]*"
},
"cast-expression": {
"match": "(?x)\n(\\()\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])",
"match": "(?x)\n(\\()\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])",
"captures": {
"1": {
"name": "punctuation.parenthesis.open.cs"
@@ -2847,7 +3055,7 @@
}
},
"as-expression": {
"match": "(?x)\n(?<!\\.)\\b(as)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?",
"match": "(?x)\n(?<!\\.)\\b(as)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
"captures": {
"1": {
"name": "keyword.other.as.cs"
@@ -2862,7 +3070,7 @@
}
},
"is-expression": {
"match": "(?x)\n(?<!\\.)\\b(is)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?",
"match": "(?x)\n(?<!\\.)\\b(is)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
"captures": {
"1": {
"name": "keyword.other.is.cs"
@@ -2888,7 +3096,7 @@
}
},
"invocation-expression": {
"begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?<type-args>\\s*<([^<>]|\\g<type-args>)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list",
"begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?<type_args>\\s*<([^<>]|\\g<type_args>)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list",
"beginCaptures": {
"1": {
"name": "keyword.operator.null-conditional.cs"
@@ -2954,7 +3162,7 @@
}
},
{
"match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?<type-params>\\s*<([^<>]|\\g<type-params>)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)",
"match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?<type_params>\\s*<([^<>]|\\g<type_params>)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)",
"captures": {
"1": {
"name": "punctuation.accessor.cs"
@@ -2992,7 +3200,7 @@
]
},
"object-creation-expression-with-parameters": {
"begin": "(?x)\n(new)\\s+\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()",
"begin": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
"beginCaptures": {
"1": {
"name": "keyword.other.new.cs"
@@ -3013,7 +3221,7 @@
]
},
"object-creation-expression-with-no-parameters": {
"match": "(?x)\n(new)\\s+\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)",
"match": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|$)",
"captures": {
"1": {
"name": "keyword.other.new.cs"
@@ -3028,7 +3236,7 @@
}
},
"array-creation-expression": {
"begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)",
"begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)",
"beginCaptures": {
"1": {
"name": "keyword.other.new.cs"
@@ -3131,7 +3339,7 @@
]
},
"parameter": {
"match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type-name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)",
"match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type_name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)",
"captures": {
"1": {
"name": "storage.modifier.cs"
@@ -3230,7 +3438,7 @@
]
},
"query-expression": {
"begin": "(?x)\n\\b(from)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"begin": "(?x)\n\\b(from)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"beginCaptures": {
"1": {
"name": "keyword.query.from.cs"
@@ -3322,7 +3530,7 @@
]
},
"join-clause": {
"begin": "(?x)\n\\b(join)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"begin": "(?x)\n\\b(join)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"beginCaptures": {
"1": {
"name": "keyword.query.join.cs"
@@ -3592,7 +3800,7 @@
]
},
"lambda-parameter": {
"match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"captures": {
"1": {
"name": "storage.modifier.cs"
@@ -3672,7 +3880,7 @@
]
},
"tuple-element": {
"match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\n(?:(?<tuple-name>\\g<identifier>)\\b)?",
"match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\n(?:(?<tuple_name>\\g<identifier>)\\b)?",
"captures": {
"1": {
"patterns": [

View File

@@ -1,9 +1,9 @@
{
"extends": "../../shared.tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -18,6 +18,12 @@
"main": "./client/out/node/cssClientMain",
"browser": "./client/dist/browser/cssClientMain",
"enableProposedApi": true,
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"scripts": {
"compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server",
"watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server",

View File

@@ -10,7 +10,7 @@
"main": "./out/node/cssServerMain",
"browser": "./dist/browser/cssServerMain",
"dependencies": {
"vscode-css-languageservice": "^5.1.0",
"vscode-css-languageservice": "^5.1.1",
"vscode-languageserver": "^7.0.0",
"vscode-uri": "^3.0.2"
},

View File

@@ -11,7 +11,7 @@ const suite = 'Integration CSS Extension Tests';
const options = {
ui: 'tdd',
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
color: true,
timeout: 60000
};

View File

@@ -1,9 +1,9 @@
{
"extends": "../../shared.tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -12,10 +12,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==
vscode-css-languageservice@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.0.tgz#cd172d13e9e7ae23ba567c73778aee10475ff716"
integrity sha512-iLHd/WjRKgaZBXMNeUooHG+r0qlhJBkXa+3MpQQR6Rpm928cis/3OV2Mp1R80yAQevIMeDL32RIJfHoJCT/RRg==
vscode-css-languageservice@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.1.tgz#d68a22ea0b34a8356c169cafc7d32564c2ff6e87"
integrity sha512-QW0oe/g2y5E2AbVqY7FJNr2Q8uHiAHNSFpptI6xB8Y0KgzVKppOcIVrgmBNzXhFp9IswAwptkdqr8ExSJbqPkQ==
dependencies:
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -8,6 +8,13 @@
"engines": {
"vscode": "^1.5.0"
},
"icon": "media/icon.png",
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"activationEvents": [
"*"
],

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"downlevelIteration": true
@@ -7,4 +7,4 @@
"include": [
"src/**/*"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -8,9 +8,16 @@
"engines": {
"vscode": "^1.32.0"
},
"icon": "media/icon.png",
"activationEvents": [
"onDebugResolve"
],
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"enableProposedApi": true,
"main": "./out/extension",
"scripts": {

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"downlevelIteration": true
@@ -7,4 +7,4 @@
"include": [
"src/**/*"
]
}
}

View File

@@ -69,97 +69,98 @@
}
},
"default": {},
"description": "%emmetVariables%"
"markdownDescription": "%emmetVariables%"
},
"emmet.syntaxProfiles": {
"type": "object",
"default": {},
"description": "%emmetSyntaxProfiles%"
"markdownDescription": "%emmetSyntaxProfiles%"
},
"emmet.excludeLanguages": {
"type": "array",
"default": [
"markdown"
],
"description": "%emmetExclude%"
"markdownDescription": "%emmetExclude%"
},
"emmet.extensionsPath": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"markdownDescription": "%emmetExtensionsPathItem%"
},
"default": [],
"description": "%emmetExtensionsPath%"
"markdownDescription": "%emmetExtensionsPath%"
},
"emmet.triggerExpansionOnTab": {
"type": "boolean",
"default": false,
"description": "%emmetTriggerExpansionOnTab%"
"markdownDescription": "%emmetTriggerExpansionOnTab%"
},
"emmet.preferences": {
"type": "object",
"default": {},
"description": "%emmetPreferences%",
"markdownDescription": "%emmetPreferences%",
"properties": {
"css.intUnit": {
"type": "string",
"default": "px",
"description": "%emmetPreferencesIntUnit%"
"markdownDescription": "%emmetPreferencesIntUnit%"
},
"css.floatUnit": {
"type": "string",
"default": "em",
"description": "%emmetPreferencesFloatUnit%"
"markdownDescription": "%emmetPreferencesFloatUnit%"
},
"css.propertyEnd": {
"type": "string",
"default": ";",
"description": "%emmetPreferencesCssAfter%"
"markdownDescription": "%emmetPreferencesCssAfter%"
},
"sass.propertyEnd": {
"type": "string",
"default": "",
"description": "%emmetPreferencesSassAfter%"
"markdownDescription": "%emmetPreferencesSassAfter%"
},
"stylus.propertyEnd": {
"type": "string",
"default": "",
"description": "%emmetPreferencesStylusAfter%"
"markdownDescription": "%emmetPreferencesStylusAfter%"
},
"css.valueSeparator": {
"type": "string",
"default": ": ",
"description": "%emmetPreferencesCssBetween%"
"markdownDescription": "%emmetPreferencesCssBetween%"
},
"sass.valueSeparator": {
"type": "string",
"default": ": ",
"description": "%emmetPreferencesSassBetween%"
"markdownDescription": "%emmetPreferencesSassBetween%"
},
"stylus.valueSeparator": {
"type": "string",
"default": " ",
"description": "%emmetPreferencesStylusBetween%"
"markdownDescription": "%emmetPreferencesStylusBetween%"
},
"bem.elementSeparator": {
"type": "string",
"default": "__",
"description": "%emmetPreferencesBemElementSeparator%"
"markdownDescription": "%emmetPreferencesBemElementSeparator%"
},
"bem.modifierSeparator": {
"type": "string",
"default": "_",
"description": "%emmetPreferencesBemModifierSeparator%"
"markdownDescription": "%emmetPreferencesBemModifierSeparator%"
},
"filter.commentBefore": {
"type": "string",
"default": "",
"description": "%emmetPreferencesFilterCommentBefore%"
"markdownDescription": "%emmetPreferencesFilterCommentBefore%"
},
"filter.commentAfter": {
"type": "string",
"default": "\n<!-- /[#ID][.CLASS] -->",
"description": "%emmetPreferencesFilterCommentAfter%"
"markdownDescription": "%emmetPreferencesFilterCommentAfter%"
},
"filter.commentTrigger": {
"type": "array",
@@ -167,26 +168,26 @@
"id",
"class"
],
"description": "%emmetPreferencesFilterCommentTrigger%"
"markdownDescription": "%emmetPreferencesFilterCommentTrigger%"
},
"format.noIndentTags": {
"type": "array",
"default": [
"html"
],
"description": "%emmetPreferencesFormatNoIndentTags%"
"markdownDescription": "%emmetPreferencesFormatNoIndentTags%"
},
"format.forceIndentationForTags": {
"type": "array",
"default": [
"body"
],
"description": "%emmetPreferencesFormatForceIndentTags%"
"markdownDescription": "%emmetPreferencesFormatForceIndentTags%"
},
"profile.allowCompactBoolean": {
"type": "boolean",
"default": false,
"description": "%emmetPreferencesAllowCompactBoolean%"
"markdownDescription": "%emmetPreferencesAllowCompactBoolean%"
},
"css.webkitProperties": {
"type": "string",
@@ -211,17 +212,28 @@
"css.fuzzySearchMinScore": {
"type": "number",
"default": 0.3,
"description": "%emmetPreferencesCssFuzzySearchMinScore%"
"markdownDescription": "%emmetPreferencesCssFuzzySearchMinScore%"
},
"output.inlineBreak": {
"type": "number",
"default": 0,
"markdownDescription": "%emmetPreferencesOutputInlineBreak%"
},
"output.reverseAttributes": {
"type": "boolean",
"default": false,
"description": "%emmetPreferencesOutputReverseAttributes%"
"markdownDescription": "%emmetPreferencesOutputReverseAttributes%"
},
"output.selfClosingStyle": {
"type": "string",
"enum": ["html", "xhtml", "xml"],
"default": "html",
"markdownDescription": "%emmetPreferencesOutputSelfClosingStyle%"
},
"css.color.short": {
"type": "boolean",
"default": true,
"description": "%emmetPreferencesCssColorShort%"
"markdownDescription": "%emmetPreferencesCssColorShort%"
}
}
},
@@ -442,5 +454,11 @@
"image-size": "^0.5.2",
"vscode-emmet-helper": "^2.3.0",
"vscode-languageserver-textdocument": "^1.0.1"
},
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
}
}

View File

@@ -25,36 +25,39 @@
"command.showEmmetCommands": "Show Emmet Commands",
"emmetSyntaxProfiles": "Define profile for specified syntax or use your own profile with specific rules.",
"emmetExclude": "An array of languages where Emmet abbreviations should not be expanded.",
"emmetExtensionsPath": "Path to a folder containing Emmet profiles and snippets.",
"emmetExtensionsPath": "An array of paths, where each path can contain Emmet syntaxProfiles and/or snippet files.\nIn case of conflicts, the profiles/snippets of later paths will override those of earlier paths.\nSee https://code.visualstudio.com/docs/editor/emmet for more information and an example snippet file.",
"emmetExtensionsPathItem": "A path containing Emmet syntaxProfiles and/or snippets.",
"emmetShowExpandedAbbreviation": "Shows expanded Emmet abbreviations as suggestions.\nThe option `\"inMarkupAndStylesheetFilesOnly\"` applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option `\"always\"` applies to all parts of the file regardless of markup/css.",
"emmetShowAbbreviationSuggestions": "Shows possible Emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to `\"never\"`.",
"emmetIncludeLanguages": "Enable Emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and Emmet supported language.\n For example: `{\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}`",
"emmetVariables": "Variables to be used in Emmet snippets",
"emmetVariables": "Variables to be used in Emmet snippets.",
"emmetTriggerExpansionOnTab": "When enabled, Emmet abbreviations are expanded when pressing TAB.",
"emmetPreferences": "Preferences used to modify behavior of some actions and resolvers of Emmet.",
"emmetPreferencesIntUnit": "Default unit for integer values",
"emmetPreferencesFloatUnit": "Default unit for float values",
"emmetPreferencesCssAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations",
"emmetPreferencesSassAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Sass files",
"emmetPreferencesStylusAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Stylus files",
"emmetPreferencesCssBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations",
"emmetPreferencesSassBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Sass files",
"emmetPreferencesStylusBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Stylus files",
"emmetPreferencesIntUnit": "Default unit for integer values.",
"emmetPreferencesFloatUnit": "Default unit for float values.",
"emmetPreferencesCssAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations.",
"emmetPreferencesSassAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Sass files.",
"emmetPreferencesStylusAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Stylus files.",
"emmetPreferencesCssBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations.",
"emmetPreferencesSassBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Sass files.",
"emmetPreferencesStylusBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Stylus files.",
"emmetShowSuggestionsAsSnippets": "If `true`, then Emmet suggestions will show up as snippets allowing you to order them as per `#editor.snippetSuggestions#` setting.",
"emmetPreferencesBemElementSeparator": "Element separator used for classes when using the BEM filter",
"emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter",
"emmetPreferencesBemElementSeparator": "Element separator used for classes when using the BEM filter.",
"emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter.",
"emmetPreferencesFilterCommentBefore": "A definition of comment that should be placed before matched element when comment filter is applied.",
"emmetPreferencesFilterCommentAfter": "A definition of comment that should be placed after matched element when comment filter is applied.",
"emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in abbreviation for the comment filter to be applied",
"emmetPreferencesFormatNoIndentTags": "An array of tag names that should not get inner indentation",
"emmetPreferencesFormatForceIndentTags": "An array of tag names that should always get inner indentation",
"emmetPreferencesAllowCompactBoolean": "If true, compact notation of boolean attributes are produced",
"emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in the abbreviation for the comment filter to be applied.",
"emmetPreferencesFormatNoIndentTags": "An array of tag names that should never get inner indentation.",
"emmetPreferencesFormatForceIndentTags": "An array of tag names that should always get inner indentation.",
"emmetPreferencesAllowCompactBoolean": "If `true`, compact notation of boolean attributes are produced.",
"emmetPreferencesCssWebkitProperties": "Comma separated CSS properties that get the 'webkit' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'webkit' prefix.",
"emmetPreferencesCssMozProperties": "Comma separated CSS properties that get the 'moz' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'moz' prefix.",
"emmetPreferencesCssOProperties": "Comma separated CSS properties that get the 'o' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'o' prefix.",
"emmetPreferencesCssMsProperties": "Comma separated CSS properties that get the 'ms' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'ms' prefix.",
"emmetPreferencesCssFuzzySearchMinScore": "The minimum score (from 0 to 1) that fuzzy-matched abbreviation should achieve. Lower values may produce many false-positive matches, higher values may reduce possible matches.",
"emmetOptimizeStylesheetParsing": "When set to `false`, the whole file is parsed to determine if current position is valid for expanding Emmet abbreviations. When set to `true`, only the content around the current position in CSS/SCSS/Less files is parsed.",
"emmetPreferencesOutputInlineBreak": "The number of sibling inline elements needed for line breaks to be placed between those elements. If `0`, inline elements are always expanded onto a single line.",
"emmetPreferencesOutputReverseAttributes": "If `true`, reverses attribute merging directions when resolving snippets.",
"emmetPreferencesCssColorShort": "If `true`, color values like #f will be expanded to #fff instead of #ffffff."
"emmetPreferencesOutputSelfClosingStyle": "Style of self-closing tags: html (`<br>`), xml (`<br/>`) or xhtml (`<br />`).",
"emmetPreferencesCssColorShort": "If `true`, color values like `#f` will be expanded to `#fff` instead of `#ffffff`."
}

View File

@@ -205,7 +205,7 @@ export async function wrapWithAbbreviation(args: any): Promise<boolean> {
let inPreviewMode = false;
async function makeChanges(inputAbbreviation: string | undefined, previewChanges: boolean): Promise<boolean> {
const isAbbreviationValid = !!inputAbbreviation && !!inputAbbreviation.trim() && helper.isAbbreviationValid(syntax, inputAbbreviation);
const extractedResults = isAbbreviationValid ? helper.extractAbbreviationFromText(inputAbbreviation!) : undefined;
const extractedResults = isAbbreviationValid ? helper.extractAbbreviationFromText(inputAbbreviation!, syntax) : undefined;
if (!extractedResults) {
if (inPreviewMode) {
inPreviewMode = false;
@@ -311,12 +311,12 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
let allAbbreviationsSame: boolean = true;
const helper = getEmmetHelper();
const getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range | null, string, string] => {
const getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range | null, string, string | undefined] => {
position = document.validatePosition(position);
let rangeToReplace: vscode.Range = selection;
let abbr = document.getText(rangeToReplace);
if (!rangeToReplace.isEmpty) {
const extractedResults = helper.extractAbbreviationFromText(abbr);
const extractedResults = helper.extractAbbreviationFromText(abbr, syntax);
if (extractedResults) {
return [rangeToReplace, extractedResults.abbreviation, extractedResults.filter];
}

View File

@@ -176,7 +176,8 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
return;
}
let result = helper.doComplete(toLSTextDocument(document), position, syntax, getEmmetConfiguration(syntax!));
const config = getEmmetConfiguration(syntax!);
const result = helper.doComplete(toLSTextDocument(document), position, syntax, config);
// https://github.com/microsoft/vscode/issues/86941
if (result && result.items && result.items.length === 1) {

View File

@@ -19,7 +19,7 @@ import { evaluateMathExpression } from './evaluateMathExpression';
import { incrementDecrement } from './incrementDecrement';
import { LANGUAGE_MODES, getMappingForIncludedLanguages, updateEmmetExtensionsPath, migrateEmmetExtensionsPath, getPathBaseName, getSyntaxes, getEmmetMode } from './util';
import { reflectCssValue } from './reflectCssValue';
import { addFileToParseCache, removeFileFromParseCache } from './parseDocument';
import { addFileToParseCache, clearParseCache, removeFileFromParseCache } from './parseDocument';
export function activateEmmetExtension(context: vscode.ExtensionContext) {
migrateEmmetExtensionsPath();
@@ -203,4 +203,6 @@ function registerCompletionProviders(context: vscode.ExtensionContext) {
}
export function deactivate() {
completionProvidersMapping.clear();
clearParseCache();
}

View File

@@ -44,3 +44,7 @@ export function removeFileFromParseCache(document: TextDocument) {
const filename = document.uri.toString();
_parseCache.delete(filename);
}
export function clearParseCache() {
_parseCache.clear();
}

View File

@@ -19,7 +19,7 @@ export function nextItemHTML(document: vscode.TextDocument, selectionStart: vsco
if (currentNode.type !== 'comment') {
// If cursor is in the tag name, select tag
if (currentNode.open &&
selectionEndOffset < currentNode.open.start + currentNode.name.length) {
selectionEndOffset <= currentNode.open.start + currentNode.name.length) {
return getSelectionFromNode(document, currentNode);
}

View File

@@ -44,10 +44,7 @@ const htmlContents = `
suite('Tests for Expand Abbreviations (HTML)', () => {
const oldValueForExcludeLanguages = workspace.getConfiguration('emmet').inspect('excludeLanguages');
const oldValueForInlcudeLanguages = workspace.getConfiguration('emmet').inspect('includeLanguages');
teardown(() => {
// close all editors
return closeAllEditors;
});
teardown(closeAllEditors);
test('Expand snippets (HTML)', () => {
return testExpandAbbreviation('html', new Selection(3, 23, 3, 23), 'img', '<img src=\"\" alt=\"\">');
@@ -442,7 +439,7 @@ suite('Tests for jsx, xml and xsl', () => {
return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => {
editor.selection = new Selection(0, 6, 0, 6);
await expandEmmetAbbreviation({ language: 'javascriptreact' });
assert.strictEqual(editor.document.getText(), '<img src="" alt=""/>');
assert.strictEqual(editor.document.getText(), '<img src="" alt="" />');
return Promise.resolve();
});
});
@@ -452,7 +449,7 @@ suite('Tests for jsx, xml and xsl', () => {
return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => {
editor.selection = new Selection(0, 6, 0, 6);
await expandEmmetAbbreviation({ language: 'javascriptreact' });
assert.strictEqual(editor.document.getText(), '<img src=\'\' alt=\'\'/>');
assert.strictEqual(editor.document.getText(), '<img src=\'\' alt=\'\' />');
return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global);
});
});

View File

@@ -12,10 +12,7 @@ import { closeAllEditors, withRandomFileEditor } from './testUtils';
const completionProvider = new DefaultCompletionItemProvider();
suite('Tests for completion in CSS embedded in HTML', () => {
teardown(() => {
// close all editors
return closeAllEditors;
});
teardown(closeAllEditors);
test('style attribute & attribute value in html', async () => {
await testHtmlCompletionProvider('<div style="|"', [{ label: 'padding: ;' }]);
@@ -81,10 +78,10 @@ function testHtmlCompletionProvider(contents: string, expectedItems: TestComplet
assert.ok(match, `Didn't find completion item with label ${eItem.label}`);
if (match) {
assert.equal(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
assert.strictEqual(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
if (eItem.documentation) {
assert.equal(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
assert.strictEqual(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
}
}
});
@@ -122,10 +119,10 @@ function testCssCompletionProvider(contents: string, expectedItems: TestCompleti
assert.ok(match, `Didn't find completion item with label ${eItem.label}`);
if (match) {
assert.equal(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
assert.strictEqual(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
if (eItem.documentation) {
assert.equal(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
assert.strictEqual(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
}
}
});

View File

@@ -59,7 +59,7 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
return withRandomFileEditor(cssContents, 'css', (editor, _) => {
editor.selections = [new Selection(3, 1, 3, 6), new Selection(5, 1, 5, 6)];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), cssContents.replace(/pos:f/g, 'position: fixed;'));
assert.strictEqual(editor.document.getText(), cssContents.replace(/pos:f/g, 'position: fixed;'));
return Promise.resolve();
});
});
@@ -78,11 +78,11 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(3, 4, 3, 4);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -101,11 +101,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(5, 4, 5, 4);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -123,11 +123,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 10, 2, 10);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -140,11 +140,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(0, 30, 0, 30);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(0, 30), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -165,18 +165,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`);
assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve();
}
const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`);
assert.strictEqual(1, 2, `Empty Completions`);
return;
}
const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
};
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@@ -184,7 +184,7 @@ nav#
callBack(result2, '!important');
editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
});
});
});
@@ -201,11 +201,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(3, 10, 3, 10);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -226,18 +226,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(3, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`);
assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve();
}
const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`);
assert.strictEqual(1, 2, `Empty Completions`);
return;
}
const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
};
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@@ -245,7 +245,7 @@ nav#
callBack(result2, '!important');
editor.selections = [new Selection(3, 12, 3, 12), new Selection(3, 14, 3, 14)];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
});
});
});
@@ -261,11 +261,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 10, 2, 10);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
@@ -285,18 +285,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`);
assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve();
}
const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`);
assert.strictEqual(1, 2, `Empty Completions`);
return;
}
const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
};
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@@ -304,7 +304,7 @@ nav#
callBack(result2, '!important');
editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
});
});
});
@@ -320,11 +320,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 2, 2, 2);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 2), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion of hex color at property name`);
assert.strictEqual(1, 2, `Invalid completion of hex color at property name`);
}
return Promise.resolve();
});
@@ -342,19 +342,19 @@ nav#
const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Problem with expanding pos:f`);
assert.strictEqual(1, 2, `Problem with expanding pos:f`);
return Promise.resolve();
}
const callBack = (completionList: CompletionList) => {
if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Problem with expanding pos:f`);
assert.strictEqual(1, 2, `Problem with expanding pos:f`);
return;
}
const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
};
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@@ -374,7 +374,7 @@ nav#
new Selection(14, 5, 14, 5)
];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;'));
assert.strictEqual(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;'));
return Promise.resolve();
});
});
@@ -390,16 +390,16 @@ nav#
const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`);
assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`);
}
if (!completionPromise2) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`);
assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`);
}
if (!completionPromise3) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`);
assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`);
}
if (!completionPromise4) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`);
assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`);
}
if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) {
@@ -408,13 +408,13 @@ nav#
const callBack = (completionList: CompletionList, abbreviation: string, expandedText: string) => {
if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Problem with expanding m10`);
assert.strictEqual(1, 2, `Problem with expanding m10`);
return;
}
const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.strictEqual(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
};
return Promise.all<CompletionList>([completionPromise1, completionPromise2, completionPromise3, completionPromise4]).then(([result1, result2, result3, result4]) => {
@@ -445,7 +445,7 @@ m10
new Selection(5, 15, 5, 15) // in the value part of property value
];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), scssContentsNoExpand);
assert.strictEqual(editor.document.getText(), scssContentsNoExpand);
return Promise.resolve();
});
});
@@ -467,7 +467,7 @@ m10
const cancelSrc = new CancellationTokenSource();
let completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `m10 gets expanded in invalid location (outside rule)`);
assert.strictEqual(1, 2, `m10 gets expanded in invalid location (outside rule)`);
}
editor.selection = new Selection(5, 15, 5, 15); // in the value part of property value
@@ -475,7 +475,7 @@ m10
if (completionPromise) {
return completionPromise.then((completionList: CompletionList | undefined) => {
if (completionList && completionList.items && completionList.items.length > 0) {
assert.equal(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`);
assert.strictEqual(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`);
}
return Promise.resolve();
});
@@ -484,19 +484,18 @@ m10
});
});
});
test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => {
return withRandomFileEditor(scssContents, 'scss', (editor, _) => {
editor.selection = new Selection(19, 10, 19, 10);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), scssContents);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => {
return withRandomFileEditor(scssContents, 'scss', (editor, _) => {
editor.selection = new Selection(19, 10, 19, 10);
return expandEmmetAbbreviation(null).then(() => {
assert.strictEqual(editor.document.getText(), scssContents);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) {
assert.strictEqual(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
});
});
});

View File

@@ -352,17 +352,16 @@ suite('Tests for Next/Previous Select/Edit point and Balance actions', () => {
});
function testSelection(selection: Selection, startChar: number, startline: number, endChar?: number, endLine?: number) {
assert.equal(selection.anchor.line, startline);
assert.equal(selection.anchor.character, startChar);
assert.strictEqual(selection.anchor.line, startline);
assert.strictEqual(selection.anchor.character, startChar);
if (!endLine && endLine !== 0) {
assert.equal(selection.isSingleLine, true);
assert.strictEqual(selection.isSingleLine, true);
} else {
assert.equal(selection.active.line, endLine);
assert.strictEqual(selection.active.line, endLine);
}
if (!endChar && endChar !== 0) {
assert.equal(selection.isEmpty, true);
assert.strictEqual(selection.isEmpty, true);
} else {
assert.equal(selection.active.character, endChar);
assert.strictEqual(selection.active.character, endChar);
}
}

View File

@@ -28,7 +28,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)];
await incrementDecrement(1);
assert.equal(doc.getText(), contents.replace('123', '124').replace('999', '1000'));
assert.strictEqual(doc.getText(), contents.replace('123', '124').replace('999', '1000'));
return Promise.resolve();
});
});
@@ -37,7 +37,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)];
await incrementDecrement(10);
assert.equal(doc.getText(), contents.replace('123', '133').replace('999', '1009'));
assert.strictEqual(doc.getText(), contents.replace('123', '133').replace('999', '1009'));
return Promise.resolve();
});
});
@@ -46,7 +46,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 13), new Selection(2, 7, 2, 12)];
await incrementDecrement(0.1);
assert.equal(doc.getText(), contents.replace('123.43', '123.53').replace('999.9', '1000'));
assert.strictEqual(doc.getText(), contents.replace('123.43', '123.53').replace('999.9', '1000'));
return Promise.resolve();
});
});
@@ -55,7 +55,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)];
await incrementDecrement(-1);
assert.equal(doc.getText(), contents.replace('123', '122').replace('100', '99'));
assert.strictEqual(doc.getText(), contents.replace('123', '122').replace('100', '99'));
return Promise.resolve();
});
});
@@ -64,7 +64,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)];
await incrementDecrement(-10);
assert.equal(doc.getText(), contents.replace('123', '113').replace('100', '90'));
assert.strictEqual(doc.getText(), contents.replace('123', '113').replace('100', '90'));
return Promise.resolve();
});
});
@@ -73,8 +73,8 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 13), new Selection(3, 7, 3, 10)];
await incrementDecrement(-0.1);
assert.equal(doc.getText(), contents.replace('123.43', '123.33').replace('100', '99.9'));
assert.strictEqual(doc.getText(), contents.replace('123.43', '123.33').replace('100', '99.9'));
return Promise.resolve();
});
});
});
});

View File

@@ -8,7 +8,7 @@ const testRunner = require('../../../../test/integration/electron/testrunner');
const options: any = {
ui: 'tdd',
color: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
color: true,
timeout: 60000
};

View File

@@ -5,12 +5,13 @@
import 'mocha';
import * as assert from 'assert';
import { withRandomFileEditor } from './testUtils';
import { closeAllEditors, withRandomFileEditor } from './testUtils';
import * as vscode from 'vscode';
import { parsePartialStylesheet, getFlatNode } from '../util';
import { isValidLocationForEmmetAbbreviation } from '../abbreviationActions';
suite('Tests for partial parse of Stylesheets', () => {
teardown(closeAllEditors);
function isValid(doc: vscode.TextDocument, range: vscode.Range, syntax: string): boolean {
const rootNode = parsePartialStylesheet(doc, range.end);
@@ -43,10 +44,10 @@ p {
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), true);
assert.strictEqual(isValid(doc, range, 'css'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), false);
assert.strictEqual(isValid(doc, range, 'css'), false);
});
return Promise.resolve();
@@ -73,7 +74,7 @@ dn {
new vscode.Range(7, 2, 7, 4) // bg after ending of badly constructed block
];
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false);
assert.strictEqual(isValid(doc, range, 'scss'), false);
});
return Promise.resolve();
});
@@ -108,10 +109,10 @@ comment */
new vscode.Range(10, 2, 10, 3) // p after ending of block
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), true);
assert.strictEqual(isValid(doc, range, 'css'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), false);
assert.strictEqual(isValid(doc, range, 'css'), false);
});
return Promise.resolve();
});
@@ -143,10 +144,10 @@ comment */
new vscode.Range(6, 3, 6, 4) // In selector
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true);
assert.strictEqual(isValid(doc, range, 'scss'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false);
assert.strictEqual(isValid(doc, range, 'scss'), false);
});
return Promise.resolve();
});
@@ -175,10 +176,10 @@ comment */
new vscode.Range(1, 66, 1, 68) // Outside any ruleset
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true);
assert.strictEqual(isValid(doc, range, 'scss'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false);
assert.strictEqual(isValid(doc, range, 'scss'), false);
});
return Promise.resolve();
});
@@ -210,10 +211,10 @@ p.#{dn} {
new vscode.Range(3, 1, 3, 2), // # inside ruleset
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true);
assert.strictEqual(isValid(doc, range, 'scss'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false);
assert.strictEqual(isValid(doc, range, 'scss'), false);
});
return Promise.resolve();
});
@@ -248,10 +249,10 @@ ment */{
new vscode.Range(6, 3, 6, 4) // In c inside block comment
];
rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true);
assert.strictEqual(isValid(doc, range, 'scss'), true);
});
rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false);
assert.strictEqual(isValid(doc, range, 'scss'), false);
});
return Promise.resolve();
});

View File

@@ -50,7 +50,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(cssContents, '.css', (editor, doc) => {
editor.selections = [new Selection(5, 10, 5, 10)];
return reflectCssValue().then(() => {
assert.equal(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
assert.strictEqual(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve();
});
});
@@ -60,7 +60,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(cssContents, '.css', (editor, doc) => {
editor.selections = [new Selection(5, 2, 5, 32)];
return reflectCssValue().then(() => {
assert.equal(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
assert.strictEqual(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve();
});
});
@@ -70,7 +70,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(htmlContents, '.html', (editor, doc) => {
editor.selections = [new Selection(7, 20, 7, 20)];
return reflectCssValue().then(() => {
assert.equal(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
assert.strictEqual(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve();
});
});
@@ -80,10 +80,10 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(htmlContents, '.html', (editor, doc) => {
editor.selections = [new Selection(7, 4, 7, 34)];
return reflectCssValue().then(() => {
assert.equal(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
assert.strictEqual(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve();
});
});
});
});
});

View File

@@ -14,10 +14,7 @@ import { splitJoinTag } from '../splitJoinTag';
import { mergeLines } from '../mergeLines';
suite('Tests for Emmet actions on html tags', () => {
teardown(() => {
// close all editors
return closeAllEditors;
});
teardown(closeAllEditors);
const contents = `
<div class="hello">
@@ -60,7 +57,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -85,7 +82,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -109,7 +106,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -136,7 +133,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -161,7 +158,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -185,7 +182,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -211,7 +208,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -235,7 +232,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -259,7 +256,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -285,7 +282,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global);
});
});
@@ -308,10 +305,10 @@ suite('Tests for Emmet actions on html tags', () => {
matchTag();
editor.selections.forEach(selection => {
assert.equal(selection.active.line, 8);
assert.equal(selection.active.character, 3);
assert.equal(selection.anchor.line, 8);
assert.equal(selection.anchor.character, 3);
assert.strictEqual(selection.active.line, 8);
assert.strictEqual(selection.active.character, 3);
assert.strictEqual(selection.anchor.line, 8);
assert.strictEqual(selection.anchor.character, 3);
});
return Promise.resolve();
@@ -334,10 +331,10 @@ suite('Tests for Emmet actions on html tags', () => {
matchTag();
editor.selections.forEach(selection => {
assert.equal(selection.active.line, 4);
assert.equal(selection.active.character, 4);
assert.equal(selection.anchor.line, 4);
assert.equal(selection.anchor.character, 4);
assert.strictEqual(selection.active.line, 4);
assert.strictEqual(selection.active.character, 4);
assert.strictEqual(selection.anchor.line, 4);
assert.strictEqual(selection.anchor.character, 4);
});
return Promise.resolve();
@@ -360,7 +357,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return mergeLines()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -379,7 +376,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return mergeLines()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -394,7 +391,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return mergeLines()!.then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});

View File

@@ -1 +0,0 @@
DO NOT DELETE, USED BY INTEGRATION TESTS

View File

@@ -48,7 +48,6 @@ export function deleteFile(file: vscode.Uri): Thenable<boolean> {
export function closeAllEditors(): Thenable<any> {
return vscode.commands.executeCommand('workbench.action.closeAllEditors');
}
export function withRandomFileEditor(initialContents: string, fileExtension: string = 'txt', run: (editor: vscode.TextEditor, doc: vscode.TextDocument) => Thenable<void>): Thenable<boolean> {
@@ -67,4 +66,4 @@ export function withRandomFileEditor(initialContents: string, fileExtension: str
});
});
});
}
}

View File

@@ -79,7 +79,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -120,7 +120,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -158,7 +158,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -196,7 +196,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -241,7 +241,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
@@ -272,7 +272,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
new Selection(4, 18, 4, 18), // cursor inside the noncommented span
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -315,9 +315,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -345,9 +345,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
//return toggleComment().then(() => {
//assert.equal(doc.getText(), contents);
//assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
//});
});
@@ -376,9 +376,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -404,9 +404,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -432,9 +432,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -460,9 +460,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -488,9 +488,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -517,9 +517,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -568,9 +568,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -599,9 +599,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -629,9 +629,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
//return toggleComment().then(() => {
// assert.equal(doc.getText(), contents);
// assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
//});
});
@@ -659,9 +659,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -689,9 +689,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -717,9 +717,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});
@@ -743,9 +743,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
];
return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => {
assert.equal(doc.getText(), contents);
assert.strictEqual(doc.getText(), contents);
return Promise.resolve();
});
});

View File

@@ -55,7 +55,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -112,7 +112,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -141,7 +141,7 @@ suite('Tests for Emmet actions on html tags', () => {
];
return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents);
assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve();
});
});

View File

@@ -398,12 +398,12 @@ function testWrapWithAbbreviation(selections: Selection[], abbreviation: string,
editor.selections = selections;
const promise = wrapWithAbbreviation({ abbreviation });
if (!promise) {
assert.equal(1, 2, 'Wrap with Abbreviation returned undefined.');
assert.strictEqual(1, 2, 'Wrap with Abbreviation returned undefined.');
return Promise.resolve();
}
return promise.then(() => {
assert.equal(editor.document.getText(), expectedContents);
assert.strictEqual(editor.document.getText(), expectedContents);
return Promise.resolve();
});
});
@@ -414,12 +414,12 @@ function testWrapIndividualLinesWithAbbreviation(selections: Selection[], abbrev
editor.selections = selections;
const promise = wrapWithAbbreviation({ abbreviation });
if (!promise) {
assert.equal(1, 2, 'Wrap individual lines with Abbreviation returned undefined.');
assert.strictEqual(1, 2, 'Wrap individual lines with Abbreviation returned undefined.');
return Promise.resolve();
}
return promise.then(() => {
assert.equal(editor.document.getText(), expectedContents);
assert.strictEqual(editor.document.getText(), expectedContents);
return Promise.resolve();
});
});

View File

@@ -42,17 +42,13 @@ export function updateEmmetExtensionsPath(forceRefresh: boolean = false) {
}
if (forceRefresh || _currentExtensionsPath !== extensionsPath) {
_currentExtensionsPath = extensionsPath;
if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) {
return;
} else {
const rootPath = vscode.workspace.workspaceFolders[0].uri;
const fileSystem = vscode.workspace.fs;
helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => {
if (Array.isArray(extensionsPath) && extensionsPath.length) {
vscode.window.showErrorMessage(err.message);
}
});
}
const rootPath = vscode.workspace.workspaceFolders?.length ? vscode.workspace.workspaceFolders[0].uri : undefined;
const fileSystem = vscode.workspace.fs;
helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => {
if (Array.isArray(extensionsPath) && extensionsPath.length) {
vscode.window.showErrorMessage(err.message);
}
});
}
}
@@ -88,19 +84,19 @@ export function migrateEmmetExtensionsPath() {
* Mapping between languages that support Emmet and completion trigger characters
*/
export const LANGUAGE_MODES: { [id: string]: string[] } = {
'html': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'jade': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'slim': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'haml': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xml': ['.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xsl': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'html': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'jade': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'slim': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'haml': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xml': ['.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xsl': ['!', '.', '}', '*', '$', '/', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'javascriptreact': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'typescriptreact': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
'javascriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'typescriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
};
export function isStyleSheet(syntax: string): boolean {
@@ -380,32 +376,36 @@ export const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-t
* If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well
*/
export function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined {
const currentNode: HtmlFlatNode | undefined = <HtmlFlatNode | undefined>getFlatNode(root, offset, includeNodeBoundary);
let currentNode: HtmlFlatNode | undefined = <HtmlFlatNode | undefined>getFlatNode(root, offset, includeNodeBoundary);
if (!currentNode) { return; }
const isTemplateScript = currentNode.name === 'script' &&
(currentNode.attributes &&
currentNode.attributes.some(x => x.name.toString() === 'type'
&& allowedMimeTypesInScriptTag.includes(x.value.toString())));
if (isTemplateScript
&& currentNode.open
&& offset > currentNode.open.end
&& (!currentNode.close || offset < currentNode.close.start)) {
// blank out the rest of the document and search for the node within
const beforePadding = ' '.repeat(currentNode.open.end);
const endToUse = currentNode.close ? currentNode.close.start : currentNode.end;
const scriptBodyText = beforePadding + documentText.substring(currentNode.open.end, endToUse);
const innerRoot: HtmlFlatNode = parse(scriptBodyText);
const scriptBodyNode = getHtmlFlatNode(scriptBodyText, innerRoot, offset, includeNodeBoundary);
if (scriptBodyNode) {
scriptBodyNode.parent = currentNode;
currentNode.children.push(scriptBodyNode);
return scriptBodyNode;
}
// If the currentNode is a script one, first set up its subtree and then find HTML node.
if (currentNode.name === 'script' && currentNode.children.length === 0) {
setUpScriptNodeSubtree(documentText, currentNode);
currentNode = <HtmlFlatNode | undefined>getFlatNode(currentNode, offset, includeNodeBoundary) ?? currentNode;
}
return currentNode;
}
export function setUpScriptNodeSubtree(documentText: string, scriptNode: HtmlFlatNode): void {
const isTemplateScript = scriptNode.name === 'script' &&
(scriptNode.attributes &&
scriptNode.attributes.some(x => x.name.toString() === 'type'
&& allowedMimeTypesInScriptTag.includes(x.value.toString())));
if (isTemplateScript
&& scriptNode.open) {
// blank out the rest of the document and generate the subtree.
const beforePadding = ' '.repeat(scriptNode.open.end);
const endToUse = scriptNode.close ? scriptNode.close.start : scriptNode.end;
const scriptBodyText = beforePadding + documentText.substring(scriptNode.open.end, endToUse);
const innerRoot: HtmlFlatNode = parse(scriptBodyText);
innerRoot.children.forEach(child => {
scriptNode.children.push(child);
child.parent = scriptNode;
});
}
}
export function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean {
const htmlNode = node as HtmlFlatNode;
if ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end)
@@ -583,7 +583,7 @@ export function getEmmetConfiguration(syntax: string) {
) {
syntaxProfiles[syntax] = {
...syntaxProfiles[syntax],
selfClosingStyle: 'xml'
selfClosingStyle: syntax === 'jsx' ? 'xhtml' : 'xml'
};
}
}
@@ -657,10 +657,8 @@ export function getEmbeddedCssNodeIfAny(document: vscode.TextDocument, currentNo
const currentHtmlNode = <HtmlFlatNode>currentNode;
if (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) {
const offset = document.offsetAt(position);
if (currentHtmlNode.open.end <= offset && offset <= currentHtmlNode.close.start) {
if (currentHtmlNode.name === 'style'
&& currentHtmlNode.open.end < offset
&& currentHtmlNode.close.start > offset) {
if (currentHtmlNode.open.end < offset && offset <= currentHtmlNode.close.start) {
if (currentHtmlNode.name === 'style') {
const buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start);
return parseStylesheet(buffer);
}

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
@@ -10,4 +10,4 @@
"include": [
"src/**/*"
]
}
}

View File

@@ -54,9 +54,9 @@
integrity sha1-Rs/+oRmgoAMxKiHC2bVijLX81EI=
"@types/node@^12.19.9":
version "12.20.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.6.tgz#7b73cce37352936e628c5ba40326193443cfba25"
integrity sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==
version "12.20.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.7.tgz#1cb61fd0c85cb87e728c43107b5fd82b69bc9ef8"
integrity sha512-gWL8VUkg8VRaCAUgG9WmhefMqHmMblxe2rVpMF86nZY/+ZysU+BkAp+3cz03AixWDSSz0ks5WX59yAhv/cDwFA==
emmet@^2.3.0:
version "2.3.4"
@@ -77,9 +77,9 @@ jsonc-parser@^2.3.0:
integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==
vscode-emmet-helper@^2.3.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.4.2.tgz#98dc3275a22668f0e0ef9f2ee1fa76653d71e78f"
integrity sha512-j6N6xBn0NOigk2RYWESFlsnMQNJm5B10UUgOeHxRpm66Kck9Bq1nxwy6qT9eqKvzxz4hpC29Xv4aPGlOzsKw3w==
version "2.6.2"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.6.2.tgz#777b471a7851ba0ca8e4151533be7f92511f39b0"
integrity sha512-SkL1WjZZsA+bfTo52QH4PgqXCQAJSqzOmJtAY3rOl17MKbY6iJhVv2T26PshjmUnHoXnXMNa7PcLMCS75RsQDQ==
dependencies:
emmet "^2.3.0"
jsonc-parser "^2.3.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -8,6 +8,7 @@
"engines": {
"vscode": "^1.4.0"
},
"icon": "images/icon.png",
"activationEvents": [
"onLanguage:json",
"onLanguage:markdown",
@@ -15,13 +16,19 @@
],
"main": "./out/extensionEditingMain",
"browser": "./dist/browser/extensionEditingBrowserMain",
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"scripts": {
"compile": "gulp compile-extension:extension-editing",
"watch": "gulp watch-extension:extension-editing"
},
"dependencies": {
"jsonc-parser": "^2.2.1",
"markdown-it": "^8.3.1",
"markdown-it": "^12.0.4",
"parse5": "^3.0.2",
"vscode-nls": "^4.1.1"
},

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"typeRoots": [
@@ -9,4 +9,4 @@
"include": [
"src/**/*"
]
}
}

View File

@@ -17,40 +17,38 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470"
integrity sha512-+vD6E8ixntRzzZukoF3uP1iV+ZjVN3koTcaeK+BEoc/kSfGbLDIGC7RmCaUgVpUfN6cWvfczFRERCyKM9mkvXg==
argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
integrity sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=
dependencies:
sprintf-js "~1.0.2"
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA=
entities@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
jsonc-parser@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc"
integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==
linkify-it@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f"
integrity sha1-2UpGSPmxwXnWT6lykSaL22zpQ08=
linkify-it@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8"
integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ==
dependencies:
uc.micro "^1.0.1"
markdown-it@^8.3.1:
version "8.4.0"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.0.tgz#e2400881bf171f7018ed1bd9da441dac8af6306d"
integrity sha512-tNuOCCfunY5v5uhcO2AUMArvKAyKMygX8tfup/JrgnsDqcCATQsAExBq7o5Ml9iMmO82bk6jYNLj6khcrl0JGA==
markdown-it@^12.0.4:
version "12.0.4"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33"
integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q==
dependencies:
argparse "^1.0.7"
entities "~1.1.1"
linkify-it "^2.0.0"
argparse "^2.0.1"
entities "~2.1.0"
linkify-it "^3.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.3"
uc.micro "^1.0.5"
mdurl@^1.0.1:
version "1.0.1"
@@ -64,16 +62,16 @@ parse5@^3.0.2:
dependencies:
"@types/node" "^6.0.46"
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
uc.micro@^1.0.1, uc.micro@^1.0.3:
uc.micro@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
integrity sha1-ftUNXg+an7ClczeSWfKndFjVAZI=
uc.micro@^1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
vscode-nls@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c"

View File

@@ -1,8 +0,0 @@
src/**
test/**
out/**
tsconfig.json
build/**
extension.webpack.config.js
cgmanifest.json
yarn.lock

View File

@@ -1,7 +0,0 @@
# Git UI integration for Visual Studio Code
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
## Features
See [Git support in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) to learn about the features of this extension.

View File

@@ -1,4 +0,0 @@
{
"registrations": [],
"version": 1
}

View File

@@ -1,17 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
const withDefaults = require('../shared.webpack.config');
module.exports = withDefaults({
context: __dirname,
entry: {
main: './src/main.ts'
}
});

View File

@@ -1,35 +0,0 @@
{
"name": "git-ui",
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"license": "MIT",
"version": "1.0.0",
"engines": {
"vscode": "^1.5.0"
},
"extensionKind": [
"ui"
],
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"enableProposedApi": true,
"categories": [
"Other"
],
"activationEvents": [
"onCommand:git.credential"
],
"main": "./out/main",
"icon": "resources/icons/git.png",
"scripts": {
"compile": "gulp compile-extension:git-ui",
"watch": "gulp watch-extension:git-ui"
},
"devDependencies": {
"@types/node": "^12.19.9"
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}

View File

@@ -1,4 +0,0 @@
{
"displayName": "Git UI",
"description": "Git SCM UI Integration"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,57 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ExtensionContext, commands } from 'vscode';
import * as cp from 'child_process';
export async function deactivate(): Promise<any> {
}
export async function activate(context: ExtensionContext): Promise<void> {
context.subscriptions.push(commands.registerCommand('git.credential', async (data: any) => {
try {
const { stdout, stderr } = await exec(`git credential ${data.command}`, {
stdin: data.stdin,
env: Object.assign(process.env, { GIT_TERMINAL_PROMPT: '0' })
});
return { stdout, stderr, code: 0 };
} catch ({ stdout, stderr, error }) {
const code = error.code || 0;
if (stderr.indexOf('terminal prompts disabled') !== -1) {
stderr = '';
}
return { stdout, stderr, code };
}
}));
}
export interface ExecResult {
error: Error | null;
stdout: string;
stderr: string;
}
export function exec(command: string, options: cp.ExecOptions & { stdin?: string } = {}) {
return new Promise<ExecResult>((resolve, reject) => {
const child = cp.exec(command, options, (error, stdout, stderr) => {
(error ? reject : resolve)({ error, stdout, stderr });
});
if (options.stdin) {
child.stdin!.write(options.stdin, (err: any) => {
if (err) {
reject(err);
return;
}
child.stdin!.end((err: any) => {
if (err) {
reject(err);
}
});
});
}
});
}

View File

@@ -1,8 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
/// <reference types='@types/node'/>

View File

@@ -1,13 +0,0 @@
{
"extends": "../shared.tsconfig.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,
"typeRoots": [
"./node_modules/@types"
]
},
"include": [
"src/**/*"
]
}

View File

@@ -1,8 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/node@^12.19.9":
version "12.19.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==

View File

@@ -26,6 +26,12 @@
"update-grammar": "node ./build/update-grammars.js",
"test": "node ../../node_modules/mocha/bin/mocha"
},
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"commands": [
{
@@ -1686,19 +1692,10 @@
"default": true
},
"git.autofetch": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"enum": [
"all"
]
}
],
"type": ["boolean", "string"],
"enum": [true, false, "all"],
"scope": "resource",
"description": "%config.autofetch%",
"markdownDescription": "%config.autofetch%",
"default": false,
"tags": [
"usesOnlineServices"
@@ -1707,7 +1704,7 @@
"git.autofetchPeriod": {
"type": "number",
"scope": "resource",
"description": "%config.autofetchPeriod%",
"markdownDescription": "%config.autofetchPeriod%",
"default": 180
},
"git.branchValidationRegex": {
@@ -2378,7 +2375,7 @@
"byline": "^5.0.0",
"file-type": "^7.2.0",
"iconv-lite-umd": "0.6.8",
"jschardet": "2.2.1",
"jschardet": "2.3.0",
"vscode-extension-telemetry": "0.1.7",
"vscode-nls": "^4.0.0",
"vscode-uri": "^2.0.0",

View File

@@ -101,7 +101,7 @@
"config.autoRepositoryDetection.openEditors": "Scan for parent folders of open files.",
"config.autorefresh": "Whether auto refreshing is enabled.",
"config.autofetch": "When set to true, commits will automatically be fetched from the default remote of the current Git repository. Setting to `all` will fetch from all remotes.",
"config.autofetchPeriod": "Duration in seconds between each automatic git fetch, when `git.autofetch` is enabled.",
"config.autofetchPeriod": "Duration in seconds between each automatic git fetch, when `#git.autofetch#` is enabled.",
"config.confirmSync": "Confirm before synchronizing git repositories.",
"config.countBadge": "Controls the Git count badge.",
"config.countBadge.all": "Count all changes.",

View File

@@ -43,18 +43,18 @@ class CheckoutItem implements QuickPickItem {
class CheckoutTagItem extends CheckoutItem {
get description(): string {
override get description(): string {
return localize('tag at', "Tag at {0}", this.shortCommit);
}
}
class CheckoutRemoteHeadItem extends CheckoutItem {
get description(): string {
override get description(): string {
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
}
async run(repository: Repository, opts?: { detached?: boolean }): Promise<void> {
override async run(repository: Repository, opts?: { detached?: boolean }): Promise<void> {
if (!this.ref.name) {
return;
}
@@ -797,7 +797,7 @@ export class CommandCenter {
return;
}
const from = path.relative(repository.root, fromUri.path);
const from = path.relative(repository.root, fromUri.fsPath);
let to = await window.showInputBox({
value: from,
valueSelection: [from.length - path.basename(from).length, from.length]

View File

@@ -11,7 +11,7 @@ import * as which from 'which';
import { EventEmitter } from 'events';
import * as iconv from 'iconv-lite-umd';
import * as filetype from 'file-type';
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util';
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions } from './util';
import { CancellationToken, Progress, Uri } from 'vscode';
import { detectEncoding } from './encoding';
import { Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, BranchQuery } from './api/git';
@@ -377,6 +377,10 @@ export class Git {
this.env = options.env || {};
}
compareGitVersionTo(version: string): -1 | 0 | 1 {
return Versions.compare(Versions.fromString(this.version), Versions.fromString(version));
}
open(repository: string, dotGit: string): Repository {
return new Repository(this, repository, dotGit);
}
@@ -1977,7 +1981,16 @@ export class Repository {
return this.getHEAD();
}
const args = ['for-each-ref', '--format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname)'];
const args = ['for-each-ref'];
let supportsAheadBehind = true;
if (this._git.compareGitVersionTo('1.9.0') === -1) {
args.push('--format=%(refname)%00%(upstream:short)%00%(objectname)');
supportsAheadBehind = false;
} else {
args.push('--format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)');
}
if (/^refs\/(head|remotes)\//i.test(name)) {
args.push(name);
} else {
@@ -1986,7 +1999,7 @@ export class Repository {
const result = await this.exec(args);
const branches: Branch[] = result.stdout.trim().split('\n').map<Branch | undefined>(line => {
let [branchName, upstream, status, ref] = line.trim().split('\0');
let [branchName, upstream, ref, status] = line.trim().split('\0');
if (branchName.startsWith('refs/heads/')) {
branchName = branchName.substring(11);
@@ -2026,7 +2039,19 @@ export class Repository {
}).filter((b?: Branch): b is Branch => !!b);
if (branches.length) {
return branches[0];
const [branch] = branches;
if (!supportsAheadBehind && branch.upstream) {
try {
const result = await this.exec(['rev-list', '--left-right', '--count', `${branch.name}...${branch.upstream.remote}/${branch.upstream.name}`]);
const [ahead, behind] = result.stdout.trim().split('\t');
(branch as any).ahead = Number(ahead) || 0;
(branch as any).behind = Number(behind) || 0;
} catch { }
}
return branch;
}
return Promise.reject<Branch>(new Error('No such branch'));

View File

@@ -1835,7 +1835,10 @@ export class Repository implements Disposable {
// noop
}
const sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically';
let sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically';
if (sort !== 'alphabetically' && sort !== 'committerdate') {
sort = 'alphabetically';
}
const [refs, remotes, submodules, rebaseCommit] = await Promise.all([this.repository.getRefs({ sort }), this.repository.getRemotes(), this.repository.getSubmodules(), this.getRebaseCommit()]);
this._HEAD = HEAD;

View File

@@ -8,7 +8,7 @@ const testRunner = require('../../../../test/integration/electron/testrunner');
const options: any = {
ui: 'tdd',
color: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
color: true,
timeout: 60000
};

View File

@@ -45,8 +45,10 @@ suite('git smoke test', function () {
cp.execSync('git init', { cwd });
cp.execSync('git config user.name testuser', { cwd });
cp.execSync('git config user.email monacotools@microsoft.com', { cwd });
cp.execSync('git config commit.gpgsign false', { cwd });
cp.execSync('git add .', { cwd });
cp.execSync('git commit -m "initial commit"', { cwd });
cp.execSync('git branch -m main', { cwd });
// make sure git is activated
const ext = extensions.getExtension<GitExtension>('vscode.git');
@@ -124,7 +126,7 @@ suite('git smoke test', function () {
assert.equal(repository.state.workingTreeChanges.length, 0);
assert.equal(repository.state.indexChanges.length, 0);
});
test('rename/delete conflict', async function () {
cp.execSync('git branch test', { cwd });
cp.execSync('git checkout test', { cwd });
@@ -133,16 +135,16 @@ suite('git smoke test', function () {
cp.execSync('git add .', { cwd });
await repository.commit('commit on test');
cp.execSync('git checkout master', { cwd });
cp.execSync('git checkout main', { cwd });
fs.renameSync(file('app.js'), file('rename.js'));
cp.execSync('git add .', { cwd });
await repository.commit('commit on master');
await repository.commit('commit on main');
try {
cp.execSync('git merge test', { cwd });
} catch (e) { }
setTimeout(() => {
commands.executeCommand('workbench.scm.focus');
}, 2e3);

View File

@@ -414,3 +414,56 @@ export class PromiseSource<T> {
}
}
}
export namespace Versions {
declare type VersionComparisonResult = -1 | 0 | 1;
export interface Version {
major: number;
minor: number;
patch: number;
pre?: string;
}
export function compare(v1: string | Version, v2: string | Version): VersionComparisonResult {
if (typeof v1 === 'string') {
v1 = fromString(v1);
}
if (typeof v2 === 'string') {
v2 = fromString(v2);
}
if (v1.major > v2.major) { return 1; }
if (v1.major < v2.major) { return -1; }
if (v1.minor > v2.minor) { return 1; }
if (v1.minor < v2.minor) { return -1; }
if (v1.patch > v2.patch) { return 1; }
if (v1.patch < v2.patch) { return -1; }
if (v1.pre === undefined && v2.pre !== undefined) { return 1; }
if (v1.pre !== undefined && v2.pre === undefined) { return -1; }
if (v1.pre !== undefined && v2.pre !== undefined) {
return v1.pre.localeCompare(v2.pre) as VersionComparisonResult;
}
return 0;
}
export function from(major: string | number, minor: string | number, patch?: string | number, pre?: string): Version {
return {
major: typeof major === 'string' ? parseInt(major, 10) : major,
minor: typeof minor === 'string' ? parseInt(minor, 10) : minor,
patch: patch === undefined || patch === null ? 0 : typeof patch === 'string' ? parseInt(patch, 10) : patch,
pre: pre,
};
}
export function fromString(version: string): Version {
const [ver, pre] = version.split('-');
const [major, minor, patch] = ver.split('.');
return from(major, minor, patch, pre);
}
}

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,
@@ -10,4 +10,4 @@
"include": [
"src/**/*"
]
}
}

View File

@@ -117,10 +117,10 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
jschardet@2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.2.1.tgz#03b0264669a90c7a5c436a68c5a7d4e4cb0c9823"
integrity sha512-Ks2JNuUJoc7PGaZ7bVFtSEvOcr0rBq6Q1J5/7+zKWLT+g+4zziL63O0jg7y2jxhzIa1LVsHUbPXrbaWmz9iwDw==
jschardet@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.3.0.tgz#06e2636e16c8ada36feebbdc08aa34e6a9b3ff75"
integrity sha512-6I6xT7XN/7sBB7q8ObzKbmv5vN+blzLcboDE1BNEsEfmRXJValMxO6OIRT69ylPBRemS3rw6US+CMCar0OBc9g==
semver@^5.3.0:
version "5.5.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -8,6 +8,7 @@
"engines": {
"vscode": "^1.41.0"
},
"icon": "images/icon.png",
"enableProposedApi": true,
"categories": [
"Other"
@@ -20,6 +21,12 @@
"activationEvents": [
"onAuthenticationRequest:github"
],
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"commands": [
{
@@ -56,7 +63,8 @@
"node-fetch": "2.6.1",
"uuid": "8.1.0",
"vscode-extension-telemetry": "0.1.7",
"vscode-nls": "^4.1.2"
"vscode-nls": "^4.1.2",
"vscode-tas-client": "^0.1.22"
},
"devDependencies": {
"@types/node": "^12.19.9",

View File

@@ -0,0 +1,73 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry';
import { getExperimentationService, IExperimentationService, IExperimentationTelemetry, TargetPopulation } from 'vscode-tas-client';
export class ExperimentationTelemetry implements IExperimentationTelemetry {
private sharedProperties: Record<string, string> = {};
constructor(private baseReporter: TelemetryReporter) { }
sendTelemetryEvent(eventName: string, properties?: Record<string, string>, measurements?: Record<string, number>) {
this.baseReporter.sendTelemetryEvent(
eventName,
{
...this.sharedProperties,
...properties,
},
measurements,
);
}
sendTelemetryErrorEvent(
eventName: string,
properties?: Record<string, string>,
_measurements?: Record<string, number>,
) {
this.baseReporter.sendTelemetryErrorEvent(eventName, {
...this.sharedProperties,
...properties,
});
}
setSharedProperty(name: string, value: string): void {
this.sharedProperties[name] = value;
}
postEvent(eventName: string, props: Map<string, string>): void {
const event: Record<string, string> = {};
for (const [key, value] of props) {
event[key] = value;
}
this.sendTelemetryEvent(eventName, event);
}
dispose(): Promise<any> {
return this.baseReporter.dispose();
}
}
function getTargetPopulation(): TargetPopulation {
switch (vscode.env.uriScheme) {
case 'vscode':
return TargetPopulation.Public;
case 'vscode-insiders':
return TargetPopulation.Insiders;
case 'vscode-exploration':
return TargetPopulation.Internal;
case 'code-oss':
return TargetPopulation.Team;
default:
return TargetPopulation.Public;
}
}
export async function createExperimentationService(context: vscode.ExtensionContext, telemetry: ExperimentationTelemetry): Promise<IExperimentationService> {
const id = context.extension.id;
const version = context.extension.packageJSON.version;
return getExperimentationService(id, version, getTargetPopulation(), telemetry, context.globalState);
}

View File

@@ -8,10 +8,14 @@ import { GitHubAuthenticationProvider, onDidChangeSessions } from './github';
import { uriHandler } from './githubServer';
import Logger from './common/logger';
import TelemetryReporter from 'vscode-extension-telemetry';
import { createExperimentationService, ExperimentationTelemetry } from './experimentationService';
export async function activate(context: vscode.ExtensionContext) {
const { name, version, aiKey } = require('../package.json') as { name: string, version: string, aiKey: string };
const telemetryReporter = new TelemetryReporter(name, version, aiKey);
const telemetryReporter = new ExperimentationTelemetry(new TelemetryReporter(name, version, aiKey));
const experimentationService = await createExperimentationService(context, telemetryReporter);
await experimentationService.initialFetch;
context.subscriptions.push(vscode.window.registerUriHandler(uriHandler));
const loginService = new GitHubAuthenticationProvider(context, telemetryReporter);

View File

@@ -9,7 +9,7 @@ import { Keychain } from './common/keychain';
import { GitHubServer, NETWORK_ERROR } from './githubServer';
import Logger from './common/logger';
import { arrayEquals } from './common/utils';
import TelemetryReporter from 'vscode-extension-telemetry';
import { ExperimentationTelemetry } from './experimentationService';
export const onDidChangeSessions = new vscode.EventEmitter<vscode.AuthenticationProviderAuthenticationSessionsChangeEvent>();
@@ -30,7 +30,7 @@ export class GitHubAuthenticationProvider {
private _keychain: Keychain;
constructor(context: vscode.ExtensionContext, telemetryReporter: TelemetryReporter) {
constructor(context: vscode.ExtensionContext, telemetryReporter: ExperimentationTelemetry) {
this._keychain = new Keychain(context);
this._githubServer = new GitHubServer(telemetryReporter);
}

View File

@@ -9,12 +9,17 @@ import fetch, { Response } from 'node-fetch';
import { v4 as uuid } from 'uuid';
import { PromiseAdapter, promiseFromEvent } from './common/utils';
import Logger from './common/logger';
import TelemetryReporter from 'vscode-extension-telemetry';
import { ExperimentationTelemetry } from './experimentationService';
const localize = nls.loadMessageBundle();
export const NETWORK_ERROR = 'network error';
<<<<<<< HEAD
const AUTH_RELAY_SERVER = 'auth.code-server.dev';
=======
const AUTH_RELAY_SERVER = 'vscode-auth.github.com';
// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com';
>>>>>>> 58ce849223667f77dc0d6d7658870ca3f815e17f
class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
public handleUri(uri: vscode.Uri) {
@@ -42,10 +47,16 @@ export class GitHubServer {
private _pendingStates = new Map<string, string[]>();
private _codeExchangePromises = new Map<string, { promise: Promise<string>, cancel: vscode.EventEmitter<void> }>();
constructor(private readonly telemetryReporter: TelemetryReporter) { }
constructor(private readonly telemetryReporter: ExperimentationTelemetry) { }
private isTestEnvironment(url: vscode.Uri): boolean {
return url.authority === 'vscode-web-test-playground.azurewebsites.net' || url.authority.startsWith('localhost:');
return /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:');
}
// TODO@joaomoreno TODO@RMacfarlane
private async isNoCorsEnvironment(): Promise<boolean> {
const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
return uri.scheme === 'https' && /^vscode\./.test(uri.authority);
}
public async login(scopes: string): Promise<string> {
@@ -53,7 +64,10 @@ export class GitHubServer {
this.updateStatusBarItem(true);
const state = uuid();
const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
// TODO@joaomoreno TODO@RMacfarlane
const nocors = await this.isNoCorsEnvironment();
const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate${nocors ? '?nocors=true' : ''}`));
if (this.isTestEnvironment(callbackUri)) {
const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
@@ -80,7 +94,7 @@ export class GitHubServer {
const existingStates = this._pendingStates.get(scopes) || [];
this._pendingStates.set(scopes, [...existingStates, state]);
const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com`);
const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com${nocors ? '&nocors=true' : ''}`);
await vscode.env.openExternal(uri);
}
@@ -121,23 +135,36 @@ export class GitHubServer {
return;
}
try {
const result = await fetch(`https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`, {
method: 'POST',
headers: {
Accept: 'application/json'
}
});
const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
if (result.ok) {
const json = await result.json();
// TODO@joao: remove
if (query.nocors) {
try {
const json: any = await vscode.commands.executeCommand('_workbench.fetchJSON', url, 'POST');
Logger.info('Token exchange success!');
resolve(json.access_token);
} else {
reject(result.statusText);
} catch (err) {
reject(err);
}
} else {
try {
const result = await fetch(url, {
method: 'POST',
headers: {
Accept: 'application/json'
}
});
if (result.ok) {
const json = await result.json();
Logger.info('Token exchange success!');
resolve(json.access_token);
} else {
reject(result.statusText);
}
} catch (ex) {
reject(ex);
}
} catch (ex) {
reject(ex);
}
};
@@ -222,6 +249,12 @@ export class GitHubServer {
}
public async checkIsEdu(token: string): Promise<void> {
const nocors = await this.isNoCorsEnvironment();
if (nocors) {
return;
}
try {
const result = await fetch('https://education.github.com/api/user', {
headers: {

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,

View File

@@ -55,6 +55,13 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "^1.10.0"
cls-hooked@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908"
@@ -103,6 +110,11 @@ emitter-listener@^1.0.1, emitter-listener@^1.1.1:
dependencies:
shimmer "^1.2.0"
follow-redirects@^1.10.0:
version "1.13.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267"
integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==
form-data@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682"
@@ -144,6 +156,13 @@ stack-chain@^1.3.7:
resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285"
integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=
tas-client@0.1.21:
version "0.1.21"
resolved "https://registry.yarnpkg.com/tas-client/-/tas-client-0.1.21.tgz#62275d5f75266eaae408f7463364748cb92f220d"
integrity sha512-7UuIwOXarCYoCTrQHY5n7M+63XuwMC0sVUdbPQzxqDB9wMjIW0JF39dnp3yoJnxr4jJUVhPtvkkXZbAD0BxCcA==
dependencies:
axios "^0.21.1"
uuid@8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d"
@@ -160,3 +179,10 @@ vscode-nls@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167"
integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==
vscode-tas-client@^0.1.22:
version "0.1.22"
resolved "https://registry.yarnpkg.com/vscode-tas-client/-/vscode-tas-client-0.1.22.tgz#2dd674b21a94ff4e97db2b6545d9efda8b5f07c3"
integrity sha512-1sYH73nhiSRVQgfZkLQNJW7VzhKM9qNbCe8QyXgiKkLhH4GflDXRPAK4yy4P41jUgula+Fc9G7i5imj1dlKfaw==
dependencies:
tas-client "0.1.21"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -8,6 +8,7 @@
"engines": {
"vscode": "^1.41.0"
},
"icon": "images/icon.png",
"enableProposedApi": true,
"categories": [
"Other"
@@ -19,6 +20,12 @@
"vscode.git"
],
"main": "./out/extension.js",
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"commands": [
{

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { commands, env, ProgressLocation, UIKind, Uri, window } from 'vscode';
import { commands, env, ProgressLocation, Uri, window } from 'vscode';
import * as nls from 'vscode-nls';
import { getOctokit } from './auth';
import { GitErrorCodes, PushErrorHandler, Remote, Repository } from './typings/git';
@@ -17,33 +17,6 @@ export function isInCodespaces(): boolean {
}
async function handlePushError(repository: Repository, remote: Remote, refspec: string, owner: string, repo: string): Promise<void> {
const inCodespaces = isInCodespaces();
let codespace: string | undefined;
if (inCodespaces) {
if (env.uiKind === UIKind.Web) {
// TODO@eamodio Find a better way to get the codespace id
// HACK to get the codespace id
try {
const codespaceUrl = (await env.asExternalUri(Uri.parse(`${env.uriScheme}://codespace/`))).authority;
if (codespaceUrl.endsWith('.github.dev')) {
codespace = codespaceUrl.slice(0, -11);
} else {
[codespace] = codespaceUrl.split('.');
}
} catch { }
} else {
// Call into the codespaces extension to get the codespace id
const info = await commands.executeCommand<{ name: string } | undefined>('github.codespaces.getCurrentCodespace');
codespace = info?.name;
}
if (!codespace) {
const ok = localize('ok', "OK");
await window.showErrorMessage(localize('fork unable', "You don't have permissions to push to '{0}/{1}' on GitHub.", owner, repo), ok);
return;
}
}
const yes = localize('create a fork', "Create Fork");
const no = localize('no', "No");
@@ -66,15 +39,17 @@ async function handlePushError(repository: Repository, remote: Remote, refspec:
// Issue: what if the repo already exists?
let ghRepository: CreateForkResponseData;
try {
if (inCodespaces) {
const userResp = await octokit.users.getAuthenticated();
const user = userResp.data.login;
if (isInCodespaces()) {
// Call into the codespaces extension to fork the repository
const resp = await commands.executeCommand<{ repository: CreateForkResponseData, ref: string }>('github.codespaces.forkRepository');
if (!resp) {
throw new Error('Unable to fork respository');
}
const resp = await octokit.request<{ repository: CreateForkResponseData, ref: string }>({ method: 'POST', url: `/vscs_internal/user/${user}/codespaces/${codespace}/fork_repo` });
ghRepository = resp.data.repository;
ghRepository = resp.repository;
if (resp.data.ref) {
let ref = resp.data.ref;
if (resp.ref) {
let ref = resp.ref;
if (ref.startsWith('refs/heads/')) {
ref = ref.substr(11);
}
@@ -90,7 +65,6 @@ async function handlePushError(repository: Repository, remote: Remote, refspec:
throw ex;
}
progress.report({ message: localize('forking_pushing', "Pushing changes..."), increment: 33 });
// Issue: what if there's already an `upstream` repo?
@@ -166,9 +140,7 @@ export class GithubPushErrorHandler implements PushErrorHandler {
return false;
}
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl)
|| /^git@github\.com:([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl);
const match = /^(?:https:\/\/github\.com\/|git@github\.com:)([^/]+)\/([^/.]+)(?:\.git)?$/i.exec(remoteUrl);
if (!match) {
return false;
}

View File

@@ -45,8 +45,8 @@ export class GithubRemoteSourceProvider implements RemoteSourceProvider {
}
const all = await Promise.all([
this.getQueryRemoteSources(octokit, query),
this.getUserRemoteSources(octokit, query),
this.getQueryRemoteSources(octokit, query)
]);
const map = new Map<string, RemoteSource>();

View File

@@ -1,5 +1,5 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,

View File

@@ -26,6 +26,12 @@
"activationEvents": [
"onCommand:workbench.action.tasks.runTask"
],
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"configuration": {
"id": "grunt",
@@ -63,7 +69,8 @@
"type": "string",
"description": "%grunt.taskDefinition.file.description%"
}
}
},
"when": "shellExecutionSupported"
}
]
},

View File

@@ -1,9 +1,9 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -26,6 +26,12 @@
"activationEvents": [
"onCommand:workbench.action.tasks.runTask"
],
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"configuration": {
"id": "gulp",
@@ -59,7 +65,8 @@
"type": "string",
"description": "%gulp.taskDefinition.file.description%"
}
}
},
"when": "shellExecutionSupported"
}
]
},

View File

@@ -1,9 +1,9 @@
{
"extends": "../shared.tsconfig.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -1,9 +1,9 @@
{
"extends": "../../shared.tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -17,6 +17,12 @@
],
"main": "./client/out/node/htmlClientMain",
"browser": "./client/dist/browser/htmlClientMain",
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"scripts": {
"compile": "npx gulp compile-extension:html-language-features-client compile-extension:html-language-features-server",
"watch": "npx gulp watch-extension:html-language-features-client watch-extension:html-language-features-server",

View File

@@ -9,10 +9,10 @@
},
"main": "./out/node/htmlServerMain",
"dependencies": {
"vscode-css-languageservice": "^5.1.0",
"vscode-html-languageservice": "^4.0.2",
"vscode-languageserver-textdocument": "^1.0.1",
"vscode-css-languageservice": "^5.1.1",
"vscode-html-languageservice": "^4.0.3",
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
"vscode-nls": "^5.0.0",
"vscode-uri": "^3.0.2"
},

View File

@@ -127,7 +127,8 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
async doResolve(document: TextDocument, item: CompletionItem): Promise<CompletionItem> {
const jsDocument = jsDocuments.get(document);
const jsLanguageService = await host.getLanguageService(jsDocument);
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined);
// @ts-expect-error until 4.3 protocol update
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined);
if (details) {
item.detail = ts.displayPartsToString(details.displayParts);
item.documentation = ts.displayPartsToString(details.documentation);

View File

@@ -11,7 +11,7 @@ const suite = 'Integration HTML Extension Tests';
const options = {
ui: 'tdd',
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
color: true,
timeout: 60000
};

View File

@@ -1,9 +1,9 @@
{
"extends": "../../shared.tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
},
"include": [
"src/**/*"
]
}
}

View File

@@ -12,20 +12,20 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==
vscode-css-languageservice@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.0.tgz#cd172d13e9e7ae23ba567c73778aee10475ff716"
integrity sha512-iLHd/WjRKgaZBXMNeUooHG+r0qlhJBkXa+3MpQQR6Rpm928cis/3OV2Mp1R80yAQevIMeDL32RIJfHoJCT/RRg==
vscode-css-languageservice@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.1.tgz#d68a22ea0b34a8356c169cafc7d32564c2ff6e87"
integrity sha512-QW0oe/g2y5E2AbVqY7FJNr2Q8uHiAHNSFpptI6xB8Y0KgzVKppOcIVrgmBNzXhFp9IswAwptkdqr8ExSJbqPkQ==
dependencies:
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0"
vscode-nls "^5.0.0"
vscode-uri "^3.0.2"
vscode-html-languageservice@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.0.2.tgz#e0a02975b7795b409b13a545b8954c0b6e5e8345"
integrity sha512-Kin07sTZ9FkZNcNMXtoUkmmDtZHsp1hShatFUvqx07ySz1BeXDyWyvdWY/fxk2Mc/ApfQ9rmK8YyhqUotLZ8GQ==
vscode-html-languageservice@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.0.3.tgz#3b7e7d3cfee75d47da0181dd638b5f459456a913"
integrity sha512-34KPIgRHVInT+TiFNmfiPFDrUAOOLuySNP2h0pMxBu1ObAbSixSqB3BMQFxIHz9hrGd3X0DEvi5YkobDxs4rWw==
dependencies:
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More