Commit graph

85 commits

Author SHA1 Message Date
Sheetal Nandi 56b618b9fc Use indexOf and substr to exclude node_modules and bowerComponents instead of using loop 2018-04-18 11:44:28 -07:00
Sheetal Nandi 67bb67edf1 Cache canonical global cache's package.json path 2018-04-18 11:22:02 -07:00
Sheetal Nandi db9620d8f0 Use watch recursive directories instead of watchFile for node_modules and bower components 2018-04-17 14:27:21 -07:00
Sheetal Nandi 82e9a7595b Invoked should be property on watchers map instead of local variable since watchers arent closed if they need to be reopened 2018-04-13 15:17:13 -07:00
Sheetal Nandi b3d83c81cc Handle command too long failure in typings installer 2018-04-12 11:43:18 -07:00
Sheetal Nandi e48ed3f9c2 Do not close the file watches just to create new ones in the type installer
Fixes #22581
2018-03-15 10:45:09 -07:00
Andy a564912d9a
Apply 'no-unnecessary-qualifier' lint rule (#22009) 2018-03-01 14:20:18 -08:00
Nathan Shively-Sanders 7e8dab681a
typingsInstaller:Remove triple-slash references (#21982)
Replace them with an explicit list of files in tsconfig. I got this list
by adding --listFiles to the jake-generated command.
2018-02-16 14:00:10 -08:00
uniqueiniquity 4c89a813bf Handle case where package.json and package-lock.json don't agree 2018-02-09 10:36:49 -08:00
uniqueiniquity 7397fb11c4 Fix lint and test errors and add tests 2018-01-19 14:10:06 -08:00
uniqueiniquity d34b86573c Respond to CR 2018-01-19 13:13:51 -08:00
uniqueiniquity a21f73f862 Remove timestamp checking and move registry check into jstyping 2018-01-11 12:58:22 -08:00
uniqueiniquity e72ea6f7b1 Update installed types if older than those listed in the registry 2018-01-11 12:58:22 -08:00
uniqueiniquity 23324345e2 Update representation of timestamp file to prevent some extra install calls 2018-01-11 12:58:22 -08:00
uniqueiniquity 6a16cfe0a5 Use existing map to hold representations of timestamp files 2018-01-11 12:58:22 -08:00
uniqueiniquity 7b6be118f5 Allow for local timestamp files and style fixes 2018-01-11 12:58:22 -08:00
uniqueiniquity 3f23d5d02e Respond to CR 2018-01-11 12:58:22 -08:00
uniqueiniquity bf4ec1df5a Fix timestamp writing, npm install, and cache behavior 2018-01-11 12:58:21 -08:00
uniqueiniquity b0321dc177 Refactor to avoid errors 2018-01-11 12:58:21 -08:00
Benjamin Lichtman ee5e8e3eee Ensure proper JSON writing behavior of timestamps 2018-01-11 12:58:21 -08:00
uniqueiniquity 9d298a13a1 [WIP] enable updating ATA files 2018-01-11 12:58:21 -08:00
Andy d8142339f9
Use 'filter' array helper (#20452) 2017-12-04 13:36:01 -08:00
Ryan Cavanaugh ee2d436999 Always send a response to installTypings even if all types are cached 2017-11-20 21:32:56 -08:00
Ryan Cavanaugh a416826b64 Apply safelist exclusions even when include is not specified; recompute project contexts when installer reqs finish 2017-11-16 12:52:30 -08:00
micbou d97335e4e7 Silence NPM warnings when installing typings (#19749) 2017-11-06 09:45:52 -08:00
Andy 6a382f1436
In typings installer, provide mandatory 'package.json' fields (#19663) 2017-11-01 14:20:26 -07:00
Andy d05443bb1d Add quickfix and refactoring to install @types packages (#19130)
* Add quickfix and refactoring to install @types packages

* Move `validatePackageName` to `jsTyping.ts`

* Remove combinePaths overloads

* Respond to code review

* Update api baselines

* Use native PromiseConstructor

* Return false instead of undefined

* Remove getProjectRootPath

* Update api
2017-10-17 15:04:09 -07:00
Andy 193f4be355 Enable interface-over-type-literal lint rule (#17733) 2017-09-07 09:14:59 -07:00
Mohamed Hegazy deaddb5595 Ports #17983 (#17986)
* Bind logger function before using

* Use lambda isntead of bind
2017-08-23 13:01:14 -07:00
Ryan Cavanaugh 43b8ce664c Merge 2017-08-22 14:31:49 -07:00
Andy 08fbcd8b80 Fix many no-object-literal-type-assertion lint errors (#17278)
* Fix many no-object-literal-type-assertion lint errors

* Simple fixes

* Use a union for FlowNode

* PR feedback and remove remaining `id()` uses

* Use a union for CodeBlock

* Discriminate CodeBlock by CodeBlockKind
2017-08-10 12:52:15 -07:00
Ryan Cavanaugh 5272ec6309 Types Map WIP 2017-07-27 16:07:50 -07:00
Andy 3330f2a33b JsTyping: Remove "safeList" global variable (#17304) 2017-07-27 10:54:47 -07:00
Andy Hanson 96d537bc54 readFile may return undefined 2017-07-14 15:57:23 -07:00
Andy efc861c76d Add logging to discoverTypings (#16652) 2017-07-13 07:10:35 -07:00
Andy e7dc2a67ca Enable "object-literal-shorthand" lint rule (#16987) 2017-07-07 07:26:58 -07:00
Andy 179a3e10b5 Handle depth in all readDirectory implementations (#16646) 2017-06-29 11:04:33 -07:00
Andy Hanson 8371eb6401 Update tslint to latest (next is still on 4.3) and lint for BOM 2017-03-01 10:37:13 -08:00
Andy Hanson 58cb9a7f08 Use "ts2.2" (or "ts2.3", etc.) NPM tag in typingsInstaller 2017-01-31 06:57:47 -08:00
Andy Hanson 8c5afd7f54 Merge branch 'master' into map5 2017-01-06 13:03:34 -08:00
Joel Day 8b44ce2fd7 Emitting tsserverlibrary as an external module. 2016-12-31 17:37:51 -08:00
Andy Hanson 6b1cc8972d Use native maps when they're available 2016-12-08 06:40:31 -08:00
Vladimir Matveev 1418fd170d send begin/end notifications when installing types packages (#12551) 2016-11-29 10:14:22 -08:00
Jason Ramsay 5a9451ae23 Rename typingOptions.enableAutoDiscovery to typeAcquisition.enable 2016-11-18 18:14:32 -08:00
Vladimir Matveev 4c2474463c ports #12237, #12258 and #12259 into master (#12274)
* treat failures to resolve module name as missing packages (#12237)

* added extra check to prevent multiple installation of the same typing, added version field to telemetry event (#12258)

* added extra check to prevent multiple installation of the same typing, added version field to telemetry event

* use ts.version

* switch to execSync to ensure that no install orders are interleaved (#12259)

* Make sure version is public

* Update file with version string for nightly release
2016-11-15 12:53:46 -08:00
Vladimir Matveev f11e8a3c69 add 'installSuccess' flag to telemetry, cache misses if npm install fails (#12163)
* add 'installSuccess' flag to telemetry, cache misses if npm install fails

* fix typo
2016-11-14 14:10:22 -08:00
Mohamed Hegazy d537b79c61 Merge release-2.1 into master (#12157)
* Update LKG

* Update version

* Update LKG

* Skip overloads with too-short function parameters

If the parameter of an overload is a function and the argument is also a
function, skip the overload if the parameter has fewer arguments than
the argument does. That overload cannot possibly apply, and should not
participate in, for example, contextual typing.

Example:

```ts
interface I {
  (a: number): void;
  (b: string, c): void;
}
declare function f(i: I): void;
f((x, y) => {});
```

This code now skips the first overload instead of considering.

This was a longstanding bug but was only uncovered now that more
functions expressions are context sensitive.

* Test skip overloads w/too-short function params

1. Update changed baseline.
2. Add a new test with baseline.

* Minor style improvements

* Ignore optionality when skipping overloads

* Do not use contextual signatures with too few parameters

* isAritySmaller runs later: getNonGenericSignature

* rewrite void-returning statements in constructors that capture result of super call (#11868)

* rewrite void-returning statements in constructors that capture result of super call

* linter

* Update LKG

* Fix emit inferred type which is a generic type-alias both fully and partially fill type parameters

* Add tests and baselines

* Skip trying to use alias if there is target type

* Update baselines

* Add diagnostics to remind adding tsconfig file for certain external project (#11932)

* Add diagnostics for certain external project

* Show tsconfig suggestion

* fix lint error

* Address pr

* fix comment

* Update error message

* Flag for not overwrite js files by default without generating errors (#11980)

* WIP

* Properly naming things

* refactor

* apply the option to all files and check out options

* Fix typo

* Update LKG

* lockLinter

* use local registry to check if typings package exist (#12014) (#12032)

use local registry to check if typings package exist

* Add test for https://github.com/Microsoft/TypeScript/pull/11980 (#12027)

* add test for the fix for overwrite emitting error

* cr feedback

* enable sending telemetry events to tsserver client (#12034) (#12051)

enable sending telemetry events

* Update LKG

* Reuse subtree transform flags for incrementally parsed nodes (#12088)

* Update LKG

* Update version

* Update LKG

* Do not emit "use strict" when targeting es6 or higher or module kind is es2015 and the file is external module

* Add tests and baselines

* [Release 2.1] fix11754 global augmentation (#12133)

* Exclude global augmentation from module resolution logic

* Address PR: check using string literal instead of NodeFlags.globalAugmentation

* Remove comment
2016-11-10 14:28:34 -08:00
Vladimir Matveev 9e3d6efb19 reduce set of files being watched, increase polling interval (#12054) (#12092) 2016-11-07 21:13:11 -08:00
Vladimir Matveev 4ffdea838a Ports #12051 and #12032 into master (#12090)
* use local registry to check if typings package exist (#12014)

use local registry to check if typings package exist

* enable sending telemetry events to tsserver client (#12035)

enable sending telemetry events
2016-11-07 13:36:08 -08:00
Andy Hanson 12f6dcefa1 Revert "Merge pull request #11354 from Microsoft/map4"
This reverts commit adfdae0dc4, reversing
changes made to aad663cebf.
2016-10-27 15:50:21 -07:00