Commit graph

857 commits

Author SHA1 Message Date
Andy Hanson
76ccefb0ce Merge branch 'master' into tsconfig_canonicalpath 2018-09-17 10:27:56 -07:00
Benjamin Lichtman
0016fd72f7 Add test 2018-09-17 09:48:24 -07:00
Klaus Meinhardt
78d221993b fix getExtendedConfig in commandLineParser
* remove invalid assertion
* fix invalid array spread on possibly undefined value
* only add unique files to extendedSourceFiles, preventing the array from growing infinitely
2018-09-17 14:41:48 +02:00
Benjamin Lichtman
70ce7abe12
Merge pull request #27109 from uniqueiniquity/diagnosticLocation
Report async code fix diagnostic on name whenever it exists
2018-09-15 18:36:42 -07:00
Sheetal Nandi
e4718564e5
Merge pull request #27082 from Microsoft/watchAPIAndProjectReferences
Fix tsc watch and watch API for a project that has project references
2018-09-14 17:58:42 -07:00
Benjamin Lichtman
32cb9ece8b Add test 2018-09-14 17:20:46 -07:00
Benjamin Lichtman
853afd9d56 Add test 2018-09-14 16:34:17 -07:00
Benjamin Lichtman
bce34ada8f
Merge pull request #27031 from uniqueiniquity/asyncCatchUniqueNames
Ensure async code fix renaming can do more than one rename
2018-09-14 11:13:00 -07:00
Sheetal Nandi
40d33c809a Merge branch 'master' into watchAPIAndProjectReferences 2018-09-14 10:54:07 -07:00
Sheetal Nandi
ebb89ba50c Merge branch 'master' into commonCompilerOptionsWithBuild 2018-09-14 10:08:34 -07:00
Sheetal Nandi
47f311ac03
Merge pull request #27062 from Microsoft/tsbuildWatchImprovements
Multiple improvements to watching with --build option
2018-09-14 09:54:17 -07:00
Benjamin Lichtman
0e985eb342
Merge branch 'master' into asyncCatchUniqueNames 2018-09-14 09:50:27 -07:00
Sheetal Nandi
b5639786bd
Merge pull request #26135 from Microsoft/watchDirectoryOfNodeModulesScriptInfo
Instead of watching individual script infos, watch the node modules folder for script infos in node modules
2018-09-14 09:49:41 -07:00
Benjamin Lichtman
13deedf841
Merge pull request #26930 from uniqueiniquity/onlyReportExpectedPromiseArgs
Only perform async code fix if it can successfully refactor all parts
2018-09-14 09:41:34 -07:00
Sheetal Nandi
ea67e3ac56 Fix watch of project with project references 2018-09-13 15:41:07 -07:00
Nathan Shively-Sanders
64d0e0d448
Shorten more internal names to JS or TS (#27080) 2018-09-13 15:05:57 -07:00
Sheetal Nandi
e2edb69638 Instead of watching individual script infos, watch the node modules folder for script infos in node modules 2018-09-13 13:48:48 -07:00
Sheetal Nandi
4ed63e52ef Add test for preserveWatchOutput on command line
#26873
2018-09-13 13:04:38 -07:00
Sheetal Nandi
4cf746cdc4 Enable listFiles and listEmittedFiles as build option 2018-09-13 11:17:03 -07:00
Benjamin Lichtman
d12110d3e5 Respond to CR 2018-09-13 09:32:38 -07:00
Benjamin Lichtman
504b5f2985 Add and update tests 2018-09-13 09:04:52 -07:00
Andy
cc7bfc0349
Support testing jsdoc tags of completions (#26962) 2018-09-13 08:47:50 -07:00
Sheetal Nandi
b8f33f6a35 Report all project errors on incremental compile 2018-09-12 16:33:48 -07:00
Sheetal Nandi
5696384a9f Handle prepend output to be emitted in downstream project even if declaration file doesnt change 2018-09-12 15:52:59 -07:00
Sheetal Nandi
0319f103f2 Test case to verify the non local change doesnt build referencing projects 2018-09-12 15:05:20 -07:00
Sheetal Nandi
ef2024a487 Handle circular project references 2018-09-12 14:58:08 -07:00
Benjamin Lichtman
95e5f7d55a Add and update tests 2018-09-12 14:47:13 -07:00
Sheetal Nandi
5553f36c9d Instead of queueing build for downstream projects right when invalidating project, do it after build for invalidated project is complete 2018-09-12 13:53:39 -07:00
Nathan Shively-Sanders
6bd1da20c9
Rename JS-specific concepts (#26795)
* Rename JS concepts

1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.

Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.

* Remove TODO

* Rename Javascript->JS

Note that this introduces a variable name collision in a couple of
places, which I resolved like this:

```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Sheetal Nandi
bdf1c782b2 Report file not found error about the project and watch config file even if not present 2018-09-11 16:31:14 -07:00
Sheetal Nandi
42479ca337 Maintain project references more clearly
- no need to maintain map from referencing projects to references
- When queueing for downstream projects, always handle build order
2018-09-11 15:46:54 -07:00
Sheetal Nandi
c8cdb8146a Always create dependency graph and build order 2018-09-11 14:27:25 -07:00
Ron Buckton
5d79704931 Sanitize module resolution logs for typesVersions entries 2018-09-11 14:19:28 -07:00
Sheetal Nandi
a172751bf9 Always resolve the config file to ResolvedConfigFile if its json, otherwise combine tsconfig.json 2018-09-11 13:02:50 -07:00
Sheetal Nandi
ec38ca4fcb Merge branch 'master' into tsbuildWatchImprovements 2018-09-11 11:45:57 -07:00
Sheetal Nandi
08c970a03d
Merge pull request #26865 from chrissantos1995/bugs/fix-empty-files-diagnostics
Fix empty files diagnostics reporting
2018-09-11 11:25:29 -07:00
Benjamin Lichtman
7466ac1cd5 [WIP] add test 2018-09-11 11:12:10 -07:00
Sheetal Nandi
6c57ebd00b Update watches to wild card directories, input files, config files when project invalidates 2018-09-10 16:55:09 -07:00
Sheetal Nandi
82041eb300 Add partial reload support also watch wild cards correctly.
Partially fixes #26524
2018-09-10 13:10:51 -07:00
Benjamin Lichtman
95d57885c5 Ensure diagnostic reporting matches code fix ability 2018-09-07 14:14:01 -07:00
Ron Buckton
a255d9a163 Merge branch 'master' into typesVersions 2018-09-07 13:52:12 -07:00
christian
ec72f4751d Add location info to empty lists diagnostics when tsconfig file exists 2018-09-06 20:40:02 -04:00
Sheetal Nandi
88d5b04c70 Lowercase type reference directives when determining to reuse program structure (just like when we create new program) 2018-09-06 13:26:44 -07:00
Kagami Sascha Rosylight
26d6d7d16e Merge remote-tracking branch 'upstream/master' into async-es2018 2018-09-06 09:55:41 +09:00
Ryan Cavanaugh
270ea77815
Merge pull request #26308 from ajafff/checkresolvedmodule
unittests/moduleResolution: actually assert in checkResolvedModule
2018-09-05 17:42:33 -07:00
Benjamin Lichtman
5a72da76c2 Only perform async refactor if it won't delete code 2018-09-05 16:27:14 -07:00
Ryan Cavanaugh
d265fbf7f7
Merge pull request #26192 from ajafff/createprogram-nochecker
createProgram: don't use TypeChecker
2018-09-05 11:49:57 -07:00
Andy Hanson
a8bf0f7dad Merge branch 'master' into tsconfig_canonicalpath 2018-09-05 11:45:59 -07:00
Ron Buckton
b006287cb1 Refactor and clean up sourcemap decoder 2018-09-04 17:50:06 -07:00
christian
c87ca2f1ab Fix diagnostic reporting for empty files in tsconfig 2018-09-03 22:57:26 -04:00
Sheetal Nandi
45101491c0
Merge pull request #26782 from Microsoft/reportFileChangeDetectedOnce
Report file change detected only once when save takes place multipletimes before timeout
2018-08-31 15:26:03 -07:00
Ryan Cavanaugh
cbdfc01e25
Merge pull request #26794 from samlanning/fix-equalownproperties
Housekeeping: Fix equalOwnProperties
2018-08-31 13:58:25 -07:00
Sam Lanning
65fa0128bb Add test for ts.equalOwnProperties 2018-08-30 14:08:20 -07:00
Sheetal Nandi
496b18ef5e Report file change detected only once when save takes place multiple times before timeout 2018-08-30 11:38:34 -07:00
Benjamin Lichtman
f4765a6ea3 Fix error introduced by rebase 2018-08-29 15:56:22 -07:00
Benjamin Lichtman
3ad6a66e69 Add tests and validate diagnostic spans 2018-08-29 15:53:05 -07:00
Benjamin Lichtman
cc4e1f833e Look for correct description 2018-08-29 15:50:34 -07:00
Benjamin Lichtman
d21c078363 Test for existence of diagnostic when running tests 2018-08-29 15:49:48 -07:00
Ron Buckton
210de32933 Merge branch 'master' into typesVersions 2018-08-29 13:26:13 -07:00
Sheetal Nandi
90abaa1c45 Reset the build queue correctly
Fixes issue reported in #26545#issuecomment-416961260
2018-08-29 13:10:55 -07:00
Sheetal Nandi
d6ff1a7241 Move parsing of build options to commandLineParsing so it can be tested and it lines with other commandline parsing 2018-08-29 12:52:27 -07:00
Sheetal Nandi
9100047f84
Merge pull request #26723 from Microsoft/buildCleanSourcemaps
Add js source maps to list of outputs when doing --build
2018-08-29 10:21:25 -07:00
Nathan Shively-Sanders
30f611b055
Add survey event (#26455)
* Start adding survey event

* Add surveyReady event

* Remove old notes

* Move event, simplify type, add test

1. Move the survey event to sendProjectTelemetry so that it happens on
open instead of on editing tsconfig.
2. Remove URL from the survey type; VS code should control this
information.
3. Add test based on large files event test. I'm not sure it's in the
right place, though.

* Fix tests and update API baseline

* Split survey sending from telemetry

Based on tests requested during review.

* Add additional assertion
2018-08-28 19:57:39 -07:00
Ron Buckton
5f6a2cbf69 Merge branch 'master' into typesVersions 2018-08-28 17:37:23 -07:00
Sheetal Nandi
723e64ba3b Add js source maps to list of outputs when doing --build
Fixes #26619
2018-08-28 16:17:10 -07:00
Sheetal Nandi
52fef42baa Merge branch 'master' into lazyConfiguredProjectsFromExternalProject 2018-08-28 14:49:00 -07:00
Sheetal Nandi
fc90b8f98b lazyConfiguredProjectsFromExternalProject as userpreference instead of command line option 2018-08-28 14:41:22 -07:00
Ron Buckton
04a524511e Add semver range parsing support 2018-08-28 14:11:01 -07:00
Sheetal Nandi
96e61407c5 Add option --lazyConfiguredProjectsFromExternalProject to enable lazy load of configured projects referenced by external project
Fixes #26696
2018-08-28 12:49:09 -07:00
Sheetal Nandi
530a530ac0
Merge pull request #26590 from Microsoft/buildRefactoring
Refactor ts build and report watch status when doing --build --watch
2018-08-28 11:43:35 -07:00
Andy
4cf5774c5e
Add tsserver test for completions and avoid excess properties (#25622) 2018-08-27 16:04:02 -07:00
Ron Buckton
173b5dfcfb Refactor sourcemap emitter 2018-08-22 12:42:36 -07:00
Ron Buckton
b9afdadf71 Remove jsTypings/semver.ts, add unit tests and logging 2018-08-22 12:38:16 -07:00
Sheetal Nandi
cec1b0a717 Report error summary from the queue. 2018-08-21 17:30:51 -07:00
Sheetal Nandi
0831edab36 Keep only errors starting on new screen 2018-08-21 13:41:32 -07:00
Sheetal Nandi
dedb2aefc0 Combine buildHost methods into SolutionBuilderHost's reportDiagnostic and reportStatus 2018-08-21 13:41:32 -07:00
Sheetal Nandi
26b4b6c9ad Create api with watchHost to include in solution builder host 2018-08-21 13:41:32 -07:00
Sheetal Nandi
0c4003e735 Use SolutionBuilderHost instead of using compilerhost for solution builder 2018-08-21 13:41:31 -07:00
Sheetal Nandi
17ee9231b7 Write first test with --build and --watch 2018-08-21 13:41:30 -07:00
Andy
435a12e476
Remove some duplicate code in convertToAsyncFunction unit tests (#26527) 2018-08-17 18:41:18 -07:00
Wesley Wigham
d58b1f664b
mark error type in baselines very not-aggressively (#26346) 2018-08-17 15:45:14 -07:00
Andy
60b8f8c206
Remove unnecessary callback in runBaseline (#26500) 2018-08-17 12:51:30 -07:00
Sheetal Nandi
0f97620b9c
Merge pull request #25884 from Microsoft/optimizeOpenExternalProject
Delay load configured project referenced from external project when opening it
2018-08-17 12:26:14 -07:00
Sheetal Nandi
7e117f2707 Check large file size only for non ts files 2018-08-13 13:30:31 -07:00
Sheetal Nandi
f2011ce755
Merge pull request #26197 from Microsoft/largeFileEvent
Send event on referencing large file
2018-08-13 11:14:22 -07:00
Sheetal Nandi
fe387cc7f0
Merge pull request #26377 from Microsoft/moduleResolutionWithSymLinks
Use original path from resolved module cache when available.
2018-08-10 22:27:38 -07:00
Sheetal Nandi
c5b74db78b
Merge pull request #26200 from Microsoft/watchWithStrict
Refresh semantic diagnostics when compiler options affecting semantic diagnostics generation changes
2018-08-10 16:15:37 -07:00
Elizabeth Dinella
421730a68d
Refactoring promises returning functions to use async and await (#26373) 2018-08-10 16:11:45 -07:00
Sheetal Nandi
82d4cccf53 Use original path from resolved module cache when available.
Fixes #26273
Thanks to @ajafff, for partial fix  and test (#26310)
2018-08-10 16:11:38 -07:00
Sheetal Nandi
c8e10a9a66
Merge pull request #26296 from ajafff/modulenameresolver-cache
fix moduleNameResolver cache
2018-08-10 14:36:54 -07:00
Sheetal Nandi
9ba224d3b0
Merge pull request #26305 from ajafff/common-prefix
moduleNameResolver: fix getCommonPrefix
2018-08-10 13:35:24 -07:00
Klaus Meinhardt
3469b62be6 review comments 2018-08-10 22:25:27 +02:00
Andy Hanson
77494d6294 getScriptInfoOrConfig: Canonicalize tsconfig path before lookup 2018-08-09 08:19:57 -07:00
Klaus Meinhardt
d2dc17d765 fix handling if there is no commonPrefix 2018-08-09 11:50:00 +02:00
Wesley Wigham
a36a53bfdb
Actually add sorting of elaboration text to user baselines 2018-08-08 13:40:21 -07:00
Klaus Meinhardt
711b5660cb unittests/moduleResolution: actually assert in checkResolvedModule
this change uncovered a bug in testPreserveSymlinks which always silently failed
2018-08-08 21:16:09 +02:00
Klaus Meinhardt
20442fe363 handle failed lookups 2018-08-08 20:45:31 +02:00
Klaus Meinhardt
95082e4743 make it work for root directory 2018-08-08 20:29:59 +02:00
Klaus Meinhardt
ec1ff29a8c really, really fix test(?) 2018-08-08 17:10:22 +02:00
Klaus Meinhardt
27d2a2d564 add test 2018-08-08 17:05:31 +02:00
Klaus Meinhardt
f31b9d3891 fix test 2018-08-08 16:38:42 +02:00
Klaus Meinhardt
47e77901fd actually test the cache 2018-08-08 15:39:07 +02:00
Klaus Meinhardt
bed93b48f5 fix moduleNameResolver cache
Fixes: #26271
2018-08-08 11:12:48 +02:00
Sheetal Nandi
f67bdd429a Skip loading configured project just to report project info through synchronizeProjectList for project opened by external project 2018-08-06 16:24:14 -07:00
Sheetal Nandi
8c4607d8eb Dont delay external project update from openExternalProject
Since external projects are needed to be uptodate when opening file,
so in most likely scenarios these will be loaded anyways so there is no saving in postponing this work
2018-08-06 16:06:40 -07:00
Sheetal Nandi
a0190e397a Delay update graph when opening external project, and delay load configured project referenced from external project when opening it 2018-08-06 16:01:15 -07:00
Kagami Sascha Rosylight
76ae12d143 Change esnext.asynciterable to es2018.asynciterable 2018-08-06 16:30:08 +09:00
Sheetal Nandi
d419968c0d Refresh semantic diagnostics when compiler options affecting semantic diagnostics generation changes
Fixes #26195
2018-08-03 16:27:25 -07:00
Sheetal Nandi
c6ca96bdcf Removing debugger statements from tests 2018-08-03 15:41:44 -07:00
Sheetal Nandi
1e5e61873d Send event on referencing large file 2018-08-03 15:22:28 -07:00
Klaus Meinhardt
3b022a4e66 add link to issue 2018-08-03 23:19:04 +02:00
Klaus Meinhardt
a1978eb8a1 add test 2018-08-03 22:10:18 +02:00
Sheetal Nandi
77e29b7f0e
Merge pull request #26169 from Microsoft/largeFile
Do not read files greater than maxFileSize which is currently 4mb
2018-08-03 10:38:02 -07:00
Sheetal Nandi
46d223dc1b Fixes to ensure getDefinitionAndBoundSpan works correctly when using composite projects
Project references need to be detached from the project when closing project
In SourceMapDecoder handle when the redirected file to project reference is set as the output of the project
Keep configured project alive if project it references has open ref
Fixes #26164
2018-08-02 16:36:50 -07:00
Sheetal Nandi
135425d40b Do not read files greater than maxFileSize which is currently 4mb
Fixes #24762
2018-08-02 13:03:58 -07:00
Sheetal Nandi
924228b45b Merge branch 'master' into errorInFileWithDeepImport 2018-08-01 15:36:52 -07:00
Sheetal Nandi
a5a26ec939
Merge pull request #26109 from Microsoft/invalidTsconfig
Handle when property name turns out to be non string literal computed name because of errors in tsconfig file
2018-08-01 09:04:13 -07:00
Andy
9c9f3e3cf9
importFixes: When one file redirects to another, consider both for global import specifiers (#25834)
* importFixes: When one file redirects to another, consider both for global import specifiers

* Add test for #26044

* Avoid a symlinked package globally importing itself (fixes another case of #26044)

* Compare to node_modules with getCanonicalFileName
2018-07-31 17:28:56 -07:00
Sheetal Nandi
3c971ed685 Handle when property name turns out to be non string literal computed name because of errors in tsconfig file
Fixes #26076
2018-07-31 17:23:55 -07:00
Sheetal Nandi
7bd1c8e6aa
Merge pull request #25811 from Microsoft/subDirectoryOfRootWatches
Watch subdirectories in project root instead of watching project root…
2018-07-31 11:51:16 -07:00
Mohamed Hegazy
aaf14f47b7
Merge pull request #26065 from ajafff/createbinary-arrow-parens
createBinary: parenthesize ArrowFunction in RHS
2018-07-31 11:27:53 -07:00
Sheetal Nandi
d65cb21fcd Keep the original configured project alive created during findAllReferences 2018-07-30 14:44:21 -07:00
Sheetal Nandi
f3b0a2de06 Move the original location getter to ProjectService.
This is in anticipation of work needed to keep original projects alive
2018-07-30 14:44:21 -07:00
Sheetal Nandi
1345a35e5f
Merge pull request #26012 from Microsoft/compileOnSaveOptimization
If project name is specified in compile on save, do not update all projects to just use that project
2018-07-30 14:43:18 -07:00
Sheetal Nandi
7b405c4ad9 Test that verifies we arent updating all projects unnecessarily when called with compileOnSave and project 2018-07-30 14:10:56 -07:00
Sheetal Nandi
9196b7db33
Merge pull request #25851 from Microsoft/configFileDiag
Report compiler options errors as well as part of configFileDiag event
2018-07-30 11:07:07 -07:00
Klaus Meinhardt
4dabd650ed createBinary: parenthesize ArrowFunction in RHS
Fixes: #25964
2018-07-30 19:22:30 +02:00
Mohamed Hegazy
fd2eb4918d
Merge pull request #25604 from mprobst/fix-exported-var-comments
Retain synthetic comments on exports.
2018-07-24 17:41:44 -07:00
Wesley Wigham
59854bbd55
Inspect all possible module paths when looking for the best one to create a specifier with (#25850)
* Inspect all possible specifier paths when looking for the best one

* Add missing secondary option from test
2018-07-24 13:56:21 -07:00
Sheetal Nandi
a9d497a008 Report compiler options errors as well as part of configFileDiag event
Fixes #25741
2018-07-20 18:04:08 -07:00
Andy
93722c8942
findAllReferences/rename: Search in all open projects (#25648)
* findAllReferences/rename: Search in all open projects

* Avoid needing a dummy location when location is unused

* Remove Program#getDeclarationEmitPath

* Only iterate over enabled projects
2018-07-20 16:53:59 -07:00
Sheetal Nandi
4ee3f2b3ea Watch subdirectories in project root instead of watching project root so as to avoid watching excluded directories that are not part of config file
Fixes #25629 and Microsoft/vscode#51139
2018-07-19 17:21:50 -07:00
Andy
2701f785ed
Consistently use ScriptInfo for converting positions to Locations (#25623)
* Consistently use ScriptInfo for converting positions to Locations

* Code review
2018-07-18 13:02:38 -07:00
Martin Probst
c50a6f7389 Fix comment emit for namespaces & enums.
Keep emit flags set on the original node on a namespace or enum node.
This prevents dropping flags like NoComments, which caused duplicated
comment emits.

Additionally, TypeScript would emit synthetic comments twice, once for
the variable declaration, once for the module statement. This explicitly
clears away synthetic comments on namespaces and enums if their
synthetic comments have already been emitted on the corresponding
variable statement.
2018-07-18 17:23:28 +02:00
Martin Probst
2529b864f4 Retain synthetic comments on classes and their properties. 2018-07-18 17:23:27 +02:00
Martin Probst
1bd79af760 Reduce duplication of addSyntheticComment. 2018-07-18 16:30:32 +02:00
Martin Probst
6f114a2c9b Fix comments for import and export declarations.
Previously, TypeScript would only set the text range when transforming
import and export declarations, leading it to drop synthetic comments
and emit flags.

This commit sets the original node on the statements that contains the
generated `require()` call (or similar, depending on module system),
retaining emit flags and synthetic comments.
2018-07-18 16:30:32 +02:00
Martin Probst
db888b8670 Retain synthetic comments on exported variables.
Variables that do not have a local variable created get transformed into
a single exports assignment expression. TypeScript previously just
created a new expression and set the text range to retain original
comments, but for synthetic comments, merging the emit nodes by setting
the original node is required.
2018-07-18 16:30:32 +02:00
Daniel Rosenwasser
60986adee5
Merge pull request #25507 from ajafff/leftmost-expr-tagged-template
getLeftmostExpression: handle TaggedTemplateExpression
2018-07-13 23:56:32 -07:00
Andy
e25a23bb3c
Fix Buffer.from uses to handle node 5.4.1 bug (#25659) 2018-07-13 17:08:25 -07:00
Sheetal Nandi
49ac60f286 Support resolveJsonModule option when files contain the json file
Fixes #25636
2018-07-13 12:21:51 -07:00
Sheetal Nandi
ca083809a4 Fix incorrect handling of preserveWatchOutput flag is in config file
Fixes #25620
2018-07-12 18:29:02 -07:00
Andy
af412e39cf
mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change (#25586)
*  mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change

* Can't use `program.getSourceFile()` to determine file existence when multiple projects exist

* Use direct union instead of discriminated union
2018-07-12 12:09:04 -07:00
Sheetal Nandi
585acb1990 Use exported modules through declaration emit to invalidate the semantic diagnostics
Fixes #24986
2018-07-11 16:43:02 -07:00
Sheetal Nandi
d93e0d4096 Add test for reporting errors from deep import.
Test case for #24986
2018-07-10 15:43:31 -07:00
Sheetal Nandi
821ebcb529 Merge branch 'master' into cacheRecursiveDirectoryWatchers 2018-07-10 15:08:14 -07:00
Andy
e9e5ebee73
getEditsForFileRename: Handle all projects and source-mapped files (#25522)
* getEditsForFileRename: Handle all projects and source-mapped files

* Update API (#24966)

* Use areEqual
2018-07-09 17:58:02 -07:00
Ryan Cavanaugh
e532f53189
Merge pull request #25531 from RyanCavanaugh/fix25527
Don't crash when an implicit rootDir constraint is violated under composite: true
2018-07-09 17:51:17 -07:00
Ryan Cavanaugh
72f0789908 Don't crash when an implicit rootDir constraint is violated under composite:true
Fixes #25527
2018-07-09 15:41:15 -07:00
Sheetal Nandi
f941226011 Do not watch modules that get resolved by ambient modules 2018-07-09 12:05:29 -07:00
Klaus Meinhardt
165a87affa getLeftmostExpression: handle TaggedTemplateExpression 2018-07-08 21:25:09 +02:00
Nathan Shively-Sanders
10b174abc1
Fix lineText in references command (#25494)
Previously it was just the identifier text. Now it is back to the full
text of the line.
2018-07-06 16:23:11 -07:00
Klaus Meinhardt
25610de38a Merge branch 'master' into factory-export-default 2018-07-06 08:40:12 +02:00
Sheetal Nandi
9c6c333b67 Caches the recursive directory watchers so we do not have to traverse and recreate more children watches
Helps with #25018
2018-07-05 16:06:17 -07:00
Andy
64555aa6a9
navigateTo: Collect results from all referenced projects. (#25283)
* navigateTo: Collect results from all referenced projects.

* Don't use project references, just source maps

* Move more code to session

* Test when implementation file is deleted

* Use tsserver tests instead of fourslash tests to ensure session is used

* Support find-all-references

* Restore fourslash tests

* Update emit baselines (added missing newline)

* Support rename

* @weswigham code review

* Don't open/close files

* Avoid growing `toDo` too eagerly

* @sheetalkamat code review

* Also get symlinked projects for originalLocation

* Update API (#24966)

* More @sheetalkamat code review

* Remove unnecessary test

* Update API (#24966)
2018-07-05 15:39:03 -07:00
Wesley Wigham
5b92678285
Optimize sourcemap application more (#25425)
* Optimize sourcemap application more

* Remove test-only memory hog sourceMapDecodedMappings field

* Update for style, remove unused function that triggers warnings in node 10

* Avoid all raw buffer constructor calls

* Small TDZ fix
2018-07-05 15:12:10 -07:00
Klaus Meinhardt
f4470cd342 createArrowFunction: parenthesize comma sequence
Fixes: #25366
2018-07-04 20:47:06 +02:00
Klaus Meinhardt
755dc83880 Merge branch 'master' of github.com:Microsoft/TypeScript into factory-export-default 2018-07-04 20:34:04 +02:00
Daniel Rosenwasser
e4145e3017
Merge pull request #25342 from ajafff/factory-leftmost-expression
getLeftmostExpression: handle AsExpression and NonNullExpression
2018-07-03 18:02:04 -07:00
Sheetal Nandi
4175773637 Fix typo to fix logging when built with --watch --diagnostics 2018-07-03 13:06:06 -07:00
Daniel Rosenwasser
e13fd0c568
Merge pull request #24915 from Microsoft/triggerSignatureHelpIArdlyKnowSignatureHelp
Trigger characters in signature help
2018-07-02 23:36:57 -07:00
Andy
efc1b7df08
More thoroughly test navigateTo (#25239)
* More thoroughly test navigateTo

* Fix #25233 and #25237

* Update API (#24966)
2018-07-02 19:25:27 -07:00
Daniel Rosenwasser
c046958752 Merge remote-tracking branch 'origin/master' into triggerSignatureHelpIArdlyKnowSignatureHelp 2018-07-02 15:36:41 -07:00
Sheetal Nandi
e0d5363380 Merge branch 'master' into openSameFileWithDifferentText 2018-07-02 12:16:54 -07:00
Klaus Meinhardt
c39da7b0f4 remove unnecessary qualifier 2018-07-02 18:02:46 +02:00
Klaus Meinhardt
3a84c028b5 add tests 2018-07-02 17:58:38 +02:00
Klaus Meinhardt
b8d7a2f763 add tests 2018-07-02 17:44:32 +02:00
Andy
ded446573a
ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList (#25276)
* ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList

* Change name

* Update API (#24966)
2018-06-29 19:53:32 -07:00
Daniel Rosenwasser
6f06fd0d46 Use a more direct error. 2018-06-28 16:06:55 -07:00
Daniel Rosenwasser
950593b669
Merge pull request #25251 from Microsoft/betterAlwaysTrueFalseErrors
Better "always true/false" errors
2018-06-27 21:57:25 -07:00
Daniel Rosenwasser
1f8ad2d318 indicates -> indicate 2018-06-27 17:20:24 -07:00
Andy
16f045b7f5
Add test for goto-definition with project references (#24867)
* Add test for goto-definition with project references

* Assert that the declaration file is what we emit
2018-06-27 15:56:04 -07:00
Andy
13bc46d970
getTokenAtPosition: default includeJsDocComment to true (#25015)
* getTokenAtPosition: default includeJsDocComment to true

* Update API (#24966)

* Flip meaning of parameter

* Update API (#24966)

* Remove all `ignoreJsDocComment` uses (fixes #25162)
2018-06-26 16:20:44 -07:00
Daniel Rosenwasser
4ca7aa4c37 Update error code expectations. 2018-06-26 15:54:06 -07:00
Daniel Rosenwasser
62e1e9d159 semanitc -> semantic 2018-06-26 15:52:52 -07:00
Sheetal Nandi
b155a71e70 Retain the version information of script infos when they are deleted
This helps in having to not restart the versioning,
which could potentially have same version but different contents and project could confuse with it
2018-06-26 15:03:35 -07:00
Nathan Shively-Sanders
133bb9f78d
Add name to jsDocParsing link tag test (#25229) 2018-06-26 10:50:59 -07:00
Ron Buckton
78bf10ad80
Merge pull request #25004 from Microsoft/trackFailedTests
Adds failed test tracking
2018-06-25 16:55:43 -07:00
Nathan Shively-Sanders
99ebcd788f
Treat link tag as comment (#25206)
* First attempt at parsing. Doesn't work

But my machine is dying, so this is an emergency commit.

* Parsing sort of works

But it's not right yet; the test I added fails. See the TODO I added.

* Parse link tag as comment
2018-06-25 15:27:49 -07:00
Ron Buckton
52fa900b5c Merge branch 'master' into trackFailedTests 2018-06-25 11:26:08 -07:00
Andy
878bf80a48
Make GetEditsForFileRenameRequestArgs not extend FileRequestArgs (#25052)
* Make GetEditsForFileRenameRequestArgs not extend FileRequestArgs

* Code review: check new location first, and use scriptInfo.getDefaultProject()

* Remove changes to e getDefaultProjectForFile (now #25060)

* Undo API changes (#24966)

* Combine edits from all projects (fixes #25052)

* Update API (#24966)

* Ignore orphan projects or projects with language service disabled
2018-06-25 11:00:51 -07:00
Andy
38a60ac59b
Fix --strictNullChecks error with getDefaultProjectForFile (#25060)
* Fix --strictNullChecks error with getDefaultProjectForFile

* Mark methods internal
2018-06-22 11:22:34 -07:00
Sheetal Nandi
f506b28e95 Mark the declarations visible correctly when emit is disabled but asked to emit declarations for watch mode
Fixes #25068
2018-06-20 12:28:50 -07:00
dangoo
2ef73ab4fa Fix test messages to mention esnext.intl 2018-06-19 22:58:26 +02:00
Ryan Cavanaugh
a72fe5dd8e Add a testcase 2018-06-18 16:44:25 -07:00
Ron Buckton
0944c29a47 Adds failed test tracking 2018-06-18 13:25:29 -07:00
Ron Buckton
23c7571e27 Merge branch 'master' into parallelAsyncTests 2018-06-15 13:26:27 -07:00
Ryan Cavanaugh
73844ac565 Accept baseline 2018-06-15 11:10:54 -07:00
Wesley Wigham
640af3f75e
Introduce related spans into tsserver protocol (#24548)
* Introduce related spans into tsserver protocol

* Incorporate pretty output, implement esModuleInterop related span
2018-06-15 10:54:36 -07:00
Ryan Cavanaugh
03c3c9dda1 Merge branch 'master' into esau-squash 2018-06-14 13:23:15 -07:00
Sheetal Nandi
34b9c4dbad
Merge pull request #24959 from Microsoft/moduleResolutionWithoutExtensionWithJson
Handle the json extension when ResolvedModule result is json file
2018-06-14 13:09:29 -07:00
Sheetal Nandi
8e16bfffc2 Handle the json extension when ResolvedModule result is json file
Fixes #24932
2018-06-14 09:53:06 -07:00
Ryan Cavanaugh
1bbe6610a4 Merge branch 'master' into esau-squash 2018-06-13 15:35:18 -07:00
Sheetal Nandi
cd97adbf3b Do not watch the parent folders recursively if not needed.
This avoids watching folders like parent folder of the project root just to watch files created in the folder
Fixes Microsoft/vscode#51139
2018-06-13 14:37:58 -07:00
Sheetal Nandi
46e7ccae7c Test for amd resolution setting the recursive directory watcher in the parents of root folder 2018-06-13 14:16:53 -07:00
Ryan Cavanaugh
73bb89f24f Fix input file path 2018-06-13 14:00:37 -07:00
Ron Buckton
e756182e21 PR Feedback 2018-06-13 10:46:38 -07:00
Ryan Cavanaugh
ed0b90c978 Issue a better error 2018-06-13 10:44:22 -07:00
Ron Buckton
131890a781 Add vfs diff, update tsbuild test 2018-06-13 00:08:36 -07:00
Daniel Rosenwasser
5e3c96bb9a Implemented support for trigger characters in signature help. 2018-06-12 15:48:40 -07:00
Wesley Wigham
61fb222cd2
Use symlinks when looking for module names for declaration emit (#24874)
* fix symlink tag, support arbitrary (ie, directory) links via @link

Introduce indirect symlink lookup to specifier deriver

Use fileset, move exec

vfs path resolution :shakes fist:

Apply files symlink relative to dirname

Use directory function

* Accept really bad baseline updates
2018-06-12 12:52:44 -07:00
Ryan Cavanaugh
066b191982 Collapse core/compiler/parser into parser 2018-06-11 17:07:58 -07:00
Ryan Cavanaugh
3432468ea9 Merge and baseline accept 2018-06-11 15:04:19 -07:00
Ryan Cavanaugh
bb4872787c Merge branch 'master' into projzilla 2018-06-11 13:36:31 -07:00
Ryan Cavanaugh
ab10b86205 Almost working? 2018-06-10 19:28:38 -07:00
Ryan Cavanaugh
3b4b7dc125 Fix unittests config 2018-06-10 15:10:10 -07:00
Ryan Cavanaugh
336c37662d Projzilla phase 1 2018-06-09 16:48:08 -07:00