14906 Commits

Author SHA1 Message Date
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
Sosuke Suzuki
d5ba355867
Support TypeScript 4.5 type-only import/export specifiers (#13802) 2021-10-29 01:23:23 +02:00
Huáng Jùnliàng
872086a9a0
feat: support startColumn option (#13887) 2021-10-29 01:20:32 +02:00
Nicolò Ribaudo
718c6cb7de
Handle .mts and .cts files in @babel/preset-typescript (#13838) 2021-10-29 01:13:37 +02:00
Nicolò Ribaudo
381277ae35
Add ESLint 8 support to @babel/eslint-parser (#13782)
* Add ESLint 8 support to `@babel/eslint-parser`

* Only read eslint version dynamically during dev

* Fix tests

* Update ESLint

* Use ESLint 8 stable

* Review

* Check

* Fix babel config
2021-10-28 16:41:55 -04:00
J. S. Choi
ad59a2c618
Caret topic (pipe operator) (#13749)
* parser: Add caret as topic reference (tests)

* parser: Add caret as topic reference (implement)

* generator: Avoid reconstructing validTopicTokenSet

* babel-parser: Remove redundant throws in expression.js

* Minimize diff

* Update error message

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-10-28 16:04:55 -04:00
Sosuke Suzuki
ddc45a5a50
Enable class static blocks by default (#13713)
* Remove classStaticBlock plugin

* Update tests

* Remove class static blocks from proposalPlugins

* Update tests

* Remove classStaticBlock from mapping for test262

* chore: update babel-types

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-10-28 14:39:04 -04:00
Mickey Rose
99a3fefede
add skipTransparentExprWrapperNodes helper (#13687)
* overload `skipTransparentExprWrappers`

* fixes isSimpleMemberExpression
  in @babel/plugin-proposal-optional-chaining

* use skipTransparentExprWrappers<Expression> instead of the NodePath
  overload where possible in @babel/plugin-proposal-optional-chaining

* Revert "overload `skipTransparentExprWrappers`"

This reverts commit fad47596a64a8d33aadacb7695dbf1aa60a528ae.

* add helper `skipTransparentExprWrapperNodes`

* avoids constructing NodePaths when only the Node is needed

* fixes isSimpleMemberExpression
  in @babel/plugin-proposal-optional-chaining

* use this new helper instead of skipTransparentExprWrappers
  where possible in @babel/plugin-proposal-optional-chaining
2021-10-28 14:16:22 -04:00
Justin Ridgewell
b1793656e6
Add aliases for Standardized, TypeScript, and Flow (#13666)
* Ensure non-standard types have an appropriate alias

This helps with filter out the types. Eg, I'm concerned with just the core JS types, and in I can derive them via:

```typescript
type Core = Exclude<t.Node, t.TypeScript | t.Flow>;
```

* Lint

* Export deprecated alias types

* Add docs descriptions for new aliases

* Add Standardized alias

* Fix inherits aliases

* Filter aliases from node types

* Remove Proposal alias
2021-10-28 14:14:32 -04:00
Nicolò Ribaudo
248aa9d302
Use Yarn 3.1 stable (#13885) 2021-10-26 19:23:23 +02:00
Nicolò Ribaudo
fb7ddf4d38
[ts] Support private methods overloads (#13876)
* [parser] Allow private methods overloads when parsing TS

* Add transform tests

* Fix estree

* Fix flow
2021-10-26 07:29:20 +02:00
Nicolò Ribaudo
290d52fdc1
Lint benchmarks (#13881) 2021-10-25 07:23:43 +02:00
Nicolò Ribaudo
ff922962a4
Fix create-react-app and vue-cli tests on Node.js 17 (#13879)
* Fix `create-react-app` and `vue-cli` tests on Node.js 17

* Only on Node 17

* Fix
2021-10-25 07:22:42 +02:00
Nicolò Ribaudo
c7ddb1ae93
Use workspace:^ to specify @babel/ dependencies (#13772)
* Enforce `workspace:^` to specify `@babel/` dependencies

* `yarn constraints --fix`

* Update lockfile
2021-10-25 07:22:08 +02:00
Nicolò Ribaudo
62b2c5ebb9
Regenerate parser fixtures (#13882) 2021-10-24 18:12:10 +02:00
Huáng Jùnliàng
e45d86c333
[babel 8] Enable preset-env bugfixes by default (#13866) 2021-10-24 15:17:19 +02:00
Nicolò Ribaudo
f2b3134791
Update to Yarn 3.1 (#13856) 2021-10-24 14:47:03 +02:00
Mickey Rose
76a7e65229
add benchmarks for babel-types builders (#13874) 2021-10-23 23:28:47 +02:00
Mickey Rose
b5907ef967
remove executable permission from files that shouldn't have it (#13873) 2021-10-23 14:18:30 +02:00
Mickey Rose
cfe6739dc0
fix: allow enum member without initializer after non-literal member (#13865) 2021-10-22 08:52:23 -04:00
Babel Bot
c75fa21cb8
Update test262 (#13869) 2021-10-22 09:00:06 +02:00
Mickey Rose
35ec4394a7
Simplify (transpiled) babel-types builder wrappers (#13843) 2021-10-21 18:55:42 +02:00
Nicolò Ribaudo
362c623a1c
Test on Node.js 17 (#13867) 2021-10-21 13:23:11 +02:00
Emily Marigold Klassen
fca5c9a501
Don't transform declare class in proposal-class-properties (#13854)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-10-21 00:30:05 +02:00
Huáng Jùnliàng
29f697c84e
Implement @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression (#13842)
* fix: register function expression id after params

* implement bugfix plugin

* add more testcases

* fix: do not skip pattern binding referencing id

* update compat-table

* add bugfix plugin to preset-env

* update Babel 8 test fixtures

* Update packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/README.md

* chore: bundle bugfix plugin

* address review comments

* add runtime version check

* update compat table

* fix syntax error

* update test fixtures

* revert bugfixes targets update

* update Babel 8 test fixtures
2021-10-20 15:53:40 -04:00
Nicolò Ribaudo
780aa48d2a
Force loading plugins/presets from the monorepo in tests (#13858) 2021-10-18 14:03:50 +02:00
Babel Bot
513b00e60d
chore: update test262 to 8d420cef415f3501cb24d674b8c032d1f09402a0 (#13850) 2021-10-14 22:55:02 -04:00
Mickey Rose
24aa1b44fe
[ts] precise return type on createTypeAnnotationBasedOnTypeof (#13844) 2021-10-14 09:00:19 +02:00