14563 Commits

Author SHA1 Message Date
Trinangkur Chatterjee
5ae3a6c2a4
Update lodash version for fixing security vulnerability (#13289)
* Update lodash version for fixing security vulnerability

* Update yarn.lock
2021-05-10 09:20:23 -04:00
Sosuke Suzuki
1d54419ec4
Parse attributes of import expression with estree plugin (#13284)
* Parse attributes of import expression with estree plugin

* Add tests

* Update packages/babel-parser/src/types.js

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-05-07 16:37:20 -04:00
serut
e74b3fb1c6
[DOC] Add missing Monorepo configuration (#13253)
* [DOC] Add missing Monorepo configuration

* Update eslint/babel-eslint-parser/README.md

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>

* [DOC] Unify monorepo config file

* [DOC] Clean monorepo configuration

* [DOC] Monorepo conf when eslint runned by package

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-05-07 13:53:01 -04:00
Nicolò Ribaudo
4c725f8cf8
Support objects from other contexts in t.valueToNode (#13275) 2021-05-07 12:34:30 +02:00
Babel Bot
4c1b8cc751
chore: update test262 to c11d6b00bc2c53323fe26a5813a720fd74cd25ad (#13276) 2021-05-07 10:27:04 +02:00
Huáng Jùnliàng
a8fea4037d
Faster identifier tokenizing (#13262)
* add benchmark

* perf: faster identifier tokenizing

- Mover iterator identifier parsing to the Flow plugin
- If the character is an identifier start, pass it to readWord1
2021-05-06 18:47:19 -04:00
Nicolò Ribaudo
1879491af7
[eslint] Don't crash on multiple @babel/parser copies (#13274) 2021-05-06 23:31:19 +02:00
Stuart Cook
68bc4dfd31
Print parentheses around identifier let where necessary (#13269) 2021-05-06 21:10:45 +02:00
Huáng Jùnliàng
96fce81438
chore: bump eslint-visitor-keys (#13272) 2021-05-06 12:23:21 -04:00
Huáng Jùnliàng
a387973821
Refactor private name tokenizing (#13256)
* add benchmark

* refactor: create tt.privateName token for private names

* add backward compat privateName = hash + name to Babel 7

* perf: get private name SV from token value

* chore: tweak benchmark file

* chore: update test fixtures

* convert tt.privateName to PrivateIdentifier

* perf: avoid most isPrivateName call

* Update packages/babel-parser/src/parser/expression.js

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* perf: use inlinable codePointAtPos

* make prettier happy

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-05-06 09:46:09 -04:00
Huáng Jùnliàng
278193b6f7
fix: update chunkStart on missing unicode escape (#13261) 2021-05-06 08:31:11 -04:00
Nicolò Ribaudo
9440318309
Update Rollup plugins (#13265) 2021-05-06 08:53: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
8873d0c402 Add v7.14.1 to CHANGELOG.md [skip ci] 2021-05-04 01:56:35 +00:00
Babel Bot
3ecc7919c5 v7.14.1 2021-05-04 01:46:37 +00:00
Sosuke Suzuki
ef87648f3f
Parse static blocks with typescript plugin (#13243)
* Support static blocks with typescript

* Add tests

* Reuse isStatic var

* Disallow parsing static blocks with modifiers

* Add tests

* Raise recoverable errors

* Address review

* Add tests for static static {}
2021-05-03 16:17:08 -04:00
Nicolò Ribaudo
175a51f94e
Don't use "composite": true in tsc (until it supports cycles) (#13242)
* [ts] Don't use project references

* Commit `tsconfig.json` so it's ready-to-go

* Remove `clean-tsconfig` task

* Fix dts generation

* Add comment

* `yarn`

* Review

* Fix regexp
2021-05-03 20:47:53 +02:00
Nicolò Ribaudo
07440424d9
Archive @@babel/plugin-syntax-module-string-names (#13246)
babel/babel-archive@15c88ef856
2021-05-03 14:07:25 -04:00
overlookmotel
f166b7ae58
Fix plugin-transform-block-scoping const violations (#13248)
* Fix plugin-transform-block-scoping const violations

Fixes #13245

* Replace `a++` with `+a` where const violation

* Remove assignment where const violation

* Remove assignment for `&&=`, `||=`, `??=` where const violation

* Shorten test
2021-05-03 11:47:25 -04:00
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