Skip to content

Commit 5632737

Browse files
committed
docs(en): merging all conflicts
2 parents a90f03b + d8df2be commit 5632737

20 files changed

+201
-67
lines changed

_redirects

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ https://babel.netlify.com/* https://babeljs.io/:splat 301!
7070
/docs/babel-plugin-proposal-class-properties /docs/babel-plugin-transform-class-properties
7171
/docs/babel-plugin-proposal-private-methods /docs/babel-plugin-transform-private-methods
7272
/docs/babel-plugin-proposal-numeric-separator /docs/babel-plugin-transform-numeric-separator
73+
/docs/babel-plugin-proposal-dynamic-import /docs/babel-plugin-transform-dynamic-import
7374
/docs/babel-plugin-proposal-logical-assignment-operators /docs/babel-plugin-transform-logical-assignment-operators
7475
/docs/babel-plugin-proposal-nullish-coalescing-operator /docs/babel-plugin-transform-nullish-coalescing-operator
7576
/docs/babel-plugin-proposal-optional-chaining /docs/babel-plugin-transform-optional-chaining
@@ -93,7 +94,7 @@ https://babel.netlify.com/* https://babeljs.io/:splat 301!
9394

9495
# Blog rewrites
9596
/7.24.0 /blog/2024/02/28/7.24.0
96-
/7.23.0 /blog/2023/09/25/7.22.0
97+
/7.23.0 /blog/2023/09/25/7.23.0
9798
/7.22.0 /blog/2023/05/26/7.22.0
9899
/7.21.0 /blog/2023/02/20/7.21.0
99100
/7.20.0 /blog/2022/10/27/7.20.0

docs/parser.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ It is based on [ESTree spec][] with the following deviations:
118118
- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][]
119119
- [ClassMethod][], [ClassPrivateMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node.
120120
- [ChainExpression][] is replaced with [OptionalMemberExpression][] and [OptionalCallExpression][]
121-
- [ImportExpression][] is replaced with a [CallExpression][] whose `callee` is an [Import] node.
121+
- [ImportExpression][] is replaced with a [CallExpression][] whose `callee` is an [Import] node. This change will be reversed in Babel 8.
122+
- [ExportAllDeclaration][] with `exported` field is replaced with an [ExportNamedDeclaration][] containing an [ExportNamespaceSpecifier][] node.
122123

123124
:::tip
124125
There is now an `estree` plugin which reverts these deviations
@@ -134,6 +135,7 @@ AST for JSX code is based on [Facebook JSX AST][].
134135
[propertydefinition]: https://github.com/estree/estree/blob/master/es2022.md#propertydefinition
135136
[chainexpression]: https://github.com/estree/estree/blob/master/es2020.md#chainexpression
136137
[importexpression]: https://github.com/estree/estree/blob/master/es2020.md#importexpression
138+
[exportalldeclaration]: https://github.com/estree/estree/blob/master/es2020.md#exportalldeclaration
137139
[privateidentifier]: https://github.com/estree/estree/blob/master/es2022.md#privateidentifier
138140
[stringliteral]: https://github.com/babel/babel/tree/main/packages/babel-parser/ast/spec.md#stringliteral
139141
[numericliteral]: https://github.com/babel/babel/tree/main/packages/babel-parser/ast/spec.md#numericliteral
@@ -157,6 +159,8 @@ AST for JSX code is based on [Facebook JSX AST][].
157159
[optionalcallexpression]: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#optionalcallexpression
158160
[callexpression]: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#callexpression
159161
[import]: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#import
162+
[exportnameddeclaration]: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#exportnameddeclaration
163+
[exportnamespacespecifier]: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#exportnamespacespecifier
160164
[facebook jsx ast]: https://github.com/facebook/jsx/blob/master/AST.md
161165

162166
### Semver
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
id: babel-plugin-bugfix-firefox-class-in-computed-class-key
3+
title: "@babel/plugin-bugfix-firefox-class-in-computed-class-key"
4+
sidebar_label: bugfix-firefox-class-in-computed-class-key
5+
---
6+
7+
This bugfix plugin transforms classes inside computed keys of other classes to workaround a [SpiderMonkey bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1887677) with private class elements.
8+
9+
:::tip
10+
This plugin is included in `@babel/preset-env`, and Babel will automatically enable this plugin for you when your `targets` are affected by the browser bug.
11+
:::
12+
13+
:::warning
14+
Terser versions older than 5.30.2 will undo the transform done by this plugin. Make sure to use at least version 5.30.2, or set the Terser's [`compress.inline`](https://terser.org/docs/options/#compress-options) option to `false`.
15+
:::
16+
17+
## Installation
18+
19+
```shell npm2yarn
20+
npm install --save-dev @babel/plugin-bugfix-firefox-class-in-computed-class-key
21+
```
22+
23+
## Usage
24+
25+
### With a configuration file (Recommended)
26+
27+
```json title="babel.config.json"
28+
{
29+
"plugins": ["@babel/plugin-bugfix-firefox-class-in-computed-class-key"]
30+
}
31+
```
32+
33+
### Via CLI
34+
35+
```sh title="Shell"
36+
babel --plugins @babel/plugin-bugfix-firefox-class-in-computed-class-key script.js
37+
```
38+
39+
### Via Node API
40+
41+
```js title="JavaScript"
42+
require("@babel/core").transformSync("code", {
43+
plugins: ["@babel/plugin-bugfix-firefox-class-in-computed-class-key"],
44+
});
45+
```

docs/plugin-proposal-decorators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Selects the decorators proposal to use:
110110
`"2023-11"`, `"2023-05"`, `"2023-01"`, `"2022-03"`, `"2021-12"`, `"2018-09"` or `"legacy"`.
111111

112112
Selects the decorators proposal to use:
113-
- `"2023-11"` is the proposal version after the updates that reached consensus in the November 2023 TC30 meetings, intergrating [this change](https://github.com/pzuraq/ecma262/pull/12)
113+
- `"2023-11"` is the proposal version after the updates that reached consensus in the November 2023 TC39 meetings, intergrating [this change](https://github.com/pzuraq/ecma262/pull/12)
114114
- `"2023-05"` is the proposal version after the updates that reached consensus in the March and May 2023 TC39 meetings, integrating [these changes](https://github.com/pzuraq/ecma262/compare/e86128e13b63a3c2efc3728f76c8332756752b02...c4465e44d514c6c1dba810487ec2721ccd6b08f9).
115115
- `"2023-01"` is the proposal version after the updates that reached consensus in the January 2023 TC39 meeting, integrating [`pzuraq/ecma262#4`](https://github.com/pzuraq/ecma262/pull/4).
116116
- `"2022-03"` is the proposal version that reached consensus for Stage 3 in the March 2022 TC39 meeting. You can read more about it at [`tc39/proposal-decorators@8ca65c046d`](https://github.com/tc39/proposal-decorators/tree/8ca65c046dd5e9aa3846a1fe5df343a6f7efd9f8).

docs/plugin-proposal-duplicate-named-capturing-groups-regex.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: "@babel/plugin-proposal-duplicate-named-capturing-groups-regex"
44
sidebar_label: duplicate-named-capturing-groups-regex
55
---
66

7+
This plugin transforms regular expression _literals_ to support duplicate named capturing groups. It does not patch the `new RegExp` constructor, since its arguments cannot be pre-transformed statically: to handle runtime behavior of functions/classes, you will need to use a polyfill instead.
8+
79
## Examples
810

911
**In**

docs/plugin-proposal-optional-chaining-assign.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ npm install --save-dev @babel/plugin-proposal-optional-chaining-assign
3434
```json title="babel.config.json"
3535
{
3636
"plugins": [
37-
"@babel/plugin-proposal-optional-chaining-assign",
38-
{
39-
"version": "2023-07"
40-
}
37+
[
38+
"@babel/plugin-proposal-optional-chaining-assign",
39+
{
40+
"version": "2023-07"
41+
}
42+
]
4143
]
4244
}
4345
```

docs/plugin-transform-dotall-regex.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ sidebar_label: dotall-regex
88
This plugin is included in `@babel/preset-env`, in [ES2018](https://github.com/tc39/proposals/blob/master/finished-proposals.md)
99
:::
1010

11+
This plugin transforms regular expression _literals_ to support the `/s` flag. It does not patch the `new RegExp` constructor, since its arguments cannot be pre-transformed statically: to handle runtime behavior of functions/classes, you will need to use a polyfill instead.
12+
1113
## Example
1214

1315
**In**

docs/plugin-proposal-dynamic-import.md renamed to docs/plugin-transform-dynamic-import.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
id: babel-plugin-proposal-dynamic-import
3-
title: "@babel/plugin-proposal-dynamic-import"
2+
id: babel-plugin-transform-dynamic-import
3+
title: "@babel/plugin-transform-dynamic-import"
44
sidebar_label: dynamic-import
55
---
66

@@ -74,7 +74,7 @@ will be transformed to
7474
## Installation
7575

7676
```shell npm2yarn
77-
npm install --save-dev @babel/plugin-proposal-dynamic-import
77+
npm install --save-dev @babel/plugin-transform-dynamic-import
7878
```
7979

8080
## Usage
@@ -84,7 +84,7 @@ npm install --save-dev @babel/plugin-proposal-dynamic-import
8484
```json title="babel.config.json"
8585
{
8686
"plugins": [
87-
"@babel/plugin-proposal-dynamic-import",
87+
"@babel/plugin-transform-dynamic-import",
8888
"@babel/plugin-transform-modules-commonjs"
8989
]
9090
}
@@ -93,15 +93,15 @@ npm install --save-dev @babel/plugin-proposal-dynamic-import
9393
### Via CLI
9494

9595
```sh title="Shell"
96-
babel --plugins=@babel/plugin-proposal-dynamic-import,@babel/plugin-transform-modules-amd script.js
96+
babel --plugins=@babel/plugin-transform-dynamic-import,@babel/plugin-transform-modules-amd script.js
9797
```
9898

9999
### Via Node API
100100

101101
```js title="JavaScript"
102102
require("@babel/core").transformSync("code", {
103103
plugins: [
104-
"@babel/plugin-proposal-dynamic-import",
104+
"@babel/plugin-transform-dynamic-import",
105105
"@babel/plugin-transform-modules-systemjs"
106106
],
107107
});

docs/plugin-transform-named-capturing-groups-regex.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ functionalities. If you need to support older browsers, use either
1111
the `runtime: false` option or import a proper polyfill (e.g. `core-js`).
1212
:::
1313

14+
This plugin transforms regular expression _literals_ to support named capturing groups. It does not patch the `new RegExp` constructor, since its arguments cannot be pre-transformed statically: to handle runtime behavior of functions/classes, you will need to use a polyfill instead.
15+
1416
## Examples
1517

1618
**In**

0 commit comments

Comments
 (0)