1631 Commits

Author SHA1 Message Date
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
Wenlu Wang
bd27296ba6 improve stripInternal with inline comments (#23611)
* improve stripInternal with inline comments

* fix lint

* stash

* simptify StripInternal

* fix internal type declaration

* fix internal type declaration again

* accept baseline

* refactor inline

* simply prev check

* remove getTrailingCommentRangesOfNode

* Merge implementation with new isInternalDeclaration method, accept lkg-based baseline
2019-03-12 13:14:47 -07:00
Sheetal Nandi
990b199ebd Merge branch 'master' into incrementalBuildInfo 2019-03-08 11:42:19 -08:00
Sheetal Nandi
ec2ee9ff3a Ignore anything starting with ".git"
Fixes #29782
2019-03-06 15:00:26 -08:00
Sheetal Nandi
e55fbffed6 Rename the request as updateOpen 2019-03-05 14:34:08 -08:00
Sheetal Nandi
5fd745d834 Update the tsconfigs 2019-02-28 14:01:40 -08:00
Sheetal Nandi
03377f70b7 Apply changes in reverse order even in new API to match behaviour with internal api 2019-02-27 14:07:15 -08:00
Sheetal Nandi
e6068f405b Make applyChangesToOpenFiles efficient to handle batch file opens, close and changes before updating projects
Fixes #29667
2019-02-26 11:54:29 -08:00
Sheetal Nandi
2258bb2fb7 Add request applyChangesToOpenFiles 2019-02-26 10:21:01 -08:00
Sheetal Nandi
9fa28158bb Enable building typescript.d.ts with current source 2019-02-22 18:11:27 -08:00
Nathan Shively-Sanders
17d16d1bbb
Disable checkJS survey (#29830)
* Disable checkJS survey

* Completely remove survey infrastructure

* Re-instate the protocol part of SurveyReady
2019-02-11 08:36:35 -08:00
Jesse Trinity
f0a6154e9b Added auto setting to quotePreference 2019-02-06 14:37:26 -08:00
Benjamin Lichtman
62cf44cb9b
Allow per-file setting for rename default behavior preferences (#29593)
<!--
Thank you for submitting a pull request!

Here's a checklist you might find useful.
* [ ] There is an associated issue that is labeled
  'Bug' or 'help wanted' or is in the Community milestone
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] There are new or updated unit tests validating the change

Refer to CONTRIBUTING.MD for more details.
  https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
-->

Fixes #29585.
#29314 and #29385 made it so their respective settings are only recognized when provided to the host as a whole.
This PR makes it so that the relevant settings for the preferences on the file override those of the preferences on the host.
2019-01-30 19:08:30 -08:00
Sheetal Nandi
9bd23652ef
Merge pull request #29161 from Microsoft/incrementalBuild
Supports incremental build in tsc --b --w mode
2019-01-17 13:44:48 -08: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
Andrew Casey
35f64fa894
Merge pull request #29421 from amcasey/DisabledLSHardening
Harden telemetryOnOpenFile against disabled projects
2019-01-15 11:23:05 -08:00
Andrew Casey
b86cb27d0b Fix trailing whitespace 2019-01-14 18:13:13 -08:00
Andrew Casey
104434182b Harden telemetryOnOpenFile against disabled projects
As for syntax-only servers, we can't meaningfully report open-file
telemetry for projects with disabled language services.

Hopefully, a deeper fix will follow, but this solves the immediate
problem that VS disables the LS for all projects when it sees a failure
in applyChangedToOpenFiles (because it assumes the server state is
corrupt).
2019-01-14 17:43:06 -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
1b37830615 Merge branch 'master' into incrementalBuild 2019-01-09 10:40:01 -08:00
Sheetal Nandi
1870ee4099 Merge branch 'master' into tsconfig_canonicalpath 2019-01-08 16:04:22 -08:00
Sheetal Nandi
24cc284d19 The assert that cached value of config file existance is always correct, might not be true if file watcher is not invoked before creating configured project
Fixes #29191
2019-01-02 15:42:12 -08:00
Sheetal Nandi
0cabb00b34 Use watch factory instead of direct host functions in tsbuild to provide detailed information on watch invokations 2018-12-21 12:53:14 -08:00
Sheetal Nandi
2f84741725 Remove unnecessary fields 2018-12-06 15:22:46 -08:00
Sheetal Nandi
fa7f5cb5a0 Actually verify when dependency and main project is open 2018-12-06 15:22:45 -08:00
Sheetal Nandi
3dc0d5a77c Watch missing map file and update the source mapping accordingly 2018-12-06 15:22:44 -08:00
Sheetal Nandi
d0976509c9 Add tests and fix DocumentPositionMapper creation on updates to d.ts, source file, map file etc 2018-12-06 15:22:43 -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
751cb9e2c3 Update source and declaration projects on update to declaration file or map file
TODO: add tests
2018-12-06 15:22:42 -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
0aa4da43ad Life time of declaration, sources and map infos
Map Info and sources is not ideal and need to revisited since we need to update mapper and projects correctly
// TODO: lifetime of source project and declaration map
2018-12-06 15:22:41 -08:00
Sheetal Nandi
5c920f3368 Dont unnecessarily make textStorage internal 2018-12-06 15:22:40 -08:00
Sheetal Nandi
afdf1e90ec Dont depend on project in document position mapper so that we can unload or remove projects independently 2018-12-06 15:22:40 -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
Andy
12f3d0d54c
Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Andrew Casey
642803c182
Merge pull request #28559 from amcasey/FileSize
Expose aggregate file sizes in FileStats
2018-11-16 13:52:12 -08:00
Andrew Casey
a8c634d70d Restore useText 2018-11-16 10:48:06 -08:00
Andy
1089424035
Ensure getApplicableRefactors doesn't crash when given a position (#28361) 2018-11-16 09:30:37 -08:00
Andy Hanson
d29a072a4a Merge branch 'master' into tsconfig_canonicalpath 2018-11-15 17:20:13 -08:00
Andrew Casey
8bfdb4145d Fix tests and lint 2018-11-15 16:00:35 -08:00
Andrew Casey
2c7d67fded Expose aggregate file sizes in FileStats
We're not sure that file counts are a good proxy for project size and
this will give us more direct insight.
2018-11-15 13:56:24 -08:00
Andrew Casey
02d5cb045c Expose file size from TextStorage
Since it's for telemetry, it prefers to return a stale value rather than
triggering file IO (though it will load the file if not even a stale
value is available).
2018-11-15 13:56:24 -08:00
Ron Buckton
50a0174582
Merge pull request #27629 from Microsoft/sourceMapGenerator
Simplify source map generation
2018-11-09 14:50:22 -08:00
Ron Buckton
151dc074a8 Merge branch 'master' into sourceMapGenerator 2018-11-09 11:50:51 -08:00
Sheetal Nandi
c77f0c41c2 Add affectsModuleResolution to compile options: maxNodeModuleJsDepth
Fixes inferred project incorrectly modifying existing compiler options
Fixes #27108
2018-11-09 10:48:28 -08:00
Sheetal Nandi
62419bb103
Merge pull request #28419 from Microsoft/elaborateAssert
Elaborate assert of infos attached to project
2018-11-08 15:45:38 -08:00
Sheetal Nandi
c0587191fc
Merge pull request #28418 from ajafff/internal-comments
remove even more internal comments
2018-11-08 14:58:33 -08:00
Sheetal Nandi
7bfc2c8113 Elaborate assert of infos attached to project 2018-11-08 14:56:10 -08:00
Sheetal Nandi
8dd05d5858 Fix public API 2018-11-08 13:01:22 -08:00
Sheetal Nandi
55fb052d7a Allow creation of relative path file infos only for open script infos
Fixes #20476
2018-11-08 12:43:48 -08:00