Commit graph

1318 commits

Author SHA1 Message Date
Ladislau Szomoru 14fd07d57a Workspace trust api feedback 2021-03-03 12:41:22 +01:00
Andrew Branch 400737c5b8
Pass 'data' to completion details request (#117092) 2021-03-01 16:04:48 -08:00
Ladislau Szomoru f18a340066 Use method instead of event 2021-03-01 20:05:30 +01:00
Ladislau Szomoru 73112daff1 Remove extra check that is not needed 2021-03-01 15:13:18 +01:00
Benjamin Pasero e916637528 tests - enable color output for integration tests 2021-03-01 15:10:15 +01:00
Ladislau Szomoru 8fd4a68845
Factor in workspace trust when switching versions (#117774) 2021-03-01 09:09:13 +01:00
Matt Bierner d89e2e17a5 Allow single line comment after { for auto indent
Fixes #86176
2021-02-26 20:30:02 -08:00
Matt Bierner 8572664c6c Enable semantic features (such as error reporting) in JS/TS notebook cells 2021-02-26 18:39:21 -08:00
Matt Bierner a74ebb17cf Add helper for tracking active js/ts editor
Fixes #117813
2021-02-26 18:05:06 -08:00
Matt Bierner 1f567e10f3 Fixing two more cases for promises in conditionals 2021-02-26 17:38:37 -08:00
Matt Bierner 91d73da5e4 Only show infer return type refactoring when refactorings are requested
Fixes #117799
2021-02-26 14:21:24 -08:00
Matt Bierner 192c817fd3 Make jsdoc completions text kind instead of snippet kind
Fixes #116941

Snippet completions can be disabled by `editor.snippetSuggestions`. It likely isn't expected that this setting could disable JSDoc completions too
2021-02-18 19:34:12 -08:00
Matt Bierner 3dc8cb1afc Add setting to enable/disable returns generation in jsdoc
Fixes #116282
2021-02-10 12:20:01 -08:00
Shunsuke Iwamoto 76524ef589
Fixes 114236: Add a multi-line comment regex to unIndentedLinePattern (#114478)
* Add a multi-line comment regex to unIndentedLinePattern

* Add multi-line comment block indentation tests

* Fix a multi-line comment block indentation test
2021-02-09 17:05:21 -08:00
Matt Bierner a0855b30c7 Use rmdirSync instead of rimraf
Fixes #115668
2021-02-04 11:44:33 -08:00
Matt Bierner 06fc252b9a Prioritize import quickfix over spelling
Fixes #115372

If both import and spelling fixes are returned, only the import will be marked as preferred
2021-02-02 12:32:36 -08:00
João Moreno 8bf9b56ade
Merge branch 'joao/extensions' 2021-02-02 12:06:01 +01:00
Matt Bierner d99c218e9b Make sure we always apply TS auto imports, even if VS Code applies the completion before it has been resolved
Fixes #109439

This introduces a new `ApplyCompletionCommand` that is included on all JS/TS completions, which  applies additional parts of the completion (such as auto imports).

This is needed since VS Code will not always wait until `resolveCompletionItem` completes before appling the completion. This causes auto imports to sometimes not work when typing quickly
2021-02-01 18:03:18 -08:00
Matt Bierner 60bb22ddd3 Use test instead of match 2021-02-01 18:03:18 -08:00
Matt Bierner 7490ac87e1 Fix spelling 2021-02-01 18:03:18 -08:00
Matt Bierner 4ccfa1d019 Fix spelling 2021-02-01 18:03:18 -08:00
Matt Bierner 6f1fbfdd93 Inline object map type
It was only being used in one spot, so just inline this type
2021-02-01 18:03:18 -08:00
Matt Bierner 8c3e6cd9ee Fix spelling 2021-02-01 18:03:18 -08:00
Matt Bierner 4e00f75408 Remove stubs file reference protocol 2021-02-01 18:03:18 -08:00
Matt Bierner 925d9234b8 Pick up latest TypeScript 4.2 nightly
This also migrates us to use our normal TS install for the serverless version
2021-02-01 14:15:27 -08:00
João Moreno ec805db5ed
add repository field to extensions package.json 2021-01-29 15:30:45 +01:00
Matt Bierner a56bc0c671 Don't write preferredLocation into workspace settings for find file references 2021-01-26 16:17:14 -08:00
Wahid Shafique 748b2e5a85
Remove # from typescript deprecation warnings (#114787)
Remove tags to match standard deprecation warnings (example dceba9ebb7/extensions/html-language-features/package.nls.json (L32))
2021-01-25 15:37:58 -08:00
Alexandru Dima ec1eda0d96
Rename OnEnterRule.oneLineAboveText to previousLineText after API call feedback (#58440) 2021-01-20 17:31:04 +01:00
Matt Bierner 0faf155028 Disable on enter test
This one seems to sometimes fail in ci on windows
2021-01-15 16:07:08 -08:00
Matt Bierner 48b726e39e Fix regex
Star was mistakenly removed in last commit
2021-01-15 14:35:55 -08:00
Matt Bierner 5f6acfb68e Move jsdoc completion tests to smoke tests 2021-01-15 13:47:58 -08:00
Matt Bierner 800e173c40 Split ts into unit and smoke tests
The smoke tests are less reliable as they simulate user actions

Fixes #102075
Fixes #102097
Fixes #102106
2021-01-15 13:32:27 -08:00
Matt Bierner 663532c317 Skipping unreliable test
Also makes sure the TS extension is activated for each of them
2021-01-15 10:38:50 -08:00
Matt Bierner 308a4f6a48 Make sure ts extension has loaded before running on-enter tests
Fixes #101922

Also adds back a test that was incorrectly removed
2021-01-15 10:38:50 -08:00
Alexandru Dima 3d500ebd8b
Adopt proposed CancellationError (#93686) 2021-01-11 17:31:22 +01:00
Matt Bierner 52bdc14cc6 Copy of translated errors for js/ts web build 2021-01-05 12:57:26 -08:00
Matt Bierner a48ef56fbf Fix compile for current TS version 2021-01-04 19:25:10 -08:00
Matt Bierner 3ed300eb9d
Add simple browser extension (#109276)
* Add support for TS's Hierarchical refactorings API

https://github.com/microsoft/TypeScript/pull/41975

* Add simple browser extension

This change adds a new 'simple browser' extension. This extension uses a webview to render webpages directly in VS Code. We plan on using it for optionally previewing local servers in both desktop and codespaces

The browser itself has a number of limitations due to the security around iframes:

- It traps keyboard focus
- We can't detect if a page fails to load
- We can't track the current url of the iframe

* Add experimental alert when the iframe is focused

* Disable events on focus warning

* Hooking up simple browser to opener
2021-01-04 19:06:53 -08:00
Matt Bierner 69dfa670ef Fix compile error if using older ts version 2021-01-04 17:55:19 -08:00
Matt Bierner 942c3bad6b Sort contribitions 2021-01-04 16:57:38 -08:00
Matt Bierner b565c422aa Add find all references command for JS/TS
Fixes #66150
2021-01-04 16:57:24 -08:00
Alexandru Dima 20831dd3df
Keep only @types/* deps in /build/ and share terser (#112718) 2020-12-18 19:51:10 +01:00
Alexandru Dima f74ad9692f
Align @types/* dev dependencies (#112718) 2020-12-18 13:28:39 +01:00
Alexandru Dima 7ca71e763d
Move away from deprecated 'vscode' node module (#112718) 2020-12-17 21:40:14 +01:00
Alexandru Dima cbc47b1d7b
Do not share terser 2020-12-17 14:38:44 +01:00
Alexandru Dima 1cada18542
Share webpack related node modules (#112718) 2020-12-17 11:16:03 +01:00
Matt Bierner 072d922c45 Revert "Revert "Pick up offical TS build for web server""
This reverts commit eb5c4388c7.
2020-12-11 13:39:19 -08:00
Matt Bierner eb5c4388c7 Revert "Pick up offical TS build for web server"
This reverts commit f29a3cabc4.
2020-12-11 12:14:58 -08:00
Matt Bierner c3d8989b24 Enable going to stdlib on serverless 2020-12-09 18:20:28 -08:00
Matt Bierner 582f8f6bb0 Bump Static version of web TS version 2020-12-09 18:19:14 -08:00
Matt Bierner e6a13fb134 Remove work around for TS not supporting paths on its own 2020-12-09 18:19:14 -08:00
Matt Bierner 71fad5aa41 Enable preferConst in TS project 2020-12-09 18:19:14 -08:00
Matt Bierner 1633404883 Remove unused types 2020-12-09 18:19:14 -08:00
Matt Bierner f29a3cabc4 Pick up offical TS build for web server 2020-12-09 17:22:26 -08:00
Matt Bierner 9e5f14c1bc Default strict null checks to off for implicit projects
For #109988
2020-11-30 16:40:15 -08:00
Johannes Rieken bd40e2555b remove TS on-type-rename feature, https://github.com/microsoft/vscode/issues/109923, fyi @mjbvz 2020-11-24 17:58:28 +01:00
Martin Aeschlimann 07d680b7c8 semantic highligting: deprecate member, add method. Fixes microsoft/language-server-protocol#1087 2020-11-23 11:41:12 +01:00
Andrew Casey 9195c9ab14
Expose TS server tracing (#110534)
* Add typescript.tsserver.enableTracing setting

* Document typescript.tsserver.enableTracing setting
2020-11-20 15:28:18 -08:00
Matt Bierner b4c0cfb513 Better note current version in TS version UI
Fixes #111001
2020-11-19 22:19:32 -08:00
Matt Bierner 59428623f9 Cancel encodedSemanticClassifications-full on resource change
For #102161
2020-11-19 14:14:21 -08:00
Johannes Rieken 793b679ebc adopt latest API 2020-11-17 10:09:17 +01:00
Johannes Rieken fd610cfa5f
Merge branch 'master' into joh/tsQuickRename 2020-11-17 09:05:38 +01:00
Andrew Branch 00fa5d3884
[typescript-language-features] Update importModuleSpecifierPreference values (#110536)
* Update importModuleSpecifierPreference values

* -using

* Add minimum version message
2020-11-16 13:06:40 -08:00
Johannes Rieken ea3b8da874 also quick rename type parameters, ignore declare only things 2020-11-16 12:05:39 +01:00
Johannes Rieken e6bb245b6c use predefined constants 2020-11-16 11:59:14 +01:00
Johannes Rieken b851bf9ca0 Merge branch 'master' into joh/tsQuickRename 2020-11-13 13:55:23 +01:00
Johannes Rieken 8f82b02a4c
Merge pull request #109842 from microsoft/joh/98228
Use new completion label for imported modules
2020-11-13 08:39:03 +01:00
Johannes Rieken 165e49bfe8 use rename info instead of highlight info 2020-11-12 21:07:59 +01:00
Johannes Rieken ce7bd67d46 explore on-type-rename for TypeScript 2020-11-12 20:47:50 +01:00
Matt Bierner 17c29f0b99 Add support for web TS Server logging over postMessage
For https://github.com/microsoft/TypeScript/pull/39656
2020-11-11 17:39:17 -08:00
Matt Bierner afcfc97316 Fix method spelling 2020-11-11 17:39:17 -08:00
Matt Bierner 7c6994d1b5 Use toOpenedFilePath to ensure we don't ask TS server for projectInfo if a file is not open 2020-11-11 17:39:17 -08:00
Matt Bierner fb93010aa2 Make sure we use the same path normalizer in a few additional places in buffer sync 2020-11-11 17:39:17 -08:00
Matt Bierner 805aa7e8f4 Make ResourceMap treat the same file with different scheme as different
Fixes #110435
2020-11-11 17:39:17 -08:00
Suman B K 4247b296eb
Including ` as part of foldEndPairCharacters (#110108)
* Including '`' as part of foldEndPairCharacters

* Removed test code, which was unrelated
2020-11-09 18:02:38 -08:00
Matt Bierner d04956f6a7
Switches the 'Fix all' quick fix provider to use resolveCodeAction (#107853)
Made while testing #106410
2020-11-09 18:00:46 -08:00
Matt Bierner 451c2b61d3 Specify type of CodeLensProvider instead of using casts 2020-11-05 12:19:55 -08:00
Matt Bierner 9f4737fa3f Exclude definitions from js/ts references code lens
Fixes #98274
2020-11-05 12:17:18 -08:00
Benjamin Pasero ac2ca0b539 typescript - fix nls issue
//cc @mjbvz
2020-11-05 10:49:22 +01:00
Matt Bierner 4a54027a82 Disable rename after refactoring in interactive playground
Fixes #75137
2020-11-04 18:06:39 -08:00
Matt Bierner 81a25a894c Rename implicit project settings and deprecate old ones
For #109990
2020-11-04 14:55:28 -08:00
Matt Bierner ff7cc33236 Use objects.equals for comparing configuration objects 2020-11-04 14:33:24 -08:00
Matt Bierner 05fee0cf3d Extract implictProjectConfiguration class 2020-11-04 14:33:24 -08:00
Matt Bierner 64705a07dc Add two new setting for strict null and strict funtion in js/ts that are implicit projects
For #109988

The new `js/ts.implicitProjectConfig.strictNullChecks` and `js/ts.implicitProjectConfig.strictFunctionTypes` control these settings in implict javascript and typescript files that are not contained in a jsconfig or tsconfig project. They are enabled by default for now so that we can collect feedback on them
2020-11-04 14:33:24 -08:00
Matt Bierner c38a12c26c Quote jsconfig and tsconfig in setting 2020-11-04 14:33:24 -08:00
Matt Bierner 8141dcf29a Extract adjustFoldingEnd 2020-11-04 13:19:38 -08:00
Matt Bierner 97db458fa4 Show closing ) while folding JS/TS
Fixes #109854
2020-11-04 13:19:38 -08:00
Matt Bierner 0608e3f5bd Pick up TS 4.1-rc for insiders 2020-11-04 13:19:38 -08:00
Johannes Rieken 0729278ad1 use label2 when CompletionEntry#source is a path inside the workspace 2020-11-02 13:22:12 +01:00
Matt Bierner 8a5ffbb044
Mark DocumentSelector as readonly (#109212)
This change:

- Make  `DocumentSelector` use a readonly array
- Updates all properties of `DocumentFilter` to be readonly

`DocumentSelector` is used as a parameter in our provider APIs and does not need to be mutable. This change lets extensions pass in readonly values for the selector
2020-10-23 18:37:39 -07:00
Matt Bierner dc9c7fae94 Remove readonly
This change was mistakenly checked in
2020-10-22 23:51:27 -07:00
Matt Bierner aabcbd5ef8 Also enable errors and warnings in interactive playground
For #83025
2020-10-22 22:42:55 -07:00
Matt Bierner 40fc0b1789 Enable semantic features in interactive playground
Fixes #109190
2020-10-22 22:36:08 -07:00
Matt Bierner 16075cc22a Add insertSpaceAfterOpeningAndBeforeClosingEmptyBrackets formatting setting
Fixes #109190
2020-10-22 22:36:08 -07:00
Matt Bierner 37c63d6ae5 Don't show loading and project loading status for in-memory JS/TS files
Fixes #108454
2020-10-19 17:18:49 -07:00
Matt Bierner 706857dfa5 Pass executingFilePath to TS server 2020-09-29 17:59:29 -07:00
Matt Bierner 6ef40a891b Disable TS plugins on web 2020-09-29 17:59:29 -07:00
Matt Bierner ee536909df Enable logging for TS Server on web
The web server does not have a log file
2020-09-29 17:59:29 -07:00
Matt Bierner f1e631ab83 Update ts server web build 2020-09-25 16:22:05 -07:00
Matt Bierner 5a7d0a1ed2 Adopt resolveCodeAction for JS/TS refactorings 2020-09-18 18:17:31 -07:00
Matt Bierner 5b4350943e Remove custom typings for refactor trigger reason
This property has been finalized
2020-09-18 18:17:31 -07:00
Matt Bierner b255097c33 null -> undefined 2020-09-18 18:17:31 -07:00
Matt Bierner bd54e5f5cc Simplify showQuickPick 2020-09-18 18:17:31 -07:00
Matt Bierner f26d81979f Extend disposable 2020-09-18 16:27:21 -07:00
Matt Bierner f8f2538d20 Move exists to own file 2020-09-18 16:26:04 -07:00
Matt Bierner c3651027ba Use enum 2020-09-18 16:23:49 -07:00
Matt Bierner 017a42552b Use Promise.all to perform config finding in parallel instead of sequentially
For #87494
2020-09-18 16:15:50 -07:00
Matt Bierner bf2448549d Make getTsConfigsInWorkspace observe the TaskProvider cancellation 2020-09-18 16:15:50 -07:00
Matt Bierner d1510288f0 Add timeout for vscode.workspace.findFiles
For #87494
2020-09-18 16:15:50 -07:00
Matt Bierner 6932306e4d Add (get) and (set) prefixes to JS/TS getters and setters in the outline
Fixes #106935
2020-09-18 11:06:32 -07:00
ChaseKnowlden e8760a5d6c Fix capitalization of GitHub org 2020-09-17 11:43:03 +02:00
Matt Bierner 50cc1d0e97 Update to use TS 4.1 for building VS Code 2020-09-16 11:58:01 -07:00
Matt Bierner 2a954244f0 Only allow configurePlugin against main TS Server
Fixes #106346

Looks like the TS Server doesn't support this in partial mode at the moment
2020-09-09 09:21:56 -07:00
Jean Pierre a6833ed841
proper fix for #105202 (#106293) 2020-09-08 14:46:43 -07:00
Matt Bierner e969bc18a1 Disable errors in non-semantic supported files
Fixes #106299
Fixes #106314

Also enables js/ts features on the right side of PRs and in search results
2020-09-08 14:39:58 -07:00
Matt Bierner 3dc43cb7b3 Exclude pr schemed files from js/ts language features
Fixes #105842
2020-09-02 10:36:24 -07:00
Matt Bierner b8e4718a12 Disable js/ts features for the private scheme
This scheme is used internally by VS Code for features such as search/replace preview
2020-09-01 15:07:05 -07:00
Matt Bierner e6b0f45556 Use containerName if it exists 2020-09-01 14:10:15 -07:00
Matt Bierner 5e9a412cd9 Remove experimental typings
These typings are now in TS 4.0
2020-09-01 14:02:58 -07:00
Pranav Senthilnathan fb80351278
prune the refactor not applicable reasons if there are too many (#103203)
* prune the refactor not applicable reasons if there are too many

* Add in appendInvalidActions for older TS versions

Co-authored-by: Matt Bierner <matb@microsoft.com>
2020-08-31 15:37:02 -07:00
Jean Pierre 8b1aca7255
Fixes #105202 (#105664) 2020-08-31 14:54:51 -07:00
Johannes Rieken bc3b0defe0 use extensionUri and joinPath instead of asAbsolutePath 2020-08-28 14:57:20 +02:00
Alex Ross 0de8d51904 Finalize task detail API
Fixes #69785
2020-08-27 11:08:48 +02:00
Matt Bierner 64d126cafb Add new TSS_REMOTE_DEBUG flags that are only active in remote cases
Fixes https://github.com/microsoft/vscode-remote-release/issues/3546
2020-08-19 17:07:13 -07:00
Matt Bierner f694b07825 Make sure we do not enable JS/TS language features on live share clients
For #104180
2020-08-18 16:48:16 -07:00
Duc Nghiem Xuan 63c711deef
Don't include this function types in completeFunctionCalls (#104479) 2020-08-17 17:52:26 -07:00
Matt Bierner 650f7688f3 Add (loading...) prefix to hovers while TS Server is starting up
Fixes #104859
2020-08-17 17:48:26 -07:00
kieferrm c17b4c2488 fix GDPR annotations 2020-08-12 00:47:16 +00:00
kieferrm ce508a8214 fix GDPR annotation 2020-08-12 00:44:36 +00:00
Matt Bierner b84660fa86 Add more specific checks for being on TS 4.0.1
Fixes #104456
2020-08-11 15:23:56 -07:00
Andrew Maust 2f61d0037c
fixes #104059 (#104193)
Co-authored-by: Andrew Maust <69081050+Andrew884@users.noreply.github.com>
2020-08-10 20:46:14 -07:00
Eric Piacentini 7e4fd71ad8
Removed lines requiring Typescript version < 3.0 (#104211) 2020-08-10 20:45:11 -07:00
Matt Bierner 6d0ac47022 Fix RC version 2020-08-10 20:06:06 -07:00
Matt Bierner a3e37dc103 Remove expect error 2020-08-10 14:33:10 -07:00
Matt Bierner d21ff5b1c3 Remove expect error for TS 4.0 2020-08-10 14:31:25 -07:00
Matt Bierner 6dd0a9a64d Remove any casts 2020-08-10 13:36:19 -07:00
Alex Ross 924ccf2b63 Include weird timestamp pattern in tsc-watch problem matcher
Fixes #104157
2020-08-07 11:00:41 +02:00
Daniel Rosenwasser 54a38a2ee9
Add check to ensure RC and forward use '--serverMode'. (#104123) 2020-08-05 15:26:59 -07:00
Matt Bierner 4193455a6f Observe the new createAutoImportProviderProgramDurationMs property added by TS 4.0
Adds this property to our completion telemetry
2020-08-05 12:28:44 -07:00
Matt Bierner 4430401028 Include server id in telemetry and in user issue reports
From https://github.com/microsoft/TypeScript/issues/39795#issuecomment-668250348
2020-08-03 16:03:34 -07:00
Matt Bierner 358cc674a7 Add more exclaimation points 2020-08-03 16:03:34 -07:00
Matt Bierner 0009a0b424 Fallback to bundled version if selected TS version is invalid
Fixes #103213

This restores some logic that we removed during the web refactoring
2020-08-03 15:08:28 -07:00
Andrew Branch 4a206a33e5
Change includePackageJsonAutoImports options (#103732) 2020-08-03 14:16:28 -07:00
adfnekc fd75556c52
fix unicode download url error (#103460)
unicode downloadurl change
2020-07-30 20:47:34 -07:00
Matt Bierner 519ce367a3 Use asAbsolutePath instead of hardcoding path 2020-07-24 13:52:48 -07:00
Matt Bierner d43491b79d Reduce number of files copied for TS web build 2020-07-24 13:52:48 -07:00
Alex Dima 91cdca1bdb
Do not ship unnecessary files with extensions 2020-07-24 13:57:51 +02:00
Matt Bierner 8c426f9f3b Update built TS web version 2020-07-22 17:56:43 -07:00
Andrew Branch 2cf34eefdd
[typescript-language-features] Add telemetry for package.json auto imports (#103126)
* Add telemetry for package.json auto imports

* Change data classification

* Use string, boolean is not allowed in TelemetryProperties
2020-07-22 15:59:51 -07:00