30869 Commits

Author SHA1 Message Date
TypeScript Bot
6d54ce8a37 Bump version to 4.0.8 and LKG v4.0.8 2021-06-16 22:33:48 +00:00
Daniel Rosenwasser
72eaadcbab
Pass throwIfNoEntry to fs.statSync (#41604) (#44583)
Future versions of node will be able to return undefined, rather than
allocating and throwing an exception, when a file is not found.

See https://github.com/nodejs/node/pull/33716

Co-authored-by: Andrew Casey <amcasey@users.noreply.github.com>
2021-06-15 13:33:14 -07:00
TypeScript Bot
13651e8481 Bump version to 4.0.7 and LKG v4.0.7 2021-02-10 00:20:52 +00:00
Sheetal Nandi
052aff3550
Handle if plugin doesnt specify name (#42721)
Fixes microsoft/vscode#116219
2021-02-09 15:25:36 -08:00
Sheetal Nandi
89d7b5ee58 Bump version to 4.0.6 and LKG v4.0.6 2020-12-08 14:21:13 -08:00
Sheetal Nandi
fa2403f2dc Allow only package names as plugin names 2020-12-08 14:15:00 -08:00
TypeScript Bot
524480f2b2 Bump version to 4.0.5 and LKG v4.0.5 2020-10-26 21:19:52 +00:00
Daniel Rosenwasser
4f783761c2 Update LKG 2020-10-23 16:32:26 -07:00
Daniel Rosenwasser
2c0e966105
Pick/41079/release 4.0 (#41204)
* Cherry-pick PR #41079 into release-4.0

Component commits:
6fa32badaf `transformGenerators`: handle `CommaListExpression`
Uses essentially the same code as `visitCommaExpression` (which was
moved, to keep both together and close to
`visit{Right,Left}AssociativeBinaryExpression`).

Fixes #40614.

* Accepted baselines.

Co-authored-by: Eli Barzilay <eli@barzilay.org>
2020-10-22 12:54:18 -07:00
TypeScript Bot
cf134778bf Bump version to 4.0.4 and LKG 2020-10-19 20:01:15 +00:00
TypeScript Bot
60ad73da1f
Cherry-pick PR #40880 into release-4.0 (#41107)
Component commits:
ca35546663 Add test that fails

c7b5005aca Handle noEmit on semantic builder's emit as well

6a05abdff8 Add test for tsbuildinfo text verification

8bae5210ee Fix noEmit handling for tsbuildinfo emit with SemanticDiagnosticBuilder

0fd4a08b75 Add test for noEmitOnError with SemanticDiagnosticsBuilder

4fa1d78a6c Fix tsbuildinfo emit with SemanticDiagnosticsBuilder on noEmitOnError

a3968e7574 Update src/compiler/builder.ts
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
174b00a9a6 Update src/compiler/builder.ts

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-10-14 18:56:04 -07:00
Andrew Casey
91628ac60e
Merge pull request #40703 from amcasey/NpmCi40
Backport package-lock infra changes to 4.0
2020-09-22 13:48:45 -07:00
Andrew Casey
a76f015f9b Backport package-lock infra changes to 4.0
From #40146
Fixes #40692
2020-09-22 10:33:23 -07:00
Daniel Rosenwasser
e9d8ccb8b6
fix(40640) add missing notApplicableReason in protocol (#40680) (#40688)
* update protocol

* fix lint error

Co-authored-by: Jesse Trinity <jesse.trinity@microsoft.com>
2020-09-21 23:53:03 -07:00
TypeScript Bot
fee3bfbe91 Bump version to 4.0.3 and LKG v4.0.3 2020-09-18 17:46:05 +00:00
TypeScript Bot
2eb5deae4b Update LKG 2020-09-18 00:43:07 +00:00
Ben Lichtman
1dde4bbe4e
Merge pull request #40595 from typescript-bot/pick/39924/release-4.0
🤖 Pick PR #39924 (Insert auto imports after header co...) into release-4.0
2020-09-16 14:19:23 -07:00
Andrew Casey
23c77c4e32
Merge pull request #40444 from amcasey/Cherry40043
Set stackTraceLimit to 0 in fileSystemEntryExists
2020-09-16 12:50:57 -07:00
Jesse Trinity
e3301f7294 Cherry-pick PR #39924 into release-4.0
Component commits:
45d9eb5e3c place first import after header

d35d719dab don't insert before non-header
2020-09-16 18:41:03 +00:00
TypeScript Bot
65b84e707e
Cherry-pick PR #40273 into release-4.0 (#40303)
Component commits:
2c0e01aa94 Fix misplaced comma in auto imported specifier

Co-authored-by: Andrew Branch <andrew@wheream.io>
2020-09-14 17:08:51 -07:00
Brandon Cheng
657576ae7c Set stackTraceLimit to 0 in fileSystemEntryExists
The exception thrown by Node.js's fs.statSync function contains a stack
trace that can be expensive to compute. Since this exception isn't used
by fileSystemEntryExists, we can safely set Error.stackTraceLimit to 0
without a change in behavior.

---

A significant performance improvement was noticed with this change while
profiling tsserver on packages within a proprietary monorepo.
Specifically, my team saw high self time percentages for Node.js's
uvException and handleErrorFromBinding internal functions. These
functions are executed within fs.statSync when it fails to find the
given path.

https://user-images.githubusercontent.com/906558/90183227-220cb800-dd81-11ea-8d61-f41f89481f46.png

fs.statSync: https://github.com/nodejs/node/blob/v14.4.0/lib/fs.js#L1030-L1037
handleErrorFromBinding: https://github.com/nodejs/node/blob/v14.4.0/lib/internal/fs/utils.js#L254-L269
uvException: https://github.com/nodejs/node/blob/v14.4.0/lib/internal/errors.js#L390-L443

 ## Measurements

After adding Error.stackTraceLimit = 0, we saw:

- For a large configured project with 12,565 files, tsserver reached the
  projectLoadingFinish event 48.78% faster. (~46.786s vs ~31.447s)
- For a medium project with 7,064 files, tsserver was 25.75% faster.
  (~20.897s vs ~16.618s)
- For a small project with 796 files, tsserver was only a negligible
  3.00% faster. (~3.545s vs ~3.442)

Measurements were taken on macOS 10.15.6, Node.js 14.4.0, and a recent
master commit of TypeScript (610fa28d). The average of 3 runs before and
after this change were taken.

I would normally include .cpuprofile and isolate-*-*-*.log files, but
can't post them publicly in this case. If there's any other summaries
the TypeScript team would be curious about I can report them.

 ## fs.statSync Misses

Within our monorepo, the fs.statSync misses were mostly searches for
alternative file extensions of module imports.

- For node_modules imports, a lot of .ts/.tsx lookups failed until the
  .d.ts file was found.
- Within projects with a lot of JSX files, .ts files were looked for
  before finding the .tsx version.
- In the medium scale project mentioned above, a total of 38,515
  non-existent files were queried during createProgram.
2020-09-08 17:51:54 -07:00
TypeScript Bot
3e7a8e7e45
Cherry-pick PR #40348 into release-4.0 (#40349)
Component commits:
3b332792a6 Fix call hierarchy item serialization and server tests

Co-authored-by: Andrew Branch <andrew@wheream.io>
2020-09-08 10:52:13 -07:00
TypeScript Bot
8890dcb7ca
Cherry-pick PR #40118 into release-4.0 (#40134)
Component commits:
e1f4f9cfc8 Fix tuple name homogeneity check

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
2020-08-26 16:38:07 -07:00
TypeScript Bot
912cbdfcb6 Update LKG v4.0.2 2020-08-17 02:14:20 +00:00
TypeScript Bot
076db46a3f
Cherry-pick PR #40072 into release-4.0 (#40076)
Component commits:
1582b76053 Revert "Add '(approximate)' to the beginning of quick info requests in PartialSemantic mode (#40061)"
This reverts commit 2426eb4980d34c762e745cdb5062ca211e65f25e.

Co-authored-by: Daniel Rosenwasser <drosen@microsoft.com>
2020-08-16 19:01:12 -07:00
TypeScript Bot
c9c6cd29b6 Bump version to 4.0.2 and LKG 2020-08-15 01:16:37 +00:00
Daniel Rosenwasser
5f5dac0280 Add '(approximate)' to the beginning of quick info requests in PartialSemantic mode (#40061)
* Add '(approximate)' to the beginning of quick info requests.

* Use 'approximation' instead of 'approximate'.
2020-08-15 01:01:11 +00:00
Sheetal Nandi
10304555e7 Ensure file, include and exclude specs used are strings (#40041)
* Test displaying failure when specs used are not strings

* Ensure specs used are strings
Fixes #38164, #39856

* Feedback
2020-08-14 23:59:19 +00:00
Andrew Casey
edaa8aa9c0
Merge pull request #39989 from amcasey/pinned-release-4.0
Pin dependencies in release branch
2020-08-13 10:24:54 -07:00
TypeScript Bot
f88f3065fa Update LKG 2020-08-13 06:22:57 +00:00
TypeScript Bot
a1925515e2
Cherry-pick PR #40026 into release-4.0 (#40028)
Component commits:
8f442baa3c Revert to including only open files in partial semantic server mode

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-08-12 20:45:52 -07:00
TypeScript Bot
6620b251ef
🤖 Pick PR #40005 (feat(40004): Missing Compiler API p...) into release-4.0 (#40015)
* Cherry-pick PR #40005 into release-4.0

Component commits:
fa1ed85593 feat(40004): make isNamedTupleMember public

* Update LKG

Co-authored-by: Alexander T <alexander.tarasyuk@outlook.com>
Co-authored-by: typescript-bot <typescript@microsoft.com>
2020-08-12 00:10:04 -07:00
TypeScript Bot
7558de69b1
Cherry-pick PR #39702 into release-4.0 (#39985)
Component commits:
cd5dde5d79 Improve deprecated suggestion node position

6e39ee706e fix typo

a593fd03fe Simplify code

58f6f3daf2 merge helper function

Co-authored-by: kingwl <kingwenlu@gmail.com>
2020-08-11 23:33:56 -07:00
Andrew Casey
47c23aa245 Pin dependencies in release branch
With this change, you can build the branch using `npm ci && npm run
build`.
2020-08-10 18:02:58 -07:00
TypeScript Bot
3055018556
Cherry-pick PR #39950 into release-4.0 (#39951)
Component commits:
6e5d75b58b Use isUncalledFunctionReference for aliases too
Fixes bogus deprecated notices on imports of functions with deprecated
overloads, but with some non-deprecated overloads.

Fixes microsoft/vscode#104238

e2eb319e72 Just check all declarations, don't call isUncalledFunction

Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
2020-08-07 10:40:44 -07:00
TypeScript Bot
264d27e779
🤖 Pick PR #39937 (Handle empty package.json files) into release-4.0 (#39938)
* Cherry-pick PR #39937 into release-4.0

Component commits:
0b9b321b0c Handle empty package.json files

* Update LKG

Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: typescript-bot <typescript@microsoft.com>
v4.0-rc
2020-08-06 10:37:28 -07:00
TypeScript Bot
071b649d59
Cherry-pick PR #39932 into release-4.0 (#39933)
Component commits:
f53db98f88 Add missing 'importName' for private field helpers

Co-authored-by: Ron Buckton <rbuckton@microsoft.com>
2020-08-06 09:56:58 -07:00
TypeScript Bot
10bfb7c6d0
🤖 Pick PR #39883 (Renames in servermode per feedback) into release-4.0 (#39888)
* Cherry-pick PR #39883 into release-4.0

Component commits:
d320625392 Server mode renames as per feedback

e8d798db59 More renames

508226eec3 Merge branch 'master' into serverModeRename

* Update LKG

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Co-authored-by: typescript-bot <typescript@microsoft.com>
2020-08-05 14:37:43 -07:00
TypeScript Bot
024a09b947 Update LKG 2020-08-05 05:30:59 +00:00
Sheetal Nandi
eeea32be29 Handle the fact that noResolveResolution resolution is reused
Fixes #39795
2020-08-04 22:18:08 -07:00
TypeScript Bot
1763b8e5f2 Update LKG 2020-08-04 07:29:17 +00:00
Daniel Rosenwasser
d063105964 Rename and use the default ref instead of having a workflow_dispatch option 2020-08-04 00:16:09 -07:00
Daniel Rosenwasser
4f02a04a05 Add an 'Update LKG' action (#39897) 2020-08-04 00:15:51 -07:00
TypeScript Bot
7cf61845c9
Cherry-pick PR #39889 into release-4.0 (#39890)
Component commits:
c3ac7fa2e7 Handle the fact that noResolveResolution resolution is reused Fixes #39795

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-08-03 22:19:53 -07:00
Nathan Shively-Sanders
3a6dde0b6b Make numeric Array constructors take ArrayLikeBuffer union
PR #38449 changed the second overload of the constructor for Int8,
Uint8, Int32, Uint32, Int16, Uint16, Float, Float64 -Array so that it no
longer includes `ArrayBufferLike`. It's just `ArrayLike<number>`.
This is fine except in the case that
the caller provides exactly `ArrayLike<number> | ArrayBufferLike`. This
PR adds ArrayBufferLike back so that the union is once again accepted.

This avoids a breaking change, in particular in one Microsoft-internal
codebase.
2020-08-03 16:57:29 -07:00
Daniel Rosenwasser
546360687b Update LKG. 2020-08-03 05:18:50 +00:00
Daniel Rosenwasser
fe74f348bf Bump version to 4.0.1-rc. 2020-08-03 05:14:17 +00:00
Daniel Rosenwasser
e141dd19b1 Merge branch 'master' into release-4.0 2020-08-03 05:12:42 +00:00
csigs
7e93035b66
LEGO: Merge pull request 39868
LEGO: Merge pull request 39868
2020-08-02 21:11:41 -07:00
csigs
b092fb37b1 LEGO: check in for master to temporary branch. 2020-08-03 04:10:44 +00:00