Skip to content

Commit 93fecc1

Browse files
committed
Merge remote-tracking branch 'origin/master' into alex/wrapping
2 parents 4553268 + 629a08e commit 93fecc1

59 files changed

Lines changed: 383 additions & 192 deletions

File tree

Some content is hidden

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

build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"minimist": "^1.2.0",
4444
"request": "^2.85.0",
4545
"terser": "4.3.8",
46-
"typescript": "3.7.3",
46+
"typescript": "^3.8.0-dev.20200104",
4747
"vsce": "1.48.0",
4848
"vscode-telemetry-extractor": "^1.5.4",
4949
"xml2js": "^0.4.17"

build/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,16 +2453,16 @@ typed-rest-client@^0.9.0:
24532453
tunnel "0.0.4"
24542454
underscore "1.8.3"
24552455

2456-
typescript@3.7.3:
2457-
version "3.7.3"
2458-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69"
2459-
integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==
2460-
24612456
typescript@^3.0.1:
24622457
version "3.5.3"
24632458
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
24642459
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
24652460

2461+
typescript@^3.8.0-dev.20200104:
2462+
version "3.8.0-dev.20200104"
2463+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.0-dev.20200104.tgz#521b2f0b5a288b6e3f8a095525f64712330cc649"
2464+
integrity sha512-Zdb8X1uzvUPrRvRBqega83NxqCuN/kyxuXG1u8BV10mGOqfwQb0SreSDoDDM1zUgrqFZ93neVh3DVyWTvx6XlA==
2465+
24662466
typical@^4.0.0:
24672467
version "4.0.0"
24682468
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"

extensions/javascript/syntaxes/JavaScript.tmLanguage.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/b7ef0941e38d56292d19ee7706a558dbff6c3a35",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js",
1010
"patterns": [
@@ -1825,7 +1825,7 @@
18251825
},
18261826
"access-modifier": {
18271827
"name": "storage.modifier.js",
1828-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1828+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
18291829
},
18301830
"property-accessor": {
18311831
"name": "storage.type.property.js",
@@ -2755,6 +2755,39 @@
27552755
}
27562756
]
27572757
},
2758+
{
2759+
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2760+
"beginCaptures": {
2761+
"1": {
2762+
"name": "storage.modifier.async.js"
2763+
}
2764+
},
2765+
"end": "(?<=\\>)",
2766+
"patterns": [
2767+
{
2768+
"include": "#type-parameters"
2769+
}
2770+
]
2771+
},
2772+
{
2773+
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2774+
"beginCaptures": {
2775+
"1": {
2776+
"name": "meta.brace.round.js"
2777+
}
2778+
},
2779+
"end": "\\)",
2780+
"endCaptures": {
2781+
"0": {
2782+
"name": "meta.brace.round.js"
2783+
}
2784+
},
2785+
"patterns": [
2786+
{
2787+
"include": "#expression-inside-possibly-arrow-parens"
2788+
}
2789+
]
2790+
},
27582791
{
27592792
"include": "#possibly-arrow-return-type"
27602793
},

extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/b7ef0941e38d56292d19ee7706a558dbff6c3a35",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js.jsx",
1010
"patterns": [
@@ -1825,7 +1825,7 @@
18251825
},
18261826
"access-modifier": {
18271827
"name": "storage.modifier.js.jsx",
1828-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1828+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
18291829
},
18301830
"property-accessor": {
18311831
"name": "storage.type.property.js.jsx",
@@ -2755,6 +2755,39 @@
27552755
}
27562756
]
27572757
},
2758+
{
2759+
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2760+
"beginCaptures": {
2761+
"1": {
2762+
"name": "storage.modifier.async.js.jsx"
2763+
}
2764+
},
2765+
"end": "(?<=\\>)",
2766+
"patterns": [
2767+
{
2768+
"include": "#type-parameters"
2769+
}
2770+
]
2771+
},
2772+
{
2773+
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2774+
"beginCaptures": {
2775+
"1": {
2776+
"name": "meta.brace.round.js.jsx"
2777+
}
2778+
},
2779+
"end": "\\)",
2780+
"endCaptures": {
2781+
"0": {
2782+
"name": "meta.brace.round.js.jsx"
2783+
}
2784+
},
2785+
"patterns": [
2786+
{
2787+
"include": "#expression-inside-possibly-arrow-parens"
2788+
}
2789+
]
2790+
},
27582791
{
27592792
"include": "#possibly-arrow-return-type"
27602793
},

extensions/typescript-basics/cgmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "TypeScript-TmLanguage",
88
"repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage",
9-
"commitHash": "c9c955af17ed0c86ebce32e0f26c72f0a2925937"
9+
"commitHash": "b7ef0941e38d56292d19ee7706a558dbff6c3a35"
1010
}
1111
},
1212
"license": "MIT",

extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/b7ef0941e38d56292d19ee7706a558dbff6c3a35",
88
"name": "TypeScript",
99
"scopeName": "source.ts",
1010
"patterns": [
@@ -1822,7 +1822,7 @@
18221822
},
18231823
"access-modifier": {
18241824
"name": "storage.modifier.ts",
1825-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1825+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
18261826
},
18271827
"property-accessor": {
18281828
"name": "storage.type.property.ts",
@@ -2752,6 +2752,39 @@
27522752
}
27532753
]
27542754
},
2755+
{
2756+
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2757+
"beginCaptures": {
2758+
"1": {
2759+
"name": "storage.modifier.async.ts"
2760+
}
2761+
},
2762+
"end": "(?<=\\>)",
2763+
"patterns": [
2764+
{
2765+
"include": "#type-parameters"
2766+
}
2767+
]
2768+
},
2769+
{
2770+
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2771+
"beginCaptures": {
2772+
"1": {
2773+
"name": "meta.brace.round.ts"
2774+
}
2775+
},
2776+
"end": "\\)",
2777+
"endCaptures": {
2778+
"0": {
2779+
"name": "meta.brace.round.ts"
2780+
}
2781+
},
2782+
"patterns": [
2783+
{
2784+
"include": "#expression-inside-possibly-arrow-parens"
2785+
}
2786+
]
2787+
},
27552788
{
27562789
"include": "#possibly-arrow-return-type"
27572790
},

extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/b7ef0941e38d56292d19ee7706a558dbff6c3a35",
88
"name": "TypeScriptReact",
99
"scopeName": "source.tsx",
1010
"patterns": [
@@ -1825,7 +1825,7 @@
18251825
},
18261826
"access-modifier": {
18271827
"name": "storage.modifier.tsx",
1828-
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1828+
"match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
18291829
},
18301830
"property-accessor": {
18311831
"name": "storage.type.property.tsx",
@@ -2755,6 +2755,39 @@
27552755
}
27562756
]
27572757
},
2758+
{
2759+
"begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2760+
"beginCaptures": {
2761+
"1": {
2762+
"name": "storage.modifier.async.tsx"
2763+
}
2764+
},
2765+
"end": "(?<=\\>)",
2766+
"patterns": [
2767+
{
2768+
"include": "#type-parameters"
2769+
}
2770+
]
2771+
},
2772+
{
2773+
"begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<[^<>]+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2774+
"beginCaptures": {
2775+
"1": {
2776+
"name": "meta.brace.round.tsx"
2777+
}
2778+
},
2779+
"end": "\\)",
2780+
"endCaptures": {
2781+
"0": {
2782+
"name": "meta.brace.round.tsx"
2783+
}
2784+
},
2785+
"patterns": [
2786+
{
2787+
"include": "#expression-inside-possibly-arrow-parens"
2788+
}
2789+
]
2790+
},
27582791
{
27592792
"include": "#possibly-arrow-return-type"
27602793
},

extensions/typescript-language-features/src/typescriptServiceClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { TypeScriptPluginPathsProvider } from './utils/pluginPathsProvider';
2424
import { PluginManager } from './utils/plugins';
2525
import TelemetryReporter, { VSCodeTelemetryReporter } from './utils/telemetry';
2626
import Tracer from './utils/tracer';
27-
import { inferredProjectConfig } from './utils/tsconfig';
27+
import { inferredProjectCompilerOptions } from './utils/tsconfig';
2828
import { TypeScriptVersionPicker } from './utils/versionPicker';
2929
import { TypeScriptVersion, TypeScriptVersionProvider } from './utils/versionProvider';
3030

@@ -498,7 +498,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
498498

499499
private getCompilerOptionsForInferredProjects(configuration: TypeScriptServiceConfiguration): Proto.ExternalProjectCompilerOptions {
500500
return {
501-
...inferredProjectConfig(configuration),
501+
...inferredProjectCompilerOptions(true, configuration),
502502
allowJs: true,
503503
allowSyntheticDefaultImports: true,
504504
allowNonTsExtensions: true,

extensions/typescript-language-features/src/utils/previewer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {
2828
} else {
2929
return makeCodeblock(tag.text);
3030
}
31+
case 'author':
32+
// fix obsucated email address, #80898
33+
const emailMatch = tag.text.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);
3134

35+
if (emailMatch === null) {
36+
return tag.text;
37+
} else {
38+
return `${emailMatch[1]} ${emailMatch[2]}`;
39+
}
3240
case 'default':
3341
return makeCodeblock(tag.text);
3442
}

extensions/typescript-language-features/src/utils/tsconfig.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export function isImplicitProjectConfigFile(configFileName: string) {
1212
return configFileName.startsWith('/dev/null/');
1313
}
1414

15-
export function inferredProjectConfig(
15+
export function inferredProjectCompilerOptions(
16+
isTypeScriptProject: boolean,
1617
serviceConfig: TypeScriptServiceConfiguration,
1718
): Proto.ExternalProjectCompilerOptions {
1819
const projectConfig: Proto.ExternalProjectCompilerOptions = {
@@ -23,19 +24,27 @@ export function inferredProjectConfig(
2324

2425
if (serviceConfig.checkJs) {
2526
projectConfig.checkJs = true;
27+
if (isTypeScriptProject) {
28+
projectConfig.allowJs = true;
29+
}
2630
}
2731

2832
if (serviceConfig.experimentalDecorators) {
2933
projectConfig.experimentalDecorators = true;
3034
}
3135

36+
if (isTypeScriptProject) {
37+
projectConfig.sourceMap = true;
38+
}
39+
3240
return projectConfig;
3341
}
3442

3543
function inferredProjectConfigSnippet(
44+
isTypeScriptProject: boolean,
3645
config: TypeScriptServiceConfiguration
3746
) {
38-
const baseConfig = inferredProjectConfig(config);
47+
const baseConfig = inferredProjectCompilerOptions(isTypeScriptProject, config);
3948
const compilerOptions = Object.keys(baseConfig).map(key => `"${key}": ${JSON.stringify(baseConfig[key])}`);
4049
return new vscode.SnippetString(`{
4150
"compilerOptions": {
@@ -62,8 +71,8 @@ export async function openOrCreateConfigFile(
6271
const doc = await vscode.workspace.openTextDocument(configFile.with({ scheme: 'untitled' }));
6372
const editor = await vscode.window.showTextDocument(doc, col);
6473
if (editor.document.getText().length === 0) {
65-
await editor.insertSnippet(inferredProjectConfigSnippet(config));
74+
await editor.insertSnippet(inferredProjectConfigSnippet(isTypeScriptProject, config));
6675
}
6776
return editor;
6877
}
69-
}
78+
}

0 commit comments

Comments
 (0)