Commit Graph

2039 Commits

Author SHA1 Message Date
Andy
6099b09a6e Create source files lazily in tests (#19143) 2017-10-13 07:17:17 -07:00
Andrew Casey
2ea4cfe23b Insert a line break before a function at EOF if needed
This is a pre-existing issue that became more obvious after refining
trivia handling.
2017-10-12 14:19:36 -07:00
Andrew Casey
98f04e6cfd Merge pull request #19135 from amcasey/GH18626
Introduce and consume suppressLeadingAndTrailingTrivia
2017-10-12 14:10:28 -07:00
Andrew Casey
6bfad52225 Update missed baseline 2017-10-12 13:23:08 -07:00
Sheetal Nandi
29ed92e20d Merge pull request #19118 from Microsoft/caseSensitivityInferredProjectRoot
Handles case sensitivity of project root with respect to inferred projects
2017-10-12 11:49:29 -07:00
Andrew Casey
4de6b0dd2d Introduce and consume suppressLeadingAndTrailingTrivia
Fixes #18626
2017-10-12 11:34:34 -07:00
Andrew Casey
c2150f4d26 Merge pull request #19132 from amcasey/JumpInFinallyTest
Add missing test coverage for jumps in finally blocks
2017-10-12 11:25:11 -07:00
Andrew Casey
e4313f62c6 Add missing test coverage for jumps in finally blocks 2017-10-12 09:45:10 -07:00
Andrew Casey
73826bdb7b Allow Extract Constant into enclosing scope in spite of RangeFacts.UsesThis 2017-10-12 09:32:05 -07:00
Andrew Casey
b5e6b890f1 Merge pull request #18997 from amcasey/ExtractDeclaration
Allow extraction of variable decls used outside the extracted range
2017-10-12 09:31:19 -07:00
Sheetal Nandi
6e5a4a9476 Merge pull request #18959 from Microsoft/configFileDiag
Do not report config file errors if the file opened isn't from configured project and that project doesn't have the config errors
2017-10-12 08:56:00 -07:00
Andrew Casey
c5f40a1b2b Add additional deep clone tests 2017-10-11 17:26:41 -07:00
Andrew Casey
568c8a3298 Allow extraction of variable decls used outside the extracted range
If there are only declarations, use the new function as the initializer
for a destructuring declaration.

If there are declarations and writes, changes all of the `const`
declarations to `let` and add `| undefined` onto any explicit types.
Use destructuring assignment to accomplish both "initialization" and
writes.

I don't believe there is a case where there are both declarations and a
return (since the declarations wouldn't be available after the return).

UNDONE: this could probably be generalized to handle binding patterns
but,
for now, only identifiers are supported.

Fixes #18242
Fixes #18855
2017-10-11 16:38:38 -07:00
Sheetal Nandi
4d7c112ef7 Make sure project root paths of inferred projects are canonical when comparing 2017-10-11 15:33:17 -07:00
Sheetal Nandi
deed981715 Handle case sensitivity when looking up config file for Script info
Fixes #17726
2017-10-11 13:35:06 -07:00
Sheetal Nandi
bce77fdfd9 Merge pull request #18960 from Microsoft/builderHandlesChangeInResolution
Builder handles changes in resolution/references when file's contents dont change
2017-10-11 12:11:44 -07:00
Sheetal Nandi
cf9b83accc Instead of counting events with name, verify each event to not equal event name 2017-10-10 21:15:20 -07:00
Sheetal Nandi
993890f06c Verify errors more correctly in tsc-watch mode 2017-10-10 21:11:33 -07:00
Sheetal Nandi
a7fa187fb2 Merge pull request #19058 from Microsoft/whenWatchesFail
Swallow the directory watcher exceptions and ignore them
2017-10-10 18:32:22 -07:00
Sheetal Nandi
7f1ddaf7b8 Merge branch 'master' into configFileDiag 2017-10-10 18:30:59 -07:00
Sheetal Nandi
0e2eb3a2b8 Combine the event manager testing 2017-10-10 18:25:26 -07:00
Wesley Wigham
d0168af142 Functioning parallel unittests (#18956) 2017-10-10 17:59:43 -07:00
Sheetal Nandi
bb4abbd95e Do not generate config file diagnostics event when the file opened doesnot belong to the configured project 2017-10-10 17:37:02 -07:00
Sheetal Nandi
c5b4f5e7e7 Use filterMutate instead of removeWhere 2017-10-10 17:36:20 -07:00
Wesley Wigham
edf0a95e89 Stop erroneous match of midfile sourceMappingUrl (#19084) 2017-10-10 16:41:54 -07:00
Andy
927ffefcf4 Replace more 'verify.rangeAfterCodeFix' with 'verify.codeFix' (#18800) 2017-10-10 11:28:05 -07:00
Sheetal Nandi
c4298a3c9d Merge branch 'master' into configFileDiag 2017-10-10 11:12:07 -07:00
Sheetal Nandi
67a6a9477f Merge pull request #16586 from Microsoft/projectRootAsCurrentDirectoryInEmit
Use the project root or the directory of current script info as the current directory to emit the file
2017-10-10 10:28:14 -07:00
Sheetal Nandi
b9592d4186 Use the parent most node_modules directory for module resolution failed lookup locations 2017-10-09 15:59:27 -07:00
Arthur Ozga
5faa739483 Merge pull request #18674 from aozgaa/dev/aozgaa/exceptionEvent
add error message test
2017-10-09 15:01:40 -07:00
Sheetal Nandi
2facead886 Update tests after the merge from master 2017-10-05 09:54:21 -07:00
Sheetal Nandi
03441fe120 Merge branch 'master' into projectRootAsCurrentDirectoryInEmit 2017-10-04 18:48:16 -07:00
Sheetal Nandi
bf4ca30bc3 Let builder find out from imports/typereference directives if file references have changed.
This is needed to ensure that the ambient module addition takes effect
Fixes #15632
2017-10-04 18:09:09 -07:00
Sheetal Nandi
249725d4b7 Do not report config file errors if the file opened isnt from configured project and that project doesnt have the config errors
Fixes #16635
2017-10-04 16:11:20 -07:00
Sheetal Nandi
ee05d0eb1c Compile public api so that all the updates are ensured to be correct 2017-10-04 16:09:16 -07:00
Andy
efa274f722 When emitting all files, emit the changed file first (#18930)
* When emitting all files, emit the changed file first

* Export interface
2017-10-04 13:30:37 -07:00
Wesley Wigham
25c3b99f29 Add skip lib check to many tests (#18935)
* Add skip lib check to many tests, do not include unit test duration in profiler duration

* Add a few more skipLibCheck flags

* A few more

* Add more skip lib check flags
2017-10-04 13:14:05 -07:00
Andrew Casey
d03d237b3b Merge pull request #18929 from amcasey/ExtractVoidNever
Stop extracting void and never constants
2017-10-04 10:33:05 -07:00
Wesley Wigham
37723f17d6 Latest mocha uses fullPath instead of titlePath (#18933) 2017-10-03 17:02:39 -07:00
Andrew Casey
443812a045 Stop extracting void and never constants 2017-10-03 15:07:39 -07:00
Andrew Casey
1507547020 Merge pull request #18927 from amcasey/ExtractBaselineShowRange
Include range markers in Extract Constant/Function baselines
2017-10-03 14:29:14 -07:00
Andrew Casey
d1015bff06 Merge pull request #18926 from amcasey/ExtractConstantArrow
Disallow constant extraction into expression-bodied arrow functions
2017-10-03 14:29:01 -07:00
Andrew Casey
a10274a867 Include range markers in Extract Constant/Function baselines 2017-10-03 13:50:17 -07:00
Andrew Casey
2cb965c268 Disallow constant extraction into expression-bodied arrow functions
...until https://github.com/Microsoft/TypeScript/issues/18924 is fixed.
2017-10-03 13:34:20 -07:00
Andrew Casey
b9fb1733ef Merge pull request #18919 from amcasey/ExtractLocalRefinements
Improve Extract Constant's handling of expression statements
2017-10-03 13:19:39 -07:00
Andrew Casey
7b1147fbce Stop inadvertently exempting expression statements from check 2017-10-03 12:23:32 -07:00
Daniel Rosenwasser
301c90ccff Merge pull request #18300 from Microsoft/correctlyCacheTaggedTemplates
Correctly cache tagged template objects in modules
2017-10-03 12:06:57 -07:00
Andrew Casey
2a4ab08655 Refine extraction of expression statements
1) Replace range, rather than node, to leave trivia intact.
2) Only replace node in the innermost scope - otherwise insert as usual
and delete the original statement.
2017-10-03 11:18:40 -07:00
Sheetal Nandi
6997e9b731 Merge pull request #17269 from Microsoft/watchImprovements
Watch improvements in tsserver
2017-10-02 17:38:22 -07:00
Wesley Wigham
7f7d0c6c7b Baseline public API (#18897)
* Add unit test which tracks public API changes

* Accept strict function types updates

* 100% Linefeeds, no carriage returns

* How were these missing?

* That would be why they were there

* Extract and comment

* Accept comment changes
2017-10-02 17:37:40 -07:00