14416 Commits

Author SHA1 Message Date
Justin Ridgewell
d12f9a98c7
Remove lodash/pull (#13026) 2021-03-19 15:51:34 +01:00
Justin Ridgewell
78cf07767a
Remove lodash/has (#13023) 2021-03-19 15:50:52 +01:00
Huáng Jùnliàng
020c88e74b
Update compat data (#13008) 2021-03-19 08:33:59 -04:00
Nicolò Ribaudo
52d2716bf6
Update Yarn to v2.4.1 (#12892) 2021-03-19 13:02:51 +01:00
Bogdan Savluk
d1f3d30598
convert @babel/helper-member-expression-to-functions to ts (#12925) 2021-03-19 12:53:21 +01:00
Sosuke Suzuki
beb7cf8b24
Sort error keys with ESLint (#13020) 2021-03-18 21:01:57 +01:00
Bogdan Savluk
21e8e59f7d
convert @babel/helper-module-imports to typescript (#12924) 2021-03-18 16:05:44 +01:00
Bogdan Savluk
ff8e9f74d8
convert @babel/helper-transform-fixture-test-runner to typescript (#12923)
* babel-helper-transform-fixture-test-runner flowts rename

* babel-helper-transform-fixture-test-runner flowts convert

* babel-helper-transform-fixture-test-runner

* babel-helper-transform-fixture-test-runner eslint fixes

* babel-helper-transform-fixture-test-runner type fix

* babel-helper-transform-fixture-test-runner

* yarn install
2021-03-18 10:52:19 -04:00
Bogdan Savluk
b97a627964
convert @babel/helper-simple-access to typescript (#12927) 2021-03-16 15:31:59 +01:00
Bogdan Savluk
befa46567f
convert @babel/helper-replace-supers to typescript (#12926) 2021-03-16 13:05:15 +01:00
hajnalbendeguz
281acd6448
Improve error message when not providing a value for JSX key (#12983)
* Improve error message when not providing a value for key

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

Show location of attribute instead of only the path

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

* Change error message to be less aggressive

* Throw error when runtime is "classic"

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-03-16 13:02:08 +01:00
Bogdan Savluk
6e1e00388b
update tsconfig generation to reference dependencies used in source code (#12941)
* update tsconfig generation to reference dependencies used in source code

in some cases there are devDependecnies used for type-checking, this change adds references to them when generationg tsconfig

* use regexp to extract import sources instead of parsing the code

* try reverting globby to previously installed version

* Run `generate-tsconfig` after `bootstrap-only`

* Revert "try reverting globby to previously installed version"

This reverts commit 56489622137f6f56938c781ea3aec5c98528b033.

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-15 12:13:36 -04:00
Babel Bot
df51ba03cd Add v7.13.11 to CHANGELOG.md [skip ci] 2021-03-15 09:45:03 +00:00
Babel Bot
4b674ea031 v7.13.11 2021-03-15 09:34:23 +00:00
Nicolò Ribaudo
759f8ecdce
Point to CJS files in @babel/compat-data's exports (#13000) 2021-03-15 10:14:47 +01:00
Huáng Jùnliàng
0988c471e9
Parse type imports in TSImportEqualsDeclaration (#12962) 2021-03-14 23:34:49 +01:00
Huáng Jùnliàng
1a05b81387
Support multiple static blocks (#12738) 2021-03-12 23:29:55 +01:00
Nicolò Ribaudo
05fa18e652
Run e2e tests on GH actions (#12517)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2021-03-12 22:33:40 +01:00
Huáng Jùnliàng
71417bbfcf
Fix esmodule: "intersect" on iOS versions (#12996) 2021-03-12 22:14:00 +01:00
Babel Bot
bc856e03c2
chore: update test262 to 31126581e7290f9233c29cefd93f66c6ac78f1c9 (#12993) 2021-03-12 10:12:10 -05:00
Nicolò Ribaudo
8ad6b75cde
Use function rather than var to compile private methods (#12990) 2021-03-11 02:08:31 +01:00
Babel Bot
b3e2bcda73 Add v7.13.10 to CHANGELOG.md [skip ci] 2021-03-08 22:36:59 +00:00
Babel Bot
d1d404b9a3 v7.13.10 2021-03-08 22:23:36 +00:00
MrBrain295
4bd24a92ae
Capitalize design docs headings (#12974)
[skip ci]
2021-03-08 23:20:47 +01:00
Justin Ridgewell
49a9b70cb1
Optionally enable external-helpers in tests (#12982)
* Optionally enable external-helpers in tests

https://github.com/babel/babel/pull/12911 was a breaking change that now requires you to keep `babel-plugin-external-helpers` in your `package.json`. It'll will probably be unnoticeable for most, because another dependency could transitively depend on it, but AMP recently hit it when cleaning up our deps.

* Cast to boolean

* Fix package name
2021-03-08 16:58:30 -05:00
Nicolò Ribaudo
c702895256
Update min Babel version for #12917 (#12977) 2021-03-07 21:09:05 +01:00
Nicolò Ribaudo
8dacf85859
Lazily initialize and cache constant JSX elements (#12967)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-03-06 17:33:43 +01:00
Nicolò Ribaudo
d04842a700
Avoid using CJS globals in internal source files (#12963)
* Lint against CJS globals in modules

* Use `import.meta.url` instead of `__filename` in `src` files

* Prepare fixtures runner for `import.meta.url`

* Use `import.meta.url` instead of `__filename` in `test/index` files

* Remove `__dirname` from remaining test files

dirname

* Avoid using `module` in `src` files

* Avoid using `require` in `src` files

* Avoid using `require` in `test` files

* Update `@types/node`

* Compile dynamic import in `@babel/node`

* Fix windows

* Use `@babel/plugin-proposal-dynamic-import` from npm
2021-03-05 19:55:36 +01:00
Babel Bot
ea620e822e
Update test262 (#12968) 2021-03-05 01:27:02 +01:00
Nicolò Ribaudo
6e551ae882
Suggest using babel.config.json when linting dependencies (#12956) 2021-03-04 21:13:19 +01:00
Nicolò Ribaudo
5f60bf0d14
Regenerate @babel/runtime-* package.json (#12964) 2021-03-04 19:18:57 +01:00
Nicolò Ribaudo
d9ebfab07f
[internal] Use the Node.js behavior for default imports (#12795) 2021-03-04 13:55:15 +01:00
Huáng Jùnliàng
ac758f7d70
Ensure static private method init run before static property (#12918) 2021-03-04 00:02:23 +01:00
Huáng Jùnliàng
bdb207cb75
Class static private field destructure set (#12917)
* fix: support static private field destructure set ([C.#p] = [0])

* 🚧

* fix: add compatibility warning for older @babel/helper versions

* refactor: extract common routines among classPrivateFiled helpers

* More 🚧
2021-03-03 16:38:16 -05:00
Huáng Jùnliàng
70c77e550c
check descriptor before private field access (#12910)
* fix: check descriptor before private field access

* add test cases
2021-03-03 15:06:38 -05:00
Nicolò Ribaudo
b12a4de457
Update @babel/helper-create-class-features-plugin (#12944) 2021-03-02 16:28:14 +01:00
Nicolò Ribaudo
42752a430e
Don't show warning from spied console.warn (#12946) 2021-03-02 15:22:20 +01:00
Nicolò Ribaudo
8574aa33d5
Remove accidentally commited file (#12947) 2021-03-02 08:34:23 -05:00
Sosuke Suzuki
b416847b61
(ts) Raise syntax error for abstract methods with a body (#12687)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-02 11:57:58 +01:00
Nicolò Ribaudo
0d9ad433b4
Fix esmodules: true without specified browsers (#12908)
* Fix `esmodules: true` without specified browsers

* fix
2021-03-02 08:16:25 +01:00
Huáng Jùnliàng
82e089c7dd
Evaluate object and initializer when setting a private method (#12707)
* fix: evaluate initializer when a private method is set as a field

* make legacy node happy

* add accessor test cases

* fix: evaluate object before RHS

* fix: evaluate object before throwing writeOnlyError
2021-03-01 17:49:59 -05:00
Babel Bot
78d1950aed Add v7.13.9 to CHANGELOG.md [skip ci] 2021-03-01 21:44:41 +00:00
Babel Bot
2c0e8d0008 v7.13.9 2021-03-01 21:33:11 +00:00
Nicolò Ribaudo
c155caf1e8
Load .browserslistrc when using old @babel/core versions (#12934) 2021-03-01 20:46:02 +01:00
Huáng Jùnliàng
efdca01409
fix: add tokens when tokens: true is passed to parseExpression (#12939) 2021-03-01 14:09:56 -05:00
Nicolò Ribaudo
9844eeee84
Put back ESM helpers in a folder where we can use .js (#12919) 2021-03-01 17:31:12 +01:00
Bogdan Savluk
a653b9c08e
Convert @babel/helper-fixtures to typescript (#12922) 2021-03-01 16:44:23 +01:00
Michael サイトー 中村 Bashurov
d05fdbc3c7
Fix invalid print output when empty array is passed to t.tsInterfaceDeclaration (#12921)
If you pass an empty array as `extends` in `t.tsInterfaceDeclaration` you'll get an invalid code printed

```ts
t.tsInterfaceDeclaration(
  t.identifier('x'),
  undefined,
  [],
  t.tsInterfaceBody([])
)
```

You will get
```ts
interface A extends {}
```

Which is an invalid TS, this PR fixes that
2021-03-01 10:43:24 -05:00
Michael サイトー 中村 Bashurov
4c343ac853
Allow nullish extends in interfaceish (#12920)
* Allow nullish extends in interfaceish

Otherwise code such as

```ts
t.interfaceDeclaration(
  t.identifier('id'),
  undefined,
  undefined,
  t.objectTypeAnnotation([])
)
```

Will fail when priting with ` TypeError: unknown: Cannot read property 'length' of null`
Despite nullish values being allowed in `t.interfaceDeclaration` definitions

* Update packages/babel-generator/src/generators/flow.ts

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

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-01 10:42:40 -05:00
Sosuke Suzuki
b62fc3d44f
babel-parser(flow): Set this property to null for FunctionTypeAnnotation without parens (#12930)
* Add null property to FunctionTypeAnnotation without parens

* Update tests

* Update tests
2021-03-01 09:15:43 -05:00