2946 Commits

Author SHA1 Message Date
Orta
2a2866c3a9
Merge pull request #32563 from orta/fix_31298
Handle namepaths inside JSDoc type expressions a bit better
2019-08-09 16:15:50 -07:00
Ron Buckton
d75740280f
Resolve module specifier relative to moduleFile.originalFileName (#32722)
* Resolve module specifier relative to moduleFile.originalFileName

* Use baseline testing for outputs

* Added skipLibCheck to test

* Switch to using vfs.formatPatch for output
2019-08-06 13:48:58 -07:00
Orta Therox
487e2ffe2a Merge master 2019-08-06 15:34:06 -04:00
Ron Buckton
e3f4979736
Fix emit for object rest on a module export (#32699)
* Fix emit for object rest on a module export

* Add tests for exports of empty object/array binding patterns

* Add delay for exec to ensure diff tool has enough time to start
2019-08-05 16:53:21 -07:00
Andrew Branch
62f65a7884
Make auto-imports more likely to be valid for the file (including JS) & project settings (#32684)
* Add failing tests

* Use default import or namespace import for import fixes when compiler options allow

* Don’t do import * for export=, ever

* Only do import default for export equals if nothing else will work

* Never do import/require in a JavaScript file

* Update tests for changes in master

* Add const/require fix for JS and select based on usage heuristic

* Fix JS UMD import
2019-08-02 15:58:10 -07:00
Sheetal Nandi
bf903eb48f
Merge pull request #32613 from microsoft/singleHostFsWatchFile
Create only single StatFileWatcher through node
2019-08-02 11:03:28 -07:00
Orta
4a26271b63
Merge pull request #32663 from orta/fix_31195
Ensure that the comma is removed when all named imports are removed via moveToFile
2019-08-02 10:29:51 -04:00
Wesley Wigham
00a75c4283
Retarget to es6 and fix the resulting bugs (#32221)
* Retarget to es6 and fix the resulting bugs

* Set target back to es5

* Fix typos in declaration emitter
2019-08-01 14:23:57 -07:00
Orta Therox
c337f046fb Ensure that the comma is removed when all named imports are removed via moveToFile - fixes #31195 2019-08-01 15:01:52 -04:00
Sheetal Nandi
b84f13d7cf Use single stats watcher per filename
Fixes #28690
2019-07-29 15:33:34 -07:00
Sheetal Nandi
2db8a13d81 Remove project status, watches etc when project is no longer part of build order 2019-07-29 15:33:34 -07:00
Wesley Wigham
b963e1a2a7
Update LKG (#32578)
* Update LKG

* Add @types/node version bump

* Small paatches/casts to be compatible with latest node

* Accept API baseline update

* Make internal NodeBuffer compatable with latest Buffer

* Why do we even have an internal buffer type

* Sync up internal buffer type better

* Fix lint

* Readd mroe missing Buffer methods
2019-07-29 10:33:43 -07:00
Orta Therox
30aad9db8d Support more terminators for parsing jsdoc filepaths 2019-07-29 09:46:42 -04:00
Wesley Wigham
2a4930f4ec
Bind a jsdoc enum as SymbolFlags.TypeAlias and not SymbolFlags.Enum (#32520)
* Bind a jsdoc enum as SymbolFlags.TypeAlias and not SymbolFlags.Enum

* Actually include an @enum tag as a declaration

* Add enum tag refs into a couple more syntax kind lists

* accept symbol baseline update
2019-07-26 13:57:22 -07: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 60a1b1dc1a93ca792cf12bb0432cf7bc134c3ad1.
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 Branch
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 Wigham
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