509 Commits

Author SHA1 Message Date
Sheetal Nandi
12428d45c0 Add method on host to get DocumentPositionMapper so it can be cached. 2018-12-06 15:22:39 -08:00
Andy
12f3d0d54c
Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Andy
1089424035
Ensure getApplicableRefactors doesn't crash when given a position (#28361) 2018-11-16 09:30:37 -08:00
Ron Buckton
151dc074a8 Merge branch 'master' into sourceMapGenerator 2018-11-09 11:50:51 -08:00
Sheetal Nandi
9eecf3bd68 Some reorg 2018-11-08 12:32:48 -08:00
Sheetal Nandi
f0f02754f3 Change type of metadata to unknown 2018-11-06 18:45:08 -08:00
Sheetal Nandi
4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Andy
92a48d8880
Improve error message when scriptInfo is missing in mapTextChangeToCodeEdit (#28258)
* Improve error message when scriptInfo is missing in mapTextChangeToCodeEdit

* Include both fileName and path, and use in more places

* Move logErrorForScriptInfoNotFound to editorServices.ts

* Update API
2018-11-02 16:12:46 -07:00
Sheetal Nandi
878b7a21ce Fix incorrect event 2018-10-31 13:05:00 -07:00
Mine Starks
1fbabd5534 Merge pull request #28106 from minestarks/configure-plugins
configurePlugins command for tsserver
2018-10-29 14:06:40 -07:00
Andy
672b0e3e16
Have flatMap return a ReadonlyArray by default (#28205) 2018-10-29 11:12:51 -07:00
Ron Buckton
4982803a38 Merge branch 'master' into sourceMapGenerator 2018-10-08 18:01:37 -07:00
Sheetal Nandi
37e25c8873 Send even for ProjectLoadStart and ProjectLoadFinish
Fixes #27206
2018-10-05 15:09:33 -07:00
Andy
5f2741b2ba
Make RenameInfo a union (#27382) 2018-09-27 08:56:40 -07:00
Andy
0a97663843
Add 'prefixText' and 'suffixText' when renaming shorthand properties (#27356)
* Add 'prefixText' and 'suffixText' when renaming shorthand properties

* Make prefixText and suffixText missing instead of undefined

* Fix test
2018-09-26 16:58:01 -07:00
Andy
c435d1c9a4
Log text of relevant file after an exception (#27006)
* Log text of relevant file after an exception

* Require LogLevel.verbose
2018-09-26 11:31:59 -07:00
Andy
471bc646b8
Ensure session passes along fileToRename (#27323) 2018-09-24 14:44:26 -07:00
Andrew Casey
eaf6c692e8
Merge pull request #22776 from amcasey/GH22607
Thread typesMapLocation down to the ProjectService
2018-09-19 10:57:49 -07:00
Andy
c57ff087d6
Add codefix to generate types for untyped module (#26588) 2018-09-18 11:47:29 -07:00
Andrew Casey
1bcb4910ca Thread typesMapLocation down to the ProjectService
Fixes #22607
2018-09-18 10:38:43 -07:00
Andy
fc54a2c0a7
Include triggerSpan in protocol.RenameInfo (#27160) 2018-09-17 15:00:41 -07:00
Andy
bfc00935df
Fix bug: Get mapped location of definition for findAllReferencesFull (#27113) 2018-09-17 14:14:55 -07:00
Andy
24a5bdd1b1
Add 'fileToRename' property to RenameInfo (#24702)
* Add 'fileToRename' property to RenameInfo

* Update tests

* Support directory rename
2018-09-10 11:25:03 -07:00
Ryan Cavanaugh
cfc6d353b2
Merge pull request #26589 from Microsoft/deduplicate_overloads
Remove unused overloads of 'deduplicate' and 'deduplicateSorted'
2018-09-05 17:43:52 -07:00
Ron Buckton
b006287cb1 Refactor and clean up sourcemap decoder 2018-09-04 17:50:06 -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
Sheetal Nandi
03bb5d170e Use protocol.UserPreferences in server to store UserPreferences 2018-08-28 15:53:00 -07:00
Sheetal Nandi
fc90b8f98b lazyConfiguredProjectsFromExternalProject as userpreference instead of command line option 2018-08-28 14:41:22 -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
Andy Hanson
213d374e13 Make equalityComparer non-optional 2018-08-22 15:27:03 -07:00
Sheetal Nandi
1e5e61873d Send event on referencing large file 2018-08-03 15:22:28 -07:00
Sheetal Nandi
d74d8613bd Use updateGraphIfDirty to do quick check if project update is needed
With this updateGraph is used only in locations we are certain project is dirty
2018-08-01 16:08:25 -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
ab1b899cea Use isArray instead of isProjectsArray 2018-07-27 12:50:32 -07:00
Sheetal Nandi
399f497a32 Unify getProjects for compileOnSave and others like (navigation etc) 2018-07-27 12:47:47 -07:00
Sheetal Nandi
94033f212d If project name is specified in compile on save, do not update all projects to just use that project 2018-07-27 11:21:14 -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
Andy
b21c1fd595
errorCodes in CodeFixRequestArgs is non-optional (#25815) 2018-07-20 11:10:33 -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
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
Andy
8a559e4630
Improve isNewFile assert (#25419) 2018-07-10 16:57:01 -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
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
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
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
Wesley Wigham
53e163df0b
Add codes and categories to related information, officially (#25304) 2018-06-28 14:41:21 -07:00
Andy
ab9e913af3
getEditsForFileRename: Test both before and after the rename (#25074) 2018-06-26 16:55:51 -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