485 Commits

Author SHA1 Message Date
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
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
Andy
38a60ac59b
Fix --strictNullChecks error with getDefaultProjectForFile (#25060)
* Fix --strictNullChecks error with getDefaultProjectForFile

* Mark methods internal
2018-06-22 11:22:34 -07:00
Andy
1c3259d29b
Add CompletionInfo command to protocol (#25080)
* Add CompletionInfo command to protocol

* Add comments to protocol
2018-06-20 09:13:04 -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
Daniel Rosenwasser
5e3c96bb9a Implemented support for trigger characters in signature help. 2018-06-12 15:48:40 -07:00
Mohamed Hegazy
3cd6db76ef
Merge pull request #24816 from Microsoft/updateGraphBeforeErrorChecking
Updates the graph before checking if file is present in project for error checking
2018-06-11 13:15:40 -07:00
Andrew Casey
250913ad09 Normalize paths in GetEditsForFileRename 2018-06-08 18:02:33 -07:00
Sheetal Nandi
153f25a475 Updates the graph before checking if file is present in project for error checking
When file is moved using getEditsForFileRename, the watch notification could be delayed
This could result in project updates in background that could be delayed and result in file not present in the project after its synchronised
Fixes #24547
2018-06-08 16:56:33 -07:00
Andy
399ae51406
Support 'tsconfig.json' when converting TextChanges to CodeEdits (#24667)
* Support 'tsconfig.json' when converting TextChanges to CodeEdits

* Create Project#getSourceFileOrConfigFile to use instead
2018-06-07 14:30:19 -07:00
Andy
87217018b8
Add 'nameSpan' property to NavigationTree (#24698) 2018-06-07 12:43:57 -07:00
Andy
886377f8d3
Add autoCloseTag language service (#24543)
* Add autoCloseTag language service

* Change name to getJsxClosingTagAtPosition and return an object
2018-06-04 10:08:15 -07:00
Andy
d671c7ae96
getEditsForFileRename: Support directory rename (#24305)
* getEditsForFileRename: Support directory rename

* Code review

* Handle imports inside the new file/directory

* Document path updaters

* Shorten relative paths where possible

* Reduce duplicate code

* Rewrite, use moduleSpecifiers.ts to get module specifiers from scratch instead of updating relative paths

* Update additional tsconfig.json fields

* Add test with '.js' extension

* Handle case-insensitive paths

* Better tsconfig handling

* Handle properties inside compilerOptions

* Use getOptionFromName
2018-06-01 08:23:37 -07:00
Andy
77371679be
Support getting references even if quickInfo failed (#24476)
* Support getting references even if quickInfo failed

* Add test
2018-05-30 14:11:36 -07:00
Andy
e53e56cf82
Enable '--strictNullChecks' (#22088)
* Enable '--strictNullChecks'

* Fix API baselines

* Make sys.getEnvironmentVariable non-nullable

* make properties optional instead of using `| undefined` in thier type

* reportDiagnostics should be required

* Declare firstAccessor as non-nullable

* Make `some` a type guard

* Fix `getEnvironmentVariable` definition in tests

* Pretend transformFlags are always defined

* Fix one more use of sys.getEnvironmentVariable

* `requiredResponse` accepts undefined, remove assertions

* Mark optional properties as optional instead of using `| undefined`

* Mark optional properties as optional instead of using ` | undefined`

* Remove unnecessary null assertions

* Put the bang on the declaration instead of every use

* Make `createMapFromTemplate` require a parameter

* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional

* Plumb through undefined in emitLsit and EmitExpressionList

* `ElementAccessExpression.argumentExpression` can not be `undefined`

* Add overloads for `writeTokenText`

* Make `shouldWriteSeparatingLineTerminator` argument non-nullable

* Make `synthesizedNodeStartsOnNewLine` argument required

* `PropertyAssignment.initializer` cannot be undefined

* Use one `!` at declaration site instead of on every use site

* Capture host in a constant and avoid null assertions

* Remove few more unused assertions

* Update baselines

* Use parameter defaults

* Update baselines

* Fix lint

* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions

* Make Node#symbol and Type#symbol non-optional to reduce assertions

* Make `flags` non-nullable to reduce assertions

* Convert some asserts to type guards

* Make `isNonLocalAlias` a type guard

* Add overload for `getSymbolOfNode` for `Declaration`

* Some more `getSymbolOfNode` changes

* Push undefined suppression into `typeToTypeNodeHelper`

* `NodeBuilderContext.tracker` is never `undefined`

* use `Debug.assertDefined`

* Remove unnecessary tag

* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
2018-05-22 14:46:57 -07:00
Sheetal Nandi
f1acbc93ef Add noGetErrOnBackgroundUpdate session option to not queue diagnostics check for open files
This will ensure that the getErr will be queued in by host and hence would make sure that it is cancellable.
Handles one of the scenario delaying completions in #19458
2018-05-21 12:53:31 -07:00
Andy
cbbe34b35e
Fix conversion of TextChanges to FileCodeEdits for new file (#24126) 2018-05-15 13:55:26 -07:00
Ryan Cavanaugh
f01338fa33 Comments/naming 2018-05-14 18:27:21 -07:00
Ryan Cavanaugh
69f73eba16 Return mapped locations in alternate fields 2018-05-11 17:22:10 -07:00
Ryan Cavanaugh
ffa0ccba2a Project References Core support 2018-05-07 15:12:50 -07:00
Mohamed Hegazy
e52efb04f3 Fix #22419: Add kind field to OutliningSpan 2018-05-03 16:28:55 -07:00
Sheetal Nandi
d6dfd9a217 Do not remove inferred project immediately and try to reuse it on next file open 2018-04-24 11:53:36 -07:00
Andy
5c94bef0e1
Add 'renameFile' command to services (#23573)
* Add 'renameFile' command to services

* renameFile -> getEditsForFileRename

* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Andy
22f2b118b7
Add 'triggerCharacter' option for completions requests (#23491)
* Add 'triggerCharacter' option for completions requests

* mhegazy code review

* More code review

* Handle '<' in comment
2018-04-20 10:25:58 -07:00
Andrew Casey
26c836b12a Propagage reportsUnnecessary in convertToDiagnosticsWithLinePosition 2018-04-17 19:44:52 -07:00
Ryan Cavanaugh
ff60520460 Merge branch 'master' into referencesDogfood_1 2018-04-12 12:26:10 -07:00