Skip to content

Commit b4c21c7

Browse files
Enable class fields & private methods by default (#13091)
1 parent 5a7a782 commit b4c21c7

177 files changed

Lines changed: 319 additions & 81 deletions

File tree

Some content is hidden

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

packages/babel-preset-env/data/shipped-proposals.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// shipped by browsers, and are enabled by the `shippedProposals` option.
44

55
const proposalPlugins = new Set([
6-
"proposal-class-properties",
7-
"proposal-private-methods",
86
"proposal-class-static-block",
97
"proposal-private-property-in-object",
108
]);

packages/babel-preset-env/test/fixtures/bugfixes/_esmodules-no-bugfixes/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Using targets:
1616
Using modules transform: auto
1717

1818
Using plugins:
19+
proposal-class-properties { android, chrome < 84, edge < 84, firefox, ios, node < 14.6, opera < 70, safari, samsung }
20+
proposal-private-methods { android, chrome < 84, edge < 84, firefox, ios, node < 14.6, opera < 70, safari, samsung }
1921
proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 }
2022
proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung }
2123
proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 }

packages/babel-preset-env/test/fixtures/bugfixes/_esmodules/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Using targets:
1616
Using modules transform: auto
1717

1818
Using plugins:
19+
proposal-class-properties { android, chrome < 84, edge < 84, firefox, ios, node < 14.6, opera < 70, safari, samsung }
20+
proposal-private-methods { android, chrome < 84, edge < 84, firefox, ios, node < 14.6, opera < 70, safari, samsung }
1921
proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 }
2022
proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung }
2123
proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-chrome-40/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { chrome < 84 }
12+
proposal-private-methods { chrome < 84 }
1113
proposal-numeric-separator { chrome < 75 }
1214
proposal-logical-assignment-operators { chrome < 85 }
1315
proposal-nullish-coalescing-operator { chrome < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-chrome-70/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { chrome < 84 }
12+
proposal-private-methods { chrome < 84 }
1113
proposal-numeric-separator { chrome < 75 }
1214
proposal-logical-assignment-operators { chrome < 85 }
1315
proposal-nullish-coalescing-operator { chrome < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-edge-14/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { edge < 84 }
12+
proposal-private-methods { edge < 84 }
1113
proposal-numeric-separator { edge < 79 }
1214
proposal-logical-assignment-operators { edge < 85 }
1315
proposal-nullish-coalescing-operator { edge < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-edge-15/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { edge < 84 }
12+
proposal-private-methods { edge < 84 }
1113
proposal-numeric-separator { edge < 79 }
1214
proposal-logical-assignment-operators { edge < 85 }
1315
proposal-nullish-coalescing-operator { edge < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-edge-17-no-bugfixes/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { edge < 84 }
12+
proposal-private-methods { edge < 84 }
1113
proposal-numeric-separator { edge < 79 }
1214
proposal-logical-assignment-operators { edge < 85 }
1315
proposal-nullish-coalescing-operator { edge < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-edge-17/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { edge < 84 }
12+
proposal-private-methods { edge < 84 }
1113
proposal-numeric-separator { edge < 79 }
1214
proposal-logical-assignment-operators { edge < 85 }
1315
proposal-nullish-coalescing-operator { edge < 80 }

packages/babel-preset-env/test/fixtures/bugfixes/edge-default-params-edge-18/stdout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Using targets:
88
Using modules transform: auto
99

1010
Using plugins:
11+
proposal-class-properties { edge < 84 }
12+
proposal-private-methods { edge < 84 }
1113
proposal-numeric-separator { edge < 79 }
1214
proposal-logical-assignment-operators { edge < 85 }
1315
proposal-nullish-coalescing-operator { edge < 80 }

0 commit comments

Comments
 (0)