Rename ReactForgetBabelPlugin locals
ghstack-source-id: 9cd5fe41ae322632dfeb3d5c7468268678006d94 Pull Request resolved: https://github.com/facebook/react-forget/pull/2929
Joe Savona committed
May 2, 2024 at 17:14 UTC
1c8f8bfb89b6e2f1380990b7697d278c799d3f02
6 files changed
+10
-10
compiler/packages/babel-plugin-react-compiler/src/Babel/BabelPlugin.ts
+1
-1
@@ -17,7 +17,7 @@ import {
17
* @param {*} _babel
18
* @returns
19
*/
20
-export default function ReactForgetBabelPlugin(
20
+export default function BabelPluginReactCompiler(
21
_babel: typeof BabelCore
22
): BabelCore.PluginObj {
23
return {
compiler/packages/babel-plugin-react-compiler/src/Babel/RunReactCompilerBabelPlugin.ts
+2
-2
@@ -10,7 +10,7 @@ import { transformFromAstSync } from "@babel/core";
10
import * as BabelParser from "@babel/parser";
11
import invariant from "invariant";
12
import type { PluginOptions } from "../Entrypoint";
13
-import ReactForgetBabelPlugin from "./BabelPlugin";
13
+import BabelPluginReactCompiler from "./BabelPlugin";
14
15
export const DEFAULT_PLUGINS = ["babel-plugin-fbt", "babel-plugin-fbt-runtime"];
16
export function runBabelPluginReactCompiler(
@@ -31,7 +31,7 @@ export function runBabelPluginReactCompiler(
31
highlightCode: false,
32
retainLines: true,
33
plugins: [
34
- [ReactForgetBabelPlugin, options],
34
+ [BabelPluginReactCompiler, options],
35
"babel-plugin-fbt",
36
"babel-plugin-fbt-runtime",
37
],
compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts
+1
-1
@@ -15,7 +15,7 @@ const PanicThresholdOptionsSchema = z.enum([
15
/*
16
* Any errors will panic the compiler by throwing an exception, which will
17
* bubble up to the nearest exception handler above the Forget transform.
18
- * If Forget is invoked through `ReactForgetBabelPlugin`, this will at the least
18
+ * If Forget is invoked through `BabelPluginReactCompiler`, this will at the least
19
* skip Forget compilation for the rest of current file.
20
*/
21
"all_errors",
compiler/packages/babel-plugin-react-compiler/src/index.ts
+2
-2
@@ -37,5 +37,5 @@ declare global {
37
let __DEV__: boolean | null | undefined;
38
}
39
40
-import ReactForgetBabelPlugin from "./Babel/BabelPlugin";
41
-export default ReactForgetBabelPlugin;
40
+import BabelPluginReactCompiler from "./Babel/BabelPlugin";
41
+export default BabelPluginReactCompiler;
compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts
+2
-2
@@ -9,7 +9,7 @@ import { transformFromAstSync } from "@babel/core";
9
// @ts-expect-error
10
import PluginProposalPrivateMethods from "@babel/plugin-proposal-private-methods";
11
import type { SourceLocation as BabelSourceLocation } from "@babel/types";
12
-import ReactForgetBabelPlugin, {
12
+import BabelPluginReactCompiler, {
13
CompilerSuggestionOperation,
14
ErrorSeverity,
15
parsePluginOptions,
@@ -150,7 +150,7 @@ const rule: Rule.RuleModule = {
150
retainLines: true,
151
plugins: [
152
[PluginProposalPrivateMethods, { loose: true }],
153
- [ReactForgetBabelPlugin, options],
153
+ [BabelPluginReactCompiler, options],
154
],
155
sourceType: "module",
156
});
compiler/packages/snap/src/runner-worker.ts
+2
-2
@@ -57,7 +57,7 @@ function compile(
57
try {
58
// NOTE: we intentionally require lazily here so that we can clear the require cache
59
// and load fresh versions of the compiler when `compilerVersion` changes.
60
- const { default: ReactForgetBabelPlugin } = require(COMPILER_PATH) as {
60
+ const { default: BabelPluginReactCompiler } = require(COMPILER_PATH) as {
61
default: PluginObj;
62
};
63
const { toggleLogging } = require(LOGGER_PATH);
@@ -72,7 +72,7 @@ function compile(
72
input,
73
fixturePath,
74
parseConfigPragma,
75
- ReactForgetBabelPlugin,
75
+ BabelPluginReactCompiler,
76
includeEvaluator
77
);
78