Skip to content

Commit 85c427d

Browse files
[compiler] Remove @babel/plugin-proposal-private-methods (#34715)
redo of #34458 but fixing up prettier Co-authored-by: Arnaud Barré <arnaud.barre@carbometrix.com>
1 parent 02bd445 commit 85c427d

File tree

9 files changed

+4
-40
lines changed

9 files changed

+4
-40
lines changed

compiler/packages/eslint-plugin-react-compiler/babel.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ module.exports = {
1010
plugins: [
1111
['@babel/plugin-transform-private-property-in-object', {loose: true}],
1212
['@babel/plugin-transform-class-properties', {loose: true}],
13-
['@babel/plugin-transform-private-methods', {loose: true}],
1413
],
1514
};

compiler/packages/eslint-plugin-react-compiler/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"dependencies": {
1515
"@babel/core": "^7.24.4",
1616
"@babel/parser": "^7.24.4",
17-
"@babel/plugin-proposal-private-methods": "^7.18.6",
1817
"hermes-parser": "^0.25.1",
1918
"zod": "^3.22.4",
2019
"zod-validation-error": "^3.0.3"

compiler/packages/eslint-plugin-react-compiler/src/shared/RunReactCompiler.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import {transformFromAstSync} from '@babel/core';
99
import {parse as babelParse} from '@babel/parser';
1010
import {File} from '@babel/types';
11-
// @ts-expect-error: no types available
12-
import PluginProposalPrivateMethods from '@babel/plugin-proposal-private-methods';
1311
import BabelPluginReactCompiler, {
1412
parsePluginOptions,
1513
validateEnvironmentConfig,
@@ -145,10 +143,7 @@ function runReactCompilerImpl({
145143
filename,
146144
highlightCode: false,
147145
retainLines: true,
148-
plugins: [
149-
[PluginProposalPrivateMethods, {loose: true}],
150-
[BabelPluginReactCompiler, options],
151-
],
146+
plugins: [[BabelPluginReactCompiler, options]],
152147
sourceType: 'module',
153148
configFile: false,
154149
babelrc: false,

compiler/packages/eslint-plugin-react-compiler/tsup.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ import {defineConfig} from 'tsup';
1010
export default defineConfig({
1111
entry: ['./src/index.ts'],
1212
outDir: './dist',
13-
external: [
14-
'@babel/core',
15-
'@babel/plugin-proposal-private-methods',
16-
'hermes-parser',
17-
'zod',
18-
'zod-validation-error',
19-
],
13+
external: ['@babel/core', 'hermes-parser', 'zod', 'zod-validation-error'],
2014
splitting: false,
2115
sourcemap: false,
2216
dts: false,

compiler/yarn.lock

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
lru-cache "^5.1.1"
327327
semver "^6.3.1"
328328

329-
"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.25.9", "@babel/helper-create-class-features-plugin@^7.27.0":
329+
"@babel/helper-create-class-features-plugin@^7.25.9", "@babel/helper-create-class-features-plugin@^7.27.0":
330330
version "7.27.0"
331331
resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.0.tgz"
332332
integrity sha512-vSGCvMecvFCd/BdpGlhpXYNhhC4ccxyvQWpbGL4CWbvfEoLFWUZuSuf7s9Aw70flgQF+6vptvgK2IfOnKlRmBg==
@@ -706,14 +706,6 @@
706706
"@babel/helper-plugin-utils" "^7.25.9"
707707
"@babel/traverse" "^7.25.9"
708708

709-
"@babel/plugin-proposal-private-methods@^7.18.6":
710-
version "7.18.6"
711-
resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz"
712-
integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==
713-
dependencies:
714-
"@babel/helper-create-class-features-plugin" "^7.18.6"
715-
"@babel/helper-plugin-utils" "^7.18.6"
716-
717709
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
718710
version "7.21.0-placeholder-for-preset-env.2"
719711
resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz"

packages/eslint-plugin-react-hooks/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"dependencies": {
4242
"@babel/core": "^7.24.4",
4343
"@babel/parser": "^7.24.4",
44-
"@babel/plugin-proposal-private-methods": "^7.18.6",
4544
"hermes-parser": "^0.25.1",
4645
"zod": "^3.22.4",
4746
"zod-validation-error": "^3.0.3"

packages/eslint-plugin-react-hooks/src/shared/RunReactCompiler.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import {transformFromAstSync} from '@babel/core';
1010
import {parse as babelParse} from '@babel/parser';
1111
import {File} from '@babel/types';
12-
// @ts-expect-error: no types available
13-
import PluginProposalPrivateMethods from '@babel/plugin-proposal-private-methods';
1412
import BabelPluginReactCompiler, {
1513
parsePluginOptions,
1614
validateEnvironmentConfig,
@@ -147,10 +145,7 @@ function runReactCompilerImpl({
147145
filename,
148146
highlightCode: false,
149147
retainLines: true,
150-
plugins: [
151-
[PluginProposalPrivateMethods, {loose: true}],
152-
[BabelPluginReactCompiler, options],
153-
],
148+
plugins: [[BabelPluginReactCompiler, options]],
154149
sourceType: 'module',
155150
configFile: false,
156151
babelrc: false,

scripts/rollup/bundles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,6 @@ const bundles = [
12531253
preferBuiltins: true,
12541254
externals: [
12551255
'@babel/core',
1256-
'@babel/plugin-proposal-private-methods',
12571256
'hermes-parser',
12581257
'zod',
12591258
'zod-validation-error',

yarn.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,14 +1108,6 @@
11081108
"@babel/helper-create-class-features-plugin" "^7.10.4"
11091109
"@babel/helper-plugin-utils" "^7.10.4"
11101110

1111-
"@babel/plugin-proposal-private-methods@^7.18.6":
1112-
version "7.18.6"
1113-
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea"
1114-
integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==
1115-
dependencies:
1116-
"@babel/helper-create-class-features-plugin" "^7.18.6"
1117-
"@babel/helper-plugin-utils" "^7.18.6"
1118-
11191111
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
11201112
version "7.21.0-placeholder-for-preset-env.2"
11211113
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703"

0 commit comments

Comments
 (0)