Commit Graph

110 Commits

Author SHA1 Message Date
Elizabeth Dinella
421730a68d Refactoring promises returning functions to use async and await (#26373) 2018-08-10 16:11:45 -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
Andy
806a661be3 Add refactor to convert named to default export and back (#24878)
* Add refactor to convert named to default export and back

* Support ambient module

* Handle declaration kinds that can't be default-exported

* Update API (#24966)
2018-06-25 10:34:24 -07:00
Ryan Cavanaugh
8491f70379 Merge branch 'master' into esau-squash
# Conflicts:
#	tests/baselines/reference/api/typescript.d.ts
2018-06-14 11:25:00 -07:00
Wesley Wigham
2a1503610b Stop generating sectional sourcemaps (#24917)
* Generate normal 1-part sourcemaps (at increased processing cost), since tools dislike sectional ones

* Add semicolon

* Accept sad baselines]

* Forward along sourcesContent if available

* Supress lint since the API actually calls for null here

* Fix concatenated sourcemap paths

* Accept bad baselines :(

* Add overloads

* Accept api update

* Fix lint
2018-06-13 18:52:23 -07:00
Ryan Cavanaugh
066b191982 Collapse core/compiler/parser into parser 2018-06-11 17:07:58 -07:00
Ryan Cavanaugh
6876d981f2 Merge with master 2018-06-11 13:17:25 -07:00
Ryan Cavanaugh
ab10b86205 Almost working? 2018-06-10 19:28:38 -07:00
Ryan Cavanaugh
336c37662d Projzilla phase 1 2018-06-09 16:48:08 -07:00
kingwl
0d730c008a Merge branch 'master' into add-braces 2018-06-09 01:32:53 +08:00
Wesley Wigham
d9b93903c0 Use more nodelike paths for import types when possible (#24610)
* Use more nodelike paths for import types when possible

* move functionality from services into compiler, fix with propert file/directory conflict handling

* mark suspect cast
2018-06-05 12:54:36 -07:00
Andy
43bf039a94 Add refactor to convert namespace to named imports and back (#24469)
* Add refactor to convert namespace to named imports and back

* Add tests and comments

* Code review

* Handle shorthand property assignment and re-export

* Don't use forEachFreeIdentifier

* Fix rename after "."
2018-05-30 14:11:53 -07:00
王文璐
d470f32d8a Merge branch 'master' into add-braces 2018-05-24 18:03:02 +08:00
Mohamed Hegazy
dd6dc5e27a Merge pull request #24328 from Microsoft/getEditsForFileRename_oldFileStillPresent
getEditsForFileRename: Handle old file still being present
2018-05-23 16:16:00 -07:00
Wenlu Wang
4606709672 add code fix convert to mapped object type (#24286)
* add code fix convert to mapped object type

* add support for type literal and improve test

* fix typo

* add support for heritageClauses

* only determine declaration is not class
2018-05-23 14:09:49 -07:00
王文璐
32be0c7099 add tests and fix 2018-05-23 10:19:08 +08:00
王文璐
5a69d9c255 add support for add or remove braces to arrow function 2018-05-23 10:16:59 +08:00
Andy Hanson
46eaf62abb getEditsForFileRename: Handle old file still being present 2018-05-22 12:20:34 -07:00
Andy
3eb66da155 Add code fix to remove unused label (#24037)
* Add code fix to remove unused label

* Test with trivia and fix indentation with dedented label
2018-05-18 15:25:24 -07:00
王文璐
5d233054c3 add quick fix for import type missing typeof 2018-05-17 16:35:20 +08:00
Andy
6ae4d3a516 Add code fix to remove unreachable code (#24028)
* Add code fix to remove unreachable code

* Code review

* Preserve more kinds of statements
2018-05-10 16:44:48 -07:00
Andy
e33e229a52 Extract 'moduleSpecifiers' namespace out of importFixes (#24010) 2018-05-10 16:30:24 -07:00
Andy
7271ec1240 Add 'move to new file' refactor (#23726)
* Add 'move to new file' refactor

* Code review, and support commonjs

* Compute movedSymbols completely before using, and support `export import`

* Fix assertion error: sort empty change before non-empty change

* Remove extra newline

* Add allowTextChangesInNewFiles preference

* Add the new file to 'files' in tsconfig

* Avoid parameter initializer

* Update API baselines

* Use path relative to tsconfig.json

* Code review

* Fix error where node in tsconfig file was missing a source file
2018-05-10 11:17:04 -07:00
Andy
cee4289f58 Add code fix to convert 'require' in a '.ts' file to an 'import' (#23711)
* Add code fix to convert 'require' in a '.ts' file to an 'import'

* Only add suggestion for modules

* Revert "Only add suggestion for modules"

This reverts commit b1a728fdac.
2018-05-01 09:24:02 -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
cae464058a Delete "delete me" files (#23446) 2018-04-16 15:29:02 -07:00
Ryan Cavanaugh
0e07d775a1 You have to do this everywhere now! 2018-04-11 16:59:53 -07:00
Ryan Cavanaugh
9a5a5b10a3 Remove all reference comments from services 2018-04-11 15:39:12 -07:00
Wesley Wigham
6af764c560 Declaration maps and transparent goto definition using them (#22658)
* Add compiler option to enable declaration sourcemaps

* Transparent goto definition for sourcemapped declaration files

* Post-rebase touchups

* Rename API methods

* Fix lints

* Fix typo in name XD

* Log sourcemap decode errors

* Share the cache more, but also invalidate it more

* Remove todo

* Enable mapping on go to implementation as well

* Allow fourslash to test declaration maps mroe easily

* more test

* Handle sourceRoot

* Add tests documenting current behavior with other sourcemapping flags

* Ignore inline options for declaration file maps, simplify dispatch in emitter

* Change program diagnostic

* Fix nit

* Use charCodeAt

* Rename internal methods + veriables

* Avoid filter

* span -> position

* Use character codes

* Dont parse our sourcemap names until we need to start using them

* zero-index parsed positions

* Handle sourceMappingURL comments, including base64 encoded ones

* Unittest b64 decoder, make mroe robust to handle unicode properly

* Fix lint

* declarationMaps -> declarationMap

* Even more feedback

* USE Mroe lenient combined regexp

* only match base64 characters

* Fix nit
2018-03-26 12:15:34 -07:00
Wesley Wigham
19ec83fcdf Refactor declaration emitter into declaration transformer (#21930)
* Refactor declaration emitter into declaration transformer

* Slight cleanup from code review feedback

* Incorporate fix for new test

* Swaths of PR feedback

* Merge public methods

* Per-file output

* Preserve input import ordering more often

* Unify jsdoc comment start detection under more lenient rule

* Move to per-file transformations to reduce the memory that msut be retained

* Fix typo
2018-03-15 22:23:10 -07:00
Andy
fa4619c5c1 Add 'info' diagnostics (#22204)
* Add 'info' diagnostics

* Code review
2018-02-28 11:16:32 -08:00
Andrew Casey
5c278cee17 Address PR feedback
Eliminate cancellation token

Add organizeImports.ts to tsconfig.json

Simplify ts.OrganizeImports.organizeImports

Simplify sortImports

Semantic change: all invalid module specifiers are now considered to be
equal.

Simplify comparisons using ||

Pull out imports with invalid modules specifiers

...for separate processing.  They are tacked on to the end of the
organized imports in their original order.

Bonus: downstream functions can now assume imports have valid module
specifiers.

Rename baseline folder with leading lowercase

Simplify coalesceImports

Remove some unnecessary null checks

Simplify baseline generation
2018-02-16 10:56:16 -08:00
Benjamin Lichtman
f989ef7261 Merge pull request #21004 from uniqueiniquity/updateATA
Enable typings cache entries to expire and be updated
2018-02-09 14:17:26 -08:00
uniqueiniquity
e72ea6f7b1 Update installed types if older than those listed in the registry 2018-01-11 12:58:22 -08:00
Sheetal Nandi
dc62bb9abc Change builder to BuilderProgram so it is similar to operating on program 2017-12-07 18:58:15 -08:00
Sheetal Nandi
576fe1e995 Expose the watch and builder API in the typescript.d.ts 2017-11-22 11:48:50 -08:00
Wesley Wigham
053b915061 Rebase SymbolWalker change onto master
From PR #9847.
2017-08-22 11:33:32 -07:00
Wesley Wigham
4b19eb3200 Remove duplicate entries from tsconfig files (#16991) 2017-07-06 15:56:34 -07:00
Sheetal Nandi
f1ea38d127 Merge branch 'master' into ownJsonParsing 2017-05-24 12:46:29 -07:00
Ryan Cavanaugh
f6fbe61718 Refactoring support (squash) 2017-05-19 10:45:49 -07:00
Sheetal Nandi
d7e9609ae5 Merge branch 'master' into ownJsonParsing 2017-05-11 09:10:35 -07:00
Nathan Shively-Sanders
1bff5b749e Codefix:suggest spellings+update others w/new codes 2017-05-01 11:41:01 -07:00
Sheetal Nandi
6f568b3f26 Merge branch 'master' into ownJsonParsing 2017-04-17 13:40:49 -07:00
Andy Hanson
c7d51a3053 Merge branch 'master' into refactor_findallrefs 2017-04-12 11:27:58 -07:00
Andy Hanson
ec558b8080 Merge branch 'master' into refactor_findallrefs 2017-03-17 08:04:04 -07:00
Mohamed Hegazy
0dac29f6f3 Merge branch 'master' into checkJSFiles 2017-03-15 12:35:26 -07:00
Vladimir Matveev
2b10611fbf initial revision of infrastructure to produce text changes that uses existing node factory, formatter and printer (#14441)
initial revision of infrastructure to produce text changes that uses existing node factory, formatter and printer
2017-03-15 11:44:36 -07:00
Mohamed Hegazy
706acdf138 Add quick fix to disable error checking in a .js file 2017-03-09 15:59:26 -08:00
Andy Hanson
aac3d80fc4 Merge branch 'master' into refactor_findallrefs 2017-03-01 08:45:41 -08:00
Andy Hanson
0f50a5ffa7 Move code from 'Completions' to 'PathCompletions' namespace 2017-03-01 08:29:33 -08:00