Commit Graph

2073 Commits

Author SHA1 Message Date
Sheetal Nandi
b26ca160f4 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-11 12:27:58 -07:00
Sheetal Nandi
4c4ddf833d Merge branch 'master' into referencesPrototypeSourceFile 2019-08-21 15:42:36 -07:00
Alexander
23a3b340b0 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-10 09:58:25 +03:00
Sheetal Nandi
825d8bb1dc Merge pull request #32791 from microsoft/documentHighlightsFilesToSearch
Ignore unknown files to search from in document highlights
2019-08-09 15:34:05 -07:00
Sheetal Nandi
b7e49d1d1c Ignore unknown files to search from in document highlights 2019-08-09 15:06:51 -07:00
Andrew Casey
8c6612b31e Tweak message text 2019-08-09 14:50:24 -07:00
Andrew Casey
6c19c13094 Use an explicit type 2019-08-09 14:04:04 -07:00
Andrew Casey
6122e92802 Restore logging of the program file list 2019-08-09 12:34:40 -07:00
Andrew Casey
d9780cd7ba Include fewer paths in exception
It's sufficient to append them to the log.
2019-08-09 10:27:02 -07:00
Alexander
ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander
a292ae1789 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-04 15:35:41 +03:00
Sheetal Nandi
c25e7dd873 Wire in compilerOptions of the program in to the host's resolveModuleNames and resolveTypeReferenceDirectives api
Fixes #31056
2019-07-31 12:01:49 -07:00
Alexander
0059763d8f move eslint rules from eslint-plugin-microsoft-typescript to scripts/eslint 2019-07-24 13:31:17 +03:00
Alexander T
a8ee8fbe87 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-18 10:00:16 +03:00
Andrew Branch
387c917765 Revert "Proposal: If there’s a package.json, only auto-import things in it, more or less (#31893)" (#32448)
This reverts commit 60a1b1dc1a.
2019-07-17 14:02:18 -07:00
Alexander T
64baa804a8 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-15 18:35:34 +03:00
Andrew Branch
60a1b1dc1a Proposal: If there’s a package.json, only auto-import things in it, more or less (#31893)
* Move package.json related utils to utilities

* Add failing test

* Make first test pass

* Don’t filter when there’s no package.json, fix scoped package imports

* Use type acquisition as a heuristic for whether a JS project is using node core

* Make same fix in getCompletionDetails

* Fix re-exporting

* Change JS node core module heuristic to same-file utilization

* Remove unused method

* Remove other unused method

* Remove unused triple-slash ref

* Update comment

* Refactor findAlias to forEachAlias to reduce iterations

* Really fix re-exporting

* Use getModuleSpecifier instead of custom hack

* Fix offering auto imports to paths within node modules

* Rename things and make comments better

* Add another reexport test

* Inline `symbolHasBeenSeen`

* Simplify forEachAlias to findAlias

* Add note that symbols is mutated

* Symbol order doesn’t matter here

* Style nits

* Add test with nested package.jsons

* Fix and add tests for export * re-exports
2019-07-12 10:08:55 -07:00
Sheetal Nandi
b631850978 Add option disableSourceOfProjectReferenceRedirect to disable using sources of project reference redirect from editor 2019-07-10 15:49:53 -07:00
Sheetal Nandi
f7ea0bab60 Refactoring 2019-07-01 14:33:39 -07:00
Sheetal Nandi
f72af3be60 Verify the scenarios when d.ts directory of dependency doesnt exist 2019-07-01 11:34:57 -07:00
Alexander T
f6a50067d3 @typescript-eslint/indent 2019-06-27 11:30:03 +03:00
Sheetal Nandi
012ecdacde Add sourceOf project reference redirect to filesByName list for redirect path so that module symbol is correctly resolved 2019-06-26 14:56:21 -07:00
Sheetal Nandi
0adab8934a Use source files instead of .d.ts files from project references 2019-06-21 13:14:28 -07:00
Alexander T
7d449ac13f no-fallthrough 2019-06-21 18:32:22 +03:00
Alexander T
33eeceec9e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-06-19 18:48:52 +03:00
Alexander T
5ce8c831b4 prefer-const 2019-06-19 17:58:49 +03:00
Alexander T
1ccb4d2d82 microsoft-typescript/debug-assert 2019-06-14 10:00:33 +03:00
Sheetal Nandi
73bf2684ac Rename to use contextSpan 2019-06-13 12:41:21 -07:00
Sheetal Nandi
da2aa9781e Revert to using spread instead of mutating value later 2019-06-12 15:25:16 -07:00
Sheetal Nandi
768c9ed8d7 Handle jsx Opening, Closing and Self closing tags 2019-06-06 11:48:45 -07:00
Sheetal Nandi
fd86f40d05 Include declarationSpan as relevant declaration span when defintion or other places are declaration name
Fixes #30849
2019-05-24 15:44:32 -07:00
Ron Buckton
3d2af9ff33 Relocate Debug namespace to reduce duplication (#31524) 2019-05-22 11:20:29 -07:00
Andrew Branch
15daf42b2c Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
rpgeeganage
8f209be149 fixed the comments 2019-05-06 21:21:37 +02:00
rpgeeganage
578013b65c modified the service file 2019-05-05 19:01:14 +02:00
Ryan Cavanaugh
885d4d63c8 Remove "generate types" code (#31075) 2019-04-23 13:51:47 -07:00
Andrew Branch
d8936fd290 Rename to be smarter 2019-04-18 16:23:06 -07:00
Andrew Branch
0f7bc02892 Move to language service 2019-04-18 16:05:06 -07:00
Sheetal Nandi
e78f52d246 Add more information when getValidSourceFile cant find the file in question.
Log for #30180
2019-03-15 15:03:45 -07:00
Anders Hejlsberg
b34fe67ac5 Fix issue of more inferences leading to worse results 2019-03-05 17:49:58 -08:00
Benedikt Meurer
0c7a7df09d Also initialize transformFlags properly in NodeObjects. 2019-02-06 20:57:02 +01:00
Benedikt Meurer
fb65adbd23 Fix initialization of TokenOrIdentifierObject#transformFlags.
This should start with `TransformFlags.None` just like in the `Node`
constructor in `src/compiler/utilities.ts`.
2019-02-06 16:51:32 +01:00
Benedikt Meurer
97c557eb04 Make modifierFlagsCache mandatory for Node objects
The `modifierFlagsCache` property is among the top properties that cause
megamorphic stub cache misses when having `tsc` build itself. This is
because it's added sort of randomly to a whole lot of different objects,
at arbitrary points after their initialization.

This also means that `modifierFlagsCache` is often not present on the
instances, which means that when missing on the megamorphic stub cache,
Node/V8 has to compute `NonExistent` handlers for the relevant inline
caches.

It's a lot cheaper to just make sure that the property is always
existent on the instance, and ideally also at the same offset. This
change ensures exactly that.

Drive-by-fix: Also make sure that `transformFlags` (and `parent`)
is always at the same offset for `Node` objects.
2019-02-04 14:46:27 +01:00
Benjamin Lichtman
5fc8f1dd80 Add opt-in user preference for prefix and suffix text on renames (#29314)
* Add user preference to control renaming through exports

* Only impact renaming

* Update baselines

* Use flag to control all prefix and suffix text and imports

* [WIP] add tests

* Only skip export import specifier with flag

* [WIP] Update tests

* Update test

* Pick up preference from host and update test

* Shorten flag name

* Add missing utility function

* Update comment

* [WIP] rename flag and respond to cr

* [WIP] Add flag for forRelatedSymbol

* Use larger search symbol set for old-style rename

* Respond to CR

* Fix small error

* Fix type mismatch

* Update comment and remove unnecessary exprot

* Respond to CR
2019-01-16 10:58:07 -08:00
Benjamin Lichtman
d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Sheetal Nandi
0113f43632 Fix the edits clamping from #28583 after rebasing to master 2018-12-06 15:22:43 -08:00
Sheetal Nandi
56a39b754c Keep alive declaration script info and map file info if source file info is alive 2018-12-06 15:22:42 -08:00
Sheetal Nandi
12428d45c0 Add method on host to get DocumentPositionMapper so it can be cached. 2018-12-06 15:22:39 -08:00
Sheetal Nandi
0a8c47bd45 Refactoring to createSourceMapperHost 2018-12-06 15:22:38 -08:00
Andy
12f3d0d54c Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00