22407 Commits

Author SHA1 Message Date
Jack Works
8dc4f7e3d2 chore: resolve suggestions 2020-06-23 08:06:46 +08:00
Nathan Shively-Sanders
ac87e82f08 inline local functions 2020-06-22 15:11:30 -07:00
Jack Works
ddfab9640e change 2020-06-19 11:37:06 +08:00
Jack Works
41a1cd9128 chore: more change 2020-06-19 11:35:35 +08:00
Jack Works
4fce495303
chore: resolve review 2020-06-19 11:28:06 +08:00
Jack Works
d33256cc5a chore: save space 2020-06-19 10:50:40 +08:00
Jack Works
cdd14ccec6 fix: lint error 2020-06-19 10:50:37 +08:00
Jack Works
c36fe2339a chore: make isJsxAttr required 2020-06-19 10:50:33 +08:00
Jack Works
d38096ab90 chore: revert change in checker 2020-06-19 10:50:31 +08:00
Jack Works
5853d2ab69 feat: re-impl react class name fix 2020-06-19 10:50:28 +08:00
Jack Works
c8abf6fe67 Revert "feat: add a codefix to fix class to className in react"
This reverts commit 15133266893f113d7d60f8696480adc75aba9827.
2020-06-19 10:50:27 +08:00
Jack Works
8c8f84549c feat: support spell checking in JSX attribute 2020-06-19 10:50:25 +08:00
Jack Works
0975bafbde feat: add name suggestion for JSX 2020-06-19 10:50:23 +08:00
Jack Works
9fe25ca077 feat: add a codefix to fix class to className in react 2020-06-19 10:50:21 +08:00
Wenlu Wang
59ad375234
Add deprecated related feature (#38523)
* Add deprecated related feature

* Add more support

* fix navtree

* Add identifier check

* Add more deprecated

* fix crash

* fix more crash

* fix crash

* improve diagnostic

* avoid new tag

* avoid tags

* accept baseline

* Check deprecated in binder

* fix baseline

* fix jsdoc cache

* fix incorrect fix

* Avoid useless changes

* Accept baseline

* Add tests

* fix perf

* fix public api

* Adjust deprecated mark on qualifed name

* Revolve alias symbol

* Use modifier flags insted of symbol props

* Fix modifier flag resolve

* Make lint happy

* Fix crash

* fix crash

* Add cached utils function

* Accept baseline

* Add more tests

* try pinning octokit again

* Avoid tests

* Use utils some

* Deprecated perf test (#3)

* check valueDeclaration only

* check without modifierFlags

* donot check alias

* use cached tag

* remove call to jsdoc

* use deprecated tag

* revert changes

* Revert mission changes

* use node flags

* cache result

* cache

* avoid modifier flags

* Opts

* fix jsdoc include modifier

* fix tests

* fix again

* use symbol flag

* set @octokit/rest back to latest

* fix trailing spacel int

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-06-18 17:41:26 -07:00
Alexey Shvayka
520103fab0
Rename callbackfn params to predicate where possible (#39150)
* Rename `callbackfn` params to `predicate` where possible

* Perform `gulp baseline-accept`
2020-06-18 16:44:57 -07:00
Kan Adachi
37831de587
Adds [unit] and [unitDisplay] to NumberFormatOptions (#38013)
* Adds [unit] and [unitDisplay] to NumberFormatOptions

* Adds [unit] and [unitDisplay] to ResolvedNumberFormatOptions

* Updates tests for NumberFormatOptions and ResolvedNumberFormatOptions

* move unit[Display] from es5 to es2020

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-06-18 15:03:11 -07:00
Jacob Bandes-Storch
8136047a3d
Code fix for accidental calls to get-accessors (#38749)
* add code fix

* fix forEachChild and update some baselines

* excluding them from forEachChild is easier!

* cleanup

* review feedback

* fix whitespace
2020-06-18 13:58:42 -07:00
Sheetal Nandi
b977f86abd
Allows emitting buildInfo when --noEmit is specified (#39122)
* Some tests

* Allow noEmit with incremental and composite
Fixes #38440
2020-06-18 11:05:37 -07:00
csigs
5039105602 LEGO: check in for master to temporary branch. 2020-06-18 16:10:41 +00:00
ShuiRuTian
8293e517c0
fix rename cause import change wrongly (#38462)
* use canonical file name when resolve module

* renameSync in vfs supports same folder.

* Update src/harness/vfsUtil.ts

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>

* change tss rather than compiler.

* remove useless comment.

* use fileName rather than path.

Co-authored-by: Song Gao <song.gao@laserfiche.com>
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2020-06-18 08:31:30 -07:00
Noj Vek
f697d26ca1
reset soft with master for single commit (#38720) 2020-06-18 00:22:32 -07:00
Nathan Shively-Sanders
c3c6be6618
In JSDoc, parse postfix-? below conditional types/tuple types (#39123)
Outside of JSDoc comments, postfix-? is parsed at lower precedence than
the `?` of conditional types, and a postfix-? inside a tuple type
results in the type being marked optional.

This PR changes JSDoc parsing to behave the same way, which means that

1. Conditional types are allowed in JSDoc. Fixes #37166.
2. Tuple types' postfix-? syntax is interpreted correctly in JSDoc.
Fixes #38747.

The breaking change is that a postfix-? type followed by another postfix type,
like `[]` or `!`, is parsed as a conditional type. [Postfix-? is not
common](https://github.com/microsoft/TypeScript/issues/37166#issuecomment-612274456),
so this is an acceptable breaking change.

A postfix-? type `T?` is still parsed everywhere else and treated as `T | null`.
2020-06-17 14:06:39 -07:00
Orta
d7aa5f3ee1
Show a diff when the public api baselines fail (#39108)
* Add semantic highlighting pt1

* Make the public API unit tests echo out a diff
2020-06-17 17:00:46 -04:00
Dmitri
0bc29acc08
Add a type-guard overload of Array.every (#38200)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-06-17 13:02:30 -07:00
Sheetal Nandi
4105d32b7e
Fix crash in reporting unresolved project reference as part of compilerOptions verification (#39095)
* Fix crash in reporting unresolved project reference as part of compilerOptions verification
Fixes #38143

* Fix typo
2020-06-17 11:20:02 -07:00
Eli Barzilay
7611579421 Small fix in getObjectLiteralIndexInfo
Fixes #38175
2020-06-17 03:29:10 -04:00
Ron Buckton
eb3645f16b
Refactor node factory API, use node factory in parser (#35282)
* Refactor node factory API, use node factory in parser

* Move UnparsedSource nodes to factory

* Make most Node properties read-only

* Make pos/end/parent and JSDoc 'comment' read-only

* Update function/constructor-type factories

* Remove treeStateObserver

* Simplify Debug.deprecate

* Remove unused factory methods, simplify lazy factory methods

* Fix base factory used for source file updates

* Update test baseline due to merge from master

* Rename factory methods to be more consistent (#39058)
2020-06-16 16:55:03 -07:00
Sheetal Nandi
0232d4ae8e
Fixes issues with reload because of output emit (#39030)
* If there is no changes to folder structure when watching directories recursively, send the updates to fileNames only
Fixes #37994

* Ignore excluded directories from wild card watching

* Testcase showing that renaming file with non sync directory watcher displays correct error in the end
Testcase for #38684
2020-06-16 16:39:48 -07:00
Andrew Branch
540c219980
Make debug mode work with new VS Code JS debugger (#39098) 2020-06-16 16:06:13 -07:00
Wenlu Wang
6c11ceb8db
Assignment operator is definite assignment (#39087)
Co-authored-by: Orta Therox <orta.therox@gmail.com>
2020-06-16 16:44:01 -04:00
Sheetal Nandi
25f6232d45
Syntax only server creates inferred project with all the open files w… (#38561)
* Syntax only server creates inferred project with all the open files with noResolve and can handle semantic operations

* No Watching

* Disable tests

* Add and fix tests

* Only support selected commands

* Revert "Disable tests"

This reverts commit 90d8a966ebfae3dd6aeac24686b5cbc723b6e380.

* Dont log request details for unsupported commands
2020-06-16 13:39:20 -07:00
Nathan Shively-Sanders
70a5d27292 Move notation to es2020.intl.d.ts 2020-06-16 10:08:07 -07:00
Nathan Shively-Sanders
7f3499a334 Merge branch 'master' into NumberFormatOptions-notation 2020-06-16 10:05:16 -07:00
Wesley Wigham
4bda7ce8e5
Include reexported names in list of exported names (#38809) 2020-06-15 15:17:08 -07:00
Wesley Wigham
6a777ff6b3
Fix crash when serializing the return type of a generic call to Array.prototype.flat (#38904)
* Add declaration emit error and checking for circularly referential unions produced by recursive conditionals

* Allow indexed accesses to produce alias symbols on types

* Add test that still triggers the declaration emit error

* Fix spelling
2020-06-15 11:46:10 -07:00
Eli Barzilay
0432954f2d Small fix in getIsContextSensitiveAssignmentOrContextType
Test that `parentSymbol.valueDeclaration` exists.

Fixes #38532
2020-06-13 07:10:04 -04:00
Eli Barzilay
8231519b85 Simplify visitObjectLiteralExpression
I ran into it and the comment at the top tripped me, then I proceeded to
simplify the code.  Patched a bit more of the function to make sure that
the indentation doesn't change, and added tests.
2020-06-13 07:05:21 -04:00
Eli Barzilay
f447838f95 Fix handling of aruments in the emitter
Two problems are fixed:

* `isArgumentsLocalBinding` did only `PropertyAccessExpression`, now
  it's also doing `PropertyAssignment` (doesn't affect other files,
  since it's only used in the emitter).

* `visitShorthandPropertyAssignment` should call `visitIdentifier` on
  the synthesized id.  (For completion it might be better to make it
  visit the the original?)

Fixes #38594.
2020-06-13 07:05:21 -04:00
Andrew Branch
b63ea4b6df
Fix declaration emit for property references of imported object literal types (#39055)
* Fix declaration emit for property references of imported object literal types

* Add declaration file to test
2020-06-12 17:48:19 -07:00
Nathan Shively-Sanders
34c6b1a76b
Merge pull request #39052 from microsoft/dom-update-2020-06-12
DOM update 2020-06-12
2020-06-12 15:35:31 -07:00
Sheetal Nandi
f628bf8e24
Fix casing for wild card keys for implicit globs to get wild card directories to watch (#39049)
* Test showing how wild card directory is not watched because of mismatch in key case

* Fix casing for wild card keys for implicit globs
Fixes #36532
2020-06-12 14:21:51 -07:00
Nathan Shively-Sanders
4cf0afe266 DOM update 2020-06-12 2020-06-12 13:55:40 -07:00
Nathan Shively-Sanders
a26e60eb2c skip implements types with no symbols 2020-06-11 16:34:32 -07:00
Nathan Shively-Sanders
9f872c01e1 Merge branch 'master' into fix-implements-tag-emit 2020-06-11 16:05:21 -07:00
Nathan Shively-Sanders
a64166de14 isDynamicName skips parentheses for element access
Neither `x[0]` nor `x[(0)]` should be dynamic names. Previously, the
latter was because `isDynamicName` didn't skip parentheses.

Since the binder treats dynamic names in property assignments as
assignment declarations, this incorrectly tried to create a binding for
expressions like `x[(0)] = 1`.

This caused an assert because `x[(0)]` would not take the dynamic name
code path during binding (`hasDynamicName` returned false), but the
normal code path for static names.
2020-06-11 09:08:51 -07:00
Eli Barzilay
ffa35d3272 Allow e: unknown in catch arguments
In addition, allow an explicit `any`; anything else throws an error.

Also adjust and reorganize existing tests.

Fixes #36775.
2020-06-10 18:24:20 -04:00
Wesley Wigham
08cb0b23e8
Serialize (noncontextual) keyword named namespace members with export declarations in both declaration emitters (#38982)
* fix(38750): create unique names for keywords and re-export them with original names

* Serialize (noncontextual) keyword named namespace members with export declarations in both declaration emitters

* Add exhaustive keyword emit test for js declaration emitter and fix it up

Co-authored-by: Alexander T <alexander.tarasyuk@outlook.com>
2020-06-10 14:42:49 -07:00
Wesley Wigham
58330d05a1
Patch to use this.timeout() > 0 rather than this.enableTimeout() to work with mocha 8+ 2020-06-10 14:26:22 -07:00
Wesley Wigham
2287dbc7e2
Handle missing return type nodes and nested type references missing type arguments in existing jsdoc node serialization (#39011)
* Handle missing return type nodes and nested type references missing type arguments in existing jsdoc node serialization

* Accept updated baselines
2020-06-10 12:42:38 -07:00