656 Commits

Author SHA1 Message Date
Mickey Rose
35ec4394a7
Simplify (transpiled) babel-types builder wrappers (#13843) 2021-10-21 18:55:42 +02:00
Mickey Rose
24aa1b44fe
[ts] precise return type on createTypeAnnotationBasedOnTypeof (#13844) 2021-10-14 09:00:19 +02:00
Huáng Jùnliàng
49a0d65be1
Mark static block as FunctionParent (#13832)
* refactor: move StaticBlock definition to core

* update generated types

* fix: mark StaticBlock as FunctionParent

* revise testcase

* update babel-types docs
2021-10-10 20:22:27 -04:00
Huáng Jùnliàng
c2f747c9b9
Improve transform-react-jsx typings (#13820)
* improve transform-react-jsx typings

* rename test fixtures

* remove unreachable sourceSelf check

* update test fixtures

* Update packages/babel-core/src/index.ts

* Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts

Co-authored-by: Henry Zhu <hi@henryzoo.com>

* Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts

Co-authored-by: Henry Zhu <hi@henryzoo.com>
2021-10-07 14:01:50 -04:00
Babel Bot
34a27e46f8 v7.15.6 2021-09-09 19:22:51 +00:00
Huáng Jùnliàng
d87a3d9e13
id in import attributes should not be referenced (#13733) 2021-09-07 08:29:15 -04:00
Babel Bot
b2376757d7 v7.15.4 2021-09-02 21:28:31 +00:00
Huáng Jùnliàng
51c6a99c8e
getBindingIdentifiers should return params for private methods (#13723)
* docs: add comments on binding kind

* refactor: simplify For collector visitor

* getBinding does not return falsy values

* chore: table style tests

* add more test cases

* fix: return params for private methods
2021-09-02 21:55:39 +02:00
Nicolò Ribaudo
804a94f829
Use import.meta.url instead of __dirname (#13721) 2021-09-01 15:57:55 +02:00
Huáng Jùnliàng
6436733d7d
fix: stricter rest element check (#13715) 2021-08-31 09:31:21 -04:00
Federico Ciardi
10640b2aad
perf: partially replace .concat with .push (#13609) 2021-08-14 16:57:06 +02:00
Nicolò Ribaudo
6912f968a6 v7.15.0 2021-08-04 23:00:40 +02:00
J. S. Choi
6276853eb9 Add support for the "Hack" pipeline proposal (#13191)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-08-03 23:30:16 +02:00
Babel Bot
aa2cac5edc v7.14.9 2021-08-01 07:42:57 +00:00
Andy Edwards
1d48bb0d8c
add 12 missing NODE_FIELDS (#13577)
* test: add fields test

* fix(babel-types): add missing NODE_FIELDS and tests

fix #13558
fix #13563

* chore: avoid using fs-extra

* chore: code cleanup

* chore: avoid util.promisify

* fix: remove bad ts-expect-error suppressions
2021-07-23 09:36:08 -04:00
Babel Bot
e591780244 v7.14.8 2021-07-20 17:51:55 +00:00
Huáng Jùnliàng
234316161f
fix: use BABEL_8_BREAKING for new babel-types breaking changes (#13538) 2021-07-09 09:27:59 -04:00
Colin Wang
fce35af691
fix(babel-types): accept UnaryExpression in TSLiteralType (#13525)
* fix(babel-types): add validator for TSLiteralType to accept UnaryExpression

seems that the generated files is missing typings

fix #13327

* fix(babel-types): add allowlist for TSLiteralType

now generated types seems correct

* fix(babel-types): use oneOfNodeTypes instead of oneOf
2021-07-03 00:34:26 +02:00
Federico Ciardi
9bad558d13
[babel 8] Use an identifier for TSTypeParameter.name (#12829) 2021-07-02 10:44:49 +02:00
Huáng Jùnliàng
3840893b48
Add typeParameters to tagged template visitor keys (#13500)
* refactor: move ES2022 AST nodes to core

* fix: add typeParameters to visitor keys

* chore: update artifacts

* fix: add typeAnnotation to visitor keys
2021-06-22 17:40:42 -04:00
Babel Bot
7a2a928398 v7.14.5 2021-06-09 23:03:30 +00:00
Huáng Jùnliàng
4eda1c8605
chore: bump eslint and its plugins (#13412) 2021-06-03 23:42:32 -04:00
Daniel Tschinder
176bc24312
[Babel 8] Remove optional field from MemberExpression (#13407) 2021-06-03 16:08:34 +02:00
Kristoffer K
140ec5aa5c
chore: setup Yarn constraints (#13363) 2021-05-31 18:46:03 +02:00
Babel Bot
219fd3ab1f v7.14.4 2021-05-28 16:50:09 +00:00
Daniel Tschinder
b1f57e5fb5
Only allow TSParameterProperty in ClassMethod parameters (#13349) 2021-05-23 20:14:21 +02:00
Babel Bot
7512095c84 v7.14.2 2021-05-12 16:58:57 +00:00
Sosuke Suzuki
b2d9156cc6
Update to Prettier 2.3 (#13288) 2021-05-10 15:34:13 +02:00
Nicolò Ribaudo
4c725f8cf8
Support objects from other contexts in t.valueToNode (#13275) 2021-05-07 12:34:30 +02:00
Yen-Wei Liu
187094b9a6
[babel-types] Update matchesPattern to account for this (#13264) 2021-05-05 23:08:43 +02:00
Babel Bot
3ecc7919c5 v7.14.1 2021-05-04 01:46:37 +00:00
Huáng Jùnliàng
9d6893d51f
Add alias docs for @babel/types (#13151)
* add alias docs generator

* fix LVal and PatternLike

* sort alias covered node types

* add inner links between alias and node types

* review comments

* tiny tweaks
2021-04-30 16:08:12 -04:00
Nicolò Ribaudo
3c0152a217 v7.14.0 2021-04-29 21:59:57 +02:00
Huáng Jùnliàng
28d7442aae Parse async do expressions (#13043)
* parse async do expressions

* add test cases

* update test fixtures

* chore: add syntax-async-do-expressions

* generater support

* fix: do not transform async do expressions

* chore: add asyncDoExpressions to missing plugin helpers

* update ast types

* add more test cases

* throw when asyncDoExpressions is enabled but not doExpressions

* avoid add parentheses for async do expressions

* address review comments

* chore: update parser typings
2021-04-28 18:26:01 +02:00
George Zahariev
8433cd0c05 Support parsing Flow's Optional Indexed Access Types (#13224) 2021-04-28 18:21:31 +02:00
Sosuke Suzuki
7484b51e56 Support TS 4.3 get/set type members (#13089)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-04-28 18:21:31 +02:00
Pig Fang
bf14a106ad Support TS 4.3 override syntax in class (#13097)
* support TS 4.3 `override` syntax in class

* fix types

* fix types

* tweak error message

* update TypeScript commit

* split tests

* add more tests

* update allowlist

* disallow `override` with `declare`

* disallow `override` in non-sub class

* update TypeScript allowlist

* rename error message key

* add more tests
2021-04-28 18:21:31 +02:00
Sosuke Suzuki
f8aa32f767 Support parsing Flow's Indexed Access Types (#13053) 2021-04-28 18:21:31 +02:00
Pig Fang
eac0259ce2 Support TS 4.3 static index signature in classes (#13096) 2021-04-28 18:21:31 +02:00
Babel Bot
006e2c9393 v7.13.17 2021-04-20 23:05:58 +00:00
Jason
ab06ccad49
fix: clone comments in cloneNode (#13178) 2021-04-20 10:34:12 -04:00
Babel Bot
d94a8e50ed v7.13.16 2021-04-20 11:11:32 +00:00
Huáng Jùnliàng
d6d942ddac
docs: refine babel-types docs generator (#13148)
* docs: refine babel-types docs generator

* avoid AST node shape title when it does not have node fields

* remove h1 from the output

* refactor docs generators
2021-04-14 16:26:25 -04:00
Nicolò Ribaudo
d24bd7ce5c
Remove remaining lodash dependencies (#13139) 2021-04-13 22:41:22 +02:00
Babel Bot
7ac9e9f740 v7.13.14 2021-03-29 13:34:28 +00:00
Henry Zhu
6b39bafab6
Remove lodash deps (#13057)
* inline escapeRegExp instead of using any dep

* inline camelCase

* replace merge with object spread

* copy if array instead of using clone

* inline isRegExp

* review fixes!

* remove escape-string-regexp from package.json and in test

* add error for field defaults that are not primitives or empty arrays

* replace merge with object spread

* yarn
2021-03-27 17:59:34 +01:00
Babel Bot
2f8203f190 v7.13.13 2021-03-26 21:09:38 +00:00
JounQin
238ce0bac8
fix(types): add missing range for BaseNode (#13046)
close #13027
2021-03-24 14:02:52 +01:00
Babel Bot
edb11baabf v7.13.12 2021-03-22 15:36:45 +00:00
Huáng Jùnliàng
85963167b4
fix: do not throw when creating type annotation based on bigint (#12971) 2021-03-19 11:44:11 -04:00