From 0da9b2daffe52030a92d0720ba190bac1a1d952e Mon Sep 17 00:00:00 2001 From: josephsavona Date: Thu, 16 Oct 2025 09:57:55 -0700 Subject: [PATCH] [compiler] improve zod v3 backwards compat (#34877) ## Summary When upgrading to `babel-plugin-react-compiler@1.0.0` in a project that uses `zod@3` we are running into TypeScript errors like: ``` node_modules/babel-plugin-react-compiler/dist/index.d.ts:435:10 - error TS2694: Namespace '"/REDACTED/node_modules/zod/v3/external"' has no exported member 'core'. 435 }, z.core.$strip>>>; ~~~~ ``` This problem seems to be related to d6eb735938bc67b41ad723206ea395ba4d761139, which introduced zod v3/v4 compatibility. Since `zod` is bundled into the compiler source this does not cause runtime issues and only manifests as TypeScript errors. My proposed solution is this PR is to use zod's [subpath versioning strategy](https://zod.dev/v4/versioning?id=versioning-in-zod-4) which allows you to support v3 and v4 APIs on both major versions. Changes in this PR include: - Updated `zod` import paths to `zod/v4` - Bumped min `zod` version to `^3.25.0` for zod which guarantees the `zod/v4` subpath is available. - Updated `zod-validation-error` import paths to `zod-validation-error/v4` - Bumped min `zod-validation-error ` version to `^3.5.0` - Updated `externals` tsup configuration where appropriate. Once the compiler drops zod v3 support we could optionally remove the `/v4` subpath from the imports. ## How did you test this change? Not totally sure the best way to test. I ran `NODE_ENV=production yarn workspace babel-plugin-react-compiler run build --dts` and diffed the `dist/` folder between my change and `v1.0.0` and it looks correct. We have a `patch-package` patch to workaround this for now and it works as expected. ```diff diff --git a/node_modules/babel-plugin-react-compiler/dist/index.d.ts b/node_modules/babel-plugin-react-compiler/dist/index.d.ts index 81c3f3d..daafc2c 100644 --- a/node_modules/babel-plugin-react-compiler/dist/index.d.ts +++ b/node_modules/babel-plugin-react-compiler/dist/index.d.ts @@ -1,7 +1,7 @@ import * as BabelCore from '@babel/core'; import { NodePath as NodePath$1 } from '@babel/core'; import * as t from '@babel/types'; -import { z } from 'zod'; +import { z } from 'zod/v4'; import { NodePath, Scope } from '@babel/traverse'; interface Result { ``` Co-authored-by: Henry Q. Dineen DiffTrain build for [ed1351c4fb92f84657a0c1a2af5ccef2484f7bd7](https://github.com/facebook/react/commit/ed1351c4fb92f84657a0c1a2af5ccef2484f7bd7) --- compiled-rn/VERSION_NATIVE_FB | 2 +- .../react/react-dom/cjs/ReactDOM-dev.js | 4 +- .../react/react-dom/cjs/ReactDOM-prod.js | 4 +- .../react/react-dom/cjs/ReactDOM-profiling.js | 4 +- .../react/react-dom/cjs/ReactDOMClient-dev.js | 12 +- .../react-dom/cjs/ReactDOMClient-prod.js | 12 +- .../react-dom/cjs/ReactDOMClient-profiling.js | 12 +- .../react-dom/cjs/ReactDOMProfiling-dev.js | 12 +- .../react-dom/cjs/ReactDOMProfiling-prod.js | 12 +- .../cjs/ReactDOMProfiling-profiling.js | 12 +- .../cjs/ReactTestRenderer-dev.js | 8 +- .../cjs/ReactTestRenderer-prod.js | 8 +- .../cjs/ReactTestRenderer-profiling.js | 8 +- .../vendor/react/react/cjs/React-dev.js | 4 +- .../vendor/react/react/cjs/React-prod.js | 4 +- .../vendor/react/react/cjs/React-profiling.js | 4 +- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 6 +- .../implementations/ReactFabric-prod.fb.js | 6 +- .../ReactFabric-profiling.fb.js | 6 +- .../ReactNativeRenderer-dev.fb.js | 10 +- .../ReactNativeRenderer-prod.fb.js | 10 +- .../ReactNativeRenderer-profiling.fb.js | 10 +- .../eslint-plugin-react-hooks.development.js | 310 +++++++++--------- .../eslint-plugin-react-hooks.production.js | 310 +++++++++--------- .../eslint-plugin-react-hooks/package.json | 6 +- 26 files changed, 399 insertions(+), 399 deletions(-) diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index 6c9f5f5c40..403506c43a 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.3.0-native-fb-d8aa94b0-20251016 \ No newline at end of file +19.3.0-native-fb-ed1351c4-20251016 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index d18ce3a106..7ebe1c4711 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<92b85e25721a5fd5afa9ab7f7ed14dd2>> + * @generated SignedSource<<0c3973912050f59d94122963d1d2deda>> */ "use strict"; @@ -404,5 +404,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; + exports.version = "19.3.0-native-fb-ed1351c4-20251016"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index d68397d91d..38b74d7075 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<492d1c7f1715f79e03e614e23bf3cfe1>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index d68397d91d..38b74d7075 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<492d1c7f1715f79e03e614e23bf3cfe1>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index 71776829e0..07763f9d0a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<6392ec10ad620717b885c00858c982d1>> + * @generated SignedSource<<10050bb86cef9b7c923695c42bf0b742>> */ /* @@ -30117,11 +30117,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-native-fb-d8aa94b0-20251016" !== isomorphicReactPackageVersion) + if ("19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-native-fb-d8aa94b0-20251016\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-native-fb-ed1351c4-20251016\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30158,10 +30158,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30311,5 +30311,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; + exports.version = "19.3.0-native-fb-ed1351c4-20251016"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index 5d15ec565d..5998130a45 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<363e7039da3eaf3fe0bea474ac2a0bf8>> */ /* @@ -17581,14 +17581,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2060 = React.version; if ( - "19.3.0-native-fb-d8aa94b0-20251016" !== + "19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion$jscomp$inline_2060 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2060, - "19.3.0-native-fb-d8aa94b0-20251016" + "19.3.0-native-fb-ed1351c4-20251016" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17610,10 +17610,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2637 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2638 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17720,4 +17720,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index b830ab57a0..6231b953ca 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<661bcbf8694be245aad5fbb7e37c3375>> + * @generated SignedSource<<839a1ddc7e6dd708b23f2243d86967ce>> */ /* @@ -19703,14 +19703,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2375 = React.version; if ( - "19.3.0-native-fb-d8aa94b0-20251016" !== + "19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion$jscomp$inline_2375 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2375, - "19.3.0-native-fb-d8aa94b0-20251016" + "19.3.0-native-fb-ed1351c4-20251016" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19732,10 +19732,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2382 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016", + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$332 = 0; @@ -19858,4 +19858,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index 085a280eeb..f149bfa83c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4a7ebe67c9f8aa928a3ad371e6fd3966>> + * @generated SignedSource<<0fe412611812eec10d6b28d328f42188>> */ /* @@ -30173,11 +30173,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-native-fb-d8aa94b0-20251016" !== isomorphicReactPackageVersion) + if ("19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-native-fb-d8aa94b0-20251016\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-native-fb-ed1351c4-20251016\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30214,10 +30214,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30683,7 +30683,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; + exports.version = "19.3.0-native-fb-ed1351c4-20251016"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index 47674b98cf..11f43472d9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9f3d58983b9f6e0cbefa334c6c2962c4>> + * @generated SignedSource<<4ac36dbf5ef6b77c072bd3c9130ef85c>> */ /* @@ -17592,14 +17592,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2061 = React.version; if ( - "19.3.0-native-fb-d8aa94b0-20251016" !== + "19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion$jscomp$inline_2061 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2061, - "19.3.0-native-fb-d8aa94b0-20251016" + "19.3.0-native-fb-ed1351c4-20251016" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17621,10 +17621,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2640 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2641 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17884,4 +17884,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 8ec96bb9a4..12679906b4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<832bdef850d7cb6af0eb98e3fd4fb460>> + * @generated SignedSource<> */ /* @@ -19718,14 +19718,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2376 = React.version; if ( - "19.3.0-native-fb-d8aa94b0-20251016" !== + "19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion$jscomp$inline_2376 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2376, - "19.3.0-native-fb-d8aa94b0-20251016" + "19.3.0-native-fb-ed1351c4-20251016" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19747,10 +19747,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2383 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016", + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$332 = 0; @@ -20026,7 +20026,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index d16f85169a..85b2c740ad 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9f76ce658a7fdc684dd7a6ba46a0811d>> + * @generated SignedSource<<907b973b3903e6e95b9fd809ce679019>> */ "use strict"; @@ -16021,10 +16021,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16170,5 +16170,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; + exports.version = "19.3.0-native-fb-ed1351c4-20251016"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index e8ff58fe23..69af136d29 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<92af8fef58b348cb6dca7a00ef1a4d4b>> + * @generated SignedSource<> */ "use strict"; @@ -10110,10 +10110,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1494 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1495 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -10249,4 +10249,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 8c4cde9fd3..866bb38c87 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<0d381b50ed74e5d304500b9608f4b564>> */ "use strict"; @@ -10731,10 +10731,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1275 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016", + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$147 = 0; @@ -10885,4 +10885,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 826907d155..a249f11b2c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0c5f3da13f6ea4fdbbdb8319b18e5158>> + * @generated SignedSource<<3a58af1cc597b0599dd0d45f8c6ff844>> */ "use strict"; @@ -1421,7 +1421,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; + exports.version = "19.3.0-native-fb-ed1351c4-20251016"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index 6e083afc88..d5d8465312 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<33eade3db9be0da9889d1c81561b316c>> + * @generated SignedSource<<7dcd3dbf90f859f2ebb5fcac67236be7>> */ "use strict"; @@ -586,4 +586,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index 4be46e3cf6..831c1b511c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<541487a427b559807cab1b70f0378406>> + * @generated SignedSource<<990d8e292947c8e70a9d50fbc3774e92>> */ "use strict"; @@ -590,7 +590,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.3.0-native-fb-d8aa94b0-20251016"; +exports.version = "19.3.0-native-fb-ed1351c4-20251016"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index a176aa142b..426c226f30 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -d8aa94b0f4f22aadd4762b7ca1c690d3d85ae776 +ed1351c4fb92f84657a0c1a2af5ccef2484f7bd7 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index adf911812e..894e380df0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<260a783cba6fb6ae70176b23f3972320>> + * @generated SignedSource<<79889028a83a8a256b2dce24da91645f>> */ "use strict"; @@ -20085,10 +20085,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index c4a85eb36f..6c391be745 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8e9c048430928d171b92fac33feb84b2>> + * @generated SignedSource<<80ed641b64fe76b066215bf256151552>> */ "use strict"; @@ -11269,10 +11269,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1321 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1321.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 572d885ae2..60323e0097 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<6279d3e709b930156b7fd56311b16447>> + * @generated SignedSource<<58162d8c4274d4ce99d837329a2c8d47>> */ "use strict"; @@ -13334,10 +13334,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1629 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1629.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 11c5b35f7d..bec465f681 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9adec0f3f0b32ead79ded68daba48372>> */ "use strict"; @@ -20354,11 +20354,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.3.0-native-fb-d8aa94b0-20251016" !== isomorphicReactPackageVersion) + if ("19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.3.0-native-fb-d8aa94b0-20251016\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.3.0-native-fb-ed1351c4-20251016\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -20384,10 +20384,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 84d4642bfd..8fda039275 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<34080f7cb3678cc191e8c178b90576b3>> + * @generated SignedSource<> */ "use strict"; @@ -11430,11 +11430,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.3.0-native-fb-d8aa94b0-20251016" !== isomorphicReactPackageVersion) +if ("19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.3.0-native-fb-d8aa94b0-20251016\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.3.0-native-fb-ed1351c4-20251016\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11484,10 +11484,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1327 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1327.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 4e90669128..86d49d3066 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<20e760334784ed765045bf373c8b9acb>> + * @generated SignedSource<> */ "use strict"; @@ -13488,11 +13488,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.3.0-native-fb-d8aa94b0-20251016" !== isomorphicReactPackageVersion) +if ("19.3.0-native-fb-ed1351c4-20251016" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.3.0-native-fb-d8aa94b0-20251016\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.3.0-native-fb-ed1351c4-20251016\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -13542,10 +13542,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1635 = { bundleType: 0, - version: "19.3.0-native-fb-d8aa94b0-20251016", + version: "19.3.0-native-fb-ed1351c4-20251016", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-native-fb-d8aa94b0-20251016" + reconcilerVersion: "19.3.0-native-fb-ed1351c4-20251016" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1635.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js index 6fd91bdf9a..c7625bd356 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js @@ -12,7 +12,7 @@ * @lightSyntaxTransform * @preventMunge * @oncall react_core - * @generated SignedSource<> + * @generated SignedSource<<6657e19da8a50d83dcf48cd0b8c03467>> */ 'use strict'; @@ -23,8 +23,8 @@ if (process.env.NODE_ENV !== "production") { var core$1 = require('@babel/core'); var BabelParser = require('@babel/parser'); -var zod = require('zod'); -var zodValidationError = require('zod-validation-error'); +var v4 = require('zod/v4'); +var v4$1 = require('zod-validation-error/v4'); var crypto = require('crypto'); var HermesParser = require('hermes-parser'); var util = require('util'); @@ -18742,7 +18742,7 @@ var ValueKind; ValueKind["Mutable"] = "mutable"; ValueKind["Context"] = "context"; })(ValueKind || (ValueKind = {})); -const ValueKindSchema = zod.z.enum([ +const ValueKindSchema = v4.z.enum([ ValueKind.MaybeFrozen, ValueKind.Frozen, ValueKind.Primitive, @@ -18750,7 +18750,7 @@ const ValueKindSchema = zod.z.enum([ ValueKind.Mutable, ValueKind.Context, ]); -const ValueReasonSchema = zod.z.enum([ +const ValueReasonSchema = v4.z.enum([ ValueReason.Context, ValueReason.Effect, ValueReason.Global, @@ -18774,7 +18774,7 @@ var Effect; Effect["Mutate"] = "mutate"; Effect["Store"] = "store"; })(Effect || (Effect = {})); -const EffectSchema = zod.z.enum([ +const EffectSchema = v4.z.enum([ Effect.Read, Effect.Mutate, Effect.ConditionallyMutate, @@ -31371,85 +31371,85 @@ function getReanimatedModuleType(registry) { return addObject(registry, null, reanimatedType); } -const ObjectPropertiesSchema = zod.z - .record(zod.z.string(), zod.z.lazy(() => TypeSchema)) +const ObjectPropertiesSchema = v4.z + .record(v4.z.string(), v4.z.lazy(() => TypeSchema)) .refine(record => { return Object.keys(record).every(key => key === '*' || key === 'default' || libExports$1.isValidIdentifier(key)); }, 'Expected all "object" property names to be valid identifier, `*` to match any property, of `default` to define a module default export'); -const ObjectTypeSchema = zod.z.object({ - kind: zod.z.literal('object'), +const ObjectTypeSchema = v4.z.object({ + kind: v4.z.literal('object'), properties: ObjectPropertiesSchema.nullable(), }); -const LifetimeIdSchema = zod.z.string().refine(id => id.startsWith('@'), { +const LifetimeIdSchema = v4.z.string().refine(id => id.startsWith('@'), { message: "Placeholder names must start with '@'", }); -const FreezeEffectSchema = zod.z.object({ - kind: zod.z.literal('Freeze'), +const FreezeEffectSchema = v4.z.object({ + kind: v4.z.literal('Freeze'), value: LifetimeIdSchema, reason: ValueReasonSchema, }); -const MutateEffectSchema = zod.z.object({ - kind: zod.z.literal('Mutate'), +const MutateEffectSchema = v4.z.object({ + kind: v4.z.literal('Mutate'), value: LifetimeIdSchema, }); -const MutateTransitiveConditionallySchema = zod.z.object({ - kind: zod.z.literal('MutateTransitiveConditionally'), +const MutateTransitiveConditionallySchema = v4.z.object({ + kind: v4.z.literal('MutateTransitiveConditionally'), value: LifetimeIdSchema, }); -const CreateEffectSchema = zod.z.object({ - kind: zod.z.literal('Create'), +const CreateEffectSchema = v4.z.object({ + kind: v4.z.literal('Create'), into: LifetimeIdSchema, value: ValueKindSchema, reason: ValueReasonSchema, }); -const AssignEffectSchema = zod.z.object({ - kind: zod.z.literal('Assign'), +const AssignEffectSchema = v4.z.object({ + kind: v4.z.literal('Assign'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const AliasEffectSchema = zod.z.object({ - kind: zod.z.literal('Alias'), +const AliasEffectSchema = v4.z.object({ + kind: v4.z.literal('Alias'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const ImmutableCaptureEffectSchema = zod.z.object({ - kind: zod.z.literal('ImmutableCapture'), +const ImmutableCaptureEffectSchema = v4.z.object({ + kind: v4.z.literal('ImmutableCapture'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const CaptureEffectSchema = zod.z.object({ - kind: zod.z.literal('Capture'), +const CaptureEffectSchema = v4.z.object({ + kind: v4.z.literal('Capture'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const CreateFromEffectSchema = zod.z.object({ - kind: zod.z.literal('CreateFrom'), +const CreateFromEffectSchema = v4.z.object({ + kind: v4.z.literal('CreateFrom'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const ApplyArgSchema = zod.z.union([ +const ApplyArgSchema = v4.z.union([ LifetimeIdSchema, - zod.z.object({ - kind: zod.z.literal('Spread'), + v4.z.object({ + kind: v4.z.literal('Spread'), place: LifetimeIdSchema, }), - zod.z.object({ - kind: zod.z.literal('Hole'), + v4.z.object({ + kind: v4.z.literal('Hole'), }), ]); -const ApplyEffectSchema = zod.z.object({ - kind: zod.z.literal('Apply'), +const ApplyEffectSchema = v4.z.object({ + kind: v4.z.literal('Apply'), receiver: LifetimeIdSchema, function: LifetimeIdSchema, - mutatesFunction: zod.z.boolean(), - args: zod.z.array(ApplyArgSchema), + mutatesFunction: v4.z.boolean(), + args: v4.z.array(ApplyArgSchema), into: LifetimeIdSchema, }); -const ImpureEffectSchema = zod.z.object({ - kind: zod.z.literal('Impure'), +const ImpureEffectSchema = v4.z.object({ + kind: v4.z.literal('Impure'), place: LifetimeIdSchema, }); -const AliasingEffectSchema = zod.z.union([ +const AliasingEffectSchema = v4.z.union([ FreezeEffectSchema, CreateEffectSchema, CreateFromEffectSchema, @@ -31462,50 +31462,50 @@ const AliasingEffectSchema = zod.z.union([ MutateTransitiveConditionallySchema, ApplyEffectSchema, ]); -const AliasingSignatureSchema = zod.z.object({ +const AliasingSignatureSchema = v4.z.object({ receiver: LifetimeIdSchema, - params: zod.z.array(LifetimeIdSchema), + params: v4.z.array(LifetimeIdSchema), rest: LifetimeIdSchema.nullable(), returns: LifetimeIdSchema, - effects: zod.z.array(AliasingEffectSchema), - temporaries: zod.z.array(LifetimeIdSchema), + effects: v4.z.array(AliasingEffectSchema), + temporaries: v4.z.array(LifetimeIdSchema), }); -const FunctionTypeSchema = zod.z.object({ - kind: zod.z.literal('function'), - positionalParams: zod.z.array(EffectSchema), +const FunctionTypeSchema = v4.z.object({ + kind: v4.z.literal('function'), + positionalParams: v4.z.array(EffectSchema), restParam: EffectSchema.nullable(), calleeEffect: EffectSchema, - returnType: zod.z.lazy(() => TypeSchema), + returnType: v4.z.lazy(() => TypeSchema), returnValueKind: ValueKindSchema, - noAlias: zod.z.boolean().nullable().optional(), - mutableOnlyIfOperandsAreMutable: zod.z.boolean().nullable().optional(), - impure: zod.z.boolean().nullable().optional(), - canonicalName: zod.z.string().nullable().optional(), + noAlias: v4.z.boolean().nullable().optional(), + mutableOnlyIfOperandsAreMutable: v4.z.boolean().nullable().optional(), + impure: v4.z.boolean().nullable().optional(), + canonicalName: v4.z.string().nullable().optional(), aliasing: AliasingSignatureSchema.nullable().optional(), - knownIncompatible: zod.z.string().nullable().optional(), + knownIncompatible: v4.z.string().nullable().optional(), }); -const HookTypeSchema = zod.z.object({ - kind: zod.z.literal('hook'), - positionalParams: zod.z.array(EffectSchema).nullable().optional(), +const HookTypeSchema = v4.z.object({ + kind: v4.z.literal('hook'), + positionalParams: v4.z.array(EffectSchema).nullable().optional(), restParam: EffectSchema.nullable().optional(), - returnType: zod.z.lazy(() => TypeSchema), + returnType: v4.z.lazy(() => TypeSchema), returnValueKind: ValueKindSchema.nullable().optional(), - noAlias: zod.z.boolean().nullable().optional(), + noAlias: v4.z.boolean().nullable().optional(), aliasing: AliasingSignatureSchema.nullable().optional(), - knownIncompatible: zod.z.string().nullable().optional(), + knownIncompatible: v4.z.string().nullable().optional(), }); -const BuiltInTypeSchema = zod.z.union([ - zod.z.literal('Any'), - zod.z.literal('Ref'), - zod.z.literal('Array'), - zod.z.literal('Primitive'), - zod.z.literal('MixedReadonly'), +const BuiltInTypeSchema = v4.z.union([ + v4.z.literal('Any'), + v4.z.literal('Ref'), + v4.z.literal('Array'), + v4.z.literal('Primitive'), + v4.z.literal('MixedReadonly'), ]); -const TypeReferenceSchema = zod.z.object({ - kind: zod.z.literal('type'), +const TypeReferenceSchema = v4.z.object({ + kind: v4.z.literal('type'), name: BuiltInTypeSchema, }); -const TypeSchema = zod.z.union([ +const TypeSchema = v4.z.union([ ObjectTypeSchema, FunctionTypeSchema, HookTypeSchema, @@ -32101,96 +32101,96 @@ function defaultModuleTypeProvider(moduleName) { } var _Environment_instances, _Environment_globals, _Environment_shapes, _Environment_moduleTypes, _Environment_nextIdentifer, _Environment_nextBlock, _Environment_nextScope, _Environment_scope, _Environment_outlinedFunctions, _Environment_contextIdentifiers, _Environment_hoistedIdentifiers, _Environment_flowTypeEnvironment, _Environment_resolveModuleType, _Environment_isKnownReactModule, _Environment_getCustomHookType; -const ReactElementSymbolSchema = zod.z.object({ - elementSymbol: zod.z.union([ - zod.z.literal('react.element'), - zod.z.literal('react.transitional.element'), +const ReactElementSymbolSchema = v4.z.object({ + elementSymbol: v4.z.union([ + v4.z.literal('react.element'), + v4.z.literal('react.transitional.element'), ]), - globalDevVar: zod.z.string(), + globalDevVar: v4.z.string(), }); -const ExternalFunctionSchema = zod.z.object({ - source: zod.z.string(), - importSpecifierName: zod.z.string(), +const ExternalFunctionSchema = v4.z.object({ + source: v4.z.string(), + importSpecifierName: v4.z.string(), }); -const InstrumentationSchema = zod.z +const InstrumentationSchema = v4.z .object({ fn: ExternalFunctionSchema, gating: ExternalFunctionSchema.nullable(), - globalGating: zod.z.string().nullable(), + globalGating: v4.z.string().nullable(), }) .refine(opts => opts.gating != null || opts.globalGating != null, 'Expected at least one of gating or globalGating'); const USE_FIRE_FUNCTION_NAME = 'useFire'; const EMIT_FREEZE_GLOBAL_GATING = 'true'; -const MacroMethodSchema = zod.z.union([ - zod.z.object({ type: zod.z.literal('wildcard') }), - zod.z.object({ type: zod.z.literal('name'), name: zod.z.string() }), +const MacroMethodSchema = v4.z.union([ + v4.z.object({ type: v4.z.literal('wildcard') }), + v4.z.object({ type: v4.z.literal('name'), name: v4.z.string() }), ]); -const MacroSchema = zod.z.union([ - zod.z.string(), - zod.z.tuple([zod.z.string(), zod.z.array(MacroMethodSchema)]), +const MacroSchema = v4.z.union([ + v4.z.string(), + v4.z.tuple([v4.z.string(), v4.z.array(MacroMethodSchema)]), ]); -const HookSchema = zod.z.object({ - effectKind: zod.z.nativeEnum(Effect), - valueKind: zod.z.nativeEnum(ValueKind), - noAlias: zod.z.boolean().default(false), - transitiveMixedData: zod.z.boolean().default(false), +const HookSchema = v4.z.object({ + effectKind: v4.z.nativeEnum(Effect), + valueKind: v4.z.nativeEnum(ValueKind), + noAlias: v4.z.boolean().default(false), + transitiveMixedData: v4.z.boolean().default(false), }); -const EnvironmentConfigSchema = zod.z.object({ - customHooks: zod.z.map(zod.z.string(), HookSchema).default(new Map()), - moduleTypeProvider: zod.z.nullable(zod.z.any()).default(null), - customMacros: zod.z.nullable(zod.z.array(MacroSchema)).default(null), - enableResetCacheOnSourceFileChanges: zod.z.nullable(zod.z.boolean()).default(null), - enablePreserveExistingMemoizationGuarantees: zod.z.boolean().default(true), - validatePreserveExistingMemoizationGuarantees: zod.z.boolean().default(true), - enablePreserveExistingManualUseMemo: zod.z.boolean().default(false), - enableForest: zod.z.boolean().default(false), - enableUseTypeAnnotations: zod.z.boolean().default(false), - flowTypeProvider: zod.z.nullable(zod.z.any()).default(null), - enableOptionalDependencies: zod.z.boolean().default(true), - enableFire: zod.z.boolean().default(false), - enableNameAnonymousFunctions: zod.z.boolean().default(false), - inferEffectDependencies: zod.z - .nullable(zod.z.array(zod.z.object({ +const EnvironmentConfigSchema = v4.z.object({ + customHooks: v4.z.map(v4.z.string(), HookSchema).default(new Map()), + moduleTypeProvider: v4.z.nullable(v4.z.any()).default(null), + customMacros: v4.z.nullable(v4.z.array(MacroSchema)).default(null), + enableResetCacheOnSourceFileChanges: v4.z.nullable(v4.z.boolean()).default(null), + enablePreserveExistingMemoizationGuarantees: v4.z.boolean().default(true), + validatePreserveExistingMemoizationGuarantees: v4.z.boolean().default(true), + enablePreserveExistingManualUseMemo: v4.z.boolean().default(false), + enableForest: v4.z.boolean().default(false), + enableUseTypeAnnotations: v4.z.boolean().default(false), + flowTypeProvider: v4.z.nullable(v4.z.any()).default(null), + enableOptionalDependencies: v4.z.boolean().default(true), + enableFire: v4.z.boolean().default(false), + enableNameAnonymousFunctions: v4.z.boolean().default(false), + inferEffectDependencies: v4.z + .nullable(v4.z.array(v4.z.object({ function: ExternalFunctionSchema, - autodepsIndex: zod.z.number().min(1, 'autodepsIndex must be > 0'), + autodepsIndex: v4.z.number().min(1, 'autodepsIndex must be > 0'), }))) .default(null), inlineJsxTransform: ReactElementSymbolSchema.nullable().default(null), - validateHooksUsage: zod.z.boolean().default(true), - validateRefAccessDuringRender: zod.z.boolean().default(true), - validateNoSetStateInRender: zod.z.boolean().default(true), - validateNoSetStateInEffects: zod.z.boolean().default(false), - validateNoDerivedComputationsInEffects: zod.z.boolean().default(false), - validateNoJSXInTryStatements: zod.z.boolean().default(false), - validateStaticComponents: zod.z.boolean().default(false), - validateMemoizedEffectDependencies: zod.z.boolean().default(false), - validateNoCapitalizedCalls: zod.z.nullable(zod.z.array(zod.z.string())).default(null), - validateBlocklistedImports: zod.z.nullable(zod.z.array(zod.z.string())).default(null), - validateNoImpureFunctionsInRender: zod.z.boolean().default(false), - validateNoFreezingKnownMutableFunctions: zod.z.boolean().default(false), - enableAssumeHooksFollowRulesOfReact: zod.z.boolean().default(true), - enableTransitivelyFreezeFunctionExpressions: zod.z.boolean().default(true), + validateHooksUsage: v4.z.boolean().default(true), + validateRefAccessDuringRender: v4.z.boolean().default(true), + validateNoSetStateInRender: v4.z.boolean().default(true), + validateNoSetStateInEffects: v4.z.boolean().default(false), + validateNoDerivedComputationsInEffects: v4.z.boolean().default(false), + validateNoJSXInTryStatements: v4.z.boolean().default(false), + validateStaticComponents: v4.z.boolean().default(false), + validateMemoizedEffectDependencies: v4.z.boolean().default(false), + validateNoCapitalizedCalls: v4.z.nullable(v4.z.array(v4.z.string())).default(null), + validateBlocklistedImports: v4.z.nullable(v4.z.array(v4.z.string())).default(null), + validateNoImpureFunctionsInRender: v4.z.boolean().default(false), + validateNoFreezingKnownMutableFunctions: v4.z.boolean().default(false), + enableAssumeHooksFollowRulesOfReact: v4.z.boolean().default(true), + enableTransitivelyFreezeFunctionExpressions: v4.z.boolean().default(true), enableEmitFreeze: ExternalFunctionSchema.nullable().default(null), enableEmitHookGuards: ExternalFunctionSchema.nullable().default(null), - enableInstructionReordering: zod.z.boolean().default(false), - enableFunctionOutlining: zod.z.boolean().default(true), - enableJsxOutlining: zod.z.boolean().default(false), + enableInstructionReordering: v4.z.boolean().default(false), + enableFunctionOutlining: v4.z.boolean().default(true), + enableJsxOutlining: v4.z.boolean().default(false), enableEmitInstrumentForget: InstrumentationSchema.nullable().default(null), - assertValidMutableRanges: zod.z.boolean().default(false), - enableChangeVariableCodegen: zod.z.boolean().default(false), - enableMemoizationComments: zod.z.boolean().default(false), - throwUnknownException__testonly: zod.z.boolean().default(false), - enableTreatFunctionDepsAsConditional: zod.z.boolean().default(false), - disableMemoizationForDebugging: zod.z.boolean().default(false), + assertValidMutableRanges: v4.z.boolean().default(false), + enableChangeVariableCodegen: v4.z.boolean().default(false), + enableMemoizationComments: v4.z.boolean().default(false), + throwUnknownException__testonly: v4.z.boolean().default(false), + enableTreatFunctionDepsAsConditional: v4.z.boolean().default(false), + disableMemoizationForDebugging: v4.z.boolean().default(false), enableChangeDetectionForDebugging: ExternalFunctionSchema.nullable().default(null), - enableCustomTypeDefinitionForReanimated: zod.z.boolean().default(false), - hookPattern: zod.z.string().nullable().default(null), - enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(true), - enableTreatSetIdentifiersAsStateSetters: zod.z.boolean().default(false), + enableCustomTypeDefinitionForReanimated: v4.z.boolean().default(false), + hookPattern: v4.z.string().nullable().default(null), + enableTreatRefLikeIdentifiersAsRefs: v4.z.boolean().default(true), + enableTreatSetIdentifiersAsStateSetters: v4.z.boolean().default(false), lowerContextAccess: ExternalFunctionSchema.nullable().default(null), - validateNoVoidUseMemo: zod.z.boolean().default(false), - validateNoDynamicallyCreatedComponentsOrHooks: zod.z.boolean().default(false), - enableAllowSetStateFromRefsInEffects: zod.z.boolean().default(true), + validateNoVoidUseMemo: v4.z.boolean().default(false), + validateNoDynamicallyCreatedComponentsOrHooks: v4.z.boolean().default(false), + enableAllowSetStateFromRefsInEffects: v4.z.boolean().default(true), }); class Environment { constructor(scope, fnType, compilerMode, config, contextIdentifiers, parentFunction, logger, filename, code, programContext) { @@ -32567,7 +32567,7 @@ function validateEnvironmentConfig(partialConfig) { } CompilerError.throwInvalidConfig({ reason: 'Could not validate environment config. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(config.error)}`, + description: `${v4$1.fromZodError(config.error)}`, loc: null, suggestions: null, }); @@ -32579,7 +32579,7 @@ function tryParseExternalFunction(maybeExternalFunction) { } CompilerError.throwInvalidConfig({ reason: 'Could not parse external function. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(externalFunction.error)}`, + description: `${v4$1.fromZodError(externalFunction.error)}`, loc: null, suggestions: null, }); @@ -53749,27 +53749,27 @@ function isNonNamespacedImport(importDeclPath) { importDeclPath.node.importKind !== 'typeof'); } -zod.z.enum([ +v4.z.enum([ 'all_errors', 'critical_errors', 'none', ]); -const DynamicGatingOptionsSchema = zod.z.object({ - source: zod.z.string(), +const DynamicGatingOptionsSchema = v4.z.object({ + source: v4.z.string(), }); -const CustomOptOutDirectiveSchema = zod.z - .nullable(zod.z.array(zod.z.string())) +const CustomOptOutDirectiveSchema = v4.z + .nullable(v4.z.array(v4.z.string())) .default(null); -const CompilerReactTargetSchema = zod.z.union([ - zod.z.literal('17'), - zod.z.literal('18'), - zod.z.literal('19'), - zod.z.object({ - kind: zod.z.literal('donotuse_meta_internal'), - runtimeModule: zod.z.string().default('react'), +const CompilerReactTargetSchema = v4.z.union([ + v4.z.literal('17'), + v4.z.literal('18'), + v4.z.literal('19'), + v4.z.object({ + kind: v4.z.literal('donotuse_meta_internal'), + runtimeModule: v4.z.string().default('react'), }), ]); -zod.z.enum([ +v4.z.enum([ 'infer', 'syntax', 'annotation', @@ -53842,7 +53842,7 @@ function parsePluginOptions(obj) { else { CompilerError.throwInvalidConfig({ reason: 'Could not parse dynamic gating. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(result.error)}`, + description: `${v4$1.fromZodError(result.error)}`, loc: null, suggestions: null, }); @@ -53858,7 +53858,7 @@ function parsePluginOptions(obj) { else { CompilerError.throwInvalidConfig({ reason: 'Could not parse custom opt out directives. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(result.error)}`, + description: `${v4$1.fromZodError(result.error)}`, loc: null, suggestions: null, }); @@ -53881,7 +53881,7 @@ function parseTargetConfig(value) { else { CompilerError.throwInvalidConfig({ reason: 'Not a valid target', - description: `${zodValidationError.fromZodError(parsed.error)}`, + description: `${v4$1.fromZodError(parsed.error)}`, suggestions: null, loc: null, }); diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js index c02e3a729a..eee619de1e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js @@ -6,15 +6,15 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * @generated SignedSource<<2ad2c9054407fdf0ed45cc00b36bc3cb>> + * @generated SignedSource<<7b33439ead54919661a5d316b265430a>> */ 'use strict'; var core$1 = require('@babel/core'); var BabelParser = require('@babel/parser'); -var zod = require('zod'); -var zodValidationError = require('zod-validation-error'); +var v4 = require('zod/v4'); +var v4$1 = require('zod-validation-error/v4'); var crypto = require('crypto'); var HermesParser = require('hermes-parser'); var util = require('util'); @@ -18727,7 +18727,7 @@ var ValueKind; ValueKind["Mutable"] = "mutable"; ValueKind["Context"] = "context"; })(ValueKind || (ValueKind = {})); -const ValueKindSchema = zod.z.enum([ +const ValueKindSchema = v4.z.enum([ ValueKind.MaybeFrozen, ValueKind.Frozen, ValueKind.Primitive, @@ -18735,7 +18735,7 @@ const ValueKindSchema = zod.z.enum([ ValueKind.Mutable, ValueKind.Context, ]); -const ValueReasonSchema = zod.z.enum([ +const ValueReasonSchema = v4.z.enum([ ValueReason.Context, ValueReason.Effect, ValueReason.Global, @@ -18759,7 +18759,7 @@ var Effect; Effect["Mutate"] = "mutate"; Effect["Store"] = "store"; })(Effect || (Effect = {})); -const EffectSchema = zod.z.enum([ +const EffectSchema = v4.z.enum([ Effect.Read, Effect.Mutate, Effect.ConditionallyMutate, @@ -31150,85 +31150,85 @@ function getReanimatedModuleType(registry) { return addObject(registry, null, reanimatedType); } -const ObjectPropertiesSchema = zod.z - .record(zod.z.string(), zod.z.lazy(() => TypeSchema)) +const ObjectPropertiesSchema = v4.z + .record(v4.z.string(), v4.z.lazy(() => TypeSchema)) .refine(record => { return Object.keys(record).every(key => key === '*' || key === 'default' || libExports$1.isValidIdentifier(key)); }, 'Expected all "object" property names to be valid identifier, `*` to match any property, of `default` to define a module default export'); -const ObjectTypeSchema = zod.z.object({ - kind: zod.z.literal('object'), +const ObjectTypeSchema = v4.z.object({ + kind: v4.z.literal('object'), properties: ObjectPropertiesSchema.nullable(), }); -const LifetimeIdSchema = zod.z.string().refine(id => id.startsWith('@'), { +const LifetimeIdSchema = v4.z.string().refine(id => id.startsWith('@'), { message: "Placeholder names must start with '@'", }); -const FreezeEffectSchema = zod.z.object({ - kind: zod.z.literal('Freeze'), +const FreezeEffectSchema = v4.z.object({ + kind: v4.z.literal('Freeze'), value: LifetimeIdSchema, reason: ValueReasonSchema, }); -const MutateEffectSchema = zod.z.object({ - kind: zod.z.literal('Mutate'), +const MutateEffectSchema = v4.z.object({ + kind: v4.z.literal('Mutate'), value: LifetimeIdSchema, }); -const MutateTransitiveConditionallySchema = zod.z.object({ - kind: zod.z.literal('MutateTransitiveConditionally'), +const MutateTransitiveConditionallySchema = v4.z.object({ + kind: v4.z.literal('MutateTransitiveConditionally'), value: LifetimeIdSchema, }); -const CreateEffectSchema = zod.z.object({ - kind: zod.z.literal('Create'), +const CreateEffectSchema = v4.z.object({ + kind: v4.z.literal('Create'), into: LifetimeIdSchema, value: ValueKindSchema, reason: ValueReasonSchema, }); -const AssignEffectSchema = zod.z.object({ - kind: zod.z.literal('Assign'), +const AssignEffectSchema = v4.z.object({ + kind: v4.z.literal('Assign'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const AliasEffectSchema = zod.z.object({ - kind: zod.z.literal('Alias'), +const AliasEffectSchema = v4.z.object({ + kind: v4.z.literal('Alias'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const ImmutableCaptureEffectSchema = zod.z.object({ - kind: zod.z.literal('ImmutableCapture'), +const ImmutableCaptureEffectSchema = v4.z.object({ + kind: v4.z.literal('ImmutableCapture'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const CaptureEffectSchema = zod.z.object({ - kind: zod.z.literal('Capture'), +const CaptureEffectSchema = v4.z.object({ + kind: v4.z.literal('Capture'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const CreateFromEffectSchema = zod.z.object({ - kind: zod.z.literal('CreateFrom'), +const CreateFromEffectSchema = v4.z.object({ + kind: v4.z.literal('CreateFrom'), from: LifetimeIdSchema, into: LifetimeIdSchema, }); -const ApplyArgSchema = zod.z.union([ +const ApplyArgSchema = v4.z.union([ LifetimeIdSchema, - zod.z.object({ - kind: zod.z.literal('Spread'), + v4.z.object({ + kind: v4.z.literal('Spread'), place: LifetimeIdSchema, }), - zod.z.object({ - kind: zod.z.literal('Hole'), + v4.z.object({ + kind: v4.z.literal('Hole'), }), ]); -const ApplyEffectSchema = zod.z.object({ - kind: zod.z.literal('Apply'), +const ApplyEffectSchema = v4.z.object({ + kind: v4.z.literal('Apply'), receiver: LifetimeIdSchema, function: LifetimeIdSchema, - mutatesFunction: zod.z.boolean(), - args: zod.z.array(ApplyArgSchema), + mutatesFunction: v4.z.boolean(), + args: v4.z.array(ApplyArgSchema), into: LifetimeIdSchema, }); -const ImpureEffectSchema = zod.z.object({ - kind: zod.z.literal('Impure'), +const ImpureEffectSchema = v4.z.object({ + kind: v4.z.literal('Impure'), place: LifetimeIdSchema, }); -const AliasingEffectSchema = zod.z.union([ +const AliasingEffectSchema = v4.z.union([ FreezeEffectSchema, CreateEffectSchema, CreateFromEffectSchema, @@ -31241,50 +31241,50 @@ const AliasingEffectSchema = zod.z.union([ MutateTransitiveConditionallySchema, ApplyEffectSchema, ]); -const AliasingSignatureSchema = zod.z.object({ +const AliasingSignatureSchema = v4.z.object({ receiver: LifetimeIdSchema, - params: zod.z.array(LifetimeIdSchema), + params: v4.z.array(LifetimeIdSchema), rest: LifetimeIdSchema.nullable(), returns: LifetimeIdSchema, - effects: zod.z.array(AliasingEffectSchema), - temporaries: zod.z.array(LifetimeIdSchema), + effects: v4.z.array(AliasingEffectSchema), + temporaries: v4.z.array(LifetimeIdSchema), }); -const FunctionTypeSchema = zod.z.object({ - kind: zod.z.literal('function'), - positionalParams: zod.z.array(EffectSchema), +const FunctionTypeSchema = v4.z.object({ + kind: v4.z.literal('function'), + positionalParams: v4.z.array(EffectSchema), restParam: EffectSchema.nullable(), calleeEffect: EffectSchema, - returnType: zod.z.lazy(() => TypeSchema), + returnType: v4.z.lazy(() => TypeSchema), returnValueKind: ValueKindSchema, - noAlias: zod.z.boolean().nullable().optional(), - mutableOnlyIfOperandsAreMutable: zod.z.boolean().nullable().optional(), - impure: zod.z.boolean().nullable().optional(), - canonicalName: zod.z.string().nullable().optional(), + noAlias: v4.z.boolean().nullable().optional(), + mutableOnlyIfOperandsAreMutable: v4.z.boolean().nullable().optional(), + impure: v4.z.boolean().nullable().optional(), + canonicalName: v4.z.string().nullable().optional(), aliasing: AliasingSignatureSchema.nullable().optional(), - knownIncompatible: zod.z.string().nullable().optional(), + knownIncompatible: v4.z.string().nullable().optional(), }); -const HookTypeSchema = zod.z.object({ - kind: zod.z.literal('hook'), - positionalParams: zod.z.array(EffectSchema).nullable().optional(), +const HookTypeSchema = v4.z.object({ + kind: v4.z.literal('hook'), + positionalParams: v4.z.array(EffectSchema).nullable().optional(), restParam: EffectSchema.nullable().optional(), - returnType: zod.z.lazy(() => TypeSchema), + returnType: v4.z.lazy(() => TypeSchema), returnValueKind: ValueKindSchema.nullable().optional(), - noAlias: zod.z.boolean().nullable().optional(), + noAlias: v4.z.boolean().nullable().optional(), aliasing: AliasingSignatureSchema.nullable().optional(), - knownIncompatible: zod.z.string().nullable().optional(), + knownIncompatible: v4.z.string().nullable().optional(), }); -const BuiltInTypeSchema = zod.z.union([ - zod.z.literal('Any'), - zod.z.literal('Ref'), - zod.z.literal('Array'), - zod.z.literal('Primitive'), - zod.z.literal('MixedReadonly'), +const BuiltInTypeSchema = v4.z.union([ + v4.z.literal('Any'), + v4.z.literal('Ref'), + v4.z.literal('Array'), + v4.z.literal('Primitive'), + v4.z.literal('MixedReadonly'), ]); -const TypeReferenceSchema = zod.z.object({ - kind: zod.z.literal('type'), +const TypeReferenceSchema = v4.z.object({ + kind: v4.z.literal('type'), name: BuiltInTypeSchema, }); -const TypeSchema = zod.z.union([ +const TypeSchema = v4.z.union([ ObjectTypeSchema, FunctionTypeSchema, HookTypeSchema, @@ -31880,96 +31880,96 @@ function defaultModuleTypeProvider(moduleName) { } var _Environment_instances, _Environment_globals, _Environment_shapes, _Environment_moduleTypes, _Environment_nextIdentifer, _Environment_nextBlock, _Environment_nextScope, _Environment_scope, _Environment_outlinedFunctions, _Environment_contextIdentifiers, _Environment_hoistedIdentifiers, _Environment_flowTypeEnvironment, _Environment_resolveModuleType, _Environment_isKnownReactModule, _Environment_getCustomHookType; -const ReactElementSymbolSchema = zod.z.object({ - elementSymbol: zod.z.union([ - zod.z.literal('react.element'), - zod.z.literal('react.transitional.element'), +const ReactElementSymbolSchema = v4.z.object({ + elementSymbol: v4.z.union([ + v4.z.literal('react.element'), + v4.z.literal('react.transitional.element'), ]), - globalDevVar: zod.z.string(), + globalDevVar: v4.z.string(), }); -const ExternalFunctionSchema = zod.z.object({ - source: zod.z.string(), - importSpecifierName: zod.z.string(), +const ExternalFunctionSchema = v4.z.object({ + source: v4.z.string(), + importSpecifierName: v4.z.string(), }); -const InstrumentationSchema = zod.z +const InstrumentationSchema = v4.z .object({ fn: ExternalFunctionSchema, gating: ExternalFunctionSchema.nullable(), - globalGating: zod.z.string().nullable(), + globalGating: v4.z.string().nullable(), }) .refine(opts => opts.gating != null || opts.globalGating != null, 'Expected at least one of gating or globalGating'); const USE_FIRE_FUNCTION_NAME = 'useFire'; const EMIT_FREEZE_GLOBAL_GATING = 'false'; -const MacroMethodSchema = zod.z.union([ - zod.z.object({ type: zod.z.literal('wildcard') }), - zod.z.object({ type: zod.z.literal('name'), name: zod.z.string() }), +const MacroMethodSchema = v4.z.union([ + v4.z.object({ type: v4.z.literal('wildcard') }), + v4.z.object({ type: v4.z.literal('name'), name: v4.z.string() }), ]); -const MacroSchema = zod.z.union([ - zod.z.string(), - zod.z.tuple([zod.z.string(), zod.z.array(MacroMethodSchema)]), +const MacroSchema = v4.z.union([ + v4.z.string(), + v4.z.tuple([v4.z.string(), v4.z.array(MacroMethodSchema)]), ]); -const HookSchema = zod.z.object({ - effectKind: zod.z.nativeEnum(Effect), - valueKind: zod.z.nativeEnum(ValueKind), - noAlias: zod.z.boolean().default(false), - transitiveMixedData: zod.z.boolean().default(false), +const HookSchema = v4.z.object({ + effectKind: v4.z.nativeEnum(Effect), + valueKind: v4.z.nativeEnum(ValueKind), + noAlias: v4.z.boolean().default(false), + transitiveMixedData: v4.z.boolean().default(false), }); -const EnvironmentConfigSchema = zod.z.object({ - customHooks: zod.z.map(zod.z.string(), HookSchema).default(new Map()), - moduleTypeProvider: zod.z.nullable(zod.z.any()).default(null), - customMacros: zod.z.nullable(zod.z.array(MacroSchema)).default(null), - enableResetCacheOnSourceFileChanges: zod.z.nullable(zod.z.boolean()).default(null), - enablePreserveExistingMemoizationGuarantees: zod.z.boolean().default(true), - validatePreserveExistingMemoizationGuarantees: zod.z.boolean().default(true), - enablePreserveExistingManualUseMemo: zod.z.boolean().default(false), - enableForest: zod.z.boolean().default(false), - enableUseTypeAnnotations: zod.z.boolean().default(false), - flowTypeProvider: zod.z.nullable(zod.z.any()).default(null), - enableOptionalDependencies: zod.z.boolean().default(true), - enableFire: zod.z.boolean().default(false), - enableNameAnonymousFunctions: zod.z.boolean().default(false), - inferEffectDependencies: zod.z - .nullable(zod.z.array(zod.z.object({ +const EnvironmentConfigSchema = v4.z.object({ + customHooks: v4.z.map(v4.z.string(), HookSchema).default(new Map()), + moduleTypeProvider: v4.z.nullable(v4.z.any()).default(null), + customMacros: v4.z.nullable(v4.z.array(MacroSchema)).default(null), + enableResetCacheOnSourceFileChanges: v4.z.nullable(v4.z.boolean()).default(null), + enablePreserveExistingMemoizationGuarantees: v4.z.boolean().default(true), + validatePreserveExistingMemoizationGuarantees: v4.z.boolean().default(true), + enablePreserveExistingManualUseMemo: v4.z.boolean().default(false), + enableForest: v4.z.boolean().default(false), + enableUseTypeAnnotations: v4.z.boolean().default(false), + flowTypeProvider: v4.z.nullable(v4.z.any()).default(null), + enableOptionalDependencies: v4.z.boolean().default(true), + enableFire: v4.z.boolean().default(false), + enableNameAnonymousFunctions: v4.z.boolean().default(false), + inferEffectDependencies: v4.z + .nullable(v4.z.array(v4.z.object({ function: ExternalFunctionSchema, - autodepsIndex: zod.z.number().min(1, 'autodepsIndex must be > 0'), + autodepsIndex: v4.z.number().min(1, 'autodepsIndex must be > 0'), }))) .default(null), inlineJsxTransform: ReactElementSymbolSchema.nullable().default(null), - validateHooksUsage: zod.z.boolean().default(true), - validateRefAccessDuringRender: zod.z.boolean().default(true), - validateNoSetStateInRender: zod.z.boolean().default(true), - validateNoSetStateInEffects: zod.z.boolean().default(false), - validateNoDerivedComputationsInEffects: zod.z.boolean().default(false), - validateNoJSXInTryStatements: zod.z.boolean().default(false), - validateStaticComponents: zod.z.boolean().default(false), - validateMemoizedEffectDependencies: zod.z.boolean().default(false), - validateNoCapitalizedCalls: zod.z.nullable(zod.z.array(zod.z.string())).default(null), - validateBlocklistedImports: zod.z.nullable(zod.z.array(zod.z.string())).default(null), - validateNoImpureFunctionsInRender: zod.z.boolean().default(false), - validateNoFreezingKnownMutableFunctions: zod.z.boolean().default(false), - enableAssumeHooksFollowRulesOfReact: zod.z.boolean().default(true), - enableTransitivelyFreezeFunctionExpressions: zod.z.boolean().default(true), + validateHooksUsage: v4.z.boolean().default(true), + validateRefAccessDuringRender: v4.z.boolean().default(true), + validateNoSetStateInRender: v4.z.boolean().default(true), + validateNoSetStateInEffects: v4.z.boolean().default(false), + validateNoDerivedComputationsInEffects: v4.z.boolean().default(false), + validateNoJSXInTryStatements: v4.z.boolean().default(false), + validateStaticComponents: v4.z.boolean().default(false), + validateMemoizedEffectDependencies: v4.z.boolean().default(false), + validateNoCapitalizedCalls: v4.z.nullable(v4.z.array(v4.z.string())).default(null), + validateBlocklistedImports: v4.z.nullable(v4.z.array(v4.z.string())).default(null), + validateNoImpureFunctionsInRender: v4.z.boolean().default(false), + validateNoFreezingKnownMutableFunctions: v4.z.boolean().default(false), + enableAssumeHooksFollowRulesOfReact: v4.z.boolean().default(true), + enableTransitivelyFreezeFunctionExpressions: v4.z.boolean().default(true), enableEmitFreeze: ExternalFunctionSchema.nullable().default(null), enableEmitHookGuards: ExternalFunctionSchema.nullable().default(null), - enableInstructionReordering: zod.z.boolean().default(false), - enableFunctionOutlining: zod.z.boolean().default(true), - enableJsxOutlining: zod.z.boolean().default(false), + enableInstructionReordering: v4.z.boolean().default(false), + enableFunctionOutlining: v4.z.boolean().default(true), + enableJsxOutlining: v4.z.boolean().default(false), enableEmitInstrumentForget: InstrumentationSchema.nullable().default(null), - assertValidMutableRanges: zod.z.boolean().default(false), - enableChangeVariableCodegen: zod.z.boolean().default(false), - enableMemoizationComments: zod.z.boolean().default(false), - throwUnknownException__testonly: zod.z.boolean().default(false), - enableTreatFunctionDepsAsConditional: zod.z.boolean().default(false), - disableMemoizationForDebugging: zod.z.boolean().default(false), + assertValidMutableRanges: v4.z.boolean().default(false), + enableChangeVariableCodegen: v4.z.boolean().default(false), + enableMemoizationComments: v4.z.boolean().default(false), + throwUnknownException__testonly: v4.z.boolean().default(false), + enableTreatFunctionDepsAsConditional: v4.z.boolean().default(false), + disableMemoizationForDebugging: v4.z.boolean().default(false), enableChangeDetectionForDebugging: ExternalFunctionSchema.nullable().default(null), - enableCustomTypeDefinitionForReanimated: zod.z.boolean().default(false), - hookPattern: zod.z.string().nullable().default(null), - enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(true), - enableTreatSetIdentifiersAsStateSetters: zod.z.boolean().default(false), + enableCustomTypeDefinitionForReanimated: v4.z.boolean().default(false), + hookPattern: v4.z.string().nullable().default(null), + enableTreatRefLikeIdentifiersAsRefs: v4.z.boolean().default(true), + enableTreatSetIdentifiersAsStateSetters: v4.z.boolean().default(false), lowerContextAccess: ExternalFunctionSchema.nullable().default(null), - validateNoVoidUseMemo: zod.z.boolean().default(false), - validateNoDynamicallyCreatedComponentsOrHooks: zod.z.boolean().default(false), - enableAllowSetStateFromRefsInEffects: zod.z.boolean().default(true), + validateNoVoidUseMemo: v4.z.boolean().default(false), + validateNoDynamicallyCreatedComponentsOrHooks: v4.z.boolean().default(false), + enableAllowSetStateFromRefsInEffects: v4.z.boolean().default(true), }); class Environment { constructor(scope, fnType, compilerMode, config, contextIdentifiers, parentFunction, logger, filename, code, programContext) { @@ -32346,7 +32346,7 @@ function validateEnvironmentConfig(partialConfig) { } CompilerError.throwInvalidConfig({ reason: 'Could not validate environment config. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(config.error)}`, + description: `${v4$1.fromZodError(config.error)}`, loc: null, suggestions: null, }); @@ -32358,7 +32358,7 @@ function tryParseExternalFunction(maybeExternalFunction) { } CompilerError.throwInvalidConfig({ reason: 'Could not parse external function. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(externalFunction.error)}`, + description: `${v4$1.fromZodError(externalFunction.error)}`, loc: null, suggestions: null, }); @@ -53528,27 +53528,27 @@ function isNonNamespacedImport(importDeclPath) { importDeclPath.node.importKind !== 'typeof'); } -zod.z.enum([ +v4.z.enum([ 'all_errors', 'critical_errors', 'none', ]); -const DynamicGatingOptionsSchema = zod.z.object({ - source: zod.z.string(), +const DynamicGatingOptionsSchema = v4.z.object({ + source: v4.z.string(), }); -const CustomOptOutDirectiveSchema = zod.z - .nullable(zod.z.array(zod.z.string())) +const CustomOptOutDirectiveSchema = v4.z + .nullable(v4.z.array(v4.z.string())) .default(null); -const CompilerReactTargetSchema = zod.z.union([ - zod.z.literal('17'), - zod.z.literal('18'), - zod.z.literal('19'), - zod.z.object({ - kind: zod.z.literal('donotuse_meta_internal'), - runtimeModule: zod.z.string().default('react'), +const CompilerReactTargetSchema = v4.z.union([ + v4.z.literal('17'), + v4.z.literal('18'), + v4.z.literal('19'), + v4.z.object({ + kind: v4.z.literal('donotuse_meta_internal'), + runtimeModule: v4.z.string().default('react'), }), ]); -zod.z.enum([ +v4.z.enum([ 'infer', 'syntax', 'annotation', @@ -53621,7 +53621,7 @@ function parsePluginOptions(obj) { else { CompilerError.throwInvalidConfig({ reason: 'Could not parse dynamic gating. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(result.error)}`, + description: `${v4$1.fromZodError(result.error)}`, loc: null, suggestions: null, }); @@ -53637,7 +53637,7 @@ function parsePluginOptions(obj) { else { CompilerError.throwInvalidConfig({ reason: 'Could not parse custom opt out directives. Update React Compiler config to fix the error', - description: `${zodValidationError.fromZodError(result.error)}`, + description: `${v4$1.fromZodError(result.error)}`, loc: null, suggestions: null, }); @@ -53660,7 +53660,7 @@ function parseTargetConfig(value) { else { CompilerError.throwInvalidConfig({ reason: 'Not a valid target', - description: `${zodValidationError.fromZodError(parsed.error)}`, + description: `${v4$1.fromZodError(parsed.error)}`, suggestions: null, loc: null, }); diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json index 70346e1842..633bb9cb3f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json @@ -1,7 +1,7 @@ { "name": "eslint-plugin-react-hooks", "description": "ESLint rules for React Hooks", - "version": "0.0.0-experimental-d8aa94b0-20251016", + "version": "0.0.0-experimental-ed1351c4-20251016", "repository": { "type": "git", "url": "https://github.com/facebook/react.git", @@ -42,8 +42,8 @@ "@babel/core": "^7.24.4", "@babel/parser": "^7.24.4", "hermes-parser": "^0.25.1", - "zod": "^3.22.4 || ^4.0.0", - "zod-validation-error": "^3.0.3 || ^4.0.0" + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" }, "devDependencies": { "@babel/eslint-parser": "^7.11.4",