From 47af560155e6f38b2fde522e9a84347b25d6e0bb Mon Sep 17 00:00:00 2001 From: Varun Kota <66264617+Programlog@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:32:32 +0000 Subject: [PATCH] chore: code quality improvements and cleanup - Remove obsolete error code 355 for useOpaqueIdentifier This error was for a feature that was never released, as noted in the TODO comment within the error message itself. - Improve @deprecated documentation for noEmit compiler option Clarify the migration path to outputMode and update terminology from 'Forget' to 'the compiler'. - Remove stale TODO comment from ReactNative.js shim The comment suggested deleting the legacy renderer, but this shim is still needed for backward compatibility. --- .../babel-plugin-react-compiler/src/Entrypoint/Options.ts | 8 ++++---- scripts/error-codes/codes.json | 1 - scripts/rollup/shims/react-native/ReactNative.js | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts index b758d7b024d..f2f9928ab0e 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts @@ -103,12 +103,12 @@ export type PluginOptions = Partial<{ panicThreshold: PanicThresholdOptions; /** - * @deprecated + * @deprecated Use `outputMode` instead. This option will be removed in a future version. * - * When enabled, Forget will continue statically analyzing and linting code, but skip over codegen - * passes. + * When enabled, the compiler will continue statically analyzing and linting code, but skip over + * codegen passes. * - * NOTE: ignored if `outputMode` is specified + * NOTE: This option is ignored if `outputMode` is specified. * * Defaults to false */ diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index d8c8e0b7685..065927ca340 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -342,7 +342,6 @@ "352": "React Lazy Components are not yet supported on the server.", "353": "A server block should never encode any other slots. This is a bug in React.", "354": "getInspectorDataForViewAtPoint() is not available in production.", - "355": "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly. (TODO: This feature was never released so we should be able to remove this error from the map.)", "356": "Could not read the cache.", "357": "The current renderer does not support React Scopes. This error is likely caused by a bug in React. Please file an issue.", "358": "Invalid update priority: %s. This is a bug in React.", diff --git a/scripts/rollup/shims/react-native/ReactNative.js b/scripts/rollup/shims/react-native/ReactNative.js index 4e7ab19ae6e..82c062bb851 100644 --- a/scripts/rollup/shims/react-native/ReactNative.js +++ b/scripts/rollup/shims/react-native/ReactNative.js @@ -14,7 +14,6 @@ import type {ReactNativeType} from './ReactNativeTypes'; let ReactNative: ReactNativeType; -// TODO: Delete the legacy renderer. Only ReactFabric is used now. if (__DEV__) { ReactNative = require('../implementations/ReactNativeRenderer-dev'); } else {