Skip to content

Commit 445b575

Browse files
Allow Babel 8 in compatible Babel 7 plugins (#17580)
1 parent 3d2357c commit 445b575

44 files changed

Lines changed: 45 additions & 45 deletions

File tree

  • packages
    • babel-plugin-bugfix-v8-static-class-fields-redefine-readonly/src
    • babel-plugin-proposal-decorators/src
    • babel-plugin-proposal-import-attributes-to-assertions/src
    • babel-plugin-proposal-import-wasm-source/src
    • babel-plugin-syntax-async-do-expressions/src
    • babel-plugin-syntax-decorators/src
    • babel-plugin-syntax-destructuring-private/src
    • babel-plugin-syntax-do-expressions/src
    • babel-plugin-syntax-explicit-resource-management/src
    • babel-plugin-syntax-export-default-from/src
    • babel-plugin-syntax-flow/src
    • babel-plugin-syntax-function-bind/src
    • babel-plugin-syntax-function-sent/src
    • babel-plugin-syntax-import-assertions/src
    • babel-plugin-syntax-import-attributes/src
    • babel-plugin-syntax-import-defer/src
    • babel-plugin-syntax-import-source/src
    • babel-plugin-syntax-jsx/src
    • babel-plugin-syntax-module-blocks/src
    • babel-plugin-syntax-optional-chaining-assign/src
    • babel-plugin-syntax-partial-application/src
    • babel-plugin-syntax-pipeline-operator/src
    • babel-plugin-syntax-throw-expressions/src
    • babel-plugin-syntax-typescript/src
    • babel-plugin-transform-async-generator-functions/src
    • babel-plugin-transform-async-to-generator/src
    • babel-plugin-transform-class-properties/src
    • babel-plugin-transform-class-static-block/src
    • babel-plugin-transform-dotall-regex/src
    • babel-plugin-transform-duplicate-named-capturing-groups-regex/src
    • babel-plugin-transform-explicit-resource-management/src
    • babel-plugin-transform-exponentiation-operator/src
    • babel-plugin-transform-json-strings/src
    • babel-plugin-transform-logical-assignment-operators/src
    • babel-plugin-transform-nullish-coalescing-operator/src
    • babel-plugin-transform-numeric-separator/src
    • babel-plugin-transform-object-rest-spread/src
    • babel-plugin-transform-optional-catch-binding/src
    • babel-plugin-transform-optional-chaining/src
    • babel-plugin-transform-private-methods/src
    • babel-plugin-transform-private-property-in-object/src
    • babel-plugin-transform-regexp-modifiers/src
    • babel-plugin-transform-unicode-property-regex/src
    • babel-plugin-transform-unicode-sets-regex/src

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/babel-plugin-bugfix-v8-static-class-fields-redefine-readonly/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function buildFieldsReplacement(
3232
}
3333

3434
export default declare(api => {
35-
api.assertVersion(REQUIRED_VERSION(7));
35+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
3636

3737
const setPublicClassFields = api.assumption("setPublicClassFields");
3838

packages/babel-plugin-proposal-decorators/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Options extends SyntaxOptions {
1717
export type { Options };
1818

1919
export default declare((api, options: Options) => {
20-
api.assertVersion(REQUIRED_VERSION(7));
20+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
2121

2222
// Options are validated in @babel/plugin-syntax-decorators
2323
if (!process.env.BABEL_8_BREAKING) {
@@ -45,7 +45,7 @@ export default declare((api, options: Options) => {
4545
version === "2023-05" ||
4646
version === "2023-11"
4747
) {
48-
api.assertVersion(REQUIRED_VERSION("^7.0.2"));
48+
api.assertVersion(REQUIRED_VERSION("^7.0.2 || ^8.0.0-0"));
4949
return createClassFeaturePlugin({
5050
name: "proposal-decorators",
5151

packages/babel-plugin-proposal-import-attributes-to-assertions/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { types as t, NodePath } from "@babel/core";
33
import syntaxImportAttributes from "@babel/plugin-syntax-import-attributes";
44

55
export default declare(api => {
6-
api.assertVersion(REQUIRED_VERSION(7));
6+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
77

88
return {
99
name: "proposal-import-attributes-to-assertions",

packages/babel-plugin-proposal-import-wasm-source/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111

1212
export default declare(api => {
1313
const { types: t, template } = api;
14-
api.assertVersion(REQUIRED_VERSION("^7.23.0"));
14+
api.assertVersion(REQUIRED_VERSION("^7.23.0 || ^8.0.0-0"));
1515

1616
const targets = api.targets();
1717

packages/babel-plugin-syntax-async-do-expressions/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { declare } from "@babel/helper-plugin-utils";
22

33
export default declare(api => {
4-
api.assertVersion(REQUIRED_VERSION(7));
4+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
55

66
return {
77
name: "syntax-async-do-expressions",

packages/babel-plugin-syntax-decorators/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface Options {
1717
}
1818

1919
export default declare((api, options: Options) => {
20-
api.assertVersion(REQUIRED_VERSION(7));
20+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
2121

2222
let { version } = options;
2323

packages/babel-plugin-syntax-destructuring-private/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { declare } from "@babel/helper-plugin-utils";
22

33
export default declare(api => {
4-
api.assertVersion(REQUIRED_VERSION(7));
4+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
55

66
return {
77
name: "syntax-destructuring-private",

packages/babel-plugin-syntax-do-expressions/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { declare } from "@babel/helper-plugin-utils";
22

33
export default declare(api => {
4-
api.assertVersion(REQUIRED_VERSION(7));
4+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
55

66
return {
77
name: "syntax-do-expressions",

packages/babel-plugin-syntax-explicit-resource-management/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { declare } from "@babel/helper-plugin-utils";
22

33
export default declare(api => {
4-
api.assertVersion(REQUIRED_VERSION(7));
4+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
55

66
return {
77
name: "syntax-explicit-resource-management",

packages/babel-plugin-syntax-export-default-from/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { declare } from "@babel/helper-plugin-utils";
22

33
export default declare(api => {
4-
api.assertVersion(REQUIRED_VERSION(7));
4+
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
55

66
return {
77
name: "syntax-export-default-from",

0 commit comments

Comments
 (0)