vxrn 2.0.0-beta.45.1 → 2.0.0-beta.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,10 @@ async function scanDepsToOptimize(packageJsonPath, options = rootOptions) {
99
99
  if (depPkgJson.dependencies?.["react-native-reanimated"]) {
100
100
  hasReanimated = true;
101
101
  }
102
+ if (depPkgJson.codegenConfig != null) {
103
+ debug?.(`${dep} skipped: declares codegenConfig (native codegen package)`);
104
+ return [];
105
+ }
102
106
  const subDeps = await scanDepsToOptimize(depPkgJsonPath, {
103
107
  parentDepNames: [...parentDepNames, dep],
104
108
  pkgJsonContent: depPkgJson,
@@ -1 +1 @@
1
- {"version":3,"file":"scanDepsToOptimize.js","names":[],"sources":["utils/scanDepsToOptimize.js"],"sourcesContent":["import { createDebugger } from \"@vxrn/debug\";\nimport FSExtra from \"fs-extra\";\nimport path, { dirname, extname, join, sep } from \"node:path\";\nconst { debug, debugDetails } = createDebugger(`vxrn:scanDepsToOptimize`);\nconst EXCLUDE_LIST = [\n \"jsc-android\",\n \"react-shallow-renderer\",\n \"fsevents\",\n \"@swc/core\",\n \"@swc/core-darwin-arm64\",\n \"@swc/core-darwin-x64\",\n \"@swc/core-linux-arm-gnueabihf\",\n \"@swc/core-linux-arm64-gnu\",\n \"@swc/core-linux-arm64-musl\",\n \"@swc/core-linux-x64-gnu\",\n \"@swc/core-linux-x64-musl\",\n \"@swc/core-win32-arm64-msvc\",\n \"@swc/core-win32-ia32-msvc\",\n \"@swc/core-win32-x64-msvc\",\n \"lightningcss\",\n // this breaks fileToUrlPath in upstreams, like @discordjs/client\n \"url\",\n \"sharp\",\n \"@sentry/react-native\",\n // not ever to be used in app\n \"@expo/cli\",\n \"expo-structured-headers\",\n // not used by web anyway\n // Could not read from file: /Users/n8/one/node_modules/react-native-web/dist/cjs/index.js/Libraries/Image/AssetRegistry\n // /lib/module/Platform/Platform.web.js:132:20\n \"@shopify/react-native-skia\",\n \"@react-native/virtualized-lists\",\n // Unexpected \"typeof\" in `node_modules/@react-native/virtualized-lists/index.js`\n // Native only, we don't expect SSR to use these packages.\n // Also, some of these packages might attempt to import from react-native internals, which will break in SSR while react-native is aliased to react-native-web.\n \"@vxrn/vite-native-hmr\",\n \"@vxrn/compiler\",\n \"@vxrn/vite-native-client\",\n // build-time only, and they load native .node addons the ssr dep optimizer\n // cannot parse. apps list vxrn as a dependency because it is their dev\n // server, which is exactly why it must never be pre-bundled for ssr.\n \"vxrn\",\n \"@vxrn/vite-plugin-metro\",\n \"oxc-transform\",\n \"oxc-parser\",\n \"react-native-ios-utilities\",\n \"react-native-ios-modal\",\n \"react-native-ios-context-menu\",\n \"react-native-haptic-feedback\",\n \"react-native-sortables\",\n \"react-native-image-colors\",\n \"react-native-fast-image\",\n \"react-native-fast-squircle\",\n \"react-native-device-info\",\n // dev server UI only, lazy-imported at runtime\n \"qrcode-terminal\",\n // CLI/scripts shouldn't be used in SSR runtime\n \"@tamagui/cli\",\n // only used by static/plugin\n \"@tamagui/static\",\n \"@tamagui/config-default\",\n \"@tamagui/vite-plugin\",\n \"@take-out/scripts\",\n \"@take-out/cli\",\n // Should be used on native only\n \"@tamagui/core/native-test\",\n \"@storybook/react\",\n // native-only or not needed in SSR\n \"@nandorojo/galeria\",\n \"expo-video\",\n \"react-native-pager-view\",\n \"@react-native/debugger-shell\",\n \"@hot-updater/react-native\",\n \"@hot-updater/plugin-core\",\n \"expo/internal/unstable-autolinking-exports\",\n \"validator\",\n \"zlib\"\n];\nconst EXCLUDE_LIST_SET = new Set(EXCLUDE_LIST);\nconst INCLUDE_LIST = [\n // ReferenceError: exports is not defined - at eval (.../node_modules/inline-style-prefixer/lib/createPrefixer.js:3:23)\n \"inline-style-prefixer\",\n \"react-native-vector-icons\",\n \"jotai\"\n];\nconst INCLUDE_LIST_SET = new Set(INCLUDE_LIST);\nconst rootOptions = {};\nasync function scanDepsToOptimize(packageJsonPath, options = rootOptions) {\n const { parentDepNames = [], proceededDeps = /* @__PURE__ */ new Map(), pkgJsonContent } = options;\n if (options === rootOptions) {\n console.info(`[one] Scanning node_modules to auto-optimize...`);\n }\n const currentRoot = path.dirname(packageJsonPath);\n const pkgJson = pkgJsonContent || await readPackageJsonSafe(packageJsonPath);\n const deps = Object.keys(pkgJson.dependencies || {});\n let hasReanimated = !!pkgJson.dependencies?.[\"react-native-reanimated\"];\n const prebundleDeps = (await Promise.all(\n deps.map(async (dep) => {\n if (parentDepNames.includes(dep)) {\n return [];\n }\n const cachedResult = proceededDeps.get(dep);\n if (cachedResult) {\n return cachedResult;\n }\n if (EXCLUDE_LIST_SET.has(dep)) {\n return [];\n }\n const localPath = await findDepPkgJsonPath(dep, currentRoot);\n if (!localPath) return [];\n const depPkgJsonPath = await FSExtra.realpath(localPath);\n if (options.filter && !options.filter(depPkgJsonPath)) {\n return [];\n }\n const depPkgJson = await readPackageJsonSafe(depPkgJsonPath);\n if (depPkgJson.dependencies?.[\"react-native-reanimated\"]) {\n hasReanimated = true;\n }\n const subDeps = await scanDepsToOptimize(depPkgJsonPath, {\n parentDepNames: [...parentDepNames, dep],\n pkgJsonContent: depPkgJson,\n proceededDeps\n });\n if (subDeps.hasReanimated) {\n hasReanimated = true;\n }\n const shouldPreBundle = subDeps.prebundleDeps.length > 0 || INCLUDE_LIST_SET.has(\n dep\n ) || hasRequiredDep(depPkgJson, \"react\") || // an optional react peer still means the package ships react\n // entrypoints (e.g. better-auth/react). left external, those load a\n // second react copy in SSR and crash hooks with a null dispatcher.\n !!depPkgJson.peerDependencies?.react || hasRequiredDep(depPkgJson, \"react-native\") || hasRequiredDep(depPkgJson, \"expo-modules-core\") || // Expo deps are often ESM but without including file extensions in import paths, making it not able to run directly by Node.js, so we need to pre-bundle them.\n dep.startsWith(\"@expo/\") || dep.startsWith(\"expo-\");\n debug?.(`${dep} shouldPreBundle? ${shouldPreBundle}`);\n const depsToPreBundle = await (async () => {\n if (!shouldPreBundle) {\n return [];\n }\n const depPkgJsonExports = depPkgJson.exports || {};\n const definedExports = Object.keys(depPkgJsonExports).filter((k) => {\n const expData = depPkgJsonExports[k];\n const imp = typeof expData === \"string\" ? expData : expData?.import;\n if (typeof imp !== \"string\") {\n return false;\n }\n if (!imp.endsWith(\".js\")) {\n return false;\n }\n if (!k.match(/^(\\.\\/)?[a-zA-Z0-9-_]+$/)) {\n return false;\n }\n return true;\n }).map((k) => k.replace(/^\\.\\/?/, \"\")).map((k) => `${dep}/${k}`);\n const specialExports = (() => {\n switch (dep) {\n case \"react-native-vector-icons\":\n return [\n \"AntDesign\",\n \"Entypo\",\n \"EvilIcons\",\n \"Feather\",\n \"FontAwesome\",\n \"FontAwesome5\",\n \"FontAwesome5Pro\",\n \"Fontisto\",\n \"Foundation\",\n \"Ionicons\",\n \"MaterialCommunityIcons\",\n \"MaterialIcons\",\n \"Octicons\",\n \"SimpleLineIcons\",\n \"Zocial\"\n ].map((n) => `${dep}/${n}`);\n default:\n return [];\n }\n })();\n const mainExport = depPkgJson[\"main\"] || depPkgJson[\"module\"] || definedExports[\".\"];\n const exports = [...definedExports, ...specialExports].filter(\n (d) => !EXCLUDE_LIST_SET.has(d)\n );\n if (mainExport) {\n if (await checkIfExportExists(join(dirname(depPkgJsonPath), mainExport))) {\n exports.unshift(dep);\n }\n }\n return exports;\n })();\n const result = [...depsToPreBundle, ...subDeps.prebundleDeps];\n debugDetails?.(`final result ${JSON.stringify(result, null, 2)}`);\n proceededDeps.set(dep, result);\n return result;\n })\n )).flat().filter((dep, index, arr) => arr.indexOf(dep) === index);\n const hasNativewind = !!pkgJson.dependencies?.[\"nativewind\"];\n if ((hasNativewind || hasReanimated) && options === rootOptions) {\n if (hasReanimated)\n console.info(\n `[one] Enabled babel plugins: ${[hasReanimated ? \"Reanimated\" : \"\", hasNativewind ? \"Nativewind\" : \"\"].filter(Boolean).join(\", \")}`\n );\n }\n return {\n prebundleDeps,\n hasReanimated,\n // only check if set in root, dont want to enable css mode too easily\n hasNativewind\n };\n}\nasync function checkIfExportExists(pathIn) {\n const paths = [\n pathIn,\n ...extname(pathIn) ? [] : [pathIn + \".js\", pathIn + sep + \"index.js\"]\n ];\n for (const path2 of paths) {\n if (await FSExtra.pathExists(path2)) {\n return true;\n }\n }\n return false;\n}\nasync function readPackageJsonSafe(packageJsonPath) {\n try {\n return await FSExtra.readJson(packageJsonPath);\n } catch (e) {\n console.error(\n `[scanDepsToPreBundleForSsr] Error reading package.json from ${packageJsonPath}: ${e}`\n );\n return {};\n }\n}\nasync function findDepPkgJsonPath(dep, dependent) {\n let root = dependent;\n while (root) {\n const possiblePkgJson = path.join(root, \"node_modules\", dep, \"package.json\");\n if (await FSExtra.pathExists(possiblePkgJson)) {\n return possiblePkgJson;\n }\n const nextRoot = path.dirname(root);\n if (nextRoot === root) break;\n root = nextRoot;\n }\n console.error(\n `[findDepPkgJsonPath] Could not find package.json for ${dep}, which is a dependency of ${dependent}`\n );\n return void 0;\n}\nfunction hasRequiredDep(pkgJson, depName) {\n return !!(pkgJson.dependencies?.[depName] || pkgJson.peerDependencies?.[depName] && !pkgJson.peerDependenciesMeta?.[depName]?.optional);\n}\nexport {\n EXCLUDE_LIST,\n EXCLUDE_LIST_SET,\n INCLUDE_LIST,\n INCLUDE_LIST_SET,\n findDepPkgJsonPath,\n scanDepsToOptimize\n};\n//# sourceMappingURL=scanDepsToOptimize.js.map\n"],"mappings":";;;;;AAGA,MAAM,EAAE,OAAO,iBAAiB,eAAe,yBAAyB;AACxE,MAAM,eAAe;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CAIA;CACA;CAIA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,mBAAm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M,WAAW,KAAK,QAAQ,IAAI;EAClC,IAAI,aAAa,MAAM;EACvB,OAAO;CACT;CACA,QAAQ,MACN,wDAAwD,IAAI,6BAA6B,WAC3F;CACA,OAAO,KAAK;AACd;AACA,SAAS,eAAe,SAAS,SAAS;CACxC,OAAO,CAAC,EAAE,QAAQ,eAAe,YAAY,QAAQ,mBAAmB,YAAY,CAAC,QAAQ,uBAAuB,QAAQ,EAAE;AAChI"}
1
+ {"version":3,"file":"scanDepsToOptimize.js","names":[],"sources":["utils/scanDepsToOptimize.js"],"sourcesContent":["import { createDebugger } from \"@vxrn/debug\";\nimport FSExtra from \"fs-extra\";\nimport path, { dirname, extname, join, sep } from \"node:path\";\nconst { debug, debugDetails } = createDebugger(`vxrn:scanDepsToOptimize`);\nconst EXCLUDE_LIST = [\n \"jsc-android\",\n \"react-shallow-renderer\",\n \"fsevents\",\n \"@swc/core\",\n \"@swc/core-darwin-arm64\",\n \"@swc/core-darwin-x64\",\n \"@swc/core-linux-arm-gnueabihf\",\n \"@swc/core-linux-arm64-gnu\",\n \"@swc/core-linux-arm64-musl\",\n \"@swc/core-linux-x64-gnu\",\n \"@swc/core-linux-x64-musl\",\n \"@swc/core-win32-arm64-msvc\",\n \"@swc/core-win32-ia32-msvc\",\n \"@swc/core-win32-x64-msvc\",\n \"lightningcss\",\n // this breaks fileToUrlPath in upstreams, like @discordjs/client\n \"url\",\n \"sharp\",\n \"@sentry/react-native\",\n // not ever to be used in app\n \"@expo/cli\",\n \"expo-structured-headers\",\n // not used by web anyway\n // Could not read from file: /Users/n8/one/node_modules/react-native-web/dist/cjs/index.js/Libraries/Image/AssetRegistry\n // /lib/module/Platform/Platform.web.js:132:20\n \"@shopify/react-native-skia\",\n \"@react-native/virtualized-lists\",\n // Unexpected \"typeof\" in `node_modules/@react-native/virtualized-lists/index.js`\n // Native only, we don't expect SSR to use these packages.\n // Also, some of these packages might attempt to import from react-native internals, which will break in SSR while react-native is aliased to react-native-web.\n \"@vxrn/vite-native-hmr\",\n \"@vxrn/compiler\",\n \"@vxrn/vite-native-client\",\n // build-time only, and they load native .node addons the ssr dep optimizer\n // cannot parse. apps list vxrn as a dependency because it is their dev\n // server, which is exactly why it must never be pre-bundled for ssr.\n \"vxrn\",\n \"@vxrn/vite-plugin-metro\",\n \"oxc-transform\",\n \"oxc-parser\",\n \"react-native-ios-utilities\",\n \"react-native-ios-modal\",\n \"react-native-ios-context-menu\",\n \"react-native-haptic-feedback\",\n \"react-native-sortables\",\n \"react-native-image-colors\",\n \"react-native-fast-image\",\n \"react-native-fast-squircle\",\n \"react-native-device-info\",\n // dev server UI only, lazy-imported at runtime\n \"qrcode-terminal\",\n // CLI/scripts shouldn't be used in SSR runtime\n \"@tamagui/cli\",\n // only used by static/plugin\n \"@tamagui/static\",\n \"@tamagui/config-default\",\n \"@tamagui/vite-plugin\",\n \"@take-out/scripts\",\n \"@take-out/cli\",\n // Should be used on native only\n \"@tamagui/core/native-test\",\n \"@storybook/react\",\n // native-only or not needed in SSR\n \"@nandorojo/galeria\",\n \"expo-video\",\n \"react-native-pager-view\",\n \"@react-native/debugger-shell\",\n \"@hot-updater/react-native\",\n \"@hot-updater/plugin-core\",\n \"expo/internal/unstable-autolinking-exports\",\n \"validator\",\n \"zlib\"\n];\nconst EXCLUDE_LIST_SET = new Set(EXCLUDE_LIST);\nconst INCLUDE_LIST = [\n // ReferenceError: exports is not defined - at eval (.../node_modules/inline-style-prefixer/lib/createPrefixer.js:3:23)\n \"inline-style-prefixer\",\n \"react-native-vector-icons\",\n \"jotai\"\n];\nconst INCLUDE_LIST_SET = new Set(INCLUDE_LIST);\nconst rootOptions = {};\nasync function scanDepsToOptimize(packageJsonPath, options = rootOptions) {\n const { parentDepNames = [], proceededDeps = /* @__PURE__ */ new Map(), pkgJsonContent } = options;\n if (options === rootOptions) {\n console.info(`[one] Scanning node_modules to auto-optimize...`);\n }\n const currentRoot = path.dirname(packageJsonPath);\n const pkgJson = pkgJsonContent || await readPackageJsonSafe(packageJsonPath);\n const deps = Object.keys(pkgJson.dependencies || {});\n let hasReanimated = !!pkgJson.dependencies?.[\"react-native-reanimated\"];\n const prebundleDeps = (await Promise.all(\n deps.map(async (dep) => {\n if (parentDepNames.includes(dep)) {\n return [];\n }\n const cachedResult = proceededDeps.get(dep);\n if (cachedResult) {\n return cachedResult;\n }\n if (EXCLUDE_LIST_SET.has(dep)) {\n return [];\n }\n const localPath = await findDepPkgJsonPath(dep, currentRoot);\n if (!localPath) return [];\n const depPkgJsonPath = await FSExtra.realpath(localPath);\n if (options.filter && !options.filter(depPkgJsonPath)) {\n return [];\n }\n const depPkgJson = await readPackageJsonSafe(depPkgJsonPath);\n if (depPkgJson.dependencies?.[\"react-native-reanimated\"]) {\n hasReanimated = true;\n }\n if (depPkgJson.codegenConfig != null) {\n debug?.(`${dep} skipped: declares codegenConfig (native codegen package)`);\n return [];\n }\n const subDeps = await scanDepsToOptimize(depPkgJsonPath, {\n parentDepNames: [...parentDepNames, dep],\n pkgJsonContent: depPkgJson,\n proceededDeps\n });\n if (subDeps.hasReanimated) {\n hasReanimated = true;\n }\n const shouldPreBundle = subDeps.prebundleDeps.length > 0 || INCLUDE_LIST_SET.has(\n dep\n ) || hasRequiredDep(depPkgJson, \"react\") || // an optional react peer still means the package ships react\n // entrypoints (e.g. better-auth/react). left external, those load a\n // second react copy in SSR and crash hooks with a null dispatcher.\n !!depPkgJson.peerDependencies?.react || hasRequiredDep(depPkgJson, \"react-native\") || hasRequiredDep(depPkgJson, \"expo-modules-core\") || // Expo deps are often ESM but without including file extensions in import paths, making it not able to run directly by Node.js, so we need to pre-bundle them.\n dep.startsWith(\"@expo/\") || dep.startsWith(\"expo-\");\n debug?.(`${dep} shouldPreBundle? ${shouldPreBundle}`);\n const depsToPreBundle = await (async () => {\n if (!shouldPreBundle) {\n return [];\n }\n const depPkgJsonExports = depPkgJson.exports || {};\n const definedExports = Object.keys(depPkgJsonExports).filter((k) => {\n const expData = depPkgJsonExports[k];\n const imp = typeof expData === \"string\" ? expData : expData?.import;\n if (typeof imp !== \"string\") {\n return false;\n }\n if (!imp.endsWith(\".js\")) {\n return false;\n }\n if (!k.match(/^(\\.\\/)?[a-zA-Z0-9-_]+$/)) {\n return false;\n }\n return true;\n }).map((k) => k.replace(/^\\.\\/?/, \"\")).map((k) => `${dep}/${k}`);\n const specialExports = (() => {\n switch (dep) {\n case \"react-native-vector-icons\":\n return [\n \"AntDesign\",\n \"Entypo\",\n \"EvilIcons\",\n \"Feather\",\n \"FontAwesome\",\n \"FontAwesome5\",\n \"FontAwesome5Pro\",\n \"Fontisto\",\n \"Foundation\",\n \"Ionicons\",\n \"MaterialCommunityIcons\",\n \"MaterialIcons\",\n \"Octicons\",\n \"SimpleLineIcons\",\n \"Zocial\"\n ].map((n) => `${dep}/${n}`);\n default:\n return [];\n }\n })();\n const mainExport = depPkgJson[\"main\"] || depPkgJson[\"module\"] || definedExports[\".\"];\n const exports = [...definedExports, ...specialExports].filter(\n (d) => !EXCLUDE_LIST_SET.has(d)\n );\n if (mainExport) {\n if (await checkIfExportExists(join(dirname(depPkgJsonPath), mainExport))) {\n exports.unshift(dep);\n }\n }\n return exports;\n })();\n const result = [...depsToPreBundle, ...subDeps.prebundleDeps];\n debugDetails?.(`final result ${JSON.stringify(result, null, 2)}`);\n proceededDeps.set(dep, result);\n return result;\n })\n )).flat().filter((dep, index, arr) => arr.indexOf(dep) === index);\n const hasNativewind = !!pkgJson.dependencies?.[\"nativewind\"];\n if ((hasNativewind || hasReanimated) && options === rootOptions) {\n if (hasReanimated)\n console.info(\n `[one] Enabled babel plugins: ${[hasReanimated ? \"Reanimated\" : \"\", hasNativewind ? \"Nativewind\" : \"\"].filter(Boolean).join(\", \")}`\n );\n }\n return {\n prebundleDeps,\n hasReanimated,\n // only check if set in root, dont want to enable css mode too easily\n hasNativewind\n };\n}\nasync function checkIfExportExists(pathIn) {\n const paths = [\n pathIn,\n ...extname(pathIn) ? [] : [pathIn + \".js\", pathIn + sep + \"index.js\"]\n ];\n for (const path2 of paths) {\n if (await FSExtra.pathExists(path2)) {\n return true;\n }\n }\n return false;\n}\nasync function readPackageJsonSafe(packageJsonPath) {\n try {\n return await FSExtra.readJson(packageJsonPath);\n } catch (e) {\n console.error(\n `[scanDepsToPreBundleForSsr] Error reading package.json from ${packageJsonPath}: ${e}`\n );\n return {};\n }\n}\nasync function findDepPkgJsonPath(dep, dependent) {\n let root = dependent;\n while (root) {\n const possiblePkgJson = path.join(root, \"node_modules\", dep, \"package.json\");\n if (await FSExtra.pathExists(possiblePkgJson)) {\n return possiblePkgJson;\n }\n const nextRoot = path.dirname(root);\n if (nextRoot === root) break;\n root = nextRoot;\n }\n console.error(\n `[findDepPkgJsonPath] Could not find package.json for ${dep}, which is a dependency of ${dependent}`\n );\n return void 0;\n}\nfunction hasRequiredDep(pkgJson, depName) {\n return !!(pkgJson.dependencies?.[depName] || pkgJson.peerDependencies?.[depName] && !pkgJson.peerDependenciesMeta?.[depName]?.optional);\n}\nexport {\n EXCLUDE_LIST,\n EXCLUDE_LIST_SET,\n INCLUDE_LIST,\n INCLUDE_LIST_SET,\n findDepPkgJsonPath,\n scanDepsToOptimize\n};\n//# sourceMappingURL=scanDepsToOptimize.js.map\n"],"mappings":";;;;;AAGA,MAAM,EAAE,OAAO,iBAAiB,eAAe,yBAAyB;AACxE,MAAM,eAAe;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CAIA;CACA;CAIA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,mBAAmB,IAAI,IAAI,YAAY;AAC7C,MAAM,eAAe;CAEnB;CACA;CACA;AACF;AACA,MAAM,mBAAmB,IAAI,IAAI,YAAY;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AK,QAAQ,IAAI;EAClC,IAAI,aAAa,MAAM;EACvB,OAAO;CACT;CACA,QAAQ,MACN,wDAAwD,IAAI,6BAA6B,WAC3F;CACA,OAAO,KAAK;AACd;AACA,SAAS,eAAe,SAAS,SAAS;CACxC,OAAO,CAAC,EAAE,QAAQ,eAAe,YAAY,QAAQ,mBAAmB,YAAY,CAAC,QAAQ,uBAAuB,QAAQ,EAAE;AAChI"}
@@ -104,6 +104,10 @@ async function scanDepsToOptimize(packageJsonPath) {
104
104
  if ((_depPkgJson_dependencies = depPkgJson.dependencies) === null || _depPkgJson_dependencies === void 0 ? void 0 : _depPkgJson_dependencies["react-native-reanimated"]) {
105
105
  hasReanimated = true;
106
106
  }
107
+ if (depPkgJson.codegenConfig != null) {
108
+ debug === null || debug === void 0 ? void 0 : debug(`${dep} skipped: declares codegenConfig (native codegen package)`);
109
+ return [];
110
+ }
107
111
  var subDeps = await scanDepsToOptimize(depPkgJsonPath, {
108
112
  parentDepNames: [...parentDepNames, dep],
109
113
  pkgJsonContent: depPkgJson,
@@ -1 +1 @@
1
- {"version":3,"file":"scanDepsToOptimize.native.js","names":[],"sources":["utils/scanDepsToOptimize.native.js"],"sourcesContent":["import { createDebugger } from \"@vxrn/debug\";\nimport FSExtra from \"fs-extra\";\nimport path, { dirname, extname, join, sep } from \"path\";\nvar { debug, debugDetails } = createDebugger(`vxrn:scanDepsToOptimize`);\nvar EXCLUDE_LIST = [\n \"jsc-android\",\n \"react-shallow-renderer\",\n \"fsevents\",\n \"@swc/core\",\n \"@swc/core-darwin-arm64\",\n \"@swc/core-darwin-x64\",\n \"@swc/core-linux-arm-gnueabihf\",\n \"@swc/core-linux-arm64-gnu\",\n \"@swc/core-linux-arm64-musl\",\n \"@swc/core-linux-x64-gnu\",\n \"@swc/core-linux-x64-musl\",\n \"@swc/core-win32-arm64-msvc\",\n \"@swc/core-win32-ia32-msvc\",\n \"@swc/core-win32-x64-msvc\",\n \"lightningcss\",\n // this breaks fileToUrlPath in upstreams, like @discordjs/client\n \"url\",\n \"sharp\",\n \"@sentry/react-native\",\n // not ever to be used in app\n \"@expo/cli\",\n \"expo-structured-headers\",\n // not used by web anyway\n // Could not read from file: /Users/n8/one/node_modules/react-native-web/dist/cjs/index.js/Libraries/Image/AssetRegistry\n // /lib/module/Platform/Platform.web.js:132:20\n \"@shopify/react-native-skia\",\n \"@react-native/virtualized-lists\",\n // Unexpected \"typeof\" in `node_modules/@react-native/virtualized-lists/index.js`\n // Native only, we don't expect SSR to use these packages.\n // Also, some of these packages might attempt to import from react-native internals, which will break in SSR while react-native is aliased to react-native-web.\n \"@vxrn/vite-native-hmr\",\n \"@vxrn/compiler\",\n \"@vxrn/vite-native-client\",\n // build-time only, and they load native .node addons the ssr dep optimizer\n // cannot parse. apps list vxrn as a dependency because it is their dev\n // server, which is exactly why it must never be pre-bundled for ssr.\n \"vxrn\",\n \"@vxrn/vite-plugin-metro\",\n \"oxc-transform\",\n \"oxc-parser\",\n \"react-native-ios-utilities\",\n \"react-native-ios-modal\",\n \"react-native-ios-context-menu\",\n \"react-native-haptic-feedback\",\n \"react-native-sortables\",\n \"react-native-image-colors\",\n \"react-native-fast-image\",\n \"react-native-fast-squircle\",\n \"react-native-device-info\",\n // dev server UI only, lazy-imported at runtime\n \"qrcode-terminal\",\n // CLI/scripts shouldn't be used in SSR runtime\n \"@tamagui/cli\",\n // only used by static/plugin\n \"@tamagui/static\",\n \"@tamagui/config-default\",\n \"@tamagui/vite-plugin\",\n \"@take-out/scripts\",\n \"@take-out/cli\",\n // Should be used on native only\n \"@tamagui/core/native-test\",\n \"@storybook/react\",\n // native-only or not needed in SSR\n \"@nandorojo/galeria\",\n \"expo-video\",\n \"react-native-pager-view\",\n \"@react-native/debugger-shell\",\n \"@hot-updater/react-native\",\n \"@hot-updater/plugin-core\",\n \"expo/internal/unstable-autolinking-exports\",\n \"validator\",\n \"zlib\"\n];\nvar EXCLUDE_LIST_SET = new Set(EXCLUDE_LIST);\nvar INCLUDE_LIST = [\n // ReferenceError: exports is not defined - at eval (.../node_modules/inline-style-prefixer/lib/createPrefixer.js:3:23)\n \"inline-style-prefixer\",\n \"react-native-vector-icons\",\n \"jotai\"\n];\nvar INCLUDE_LIST_SET = new Set(INCLUDE_LIST);\nvar rootOptions = {};\nasync function scanDepsToOptimize(packageJsonPath) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (\n /** If the content of the package.json is already read before calling this function, pass it here to avoid reading it again */\n rootOptions\n );\n var _pkgJson_dependencies, _pkgJson_dependencies1;\n var { parentDepNames = [], proceededDeps = /* @__PURE__ */ new Map(), pkgJsonContent } = options;\n if (options === rootOptions) {\n console.info(`[one] Scanning node_modules to auto-optimize...`);\n }\n var currentRoot = path.dirname(packageJsonPath);\n var pkgJson = pkgJsonContent || await readPackageJsonSafe(packageJsonPath);\n var deps = Object.keys(pkgJson.dependencies || {});\n var hasReanimated = !!((_pkgJson_dependencies = pkgJson.dependencies) === null || _pkgJson_dependencies === void 0 ? void 0 : _pkgJson_dependencies[\"react-native-reanimated\"]);\n var prebundleDeps = (await Promise.all(deps.map(async function(dep) {\n var _depPkgJson_dependencies, _depPkgJson_peerDependencies;\n if (parentDepNames.includes(dep)) {\n return [];\n }\n var cachedResult = proceededDeps.get(dep);\n if (cachedResult) {\n return cachedResult;\n }\n if (EXCLUDE_LIST_SET.has(dep)) {\n return [];\n }\n var localPath = await findDepPkgJsonPath(dep, currentRoot);\n if (!localPath) return [];\n var depPkgJsonPath = await FSExtra.realpath(localPath);\n if (options.filter && !options.filter(depPkgJsonPath)) {\n return [];\n }\n var depPkgJson = await readPackageJsonSafe(depPkgJsonPath);\n if ((_depPkgJson_dependencies = depPkgJson.dependencies) === null || _depPkgJson_dependencies === void 0 ? void 0 : _depPkgJson_dependencies[\"react-native-reanimated\"]) {\n hasReanimated = true;\n }\n var subDeps = await scanDepsToOptimize(depPkgJsonPath, {\n parentDepNames: [\n ...parentDepNames,\n dep\n ],\n pkgJsonContent: depPkgJson,\n proceededDeps\n });\n if (subDeps.hasReanimated) {\n hasReanimated = true;\n }\n var shouldPreBundle = subDeps.prebundleDeps.length > 0 || /* If this dep is depending on other deps that need pre-bundling, then also pre-bundle this dep */\n INCLUDE_LIST_SET.has(dep) || /* If this dep is in the include list, then pre-bundle it */\n hasRequiredDep(depPkgJson, \"react\") || // an optional react peer still means the package ships react\n // entrypoints (e.g. better-auth/react). left external, those load a\n // second react copy in SSR and crash hooks with a null dispatcher.\n !!((_depPkgJson_peerDependencies = depPkgJson.peerDependencies) === null || _depPkgJson_peerDependencies === void 0 ? void 0 : _depPkgJson_peerDependencies.react) || hasRequiredDep(depPkgJson, \"react-native\") || hasRequiredDep(depPkgJson, \"expo-modules-core\") || // Expo deps are often ESM but without including file extensions in import paths, making it not able to run directly by Node.js, so we need to pre-bundle them.\n dep.startsWith(\"@expo/\") || dep.startsWith(\"expo-\");\n debug === null || debug === void 0 ? void 0 : debug(`${dep} shouldPreBundle? ${shouldPreBundle}`);\n var depsToPreBundle = await (async function() {\n if (!shouldPreBundle) {\n return [];\n }\n var depPkgJsonExports = depPkgJson.exports || {};\n var definedExports = Object.keys(depPkgJsonExports).filter(function(k) {\n var expData = depPkgJsonExports[k];\n var imp = typeof expData === \"string\" ? expData : expData === null || expData === void 0 ? void 0 : expData.import;\n if (typeof imp !== \"string\") {\n return false;\n }\n if (!imp.endsWith(\".js\")) {\n return false;\n }\n if (!k.match(/^(\\.\\/)?[a-zA-Z0-9-_]+$/)) {\n return false;\n }\n return true;\n }).map(function(k) {\n return k.replace(/^\\.\\/?/, \"\");\n }).map(function(k) {\n return `${dep}/${k}`;\n });\n var specialExports = (function() {\n switch (dep) {\n case \"react-native-vector-icons\":\n return [\n \"AntDesign\",\n \"Entypo\",\n \"EvilIcons\",\n \"Feather\",\n \"FontAwesome\",\n \"FontAwesome5\",\n \"FontAwesome5Pro\",\n \"Fontisto\",\n \"Foundation\",\n \"Ionicons\",\n \"MaterialCommunityIcons\",\n \"MaterialIcons\",\n \"Octicons\",\n \"SimpleLineIcons\",\n \"Zocial\"\n ].map(function(n) {\n return `${dep}/${n}`;\n });\n default:\n return [];\n }\n })();\n var mainExport = depPkgJson[\"main\"] || depPkgJson[\"module\"] || definedExports[\".\"];\n var exports = [\n ...definedExports,\n ...specialExports\n ].filter(function(d) {\n return !EXCLUDE_LIST_SET.has(d);\n });\n if (mainExport) {\n if (await checkIfExportExists(join(dirname(depPkgJsonPath), mainExport))) {\n exports.unshift(dep);\n }\n }\n return exports;\n })();\n var result = [\n ...depsToPreBundle,\n ...subDeps.prebundleDeps\n ];\n debugDetails === null || debugDetails === void 0 ? void 0 : debugDetails(`final result ${JSON.stringify(result, null, 2)}`);\n proceededDeps.set(dep, result);\n return result;\n }))).flat().filter(function(dep, index, arr) {\n return arr.indexOf(dep) === index;\n });\n var hasNativewind = !!((_pkgJson_dependencies1 = pkgJson.dependencies) === null || _pkgJson_dependencies1 === void 0 ? void 0 : _pkgJson_dependencies1[\"nativewind\"]);\n if ((hasNativewind || hasReanimated) && options === rootOptions) {\n if (hasReanimated) console.info(`[one] Enabled babel plugins: ${[\n hasReanimated ? \"Reanimated\" : \"\",\n hasNativewind ? \"Nativewind\" : \"\"\n ].filter(Boolean).join(\", \")}`);\n }\n return {\n prebundleDeps,\n hasReanimated,\n // only check if set in root, dont want to enable css mode too easily\n hasNativewind\n };\n}\nasync function checkIfExportExists(pathIn) {\n var paths = [\n pathIn,\n ...extname(pathIn) ? [] : [\n pathIn + \".js\",\n pathIn + sep + \"index.js\"\n ]\n ];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = paths[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var path2 = _step.value;\n if (await FSExtra.pathExists(path2)) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n}\nasync function readPackageJsonSafe(packageJsonPath) {\n try {\n return await FSExtra.readJson(packageJsonPath);\n } catch (e) {\n console.error(`[scanDepsToPreBundleForSsr] Error reading package.json from ${packageJsonPath}: ${e}`);\n return {};\n }\n}\nasync function findDepPkgJsonPath(dep, dependent) {\n var root = dependent;\n while (root) {\n var possiblePkgJson = path.join(root, \"node_modules\", dep, \"package.json\");\n if (await FSExtra.pathExists(possiblePkgJson)) {\n return possiblePkgJson;\n }\n var nextRoot = path.dirname(root);\n if (nextRoot === root) break;\n root = nextRoot;\n }\n console.error(`[findDepPkgJsonPath] Could not find package.json for ${dep}, which is a dependency of ${dependent}`);\n return void 0;\n}\nfunction hasRequiredDep(pkgJson, depName) {\n var _pkgJson_dependencies, _pkgJson_peerDependencies, _pkgJson_peerDependenciesMeta_depName, _pkgJson_peerDependenciesMeta;\n return !!(((_pkgJson_dependencies = pkgJson.dependencies) === null || _pkgJson_dependencies === void 0 ? void 0 : _pkgJson_dependencies[depName]) || ((_pkgJson_peerDependencies = pkgJson.peerDependencies) === null || _pkgJson_peerDependencies === void 0 ? void 0 : _pkgJson_peerDependencies[depName]) && !((_pkgJson_peerDependenciesMeta = pkgJson.peerDependenciesMeta) === null || _pkgJson_peerDependenciesMeta === void 0 ? void 0 : (_pkgJson_peerDependenciesMeta_depName = _pkgJson_peerDependenciesMeta[depName]) === null || _pkgJson_peerDependenciesMeta_depName === void 0 ? void 0 : _pkgJson_peerDependenciesMeta_depName.optional));\n}\nexport {\n EXCLUDE_LIST,\n EXCLUDE_LIST_SET,\n INCLUDE_LIST,\n INCLUDE_LIST_SET,\n findDepPkgJsonPath,\n scanDepsToOptimize\n};\n//# sourceMappingURL=scanDepsToOptimize.js.map\n"],"mappings":";;;;;AAGA,IAAI,EAAE,OAAO,iBAAiB,eAAe,yBAAyB;AACtE,IAAI,eAAe;CACjB;CACA;CACA;CACA;CACA;CACA;CACA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;EACA,IAAI,WAAW,KAAK,QAAQ,IAAI;EAChC,IAAI,aAAa,MAAM;EACvB,OAAO;CACT;CACA,QAAQ,MAAM,wDAAwD,IAAI,6BAA6B,WAAW;CAClH,OAAO,KAAK;AACd;AACA,SAAS,eAAe,SAAS,SAAS;CACxC,IAAI,uBAAuB,2BAA2B,uCAAuC;CAC7F,OAAO,CAAC,IAAI,wBAAwB,QAAQ,kBAAkB,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,eAAe,4BAA4B,QAAQ,sBAAsB,QAAQ,8BAA8B,KAAK,IAAI,KAAK,IAAI,0BAA0B,aAAa,GAAG,gCAAgC,QAAQ,0BAA0B,QAAQ,kCAAkC,KAAK,IAAI,KAAK,KAAK,wCAAwC,8BAA8B,cAAc,QAAQ,0CAA0C,KAAK,IAAI,KAAK,IAAI,sCAAsC;AAClnB"}
1
+ {"version":3,"file":"scanDepsToOptimize.native.js","names":[],"sources":["utils/scanDepsToOptimize.native.js"],"sourcesContent":["import { createDebugger } from \"@vxrn/debug\";\nimport FSExtra from \"fs-extra\";\nimport path, { dirname, extname, join, sep } from \"path\";\nvar { debug, debugDetails } = createDebugger(`vxrn:scanDepsToOptimize`);\nvar EXCLUDE_LIST = [\n \"jsc-android\",\n \"react-shallow-renderer\",\n \"fsevents\",\n \"@swc/core\",\n \"@swc/core-darwin-arm64\",\n \"@swc/core-darwin-x64\",\n \"@swc/core-linux-arm-gnueabihf\",\n \"@swc/core-linux-arm64-gnu\",\n \"@swc/core-linux-arm64-musl\",\n \"@swc/core-linux-x64-gnu\",\n \"@swc/core-linux-x64-musl\",\n \"@swc/core-win32-arm64-msvc\",\n \"@swc/core-win32-ia32-msvc\",\n \"@swc/core-win32-x64-msvc\",\n \"lightningcss\",\n // this breaks fileToUrlPath in upstreams, like @discordjs/client\n \"url\",\n \"sharp\",\n \"@sentry/react-native\",\n // not ever to be used in app\n \"@expo/cli\",\n \"expo-structured-headers\",\n // not used by web anyway\n // Could not read from file: /Users/n8/one/node_modules/react-native-web/dist/cjs/index.js/Libraries/Image/AssetRegistry\n // /lib/module/Platform/Platform.web.js:132:20\n \"@shopify/react-native-skia\",\n \"@react-native/virtualized-lists\",\n // Unexpected \"typeof\" in `node_modules/@react-native/virtualized-lists/index.js`\n // Native only, we don't expect SSR to use these packages.\n // Also, some of these packages might attempt to import from react-native internals, which will break in SSR while react-native is aliased to react-native-web.\n \"@vxrn/vite-native-hmr\",\n \"@vxrn/compiler\",\n \"@vxrn/vite-native-client\",\n // build-time only, and they load native .node addons the ssr dep optimizer\n // cannot parse. apps list vxrn as a dependency because it is their dev\n // server, which is exactly why it must never be pre-bundled for ssr.\n \"vxrn\",\n \"@vxrn/vite-plugin-metro\",\n \"oxc-transform\",\n \"oxc-parser\",\n \"react-native-ios-utilities\",\n \"react-native-ios-modal\",\n \"react-native-ios-context-menu\",\n \"react-native-haptic-feedback\",\n \"react-native-sortables\",\n \"react-native-image-colors\",\n \"react-native-fast-image\",\n \"react-native-fast-squircle\",\n \"react-native-device-info\",\n // dev server UI only, lazy-imported at runtime\n \"qrcode-terminal\",\n // CLI/scripts shouldn't be used in SSR runtime\n \"@tamagui/cli\",\n // only used by static/plugin\n \"@tamagui/static\",\n \"@tamagui/config-default\",\n \"@tamagui/vite-plugin\",\n \"@take-out/scripts\",\n \"@take-out/cli\",\n // Should be used on native only\n \"@tamagui/core/native-test\",\n \"@storybook/react\",\n // native-only or not needed in SSR\n \"@nandorojo/galeria\",\n \"expo-video\",\n \"react-native-pager-view\",\n \"@react-native/debugger-shell\",\n \"@hot-updater/react-native\",\n \"@hot-updater/plugin-core\",\n \"expo/internal/unstable-autolinking-exports\",\n \"validator\",\n \"zlib\"\n];\nvar EXCLUDE_LIST_SET = new Set(EXCLUDE_LIST);\nvar INCLUDE_LIST = [\n // ReferenceError: exports is not defined - at eval (.../node_modules/inline-style-prefixer/lib/createPrefixer.js:3:23)\n \"inline-style-prefixer\",\n \"react-native-vector-icons\",\n \"jotai\"\n];\nvar INCLUDE_LIST_SET = new Set(INCLUDE_LIST);\nvar rootOptions = {};\nasync function scanDepsToOptimize(packageJsonPath) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (\n /** If the content of the package.json is already read before calling this function, pass it here to avoid reading it again */\n rootOptions\n );\n var _pkgJson_dependencies, _pkgJson_dependencies1;\n var { parentDepNames = [], proceededDeps = /* @__PURE__ */ new Map(), pkgJsonContent } = options;\n if (options === rootOptions) {\n console.info(`[one] Scanning node_modules to auto-optimize...`);\n }\n var currentRoot = path.dirname(packageJsonPath);\n var pkgJson = pkgJsonContent || await readPackageJsonSafe(packageJsonPath);\n var deps = Object.keys(pkgJson.dependencies || {});\n var hasReanimated = !!((_pkgJson_dependencies = pkgJson.dependencies) === null || _pkgJson_dependencies === void 0 ? void 0 : _pkgJson_dependencies[\"react-native-reanimated\"]);\n var prebundleDeps = (await Promise.all(deps.map(async function(dep) {\n var _depPkgJson_dependencies, _depPkgJson_peerDependencies;\n if (parentDepNames.includes(dep)) {\n return [];\n }\n var cachedResult = proceededDeps.get(dep);\n if (cachedResult) {\n return cachedResult;\n }\n if (EXCLUDE_LIST_SET.has(dep)) {\n return [];\n }\n var localPath = await findDepPkgJsonPath(dep, currentRoot);\n if (!localPath) return [];\n var depPkgJsonPath = await FSExtra.realpath(localPath);\n if (options.filter && !options.filter(depPkgJsonPath)) {\n return [];\n }\n var depPkgJson = await readPackageJsonSafe(depPkgJsonPath);\n if ((_depPkgJson_dependencies = depPkgJson.dependencies) === null || _depPkgJson_dependencies === void 0 ? void 0 : _depPkgJson_dependencies[\"react-native-reanimated\"]) {\n hasReanimated = true;\n }\n if (depPkgJson.codegenConfig != null) {\n debug === null || debug === void 0 ? void 0 : debug(`${dep} skipped: declares codegenConfig (native codegen package)`);\n return [];\n }\n var subDeps = await scanDepsToOptimize(depPkgJsonPath, {\n parentDepNames: [\n ...parentDepNames,\n dep\n ],\n pkgJsonContent: depPkgJson,\n proceededDeps\n });\n if (subDeps.hasReanimated) {\n hasReanimated = true;\n }\n var shouldPreBundle = subDeps.prebundleDeps.length > 0 || /* If this dep is depending on other deps that need pre-bundling, then also pre-bundle this dep */\n INCLUDE_LIST_SET.has(dep) || /* If this dep is in the include list, then pre-bundle it */\n hasRequiredDep(depPkgJson, \"react\") || // an optional react peer still means the package ships react\n // entrypoints (e.g. better-auth/react). left external, those load a\n // second react copy in SSR and crash hooks with a null dispatcher.\n !!((_depPkgJson_peerDependencies = depPkgJson.peerDependencies) === null || _depPkgJson_peerDependencies === void 0 ? void 0 : _depPkgJson_peerDependencies.react) || hasRequiredDep(depPkgJson, \"react-native\") || hasRequiredDep(depPkgJson, \"expo-modules-core\") || // Expo deps are often ESM but without including file extensions in import paths, making it not able to run directly by Node.js, so we need to pre-bundle them.\n dep.startsWith(\"@expo/\") || dep.startsWith(\"expo-\");\n debug === null || debug === void 0 ? void 0 : debug(`${dep} shouldPreBundle? ${shouldPreBundle}`);\n var depsToPreBundle = await (async function() {\n if (!shouldPreBundle) {\n return [];\n }\n var depPkgJsonExports = depPkgJson.exports || {};\n var definedExports = Object.keys(depPkgJsonExports).filter(function(k) {\n var expData = depPkgJsonExports[k];\n var imp = typeof expData === \"string\" ? expData : expData === null || expData === void 0 ? void 0 : expData.import;\n if (typeof imp !== \"string\") {\n return false;\n }\n if (!imp.endsWith(\".js\")) {\n return false;\n }\n if (!k.match(/^(\\.\\/)?[a-zA-Z0-9-_]+$/)) {\n return false;\n }\n return true;\n }).map(function(k) {\n return k.replace(/^\\.\\/?/, \"\");\n }).map(function(k) {\n return `${dep}/${k}`;\n });\n var specialExports = (function() {\n switch (dep) {\n case \"react-native-vector-icons\":\n return [\n \"AntDesign\",\n \"Entypo\",\n \"EvilIcons\",\n \"Feather\",\n \"FontAwesome\",\n \"FontAwesome5\",\n \"FontAwesome5Pro\",\n \"Fontisto\",\n \"Foundation\",\n \"Ionicons\",\n \"MaterialCommunityIcons\",\n \"MaterialIcons\",\n \"Octicons\",\n \"SimpleLineIcons\",\n \"Zocial\"\n ].map(function(n) {\n return `${dep}/${n}`;\n });\n default:\n return [];\n }\n })();\n var mainExport = depPkgJson[\"main\"] || depPkgJson[\"module\"] || definedExports[\".\"];\n var exports = [\n ...definedExports,\n ...specialExports\n ].filter(function(d) {\n return !EXCLUDE_LIST_SET.has(d);\n });\n if (mainExport) {\n if (await checkIfExportExists(join(dirname(depPkgJsonPath), mainExport))) {\n exports.unshift(dep);\n }\n }\n return exports;\n })();\n var result = [\n ...depsToPreBundle,\n ...subDeps.prebundleDeps\n ];\n debugDetails === null || debugDetails === void 0 ? void 0 : debugDetails(`final result ${JSON.stringify(result, null, 2)}`);\n proceededDeps.set(dep, result);\n return result;\n }))).flat().filter(function(dep, index, arr) {\n return arr.indexOf(dep) === index;\n });\n var hasNativewind = !!((_pkgJson_dependencies1 = pkgJson.dependencies) === null || _pkgJson_dependencies1 === void 0 ? void 0 : _pkgJson_dependencies1[\"nativewind\"]);\n if ((hasNativewind || hasReanimated) && options === rootOptions) {\n if (hasReanimated) console.info(`[one] Enabled babel plugins: ${[\n hasReanimated ? \"Reanimated\" : \"\",\n hasNativewind ? \"Nativewind\" : \"\"\n ].filter(Boolean).join(\", \")}`);\n }\n return {\n prebundleDeps,\n hasReanimated,\n // only check if set in root, dont want to enable css mode too easily\n hasNativewind\n };\n}\nasync function checkIfExportExists(pathIn) {\n var paths = [\n pathIn,\n ...extname(pathIn) ? [] : [\n pathIn + \".js\",\n pathIn + sep + \"index.js\"\n ]\n ];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = paths[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var path2 = _step.value;\n if (await FSExtra.pathExists(path2)) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n}\nasync function readPackageJsonSafe(packageJsonPath) {\n try {\n return await FSExtra.readJson(packageJsonPath);\n } catch (e) {\n console.error(`[scanDepsToPreBundleForSsr] Error reading package.json from ${packageJsonPath}: ${e}`);\n return {};\n }\n}\nasync function findDepPkgJsonPath(dep, dependent) {\n var root = dependent;\n while (root) {\n var possiblePkgJson = path.join(root, \"node_modules\", dep, \"package.json\");\n if (await FSExtra.pathExists(possiblePkgJson)) {\n return possiblePkgJson;\n }\n var nextRoot = path.dirname(root);\n if (nextRoot === root) break;\n root = nextRoot;\n }\n console.error(`[findDepPkgJsonPath] Could not find package.json for ${dep}, which is a dependency of ${dependent}`);\n return void 0;\n}\nfunction hasRequiredDep(pkgJson, depName) {\n var _pkgJson_dependencies, _pkgJson_peerDependencies, _pkgJson_peerDependenciesMeta_depName, _pkgJson_peerDependenciesMeta;\n return !!(((_pkgJson_dependencies = pkgJson.dependencies) === null || _pkgJson_dependencies === void 0 ? void 0 : _pkgJson_dependencies[depName]) || ((_pkgJson_peerDependencies = pkgJson.peerDependencies) === null || _pkgJson_peerDependencies === void 0 ? void 0 : _pkgJson_peerDependencies[depName]) && !((_pkgJson_peerDependenciesMeta = pkgJson.peerDependenciesMeta) === null || _pkgJson_peerDependenciesMeta === void 0 ? void 0 : (_pkgJson_peerDependenciesMeta_depName = _pkgJson_peerDependenciesMeta[depName]) === null || _pkgJson_peerDependenciesMeta_depName === void 0 ? void 0 : _pkgJson_peerDependenciesMeta_depName.optional));\n}\nexport {\n EXCLUDE_LIST,\n EXCLUDE_LIST_SET,\n INCLUDE_LIST,\n INCLUDE_LIST_SET,\n findDepPkgJsonPath,\n scanDepsToOptimize\n};\n//# sourceMappingURL=scanDepsToOptimize.js.map\n"],"mappings":";;;;;AAGA,IAAI,EAAE,OAAO,iBAAiB,eAAe,yBAAyB;AACtE,IAAI,eAAe;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;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I,kBAAkB,KAAK,KAAK,MAAM,gBAAgB,KAAK,cAAc;EACzE,IAAI,MAAM,QAAQ,WAAW,eAAe,GAAG;GAC7C,OAAO;EACT;EACA,IAAI,WAAW,KAAK,QAAQ,IAAI;EAChC,IAAI,aAAa,MAAM;EACvB,OAAO;CACT;CACA,QAAQ,MAAM,wDAAwD,IAAI,6BAA6B,WAAW;CAClH,OAAO,KAAK;AACd;AACA,SAAS,eAAe,SAAS,SAAS;CACxC,IAAI,uBAAuB,2BAA2B,uCAAuC;CAC7F,OAAO,CAAC,IAAI,wBAAwB,QAAQ,kBAAkB,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,eAAe,4BAA4B,QAAQ,sBAAsB,QAAQ,8BAA8B,KAAK,IAAI,KAAK,IAAI,0BAA0B,aAAa,GAAG,gCAAgC,QAAQ,0BAA0B,QAAQ,kCAAkC,KAAK,IAAI,KAAK,KAAK,wCAAwC,8BAA8B,cAAc,QAAQ,0CAA0C,KAAK,IAAI,KAAK,IAAI,sCAAsC;AAClnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxrn",
3
- "version": "2.0.0-beta.45.1",
3
+ "version": "2.0.0-beta.46.1",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,22 +59,22 @@
59
59
  "typecheck": "tsc --noEmit"
60
60
  },
61
61
  "dependencies": {
62
- "@expo/config-plugins": "~57.0.6",
62
+ "@expo/config-plugins": "58.0.0-canary-20260909-ea7a89a",
63
63
  "@hono/node-server": "^1.19.14",
64
64
  "@jridgewell/remapping": "^2.3.0",
65
65
  "@jridgewell/trace-mapping": "^0.3.25",
66
- "@react-native/codegen": "^0.86.2",
67
- "@react-native/dev-middleware": "^0.86.2",
68
- "@vxrn/compiler": "2.0.0-beta.45.1",
69
- "@vxrn/debug": "2.0.0-beta.45.1",
70
- "@vxrn/query-string": "2.0.0-beta.45.1",
71
- "@vxrn/resolve": "2.0.0-beta.45.1",
72
- "@vxrn/safe-area": "2.0.0-beta.45.1",
73
- "@vxrn/url-parse": "2.0.0-beta.45.1",
74
- "@vxrn/utils": "2.0.0-beta.45.1",
75
- "@vxrn/vendor": "2.0.0-beta.45.1",
76
- "@vxrn/vite-flow": "2.0.0-beta.45.1",
77
- "@vxrn/vite-plugin-metro": "2.0.0-beta.45.1",
66
+ "@react-native/codegen": "^0.87.1",
67
+ "@react-native/dev-middleware": "^0.87.1",
68
+ "@vxrn/compiler": "2.0.0-beta.46.1",
69
+ "@vxrn/debug": "2.0.0-beta.46.1",
70
+ "@vxrn/query-string": "2.0.0-beta.46.1",
71
+ "@vxrn/resolve": "2.0.0-beta.46.1",
72
+ "@vxrn/safe-area": "2.0.0-beta.46.1",
73
+ "@vxrn/url-parse": "2.0.0-beta.46.1",
74
+ "@vxrn/utils": "2.0.0-beta.46.1",
75
+ "@vxrn/vendor": "2.0.0-beta.46.1",
76
+ "@vxrn/vite-flow": "2.0.0-beta.46.1",
77
+ "@vxrn/vite-plugin-metro": "2.0.0-beta.46.1",
78
78
  "citty": "^0.1.6",
79
79
  "dotenv": "^17.2.1",
80
80
  "dotenv-expand": "^12.0.2",
@@ -0,0 +1,56 @@
1
+ import { mkdirSync, mkdtempSync, realpathSync, writeFileSync } from 'node:fs'
2
+ import { tmpdir } from 'node:os'
3
+ import { join } from 'node:path'
4
+ import { describe, expect, test } from 'vitest'
5
+
6
+ import { scanDepsToOptimize } from './scanDepsToOptimize'
7
+
8
+ function writePkg(dir: string, pkg: object) {
9
+ mkdirSync(dir, { recursive: true })
10
+ writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg))
11
+ writeFileSync(join(dir, 'index.js'), 'export default null\n')
12
+ }
13
+
14
+ describe('scanDepsToOptimize codegenConfig', () => {
15
+ test('excludes native codegen packages but keeps plain react deps', async () => {
16
+ const root = realpathSync(mkdtempSync(join(tmpdir(), 'vxrn-scan-')))
17
+
18
+ writePkg(root, {
19
+ name: 'codegen-fixture',
20
+ private: true,
21
+ dependencies: {
22
+ 'fake-native-tabs': '1.0.0',
23
+ 'fake-js-lib': '1.0.0',
24
+ },
25
+ })
26
+
27
+ // Fabric/TurboModule package: declares codegenConfig and peer-depends on
28
+ // react-native, so without the class exclusion it would be pre-bundled
29
+ // and its codegen entry points would break the SSR build.
30
+ writePkg(join(root, 'node_modules', 'fake-native-tabs'), {
31
+ name: 'fake-native-tabs',
32
+ version: '1.0.0',
33
+ main: './index.js',
34
+ codegenConfig: { name: 'FakeTabs', type: 'all', jsSrcsDir: './src' },
35
+ peerDependencies: { react: '*', 'react-native': '*' },
36
+ })
37
+
38
+ writePkg(join(root, 'node_modules', 'fake-js-lib'), {
39
+ name: 'fake-js-lib',
40
+ version: '1.0.0',
41
+ main: './index.js',
42
+ dependencies: { react: '*' },
43
+ })
44
+
45
+ writePkg(join(root, 'node_modules', 'react'), {
46
+ name: 'react',
47
+ version: '19.1.0',
48
+ main: './index.js',
49
+ })
50
+
51
+ const result = await scanDepsToOptimize(join(root, 'package.json'))
52
+
53
+ expect(result.prebundleDeps).toContain('fake-js-lib')
54
+ expect(result.prebundleDeps).not.toContain('fake-native-tabs')
55
+ })
56
+ })
@@ -193,6 +193,16 @@ export async function scanDepsToOptimize(
193
193
  hasReanimated = true
194
194
  }
195
195
 
196
+ // A package declaring `codegenConfig` is a native Fabric component or
197
+ // TurboModule library. Its codegen entry points import from
198
+ // `react-native/Libraries/...`, which do not exist under SSR where
199
+ // react-native is aliased to a web implementation, so it can never be
200
+ // pre-bundled. Exclude the whole class instead of naming packages.
201
+ if (depPkgJson.codegenConfig != null) {
202
+ debug?.(`${dep} skipped: declares codegenConfig (native codegen package)`)
203
+ return []
204
+ }
205
+
196
206
  const subDeps = await scanDepsToOptimize(depPkgJsonPath, {
197
207
  parentDepNames: [...parentDepNames, dep],
198
208
  pkgJsonContent: depPkgJson,
@@ -1 +1 @@
1
- {"version":3,"file":"scanDepsToOptimize.d.ts","sourceRoot":"","sources":["../../src/utils/scanDepsToOptimize.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY,UAwFxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AAErD,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AA8BrD,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,KAAK,OAAO,CAAA;IAC1C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACrC,8HAA8H;IAC9H,cAAc,CAAC,EAAE,GAAG,CAAA;CACP,GACd,OAAO,CAAC,cAAc,CAAC,CAmLzB;AA6BD,wBAAsB,kBAAkB,CAAC,GAAG,KAAA,EAAE,SAAS,KAAA,+BAmBtD"}
1
+ {"version":3,"file":"scanDepsToOptimize.d.ts","sourceRoot":"","sources":["../../src/utils/scanDepsToOptimize.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY,UAwFxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AAErD,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AA8BrD,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE;IACP,M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