14544 Commits

Author SHA1 Message Date
Stuart Cook
fa01fbe052
Parse for await (async of ...) (#13244) 2021-05-01 18:00:21 +02:00
Huáng Jùnliàng
2a3e35f026
chore: remove duplicate test262 parser tests (#13241) 2021-05-01 10:57:43 -04: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
aancer-rca
3b55e8877c
fix: Typo in @babel/helper-create-class-features-plugin (#13237) 2021-04-30 17:40:28 +02:00
Nicolò Ribaudo
41c02246fb
Update @babel/* packages (#13231) 2021-04-30 11:07:16 -04:00
Babel Bot
b99c4f06d4
chore: update test262 to 70bc32edab22b44db9d671ce505db8842ae200b6 (#13233) 2021-04-29 21:50:43 -04:00
Nicolò Ribaudo
910b1f266f
Archive @babel/plugin-syntax-class-properties (#13232)
babel/babel-archive@b95d3626ad
2021-04-29 23:56:03 +02:00
Babel Bot
437a6f32c9 Add v7.14.0 to CHANGELOG.md [skip ci] 2021-04-29 20:11:07 +00:00
Nicolò Ribaudo
3c0152a217 v7.14.0 2021-04-29 21:59:57 +02:00
Huáng Jùnliàng
0f2a1a8153
Add runFixtureTestsWithoutExactASTMatch in parser test runner (#13227) 2021-04-29 18:42:26 +02:00
Nicolò Ribaudo
a2ac2f39b5 Update @babel/parser fixtures 2021-04-28 18:41:10 +02:00
Huáng Jùnliàng
50e0e353ee Implement async-do-expressions transform (#13117)
Co-authored-by: Brian Ng <bng412@gmail.com>
2021-04-28 18:26:01 +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
Nicolò Ribaudo
f30c99aa24 Mark WeakMaps of private fields as pure (#13194) 2021-04-28 18:25:17 +02:00
Nicolò Ribaudo
b4c21c729f Enable class fields & private methods by default (#13091) 2021-04-28 18:25:17 +02:00
Nicolò Ribaudo
5a7a782da2 Add private brand checks to shippedProposals (#13176) 2021-04-28 18:25:17 +02:00
Nicolò Ribaudo
2fc288576e Allow compiling #foo in obj without compiling private fields (#13172) 2021-04-28 18:25:17 +02:00
Nicolò Ribaudo
3c2b98ff06 Add class static blocks to preset-env's shippedProposals (#13114) 2021-04-28 18:25:17 +02:00
Sosuke Suzuki
7f5b212322
babel-parser: Add new typescript plugin option dts: boolean (#13113) 2021-04-28 18:24:18 +02:00
Nicolò Ribaudo
be03be1bc3
Implement importInterop: "node" option for module transforms (#12838) 2021-04-28 18:22:47 +02:00
Nicolò Ribaudo
22b0eb038f [ts] Enforce order for the override modifier (#13209)
* [ts] Enforce order for the `override` modifier

* generator

* Add more checks

* Update TS tests
2021-04-28 18:21:31 +02:00
George Zahariev
8433cd0c05 Support parsing Flow's Optional Indexed Access Types (#13224) 2021-04-28 18:21:31 +02:00
Nicolò Ribaudo
57daba85aa Parse string export names by default (moduleStringNames) (#13195)
* Parse string epxort names by default (`moduleStringNames`)

* Remove remaining references
2021-04-28 18:21:31 +02:00
Huáng Jùnliàng
ceaab0bae7 Parse class fields and private methods by default (#13175)
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
2021-04-28 18:21:31 +02:00
Sosuke Suzuki
b116865077 Use this.isThisParam in typescript parser (#13163) 2021-04-28 18:21:31 +02:00
Sosuke Suzuki
c949660b34 babel-parser: Deep freeze for makeErrorTemplates (#13142) 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
Sosuke Suzuki
2521c666f7 Add internal ESLint rule for consistent parser error messages (#13130) 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
Sosuke Suzuki
0ee98139a6 Introduce parser error codes (#13033) 2021-04-28 18:21:31 +02:00
Chris West
d0fcbfccdd
perf(core): check files before interacting with them (#13090)
* perf(core): check files before interacting with them

* refactor: inline fs.exists.sync -> nodeFs.existsSync
2021-04-28 00:41:18 +02:00
Huáng Jùnliàng
47537688d2
Improve isIdentifierName performance (#13211) 2021-04-27 23:04:48 +02:00
Huáng Jùnliàng
88da2e80ed
perf: avoid loadFullConfig when creating block hoist plugin (#13223)
* perf: avoid loadFullConfig when creating block hoist plugin

* address code review comments
2021-04-27 14:39:18 -04:00
Nicolò Ribaudo
a0e20ac5df
Simplify the wrapRegExp helper for named groups (#13201) 2021-04-26 23:39:32 +02:00
Stuart Cook
026e7f5a95
Prevent ForOfStatement from printing the forbidden sequence "for ( async of" (#13208) 2021-04-26 11:34:10 -04:00
Simon Lydell
504d22d29b
babel-highlight: Upgrade to js-tokens@7 (#13203)
Support for ES2021: The `||=`, `&&=` and `??=` operators, as well as
undescores in numeric literals (`1_000`).
2021-04-26 16:56:59 +02:00
Stuart Cook
3d4b801bb9
Simplify the special-case printing of single-param arrow functions (#13204)
* Simplify the special-case printing of single-param arrow functions

* Update test fixtures with single-param arrow functions

* Add some explicit snapshot tests for known edge-cases
2021-04-26 10:26:45 -04:00
Huáng Jùnliàng
10f4d08efb
refactor: avoid parsing logic on locations (#13200) 2021-04-25 09:15:48 -04:00
Babel Bot
fb908fd87e
Update test262 (#13196)
* chore: update test262 to eca69e2c95972a4c5780ef58fe1f1e53e871b9b1

* test262: add mapping for privateIn

* test262: ignored syntax-free features

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-04-23 10:40:54 +02:00
Nicolò Ribaudo
f63d73c94e
Allow putting helpers in individual files (#13190)
* Allow putting helpers in individual files

* Lint

* Also move `objectSpread2` (to show an helper with deps)

* Update fixture and package.json

* fixture
2021-04-22 20:45:52 +02:00
Jason
66181dbe37
fix: don't deduplicate comments with same start index (#13169) 2021-04-21 15:57:57 +02:00
Micha Reiser
adb5adac0c
fix: Don't load browserslist in block-hoist-plugin (#13182)
* fix: Don't load browserslist in block-hoist-plugin

* Remove test case

* Remove added new line
2021-04-21 09:20:17 -04:00
Huáng Jùnliàng
0c425cfb97
chore: run coverage-test against node 16 (#13183) 2021-04-20 19:47:17 -04:00
Babel Bot
304f316e60 Add v7.13.17 to CHANGELOG.md [skip ci] 2021-04-20 23:19:47 +00:00
Babel Bot
006e2c9393 v7.13.17 2021-04-20 23:05:58 +00:00
Nicolò Ribaudo
87e35ae5c7
Fix undeclared variable in iterableToArrayLimit (#13185) 2021-04-21 00:39:00 +02:00
Anna Henningsen
b971e00eb0
Fix completion record for labeled statement (#13084)
`{labelAlthoughIMeantItToBeAKey: value}` strikes again :)
2021-04-20 11:08:46 -04:00
Moti Zilberman
691c46846f
fix(destructuring): preserve loc of original declaration in output (#13173) 2021-04-20 10:36:06 -04:00