Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(en): merge website/main into babeljs.cn/cn-v7 @ 5ca14758 #255

Open
wants to merge 100 commits into
base: cn-v7
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
629a534
[FIX] broken link (#2883)
houtan-rocky Mar 27, 2024
90125ef
Update plugin-proposal-optional-chaining-assign.md (#2884)
SharakPL Mar 29, 2024
6678bf7
Add docs for bugfix-firefox-class-in-computed-class-key (#2885)
nicolo-ribaudo Apr 3, 2024
85c50cc
Fix typo in preset-typescript.md (#2886)
askoufis Apr 10, 2024
f151f34
Update Babel types docs (#2887)
babel-bot Apr 29, 2024
d75348f
Docs updates for `transform-runtime` cleanup (#2872)
nicolo-ribaudo Apr 29, 2024
014d07f
Bump Babel 8 node.js requirements (#2888)
JLHwung Apr 30, 2024
c375585
Update plugin-transform-typescript.md (#2889)
Dunqing May 11, 2024
b013f24
docs: update Babel/estree ast difference (#2892)
sxzz Jun 1, 2024
9018180
[Babel 8] Migration guide for `extra.shorthand` (#2891)
liuxingbaoyu Jun 3, 2024
13c9277
fix transform-dynamic-import 404 (#2894)
JLHwung Jun 4, 2024
873907a
fix dynamic-import proposal link (#2896)
JLHwung Jun 4, 2024
806e689
docs: typo in plugin-proposal-decorators (#2900)
fi3ework Jun 19, 2024
d8df2be
Document that regexp plugins only handle regexp literals (#2901)
nicolo-ribaudo Jun 20, 2024
449f038
fix(docsearch): better text contrast for active hit (#2905)
Den-dp Jul 6, 2024
4caa527
docs(options.md): clarify `--source-maps` CLI option (#2898)
jedwards1211 Jul 9, 2024
7242463
docs(assumptions): Remove references to `noObjectSuper` & `noUndeclar…
rschristian Jul 9, 2024
cf9d765
Update plugins-list.md (#2909)
JLHwung Jul 9, 2024
2852ab6
Bump ws from 7.5.9 to 7.5.10 (#2910)
dependabot[bot] Jul 9, 2024
f172a96
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#2911)
dependabot[bot] Jul 9, 2024
ba5ca18
Bump braces from 3.0.2 to 3.0.3 (#2912)
dependabot[bot] Jul 9, 2024
22b7ea1
Bump ua-parser-js from 0.7.32 to 0.7.38 (#2913)
dependabot[bot] Jul 9, 2024
4f109ed
Bump follow-redirects from 1.15.3 to 1.15.6 (#2914)
dependabot[bot] Jul 9, 2024
3f0e414
Bump tar from 6.1.13 to 6.2.1 (#2917)
dependabot[bot] Jul 9, 2024
c5d1741
Bump semver from 5.7.1 to 5.7.2 (#2916)
dependabot[bot] Jul 9, 2024
8b91f98
Bump express from 4.18.2 to 4.19.2 (#2915)
dependabot[bot] Jul 9, 2024
97be67f
Add migration docs for removing methods starting with `_` (#2918)
liuxingbaoyu Jul 10, 2024
eab1cea
Fix REPL CORS error (#2920)
liuxingbaoyu Jul 15, 2024
90481ce
[Babel 8] Doc for removing some `NodePath` methods (#2924)
liuxingbaoyu Jul 26, 2024
6ea5704
Add duplicate-named-capturing-groups to ES2025 (#2893)
JLHwung Jul 26, 2024
3dd2641
Add docs for plugin-bugfix-safari-class-field-initializer-scope (#2921)
davidtaylorhq Jul 26, 2024
5c02185
Add docs for `uncheckedRequire` option (#2928)
nicolo-ribaudo Jul 26, 2024
05b6483
Add release post for 7.25.0 (#2927)
nicolo-ribaudo Jul 26, 2024
7d5e624
Remove tag from 7.25.0 blog post
nicolo-ribaudo Jul 26, 2024
7ff59f9
The Safari bug is _before_ 16
nicolo-ribaudo Jul 26, 2024
06d451b
add 7.25.0 to past versions (#2929)
JLHwung Jul 26, 2024
86dee74
Update 2024-07-26-7.25.0.md
nicolo-ribaudo Jul 27, 2024
3d3732c
fix(options): fix nested directives usage (#2908)
Armanio Jul 29, 2024
f9eeddd
fix(options): fix plugin / present entries anchors (#2930)
davidlj95 Jul 31, 2024
287e0ad
improve Babel generator docs (#2931)
JLHwung Aug 1, 2024
b3f6ea3
Updated Broken Link Broken Link #2934 (#2936)
Dwij1704 Aug 11, 2024
eccff2f
Add Route4Me sponsor logo (#2938)
nicolo-ribaudo Aug 19, 2024
4cfea29
Migration: min Node.js version for Babel 8 (#2947)
nicolo-ribaudo Sep 4, 2024
9423c66
Add Igalia as a base support sponsor (#2946)
nicolo-ribaudo Sep 4, 2024
4bad02b
[babel 8] Docs for babel/node args order (#2950)
nicolo-ribaudo Sep 6, 2024
b5d8f96
[Babel 8] doc: Remove `decimal` from parser (#2945)
liuxingbaoyu Sep 6, 2024
1c62dd8
[Babel 8] doc: Split `typeParameter` of `TSMappedType` (#2939)
liuxingbaoyu Sep 6, 2024
e159676
Fix codeblock titles (#2960)
JLHwung Sep 12, 2024
7369e6e
Bump webpack from 5.89.0 to 5.94.0 (#2962)
dependabot[bot] Sep 12, 2024
20e7a27
add diff to additionalLanguages (#2963)
JLHwung Sep 13, 2024
61d93d1
Docs for `importAssertions` and `importReflection` removal (#2948)
nicolo-ribaudo Sep 16, 2024
9291421
bump Babel 8 to 8.0.0-alpha.12 (#2961)
JLHwung Sep 17, 2024
ec30c0a
Bump Docusaurus to 3.5 (#2966)
JLHwung Sep 18, 2024
7ac5548
Update parser.md (#2968)
skyclouds2001 Sep 24, 2024
936f390
Fix `annexB` option name (#2972)
JLHwung Oct 2, 2024
c8052c2
Update Babel types docs (#2973)
babel-bot Oct 2, 2024
e9829a4
Add 7.25.0 to features timeline
nicolo-ribaudo Oct 2, 2024
3390b4f
update shipped proposals docs (#2958)
JLHwung Oct 8, 2024
ecb084b
update import assertions compat data (#2979)
JLHwung Oct 9, 2024
61218dc
fix: REPL with `preset-env` in Babel 8 (#2970)
liuxingbaoyu Oct 16, 2024
86a4395
Update Babel types docs (#2992)
babel-bot Oct 22, 2024
acb33cd
Add docs for generator's `experimental_preserveFormat` option (#2994)
nicolo-ribaudo Oct 25, 2024
c542714
docs: @babel/parser `startIndex` option (#2971)
DylanPiercey Oct 25, 2024
ded31aa
Rename proposal-modifiers (#2977)
JLHwung Oct 25, 2024
70cff98
docs: `import attributes` enabled by default (#2974)
nicolo-ribaudo Oct 25, 2024
c4e5e39
Add migration docs for flow `enums` option (#2965)
nicolo-ribaudo Oct 25, 2024
c5371ff
[babel 8] Add docs for minimal/smart pipeline modes removal (#2964)
nicolo-ribaudo Oct 25, 2024
9b8ed03
Rename `proposal-json-modules` to `transform` (#2998)
nicolo-ribaudo Oct 25, 2024
d9635e0
Docs for `@babel/highlight` and `code-frame` merge (#2995)
nicolo-ribaudo Oct 25, 2024
861cf9f
Update Babel types docs (#2999)
babel-bot Oct 25, 2024
c46a852
Add 7.26.0 blog post (#2993)
nicolo-ribaudo Oct 25, 2024
c6373d4
Bump http-proxy-middleware from 2.0.6 to 2.0.7 (#3001)
dependabot[bot] Oct 29, 2024
9f6bf35
update past versions (#3002)
JLHwung Oct 29, 2024
1fa7393
Update plugins link (#3004)
JLHwung Nov 1, 2024
bd8ae6f
Update typo in parser.md (#3007)
orta Nov 6, 2024
0e31de8
chore: upgrade Docusaurus, enable Faster Rspack/SWC/LightningCSS (#2997)
slorber Nov 8, 2024
2e87c3a
update landing page examples (#2750)
JLHwung Nov 8, 2024
8fabeac
Fix unused markdown directives warning (#3013)
JLHwung Nov 12, 2024
febfa5b
Migrate `react-instantsearch-dom` v6 to `react-instantsearch` v7 (#3017)
JLHwung Nov 21, 2024
b570d64
add compat-data docs (#3015)
JLHwung Nov 22, 2024
eb08a49
Using unpkg instead of googleapis (#3019)
liuxingbaoyu Nov 29, 2024
ff32d27
Use CodeMirror 6 in REPL (#3014)
JLHwung Nov 29, 2024
f1e8d8d
[babel 8] Docs for the new preset-react' `development` default (#3020)
nicolo-ribaudo Dec 6, 2024
2205b95
add TSTypeReference migration note (#3023)
JLHwung Dec 6, 2024
b8406d7
Add docs for `superTypeParameters` -> `superTypeArguments` rename (#3…
nicolo-ribaudo Dec 7, 2024
1e6fbf4
docs: add implied babel-types breaking changes (#3024)
JLHwung Dec 7, 2024
a0fc47b
add migration note to TSTypeQuery typeArguments (#3027)
JLHwung Dec 9, 2024
feac4d6
[Babel 8] doc: Migration for `TSClassImplements` and `TSInterfaceHeri…
liuxingbaoyu Dec 10, 2024
ccd2c0c
Add migration docs (#3028)
JLHwung Dec 11, 2024
118e1fe
add migration note for `TSAbstract` AST change (#3029)
JLHwung Dec 12, 2024
650d34c
Updated Twitter URL to x.com and added Bluesky profile link in footer…
Shubhashish-Chakraborty Dec 13, 2024
ae1eafa
Note section for Symbol.metadata in the plugin-proposal-decorators do…
naman1608 Dec 16, 2024
8c10091
add docs for typeArguments renaming (#3032)
JLHwung Dec 26, 2024
c6144b1
Make v8 API migration more uniform (#3034)
nicolo-ribaudo Dec 28, 2024
e2f716c
igalia (#3035)
liuxingbaoyu Jan 1, 2025
e6ef677
add TSImportType AST change note (#3036)
JLHwung Jan 7, 2025
9d696a5
add migration notes for TSImportType AST changes (#3039)
JLHwung Jan 9, 2025
4b73ecc
docs: add TSEnumBody migration (#3018)
JLHwung Jan 9, 2025
5ca1475
docs: update babel types (#3040)
babel-bot Jan 10, 2025
86cd340
docs(en): merging all conflicts
docschina-bot Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add TSEnumBody migration (#3018)
JLHwung authored Jan 9, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4b73ecc0d9a2db69d4fccb0f0d8c6e06c4cbbd01
56 changes: 56 additions & 0 deletions docs/v8-migration-api.md
Original file line number Diff line number Diff line change
@@ -697,6 +697,42 @@ Most of the changes to our TypeScript-specific AST nodes are to reduce the diffe
}
```

- <a name="ast-TSEnumDeclaration"></a> Wrap the `members` of `TSEnumDeclaration` within a `TSEnumBody` node ([#16979](https://github.com/babel/babel/pull/16979))

```ts title=input.ts
// Example input
enum ColorType {
Red,
Green,
Blue,
}

// AST in Babel 7
{
type: "TSEnumDeclaration",
id: Identifier("ColorType")
members: [
EnumMember("Red"),
EnumMember("Green"),
EnumMember("Blue")
]
}

// AST in Babel 8
{
type: "TSEnumDeclaration",
id: Identifier("ColorType")
body: {
type: "TSEnumBody",
members: [
EnumMember("Red"),
EnumMember("Green"),
EnumMember("Blue")
]
}
}
```

- Create `TSAbstractMethodDefinition` and `TSPropertyDefinition` when both `estree` and `typescript` parser plugins are enabled ([#16679](https://github.com/babel/babel/issues/16679), [#17014](https://github.com/babel/babel/pull/17014))

__Migration__: This breaking change is part of the efforts to libraries and ESLint plugins that can work both with `typescript-eslint` and `@babel/eslint-parser`. For most Babel plugin developers you can safely ignore this change as it does not affect the typescript transform and codemod. That said, if you are trying to develop a custom ESLint rule with `@babel/eslint-parser`, this change aligns the Babel AST to the `typescript-eslint` AST.
@@ -828,6 +864,26 @@ Most of the changes to our TypeScript-specific AST nodes are to reduce the diffe
)
```

- Require a `TSEnumBody` node as the second argument of `t.tsEnumDeclaration` ([#16979](https://github.com/babel/babel/pull/16979))

This is due to the corresponding [AST shape change](#ast-TSEnumDeclaration).

__Migration__: Wrap the `members` array within the `tsEnumBody` builder

```diff title="my-babel-codemod.js"
// Create `enum ColorType { Red, Green, Blue }`
t.tsEnumDeclaration(
t.identifier("ColorType"),
- [
+ t.tsEnumBody([
t.tsEnumMember(t.identifier("Red")),
t.tsEnumMember(t.identifier("Green")),
t.tsEnumMember(t.identifier("Blue"))
- ],
+ ]),
)
```

- Update the `t.tsMappedType` signature ([#16733](https://github.com/babel/babel/pull/16733))

This is due to the corresponding [AST shape change](#ast-TSMappedType).