mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[compiler] Remove @babel/plugin-proposal-private-methods (#34715)
redo of #34458 but fixing up prettier Co-authored-by: Arnaud Barré <arnaud.barre@carbometrix.com>
This commit is contained in:
@@ -10,6 +10,5 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
['@babel/plugin-transform-private-property-in-object', {loose: true}],
|
['@babel/plugin-transform-private-property-in-object', {loose: true}],
|
||||||
['@babel/plugin-transform-class-properties', {loose: true}],
|
['@babel/plugin-transform-class-properties', {loose: true}],
|
||||||
['@babel/plugin-transform-private-methods', {loose: true}],
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.24.4",
|
"@babel/core": "^7.24.4",
|
||||||
"@babel/parser": "^7.24.4",
|
"@babel/parser": "^7.24.4",
|
||||||
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
||||||
"hermes-parser": "^0.25.1",
|
"hermes-parser": "^0.25.1",
|
||||||
"zod": "^3.22.4",
|
"zod": "^3.22.4",
|
||||||
"zod-validation-error": "^3.0.3"
|
"zod-validation-error": "^3.0.3"
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
import {transformFromAstSync} from '@babel/core';
|
import {transformFromAstSync} from '@babel/core';
|
||||||
import {parse as babelParse} from '@babel/parser';
|
import {parse as babelParse} from '@babel/parser';
|
||||||
import {File} from '@babel/types';
|
import {File} from '@babel/types';
|
||||||
// @ts-expect-error: no types available
|
|
||||||
import PluginProposalPrivateMethods from '@babel/plugin-proposal-private-methods';
|
|
||||||
import BabelPluginReactCompiler, {
|
import BabelPluginReactCompiler, {
|
||||||
parsePluginOptions,
|
parsePluginOptions,
|
||||||
validateEnvironmentConfig,
|
validateEnvironmentConfig,
|
||||||
@@ -145,10 +143,7 @@ function runReactCompilerImpl({
|
|||||||
filename,
|
filename,
|
||||||
highlightCode: false,
|
highlightCode: false,
|
||||||
retainLines: true,
|
retainLines: true,
|
||||||
plugins: [
|
plugins: [[BabelPluginReactCompiler, options]],
|
||||||
[PluginProposalPrivateMethods, {loose: true}],
|
|
||||||
[BabelPluginReactCompiler, options],
|
|
||||||
],
|
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
configFile: false,
|
configFile: false,
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
|
|||||||
@@ -10,13 +10,7 @@ import {defineConfig} from 'tsup';
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
entry: ['./src/index.ts'],
|
entry: ['./src/index.ts'],
|
||||||
outDir: './dist',
|
outDir: './dist',
|
||||||
external: [
|
external: ['@babel/core', 'hermes-parser', 'zod', 'zod-validation-error'],
|
||||||
'@babel/core',
|
|
||||||
'@babel/plugin-proposal-private-methods',
|
|
||||||
'hermes-parser',
|
|
||||||
'zod',
|
|
||||||
'zod-validation-error',
|
|
||||||
],
|
|
||||||
splitting: false,
|
splitting: false,
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
dts: false,
|
dts: false,
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
lru-cache "^5.1.1"
|
lru-cache "^5.1.1"
|
||||||
semver "^6.3.1"
|
semver "^6.3.1"
|
||||||
|
|
||||||
"@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":
|
"@babel/helper-create-class-features-plugin@^7.25.9", "@babel/helper-create-class-features-plugin@^7.27.0":
|
||||||
version "7.27.0"
|
version "7.27.0"
|
||||||
resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.0.tgz"
|
resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.0.tgz"
|
||||||
integrity sha512-vSGCvMecvFCd/BdpGlhpXYNhhC4ccxyvQWpbGL4CWbvfEoLFWUZuSuf7s9Aw70flgQF+6vptvgK2IfOnKlRmBg==
|
integrity sha512-vSGCvMecvFCd/BdpGlhpXYNhhC4ccxyvQWpbGL4CWbvfEoLFWUZuSuf7s9Aw70flgQF+6vptvgK2IfOnKlRmBg==
|
||||||
@@ -706,14 +706,6 @@
|
|||||||
"@babel/helper-plugin-utils" "^7.25.9"
|
"@babel/helper-plugin-utils" "^7.25.9"
|
||||||
"@babel/traverse" "^7.25.9"
|
"@babel/traverse" "^7.25.9"
|
||||||
|
|
||||||
"@babel/plugin-proposal-private-methods@^7.18.6":
|
|
||||||
version "7.18.6"
|
|
||||||
resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz"
|
|
||||||
integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==
|
|
||||||
dependencies:
|
|
||||||
"@babel/helper-create-class-features-plugin" "^7.18.6"
|
|
||||||
"@babel/helper-plugin-utils" "^7.18.6"
|
|
||||||
|
|
||||||
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
|
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
|
||||||
version "7.21.0-placeholder-for-preset-env.2"
|
version "7.21.0-placeholder-for-preset-env.2"
|
||||||
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"
|
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"
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.24.4",
|
"@babel/core": "^7.24.4",
|
||||||
"@babel/parser": "^7.24.4",
|
"@babel/parser": "^7.24.4",
|
||||||
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
||||||
"hermes-parser": "^0.25.1",
|
"hermes-parser": "^0.25.1",
|
||||||
"zod": "^3.22.4",
|
"zod": "^3.22.4",
|
||||||
"zod-validation-error": "^3.0.3"
|
"zod-validation-error": "^3.0.3"
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
import {transformFromAstSync} from '@babel/core';
|
import {transformFromAstSync} from '@babel/core';
|
||||||
import {parse as babelParse} from '@babel/parser';
|
import {parse as babelParse} from '@babel/parser';
|
||||||
import {File} from '@babel/types';
|
import {File} from '@babel/types';
|
||||||
// @ts-expect-error: no types available
|
|
||||||
import PluginProposalPrivateMethods from '@babel/plugin-proposal-private-methods';
|
|
||||||
import BabelPluginReactCompiler, {
|
import BabelPluginReactCompiler, {
|
||||||
parsePluginOptions,
|
parsePluginOptions,
|
||||||
validateEnvironmentConfig,
|
validateEnvironmentConfig,
|
||||||
@@ -147,10 +145,7 @@ function runReactCompilerImpl({
|
|||||||
filename,
|
filename,
|
||||||
highlightCode: false,
|
highlightCode: false,
|
||||||
retainLines: true,
|
retainLines: true,
|
||||||
plugins: [
|
plugins: [[BabelPluginReactCompiler, options]],
|
||||||
[PluginProposalPrivateMethods, {loose: true}],
|
|
||||||
[BabelPluginReactCompiler, options],
|
|
||||||
],
|
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
configFile: false,
|
configFile: false,
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
|
|||||||
@@ -1253,7 +1253,6 @@ const bundles = [
|
|||||||
preferBuiltins: true,
|
preferBuiltins: true,
|
||||||
externals: [
|
externals: [
|
||||||
'@babel/core',
|
'@babel/core',
|
||||||
'@babel/plugin-proposal-private-methods',
|
|
||||||
'hermes-parser',
|
'hermes-parser',
|
||||||
'zod',
|
'zod',
|
||||||
'zod-validation-error',
|
'zod-validation-error',
|
||||||
|
|||||||
@@ -1108,14 +1108,6 @@
|
|||||||
"@babel/helper-create-class-features-plugin" "^7.10.4"
|
"@babel/helper-create-class-features-plugin" "^7.10.4"
|
||||||
"@babel/helper-plugin-utils" "^7.10.4"
|
"@babel/helper-plugin-utils" "^7.10.4"
|
||||||
|
|
||||||
"@babel/plugin-proposal-private-methods@^7.18.6":
|
|
||||||
version "7.18.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea"
|
|
||||||
integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==
|
|
||||||
dependencies:
|
|
||||||
"@babel/helper-create-class-features-plugin" "^7.18.6"
|
|
||||||
"@babel/helper-plugin-utils" "^7.18.6"
|
|
||||||
|
|
||||||
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
|
"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
|
||||||
version "7.21.0-placeholder-for-preset-env.2"
|
version "7.21.0-placeholder-for-preset-env.2"
|
||||||
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"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user