Commit graph

62 commits

Author SHA1 Message Date
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
Andy Hanson bcc0807198 Respond to PR comments 2016-10-27 13:14:56 -07:00
Andy Hanson c958c47ef5 Merge branch 'master' into map4 2016-10-26 11:05:51 -07:00
Vladimir Matveev 7890f63250 use unresolved imports as a source of used typings (#11828) 2016-10-25 15:24:21 -07:00
Vladimir Matveev a477d1f7bb Merge pull request #11764 from Microsoft/vladima/11744
watch configuration files if they exist even if they cannot be parsed
2016-10-20 21:31:38 -07:00
Andy Hanson 5e7e5421fa Add noop, notImplemented, and notYetImplemented helpers 2016-10-19 14:21:48 -07:00
Andy Hanson a11838215c Merge branch 'master' into map4 2016-10-19 13:16:55 -07:00
Andy Hanson 6814c1d883 Forbid unused locals/parameters anywhere 2016-10-19 08:27:49 -07:00
Andy Hanson 7292f9f67e Merge branch 'master' into map4 2016-10-17 06:49:53 -07:00
Vladimir Matveev 224582c4f3 Merge pull request #11577 from Microsoft/vladima/configure-typing-acquisition
Disable automatic type acquisition with command line option, replace npm view with request to npm registry
2016-10-13 10:22:26 -07:00
Andy Hanson aadcbcc083 Use native maps when they're available 2016-10-06 13:29:18 -07:00
Vladimir Matveev d120bcd6fe validate inferred typing names to be legal package names 2016-10-01 11:56:51 -07:00
Mohamed Hegazy f13cef19dd Add fallback for npm location if not running under node.exe 2016-09-22 14:34:08 -07:00
Vladimir Matveev 7ca85e0e4b move throttling to runAsync 2016-09-20 14:14:51 -07:00
Jason Ramsay 609e56ed8e - Reorganize nodeTypingsInstaller and typingsInstaller for testing purposes
- Add throttle tests
- Add full npm path
2016-09-19 22:27:11 -07:00
Zhengbo Li 2b8d96371e Avoid circular references in core.ts (#10783) 2016-09-08 13:26:01 -07:00
Jason Ramsay 798232c975 Fixing unit tests, lint errors & addressing CR feedback 2016-09-01 18:28:37 -07:00
Jason Ramsay 3a993c89f3 update runInstall 2016-08-31 21:14:24 -07:00
Jason Ramsay 7d3f22fc66 Changes from CR feedback 2016-08-26 16:37:31 -07:00
Jason Ramsay 1f9f20f043 Swap out TSD for Types 2.0 2016-08-25 16:25:34 -07:00
Jason Ramsay 5e37a310d7 types 2.0 WIP 2016-08-23 09:50:44 -07:00
Vladimir Matveev a3a07a0f9f lint more files 2016-08-17 14:47:54 -07:00
Vladimir Matveev ce35f96892 shutdown typing installer if parent process is exited 2016-08-17 13:01:48 -07:00
Vladimir Matveev 758d8de8f9 record projectName instead of projectRootPath 2016-08-16 14:49:45 -07:00