14383 Commits

Author SHA1 Message Date
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
Babel Bot
265424d43f Add v7.13.8 to CHANGELOG.md [skip ci] 2021-02-26 23:40:48 +00:00
Babel Bot
e2abc19c4c v7.13.8 2021-02-26 23:28:19 +00:00
Nicolò Ribaudo
ea6a438315
Enable external-helpers by default in tests (#12911)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-02-26 23:33:26 +01:00
Huáng Jùnliàng
bfd30b9445
chore: do not provide polyfills on bundling @babel/standalone (#12909)
* chore: do not provide polyfills on bundling @babel/standalone

* review from Nicolò

* chore: update @babel/helper-define-polyfill-provider
2021-02-26 17:10:10 -05:00
Babel Bot
cf7860ffa2
chore: update test262 to 0d922ddc97f7a9ad9a3636cb578bbf03604cd9d6 (#12912) 2021-02-26 09:00:23 -05:00
Alan Lu - 川古
6a0394634f
Don't inject invalid core-js@2 polyfills (#12901) 2021-02-25 21:52:21 +01:00
Nicolò Ribaudo
962d81483e
Skip _extends helper for {…x} with modern targets (#12899) 2021-02-25 21:16:56 +01:00
Nicolò Ribaudo
9a1b59f1f9
Do not warn for loose of class features in preset-env (#12898) 2021-02-25 21:15:48 +01:00
Nicolò Ribaudo
b17231e1af
[internal] Keep the .cjs extension when compiling source files (#12820)
* [internal] Keep the .cjs extension when compiling

* yarn
2021-02-25 18:03:05 +01:00
Nicolò Ribaudo
74db827c0a
Workaround yarn bug with self-referencing packages (#12906) 2021-02-25 17:33:15 +01:00
Nicolò Ribaudo
bb558aaf28
Allow require() of runtime helpers in Node.js 13.2-13.6 (#12893) 2021-02-25 12:28:50 +01:00
Nicolò Ribaudo
039eb2710d
Update all the @babel/* dependencies (#12897) 2021-02-25 02:46:56 +01:00
Bogdan Savluk
0a4dc05806
convert @babel/highlight to typescript (#12432)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-25 01:38:47 +01:00
Huáng Jùnliàng
4fa7a72874
chore: pin typescript to 4.1 (#12894) 2021-02-24 22:07:44 +01:00
Huáng Jùnliàng
227f881f35
fix(eslint-parser): merge input estree options (#12891)
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
2021-02-24 20:13:47 +01:00
Nicolò Ribaudo
6a471decc3
Improve @babel/runtime esm stability (#12883) 2021-02-24 20:04:03 +01:00
pigcan
c9da9650eb
chore: downgrade semver to ^6.3.2 (#12890) 2021-02-24 19:55:42 +01:00
Babel Bot
4e87b80eba Add v7.13.7 to CHANGELOG.md [skip ci] 2021-02-24 09:01:38 +00:00
Babel Bot
c39082ab74 v7.13.7 2021-02-24 08:52:11 +00:00
Nicolò Ribaudo
cfdbdc0d1c Add back export maps for the helpers/esm folder 2021-02-23 19:08:30 +01:00
Babel Bot
0666145742 Add v7.13.6 to CHANGELOG.md [skip ci] 2021-02-23 17:45:36 +00:00
Babel Bot
30a89c969a v7.13.6 2021-02-23 17:34:04 +00:00
Nicolò Ribaudo
ac7ac540ee
Define fallback exports for @babel/runtime on old Node (#12877)
* Define fallback `exports` for `@babel/runtime` on old Node

* Update .github/workflows/ci.yml
2021-02-23 18:32:48 +01:00
Huáng Jùnliàng
4acb73449f
Update compat table (#12850)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-23 15:32:54 +01:00
Babel Bot
4575b37c90 Add v7.13.5 to CHANGELOG.md [skip ci] 2021-02-23 14:03:09 +00:00
Babel Bot
9a4269e7b6 v7.13.5 2021-02-23 13:52:17 +00:00
Eli Gao
1484260f62
Add es6.array.slice in corejs2 builtins (#12870) 2021-02-23 13:49:09 +01:00
Nicolò Ribaudo
115841e778
Ensure that @babel/runtime-corejs3 imports are injected (#12869)
* Add failing test for #12863

* Minimal

* Ensure that `@babel/runtime-corejs2` imports are injected
2021-02-23 12:47:04 +01:00
Babel Bot
ce22ac012b Add v7.13.4 to CHANGELOG.md [skip ci] 2021-02-23 10:41:05 +00:00
Babel Bot
e940b8c4b9 v7.13.4 2021-02-23 10:31:04 +00:00
Nicolò Ribaudo
c30039029a
Don't enable class features by default in estree (#12867)
* Don't enable class features by default in `estree`

* Flow

* Reduce breakage
2021-02-23 11:30:01 +01:00
Nicolò Ribaudo
a2114d452c
Always load the CJS helpers when using require (#12865) 2021-02-23 11:21:01 +01:00
Babel Bot
f47737c31c Add v7.13.3 to CHANGELOG.md [skip ci] 2021-02-23 02:24:23 +00:00