Commit graph

51 commits

Author SHA1 Message Date
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 de876bdfc9 Use an ES5 target 2016-10-18 07:34:48 -07:00
Andy Hanson 7292f9f67e Merge branch 'master' into map4 2016-10-17 06:49:53 -07:00
Vladimir Matveev 9c41e42d62 fix linter issues 2016-10-13 10:29:01 -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 571d1f7b54 Fix gulp-typescript to 2.14.1 untill gulpFile.ts is migrated. (#11290)
* Fix gulp-typescript to 2.14.1 untill gulpFile.ts is migrated.

* Upgrade gulp-typescript to 3.0
2016-10-01 02:16:43 -07:00
Mohamed Hegazy 0cd1af4fd6 Add gulp build tasks for cancellationToken and typingsInstaller 2016-09-22 16:20:27 -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
Jason Ramsay 4b9e554494 Add throttle limit to typings installer requests 2016-09-16 18:36:13 -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 4f7a5185f8 switch to using npm ls -json instead npm install -json 2016-09-01 12:30:32 -07:00
Jason Ramsay 3a993c89f3 update runInstall 2016-08-31 21:14:24 -07:00
Jason Ramsay d15381682b - invalidate typings fix
- update gc timer
2016-08-30 15:51:43 -07:00
Jason Ramsay ba50c6eb25 Merge branch 'tsserverVS-WIP' into tsserverVS-Types2.0 2016-08-30 13:43:33 -07:00
Jason Ramsay 24ef426fbb Install packages separately 2016-08-30 13:41:24 -07:00
Vladimir Matveev 38ce6279cd add tsserver specific resolution pass that will load typings from cache locations if auto discovery is enabled 2016-08-29 22:21:58 -07:00
Jason Ramsay 199e533059 - Command line should use spaces between types instead of comma
- if entry.typings is empty use entry.typings for default typings to install
2016-08-29 19:01:55 -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 edfd104e56 use localhost:<eventPort> to send notifications when typings are updated 2016-08-18 14:29:21 -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
Vladimir Matveev f0e1f9b108 [WIP] file watching 2016-08-16 14:21:09 -07:00
Vladimir Matveev dd70fdbb76 add logging to typings installer, read npm bin path to start globally installed binaries 2016-08-15 15:59:31 -07:00
Vladimir Matveev 672813afb6 move global cache location to node typings installer 2016-08-15 11:48:28 -07:00
Vladimir Matveev 5424df7be5 adjust typing directory 2016-08-14 23:07:25 -07:00
Vladimir Matveev 9a180122a5 merge with origin/master 2016-08-14 11:42:08 -07:00
Vladimir Matveev 5d03895bb7 fix build issues on linux 2016-08-14 11:16:11 -07:00
Vladimir Matveev d07261af4f ensure tsd cache directory exists 2016-08-12 23:04:17 -07:00
Vladimir Matveev 512ec04d29 [WIP] send\receive install typing requests 2016-08-12 18:17:16 -07:00
Vladimir Matveev 959b6b6c07 remove unused dependencies to reduce the size of output file 2016-08-12 14:26:09 -07:00
Vladimir Matveev b1871a5bf9 [WIP] pass ITypingsInstaller to ProjectService 2016-08-12 14:01:23 -07:00
Vladimir Matveev 51e2b02a31 add runTsd method 2016-08-12 12:14:25 -07:00