Commit Graph
2933 Commits
Author SHA1 Message Date
Orta Therox 30aad9db8d Support more terminators for parsing jsdoc filepaths 2019-07-29 09:46:42 -04:00
Nathan Shively-Sanders e543d8bc5a Fix type keyword completions (#32474)
* Fix type keyword completions

1. In functions, type keywords were omitted.
2. In All context, no keywords were omitted.

(1) fixes #28737
(2) removes 17 keywords that should not be suggested, even at the
toplevel of a typescript file:

* private
* protected
* public
* static
* abstract
* as
* constructor
* get
* infer
* is
* namespace
* require
* set
* type
* from
* global
* of

I don't know whether we have a bug tracking this or not.

* Change keyword filter in filterGlobalCompletion

Instead of changing FunctionLikeBodyKeywords

* Add more tests cases

* Make type-only completions after < more common

Because isPossiblyTypeArgumentPosition doesn't give false positives now
that it uses type information.
2019-07-19 15:22:04 -07:00
Andrew Branch 387c917765 Revert "Proposal: If there’s a package.json, only auto-import things in it, more or less (#31893)" (#32448)
This reverts commit 60a1b1dc1a.
2019-07-17 14:02:18 -07:00
Orta 10f306350b Merge pull request #32421 from orta/improve_mulitline_exceptions
Make it easier to read multi-line exceptions
2019-07-16 14:55:09 -04:00
Sheetal Nandi dc38aceb02 Fix the export on TestServerHostCreationParameters to fix build break after LKG
Its not detected currently is because LKG doesnt have #32156
2019-07-16 11:38:09 -07:00
Orta Therox d3f3c8e113 Make it easier to read multi-line exceptions 2019-07-16 12:00:22 -04:00
Dmitrijs Minajevs 7608dc2306 Merge branch 'master' into fix29666 2019-07-16 10:52:26 +03:00
Dmitrijs Minajevs 9a37ef8667 typeAssertionKeywords tests 2019-07-16 10:04:14 +03:00
Andrew Branch 60a1b1dc1a Proposal: If there’s a package.json, only auto-import things in it, more or less (#31893)
* Move package.json related utils to utilities

* Add failing test

* Make first test pass

* Don’t filter when there’s no package.json, fix scoped package imports

* Use type acquisition as a heuristic for whether a JS project is using node core

* Make same fix in getCompletionDetails

* Fix re-exporting

* Change JS node core module heuristic to same-file utilization

* Remove unused method

* Remove other unused method

* Remove unused triple-slash ref

* Update comment

* Refactor findAlias to forEachAlias to reduce iterations

* Really fix re-exporting

* Use getModuleSpecifier instead of custom hack

* Fix offering auto imports to paths within node modules

* Rename things and make comments better

* Add another reexport test

* Inline `symbolHasBeenSeen`

* Simplify forEachAlias to findAlias

* Add note that symbols is mutated

* Symbol order doesn’t matter here

* Style nits

* Add test with nested package.jsons

* Fix and add tests for export * re-exports
2019-07-12 10:08:55 -07:00
Andrew BranchandNathan Shively-Sanders 71bec5b698 Add quick fix to add missing 'await' (#32356)
* Start prototyping addMissingAwait codefix

* Filter by diagnostics that have missing-await related info

* Start writing tests and checking precedence

* Implement codeFixAll, add test for binary expressions

* Add test for iterables

* Add test for passing argument

* Add test for call/construct signatures

* Add test for awaiting initializer

* Improve assertion error

* Replace specific property access error with general one and add await related info

* Add test for property access

* Require code to be inside a function body to offer await

* Accept suggestion

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Add explicit test for code fix being not available unless something is a Promise

* Skip looking for function body if already in AwaitContext flags

* Inline getCodeActions function for symmetry
2019-07-12 10:07:55 -07:00
Dmitrijs Minajevs 1d93b76b3f Added "readonly" to Type Keywords 2019-07-12 14:04:19 +03:00
Nathan Shively-Sanders 834a476a96 Merge branch 'master' into report-multiple-overload-errors 2019-07-08 09:33:24 -07:00
Ron Buckton e8bf9584aa Improve type checking and inference for Generators and Async Generators (#30790)
* Improve typing for Generators and Async Generators

* Add TReturn and TNext to Iterator, IterableIterator, etc.

* Update ts internal Iterator to be assignable from global Iterator

* Make 'done' optional in IteratorYieldResult

* Revert Iterable and IterableIterator to simpler versions plus other fixes

* Add additional inference tests

* Added additional tests

* PR cleanup and minor async iteration type fix

* Updated diagnostics message and added non-strict tests

* Fix expected arity of Iterator/AsyncIterator
2019-07-03 21:55:59 -07:00
Nathan Shively-Sanders e62d84cd88 Merge branch 'master' into report-multiple-overload-errors 2019-07-03 09:28:44 -07:00
Wesley Wigham 3e6856137a Add support for sharding tests across multiple workers (#32173)
* Add support for sharding tests across multiple workers

* Disable unittests when runners are expressly provided (unless they contain the unittest runner)
2019-07-01 14:56:57 -07:00
Wesley Wigham 055a07ea4a Check for parse errors in emitted JS (#32009) 2019-07-01 14:15:30 -07:00
Nathan Shively-Sanders c48018f95e Merge branch 'master' into report-multiple-overload-errors 2019-06-28 16:02:35 -07:00
Nathan Shively-Sanders ba9d8e2e81 Switch DiagnosticMessageChain to be a tree 2019-06-27 16:30:35 -07:00
Andrew Branch 871bdeeec4 Merge pull request #31480 from andrewbranch/bug/25487
Fix invalid JSXExpressions having identifier-ish things in their trivia, improve error messages for comma expressions in JSX
2019-06-26 10:13:42 -07:00
Wesley Wigham fe2b9e9e17 Assert ranges exist when looped over in fourslash (#32012) 2019-06-21 10:38:31 -07:00
Wesley WighamandNathan Shively-Sanders c39a877a92 Add dockerfile based tests for azure-sdk-for-js and office-ui-fabric-react (#31948)
* Add dockerfile based tests

* Update tests/cases/docker/README.md

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Combine sanitize functions

* Add some debugging instructions to README

* Fix listed command order
2019-06-20 12:47:57 -07:00
Sheetal Nandi 7ed3896a0a Merge pull request #31587 from microsoft/definitionSpan
Include declarationSpan as relevant declaration span when defintion or other places are declaration name
2019-06-18 14:07:15 -07:00
Sheetal Nandi 73bf2684ac Rename to use contextSpan 2019-06-13 12:41:21 -07:00
Sheetal Nandi da2aa9781e Revert to using spread instead of mutating value later 2019-06-12 15:25:16 -07:00
Andrew Casey 1bf28f21de Add regression test 2019-06-11 17:50:36 -07:00
Sheetal Nandi a84ed93f72 Merge branch 'master' into definitionSpan 2019-06-06 14:13:09 -07:00
Sheetal Nandi edad317395 Fourslash server tests 2019-06-06 10:41:33 -07:00
Sheetal Nandi d1dc837353 Cache ranges by text 2019-06-05 14:44:19 -07:00
Sheetal Nandi 6dc2ba7939 Take optional string of range text for singleReferenceGroup 2019-06-05 14:43:22 -07:00
Sheetal Nandi edffcce785 Take optional texts to verify parameter for rangesWithSameTextAreRenameLocations 2019-06-05 13:52:41 -07:00
Sheetal Nandi 5c21fad12f Merge pull request #31432 from microsoft/builderAPI
Api for tsc --build and --incremental
2019-06-05 12:31:00 -07:00
Sheetal Nandi 424f2c9e00 More tests 2019-06-04 13:06:34 -07:00
Sheetal Nandi 8948fe415f Rename declarationRange to declarationRangeIndex 2019-05-30 12:45:11 -07:00
Sheetal Nandi 6a961b5bc5 More tests 2019-05-28 16:14:44 -07:00
Sheetal Nandi 1d830ffe7a Start fixing fourslash tests 2019-05-24 16:29:27 -07:00
Andrew Branch f97f57c155 Fix containsPrecedingToken for tokens whose preceding token is a missing node 2019-05-23 12:15:50 -07:00
Andrew Branch 2856aabd70 Parse stray identifier-ish as JSXText instead of trivia 2019-05-21 15:28:16 -07:00
Andrew Branch feaef9c829 Improve error message for JSXExpressions that are comma expressions 2019-05-21 14:21:44 -07:00
Sheetal Nandi 00cea41b65 Add sortText depending scope of symbols
Fixes #15024
2019-05-20 15:53:51 -07:00
Ron Buckton f4b83ef8d3 Fix newlines in smartSelection baselines to not be platform dependent (#31437) 2019-05-16 20:39:47 -07:00
Andrew Branch 15daf42b2c Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
Sheetal Nandi 629bc0c04d Always emit tsbuild info if path says so (irrespecitive of if there exists bundle and project) 2019-05-15 11:54:17 -07:00
Sheetal Nandi 9f9ae000cb Enable getSemanticDiagnosticsOfNextAffectedFile for EmitAndSemanticDiagnosticsBuilder 2019-05-07 16:32:52 -07:00
Andrew Branch eff3960020 Fix baseline file name changes 2019-04-24 08:52:07 -07:00
Andrew Branch e28b9b2ba2 Copy smartSelect tests to fourslash 2019-04-23 16:41:59 -07:00
Andrew Branch 6fc2e4a32e Add custom baseline format for smart selection 2019-04-23 15:34:01 -07:00
Ryan Cavanaugh 885d4d63c8 Remove "generate types" code (#31075) 2019-04-23 13:51:47 -07:00
Andrew Branch d8936fd290 Rename to be smarter 2019-04-18 16:23:06 -07:00
Andrew Branch 0f7bc02892 Move to language service 2019-04-18 16:05:06 -07:00
Sheetal Nandi acbedade42 No need to fix hash of lib files since the content is now fixed 2019-04-17 15:37:56 -07:00