15033 Commits

Author SHA1 Message Date
Huáng Jùnliàng
4a337538f9
chore: update @babel/* deps (#14002) 2021-11-29 08:54:15 -06:00
Nicolò Ribaudo
23fec0c8c9
Update to prettier 2.5.0 (#14000) 2021-11-26 10:48:16 +01:00
Babel Bot
bafa016bff
Update test262 (#14001) 2021-11-26 01:23:17 +01:00
Bogdan Savluk
0058b7fef4
Migrate Babel from Flow to TypeScript (except Babel parser) (#11578)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-25 23:09:13 +01:00
Nicolò Ribaudo
473f145b27
Don't use ESM for required files in @babel/helpers tests (#13996) 2021-11-25 16:19:07 +01:00
Huáng Jùnliàng
55f020e02d
Convert proposal-object-rest-spread to TS (#13948)
* chore: add typings to object-rest-spread

* chore: bundle object-rest-spread package

* improve type inference

* address review comments
2021-11-24 10:48:31 -05:00
Nicolò Ribaudo
ad1798ed48
Only bundle the release build, and don't import src in tests (#13978)
* Only bundle the release build, and don't import `src` in tests

* Use file extension to signal skipping

* Remove unnecessary config change

* Fix imports
2021-11-24 10:08:53 -05:00
Nicolò Ribaudo
75996cb62b
Use full import specifier path in tests (#13938) 2021-11-24 11:43:18 +01:00
Huáng Jùnliàng
a470f7b479
Recover from shorthand assign exprs (#13968)
* refactor: avoid duplicate property access

* refactor: tweak parseMember

* polish: recover from shorthand assign in exprs
2021-11-19 10:22:29 -05:00
Babel Bot
d017d43535
Update test262 (#13979) 2021-11-19 01:09:44 +01:00
Nicolò Ribaudo
90c659b4cb
Fail CI when @babel/runtime ESM tests fail (#13976) 2021-11-19 00:22:32 +01:00
Mickey Rose
cd77ad1680
minify helpers-generated.ts (#13837)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-18 23:51:28 +01:00
Huáng Jùnliàng
d30308fe8e
fix: update UnexpectedPrivateField error message (#13975) 2021-11-17 18:54:23 +01:00
Babel Bot
6e2222756d Add v7.16.4 to CHANGELOG.md [skip ci] 2021-11-16 22:46:57 +00:00
Babel Bot
99774ee9fa v7.16.4 2021-11-16 22:37:47 +00:00
Sosuke Suzuki
87fc2e76d7
Add assertions to ExportNamedDeclaration without from (#13957) 2021-11-16 11:53:28 +01:00
Francisco Ryan Tolmasky I
966387d263
Always expose expressionValue in DirectiveLiteral nodes (#13960)
* fix(babel-parser): Move storage of expressionValue in DirectiveLiteral to main parser so it is accessible to others.

Closes #13953.

Reviewed by @tolmasky.

* Add results from running `OVERWRITE=true yarn jest babel-parser`.

Reviewed by @tolmasky.
2021-11-13 20:46:16 -05:00
M Behzad
d3fffd95b6
Add file extension when using absoluteRuntime (#12827)
* fix: add file extention when the absolute path to the runtime files are used (#12824)
the es module imports need the file extention (e.g. import "@babel/runtime/helpers/jsx.js", Or the filenames being listed in the package.json's subpath exports (e.g. "import "@babel/runtime/helpers/jsx" + pkg: "./helpers/jsx": "./helpers/jsx.js"). when the user passes a path via `absoluteRuntime` then the rendered require staemnts is not the module name + subpath which will be resolved via pkg.json but rather the absolute path to the file. for this case, add the file extention / index.js to prevent bundlers from raising a warning.

* Update deps

* Fix imports resolution

* Update fixtures (Windows)

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-11-14 02:03:30 +01:00
Nicolò Ribaudo
d16f8111ea
Wait the correct number of ticks on nested await (#13961) 2021-11-14 02:02:35 +01:00
Huáng Jùnliàng
54c539ecc1
Refactor bindingProperty parsing (#13929)
* refactor: inline parseMaybePrivateName

* correct test case

* perf: fast exit in checkExpressionErrors

* refactor: add parseBindingProperty

* fix: private property with variance

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

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* chore: update testcase

* refactor: remove refExpressionErrors for record/tuple

They are always non-ambiguous.

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-12 10:11:46 -05:00
Sneh Khatri
135ab837bc
Throw on duplicate __proto__ props followed by assignment (#13951) 2021-11-12 14:45:56 +01:00
Babel Bot
dd63950c99
Update test262 (#13955) 2021-11-12 14:32:29 +01:00
Huáng Jùnliàng
f731522125
chore: update compat-data (#13949)
* chore: update compat-data

* update compat-data sources

* fix: exclude deno from compat-data

* update test fixtures

* update Babel 8 test fixtures
2021-11-10 15:39:34 -05:00
Babel Bot
f8b331ca0d Add v7.16.3 to CHANGELOG.md [skip ci] 2021-11-09 21:53:35 +00:00
Babel Bot
3b6f061e18 v7.16.3 2021-11-09 21:44:15 +00:00
Mickey Rose
74bec41db5
fix(helpers): match Reflect.get behaviour (#13862) 2021-11-09 17:39:41 +01:00
Nicolò Ribaudo
43f989941b
Support transforming params of arrow functions in class fields (#13941) 2021-11-09 12:12:23 +01:00
Sneh Khatri
a6a526968d
fix: incorrect await rejection following arrow function in parameters (fixes #13872) (#13928)
* fix: incorrect await rejection following arrow func in params

* expressionScope.exit() shifted to end

* test added for yield
2021-11-05 15:41:31 -04:00
Babel Bot
5134505bf9
Update test262 (#13932) 2021-11-05 13:53:34 -05:00
Huáng Jùnliàng
7250d2562b
Simplifiy tracking of valid JSX positions (#13891)
Remove `state.inPropertyName` and simplifies `state.canStartJSXElement` tracking
2021-11-04 17:12:42 +01:00
Nicolò Ribaudo
de28707dfe
[babel 8] Align allow* parser options with ESLint behavior (#13921)
* [babel 8] Align `allow*` parser options with ESLint behavior

- The `@babel/eslint-parser` `allowImportExportEverywhere` option is removed; users can pass it to `parserOpts`
- `allowSuperOutsideMethod` is disabled
- `allowReturnOutsideFunction` is inferred from `ecmaFeatures.globalReturn`

* Update failing tests
2021-11-04 07:56:06 +01:00
Nicolò Ribaudo
531db5dc4e
Fix parserOverride support in @babel/eslint-parser (#13918) 2021-11-04 01:15:26 +01:00
Nicolò Ribaudo
6393e60a68
Update runtime integration tests for Node.js >= 16.6 (#13923) 2021-11-04 01:10:28 +01:00
Nicolò Ribaudo
76e4566bfc
Update browserslist (#13914) 2021-11-02 07:20:58 +01:00
Huáng Jùnliàng
1fa759f989
refactor: extract tt.lt and tt.gt from tt.relation (#13892) 2021-11-01 21:15:42 -04:00
Babel Bot
05af38cff2 Add v7.16.2 to CHANGELOG.md [skip ci] 2021-11-01 21:57:27 +00:00
Babel Bot
68fad796b1 v7.16.2 2021-11-01 21:47:31 +00:00
Nicolò Ribaudo
5b29557af9
Fix "e2e-babel" Babel 8 test (#13909) 2021-11-01 21:49:50 +01:00
Huáng Jùnliàng
833b39112d
fix: early return when param binding is not found (#13910) 2021-11-01 15:11:30 -04:00
Sosuke Suzuki
cba7f9e503
Add missing assertions type (#13905) 2021-11-01 08:43:39 -04:00
Babel Bot
2d9de5f7f9 Add v7.16.1 to CHANGELOG.md [skip ci] 2021-10-30 21:33:53 +00:00
Babel Bot
67eb2c805e v7.16.1 2021-10-30 21:21:37 +00:00
Nicolò Ribaudo
7396f05341
Skip ESLint 8 tests on publish (#13898) 2021-10-30 15:11:28 -04:00
Peach
c20506e594
Fix binding access for plugin-transform-typescript (#13900) 2021-10-30 19:54:42 +02:00
Nicolò Ribaudo
07d1a8008e
Lint our codebase with ESLint 8 (#13899)
* Use ESLint 8

* Update lockfile
2021-10-30 11:39:43 -04:00
Nicolò Ribaudo
b1dca95801 Add 7.16.0 to CHANGELOG.md 2021-10-30 01:49:31 +02:00
Nicolò Ribaudo
45308f3cba v7.16.0 2021-10-30 01:26:04 +02:00
Nicolò Ribaudo
e33186c68e Pre-release updates
Update the release tool to 0c289ca7ee
2021-10-30 01:25:25 +02:00
Nicolò Ribaudo
0c820a456d
Update core-js and polyfill plugins (#13897) 2021-10-30 01:09:58 +02:00
Babel Bot
bff3f4f37d
chore: update test262 to ba82d46238bd16c3e31b93d21d2846c81a9ccf7a (#13893) 2021-10-28 23:28:41 -04:00