Skip to content

Commit

Permalink
Rebase against the upstream 5f9fc78
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: 5f9fc78
  • Loading branch information
Eclipse Che Sync committed Jul 28, 2023
2 parents 8bcdf2a + 5f9fc78 commit cccf14f
Show file tree
Hide file tree
Showing 43 changed files with 11,234 additions and 102 deletions.
33 changes: 33 additions & 0 deletions code/.eslintplugin/code-no-test-async-suite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as eslint from 'eslint';

function isCallExpression(node: TSESTree.Node): node is TSESTree.CallExpression {
return node.type === 'CallExpression';
}

function isFunctionExpression(node: TSESTree.Node): node is TSESTree.FunctionExpression {
return node.type.includes('FunctionExpression');
}

export = new class NoAsyncSuite implements eslint.Rule.RuleModule {

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
function hasAsyncSuite(node: any) {
if (isCallExpression(node) && node.arguments.length >= 2 && isFunctionExpression(node.arguments[1]) && node.arguments[1].async) {
return context.report({
node: node as any,
message: 'suite factory function should never be async'
});
}
}

return {
['CallExpression[callee.name=/suite$/][arguments]']: hasAsyncSuite,
};
}
};
1 change: 1 addition & 0 deletions code/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
],
"rules": {
"local/code-no-test-only": "error",
"local/code-no-test-async-suite": "warn",
"local/code-no-unexternalized-strings": "off"
}
},
Expand Down
5 changes: 3 additions & 2 deletions code/build/azure-pipelines/common/releaseBuild.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion code/build/azure-pipelines/common/releaseBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ async function main(force: boolean): Promise<void> {

const [, , force] = process.argv;

main(force === 'true').then(() => {
console.log(process.argv);

main(/^true$/i.test(force)).then(() => {
console.log('Build successfully released');
process.exit(0);
}, err => {
Expand Down
7 changes: 1 addition & 6 deletions code/extensions/configuration-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
".code-workspace",
"language-configuration.json",
"icon-theme.json",
"color-theme.json",
".code-snippets"
"color-theme.json"
],
"filenames": [
"settings.json",
Expand All @@ -54,10 +53,6 @@
"profiles.json",
"devcontainer.json",
".devcontainer.json"
],
"filenamePatterns": [
"**/User/snippets/*.json",
"**/User/profiles/*/snippets/*.json"
]
}, {
"id": "json",
Expand Down
2 changes: 1 addition & 1 deletion code/extensions/csharp/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "878aefe73f942ac68dc4a46a0f154661bcb9eff4"
"commitHash": "772323937fedd65c6dc1c8ce6ea41d97415ed7d1"
}
},
"license": "MIT",
Expand Down
18 changes: 16 additions & 2 deletions code/extensions/csharp/syntaxes/csharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/878aefe73f942ac68dc4a46a0f154661bcb9eff4",
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/772323937fedd65c6dc1c8ce6ea41d97415ed7d1",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
Expand Down Expand Up @@ -286,6 +286,9 @@
{
"include": "#nameof-expression"
},
{
"include": "#default-literal-expression"
},
{
"include": "#throw-expression"
},
Expand All @@ -298,6 +301,9 @@
{
"include": "#verbatim-interpolated-string"
},
{
"include": "#type-builtin"
},
{
"include": "#this-or-base-expression"
},
Expand Down Expand Up @@ -2733,6 +2739,14 @@
}
]
},
"default-literal-expression": {
"match": "(?<!\\.)\\b(default)\\b",
"captures": {
"1": {
"name": "keyword.other.default.cs"
}
}
},
"throw-expression": {
"match": "(?<!\\.)\\b(throw)\\b",
"captures": {
Expand Down Expand Up @@ -3673,7 +3687,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* # 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(?=\\()",
"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"
Expand Down
2 changes: 1 addition & 1 deletion code/extensions/fsharp/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "71b1ead8c99715f6c994115ebab7ee4a14cf0c59"
"commitHash": "8740e610a367c5e3f15be716acc7207655ced4cf"
}
},
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions code/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/ionide/ionide-fsgrammar/commit/71b1ead8c99715f6c994115ebab7ee4a14cf0c59",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/8740e610a367c5e3f15be716acc7207655ced4cf",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
Expand Down Expand Up @@ -314,7 +314,7 @@
},
{
"match": "(?!when|and|or\\b)\\b([\\w0-9'`^._]+)",
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
"comments": "Here we need the \\w modifier in order to check that the words are allowed",
"captures": {
"1": {
"name": "entity.name.type.fsharp"
Expand Down Expand Up @@ -1832,4 +1832,4 @@
]
}
}
}
}
4 changes: 2 additions & 2 deletions code/extensions/java/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "redhat-developer/vscode-java",
"repositoryUrl": "https://github.com/redhat-developer/vscode-java",
"commitHash": "7a770ab6750b4b09173d98de14eb9792e3432b36"
"commitHash": "5fb57e8e1c5d776b21be13cd7227b25b87edf4a6"
}
},
"license": "MIT",
Expand Down Expand Up @@ -48,4 +48,4 @@
}
],
"version": 1
}
}
13 changes: 12 additions & 1 deletion code/extensions/java/syntaxes/java.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/redhat-developer/vscode-java/commit/7a770ab6750b4b09173d98de14eb9792e3432b36",
"version": "https://github.com/redhat-developer/vscode-java/commit/5fb57e8e1c5d776b21be13cd7227b25b87edf4a6",
"name": "Java",
"scopeName": "source.java",
"patterns": [
Expand Down Expand Up @@ -1378,6 +1378,17 @@
},
"properties": {
"patterns": [
{
"match": "(\\.)\\s*(new)",
"captures": {
"1": {
"name": "punctuation.separator.period.java"
},
"2": {
"name": "keyword.control.new.java"
}
}
},
{
"match": "(\\.)\\s*([a-zA-Z_$][\\w$]*)(?=\\s*\\.\\s*[a-zA-Z_$][\\w$]*)",
"captures": {
Expand Down
10 changes: 6 additions & 4 deletions code/extensions/json/build/update-grammars.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

var updateGrammar = require('vscode-grammar-updater');

function adaptJSON(grammar, name, replacementScope) {
function adaptJSON(grammar, name, replacementScope, replaceeScope = 'json') {
grammar.name = name;
grammar.scopeName = `source${replacementScope}`;

const regex = new RegExp(`\.${replaceeScope}`, 'g');
var fixScopeNames = function (rule) {
if (typeof rule.name === 'string') {
rule.name = rule.name.replace(/\.json/g, replacementScope);
rule.name = rule.name.replace(regex, replacementScope);
}
if (typeof rule.contentName === 'string') {
rule.contentName = rule.contentName.replace(/\.json/g, replacementScope);
rule.contentName = rule.contentName.replace(regex, replacementScope);
}
for (var property in rule) {
var value = rule[property];
Expand All @@ -35,3 +35,5 @@ var tsGrammarRepo = 'microsoft/vscode-JSON.tmLanguage';
updateGrammar.update(tsGrammarRepo, 'JSON.tmLanguage', './syntaxes/JSON.tmLanguage.json');
updateGrammar.update(tsGrammarRepo, 'JSON.tmLanguage', './syntaxes/JSONC.tmLanguage.json', grammar => adaptJSON(grammar, 'JSON with Comments', '.json.comments'));
updateGrammar.update(tsGrammarRepo, 'JSON.tmLanguage', './syntaxes/JSONL.tmLanguage.json', grammar => adaptJSON(grammar, 'JSON Lines', '.json.lines'));

updateGrammar.update('jeff-hykin/better-snippet-syntax', 'autogenerated/jsonc.tmLanguage.json', './syntaxes/snippets.tmLanguage.json', grammar => adaptJSON(grammar, 'Snippets', '.json.comments.snippets', 'json.comments'));
12 changes: 12 additions & 0 deletions code/extensions/json/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
},
"license": "MIT",
"version": "0.0.0"
},
{
"component": {
"type": "git",
"git": {
"name": "jeff-hykin/better-snippet-syntax",
"repositoryUrl": "https://github.com/jeff-hykin/better-snippet-syntax",
"commitHash": "2b1bb124cb2b9c75c3c80eae1b8f3a043841d654"
}
},
"license": "MIT",
"version": "1.0.2"
}
],
"version": 1
Expand Down
21 changes: 20 additions & 1 deletion code/extensions/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
".jslintrc",
".jsonld",
".geojson",
".ipynb",
".ipynb",
".vuerc"
],
"filenames": [
Expand Down Expand Up @@ -77,6 +77,20 @@
],
"filenames": [],
"configuration": "./language-configuration.json"
},
{
"id": "snippets",
"aliases": [
"Code Snippets"
],
"extensions": [
".code-snippets"
],
"filenamePatterns": [
"**/User/snippets/*.json",
"**/User/profiles/*/snippets/*.json"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
Expand All @@ -94,6 +108,11 @@
"language": "jsonl",
"scopeName": "source.json.lines",
"path": "./syntaxes/JSONL.tmLanguage.json"
},
{
"language": "snippets",
"scopeName": "source.json.comments.snippets",
"path": "./syntaxes/snippets.tmLanguage.json"
}
]
},
Expand Down
7,463 changes: 7,463 additions & 0 deletions code/extensions/json/syntaxes/snippets.tmLanguage.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/extensions/latex/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "jlelong/vscode-latex-basics",
"repositoryUrl": "https://github.com/jlelong/vscode-latex-basics",
"commitHash": "30adbfae9dcb0a6477584247ac477f13845d1f5f"
"commitHash": "30d04562e592305b6f6d41a539b3ccf326888aaf"
}
},
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions code/extensions/latex/syntaxes/LaTeX.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jlelong/vscode-latex-basics/commit/30adbfae9dcb0a6477584247ac477f13845d1f5f",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/30d04562e592305b6f6d41a539b3ccf326888aaf",
"name": "LaTeX",
"scopeName": "text.tex.latex",
"patterns": [
Expand Down Expand Up @@ -1337,7 +1337,7 @@
]
},
{
"begin": "(\\s*\\\\begin\\{(tabular[xy*]?|xltabular|longtable|(?:long)?tabu|(?:long|tall)?tblr|NiceTabular[X*]?)\\}(\\s*\\n)?)",
"begin": "(\\s*\\\\begin\\{(tabular[xy*]?|xltabular|longtable|(?:long)?tabu|(?:long|tall)?tblr|NiceTabular[X*]?|booktabs)\\}(\\s*\\n)?)",
"captures": {
"1": {
"patterns": [
Expand Down
2 changes: 1 addition & 1 deletion code/extensions/sql/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "microsoft/vscode-mssql",
"repositoryUrl": "https://github.com/microsoft/vscode-mssql",
"commitHash": "cb5940297a8cef76daaf4a6b63c4968c9a12d17a"
"commitHash": "9cb3529a978ddf599bf5bdd228f21bbcfe2914f5"
}
},
"license": "MIT",
Expand Down
Loading

0 comments on commit cccf14f

Please sign in to comment.