vxrn 1.27.1 → 2.0.0-beta.45.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.
Files changed (456) hide show
  1. package/dist/cli.mjs +212 -261
  2. package/dist/cli.mjs.map +1 -1
  3. package/dist/cli.native.js +216 -265
  4. package/dist/cli.native.js.map +1 -1
  5. package/dist/config/getAdditionalViteConfig.mjs +33 -62
  6. package/dist/config/getAdditionalViteConfig.mjs.map +1 -1
  7. package/dist/config/getAdditionalViteConfig.native.js +33 -62
  8. package/dist/config/getAdditionalViteConfig.native.js.map +1 -1
  9. package/dist/config/getBaseViteConfigOnly.mjs +84 -77
  10. package/dist/config/getBaseViteConfigOnly.mjs.map +1 -1
  11. package/dist/config/getBaseViteConfigOnly.native.js +86 -79
  12. package/dist/config/getBaseViteConfigOnly.native.js.map +1 -1
  13. package/dist/config/getBaseViteConfigWithPlugins.mjs +6 -4
  14. package/dist/config/getBaseViteConfigWithPlugins.mjs.map +1 -1
  15. package/dist/config/getBaseViteConfigWithPlugins.native.js +6 -4
  16. package/dist/config/getBaseViteConfigWithPlugins.native.js.map +1 -1
  17. package/dist/config/getBaseVitePlugins.mjs +102 -130
  18. package/dist/config/getBaseVitePlugins.mjs.map +1 -1
  19. package/dist/config/getBaseVitePlugins.native.js +123 -152
  20. package/dist/config/getBaseVitePlugins.native.js.map +1 -1
  21. package/dist/config/getNonCliModeOnlyVitePlugins.mjs +3 -3
  22. package/dist/config/getNonCliModeOnlyVitePlugins.mjs.map +1 -1
  23. package/dist/config/getNonCliModeOnlyVitePlugins.native.js +3 -1
  24. package/dist/config/getNonCliModeOnlyVitePlugins.native.js.map +1 -1
  25. package/dist/config/getOptimizeDeps.mjs +138 -42
  26. package/dist/config/getOptimizeDeps.mjs.map +1 -1
  27. package/dist/config/getOptimizeDeps.native.js +138 -42
  28. package/dist/config/getOptimizeDeps.native.js.map +1 -1
  29. package/dist/config/getOptionsFilled.mjs +48 -52
  30. package/dist/config/getOptionsFilled.mjs.map +1 -1
  31. package/dist/config/getOptionsFilled.native.js +51 -55
  32. package/dist/config/getOptionsFilled.native.js.map +1 -1
  33. package/dist/config/getReactNativePlugins.mjs +23 -15
  34. package/dist/config/getReactNativePlugins.mjs.map +1 -1
  35. package/dist/config/getReactNativePlugins.native.js +25 -16
  36. package/dist/config/getReactNativePlugins.native.js.map +1 -1
  37. package/dist/config/getServerOptionsFilled.mjs +33 -35
  38. package/dist/config/getServerOptionsFilled.mjs.map +1 -1
  39. package/dist/config/getServerOptionsFilled.native.js +35 -38
  40. package/dist/config/getServerOptionsFilled.native.js.map +1 -1
  41. package/dist/config/getViteServerConfig.mjs +34 -45
  42. package/dist/config/getViteServerConfig.mjs.map +1 -1
  43. package/dist/config/getViteServerConfig.native.js +35 -46
  44. package/dist/config/getViteServerConfig.native.js.map +1 -1
  45. package/dist/config/mergeUserConfig.mjs +50 -28
  46. package/dist/config/mergeUserConfig.mjs.map +1 -1
  47. package/dist/config/mergeUserConfig.native.js +60 -38
  48. package/dist/config/mergeUserConfig.native.js.map +1 -1
  49. package/dist/constants/defaults.mjs +29 -12
  50. package/dist/constants/defaults.mjs.map +1 -1
  51. package/dist/constants/defaults.native.js +29 -12
  52. package/dist/constants/defaults.native.js.map +1 -1
  53. package/dist/constants.mjs +41 -6
  54. package/dist/constants.mjs.map +1 -1
  55. package/dist/constants.native.js +41 -6
  56. package/dist/constants.native.js.map +1 -1
  57. package/dist/exports/build.mjs +218 -270
  58. package/dist/exports/build.mjs.map +1 -1
  59. package/dist/exports/build.native.js +226 -283
  60. package/dist/exports/build.native.js.map +1 -1
  61. package/dist/exports/clean.mjs +71 -78
  62. package/dist/exports/clean.mjs.map +1 -1
  63. package/dist/exports/clean.native.js +76 -90
  64. package/dist/exports/clean.native.js.map +1 -1
  65. package/dist/exports/createServer.mjs +43 -46
  66. package/dist/exports/createServer.mjs.map +1 -1
  67. package/dist/exports/createServer.native.js +45 -48
  68. package/dist/exports/createServer.native.js.map +1 -1
  69. package/dist/exports/dev.mjs +177 -201
  70. package/dist/exports/dev.mjs.map +1 -1
  71. package/dist/exports/dev.native.js +191 -215
  72. package/dist/exports/dev.native.js.map +1 -1
  73. package/dist/exports/loadEnv.mjs +51 -48
  74. package/dist/exports/loadEnv.mjs.map +1 -1
  75. package/dist/exports/loadEnv.native.js +59 -57
  76. package/dist/exports/loadEnv.native.js.map +1 -1
  77. package/dist/exports/patch.mjs +9 -7
  78. package/dist/exports/patch.mjs.map +1 -1
  79. package/dist/exports/patch.native.js +9 -7
  80. package/dist/exports/patch.native.js.map +1 -1
  81. package/dist/exports/prebuild.mjs +177 -157
  82. package/dist/exports/prebuild.mjs.map +1 -1
  83. package/dist/exports/prebuild.native.js +197 -160
  84. package/dist/exports/prebuild.native.js.map +1 -1
  85. package/dist/exports/prebuildWithoutExpo.mjs +46 -44
  86. package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
  87. package/dist/exports/prebuildWithoutExpo.native.js +48 -46
  88. package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
  89. package/dist/exports/runAndroid.mjs +9 -10
  90. package/dist/exports/runAndroid.mjs.map +1 -1
  91. package/dist/exports/runAndroid.native.js +10 -11
  92. package/dist/exports/runAndroid.native.js.map +1 -1
  93. package/dist/exports/runIos.mjs +9 -10
  94. package/dist/exports/runIos.mjs.map +1 -1
  95. package/dist/exports/runIos.native.js +10 -11
  96. package/dist/exports/runIos.native.js.map +1 -1
  97. package/dist/exports/serve.mjs +23 -31
  98. package/dist/exports/serve.mjs.map +1 -1
  99. package/dist/exports/serve.native.js +26 -34
  100. package/dist/exports/serve.native.js.map +1 -1
  101. package/dist/exports/serveStaticAssets.mjs +109 -113
  102. package/dist/exports/serveStaticAssets.mjs.map +1 -1
  103. package/dist/exports/serveStaticAssets.native.js +180 -192
  104. package/dist/exports/serveStaticAssets.native.js.map +1 -1
  105. package/dist/index.js +25 -14
  106. package/dist/index.mjs +25 -14
  107. package/dist/index.native.js +25 -14
  108. package/dist/patches/builtInDepPatches.mjs +346 -435
  109. package/dist/patches/builtInDepPatches.mjs.map +1 -1
  110. package/dist/patches/builtInDepPatches.native.js +349 -438
  111. package/dist/patches/builtInDepPatches.native.js.map +1 -1
  112. package/dist/plugins/applyBuiltInPatchesPlugin.mjs +11 -11
  113. package/dist/plugins/applyBuiltInPatchesPlugin.mjs.map +1 -1
  114. package/dist/plugins/applyBuiltInPatchesPlugin.native.js +11 -11
  115. package/dist/plugins/applyBuiltInPatchesPlugin.native.js.map +1 -1
  116. package/dist/plugins/autoDepOptimizePlugin.mjs +87 -90
  117. package/dist/plugins/autoDepOptimizePlugin.mjs.map +1 -1
  118. package/dist/plugins/autoDepOptimizePlugin.native.js +99 -102
  119. package/dist/plugins/autoDepOptimizePlugin.native.js.map +1 -1
  120. package/dist/plugins/clientInjectPlugin.mjs +13 -11
  121. package/dist/plugins/clientInjectPlugin.mjs.map +1 -1
  122. package/dist/plugins/clientInjectPlugin.native.js +13 -11
  123. package/dist/plugins/clientInjectPlugin.native.js.map +1 -1
  124. package/dist/plugins/defaultDepOptimizePlugin.mjs +15 -23
  125. package/dist/plugins/defaultDepOptimizePlugin.mjs.map +1 -1
  126. package/dist/plugins/defaultDepOptimizePlugin.native.js +15 -23
  127. package/dist/plugins/defaultDepOptimizePlugin.native.js.map +1 -1
  128. package/dist/plugins/expoManifestRequestHandlerPlugin.mjs +163 -179
  129. package/dist/plugins/expoManifestRequestHandlerPlugin.mjs.map +1 -1
  130. package/dist/plugins/expoManifestRequestHandlerPlugin.native.js +169 -191
  131. package/dist/plugins/expoManifestRequestHandlerPlugin.native.js.map +1 -1
  132. package/dist/plugins/getResolvedConfigSubset.mjs +6 -5
  133. package/dist/plugins/getResolvedConfigSubset.mjs.map +1 -1
  134. package/dist/plugins/getResolvedConfigSubset.native.js +6 -5
  135. package/dist/plugins/getResolvedConfigSubset.native.js.map +1 -1
  136. package/dist/plugins/reactNativeCommonJsPlugin.mjs +210 -178
  137. package/dist/plugins/reactNativeCommonJsPlugin.mjs.map +1 -1
  138. package/dist/plugins/reactNativeCommonJsPlugin.native.js +283 -259
  139. package/dist/plugins/reactNativeCommonJsPlugin.native.js.map +1 -1
  140. package/dist/plugins/reactNativeDevAssetPlugin.mjs +72 -83
  141. package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +1 -1
  142. package/dist/plugins/reactNativeDevAssetPlugin.native.js +75 -92
  143. package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +1 -1
  144. package/dist/plugins/reactNativeDevServer.mjs +283 -328
  145. package/dist/plugins/reactNativeDevServer.mjs.map +1 -1
  146. package/dist/plugins/reactNativeDevServer.native.js +332 -391
  147. package/dist/plugins/reactNativeDevServer.native.js.map +1 -1
  148. package/dist/plugins/rnCodegenPlugin.mjs +13 -12
  149. package/dist/plugins/rnCodegenPlugin.mjs.map +1 -1
  150. package/dist/plugins/rnCodegenPlugin.native.js +13 -12
  151. package/dist/plugins/rnCodegenPlugin.native.js.map +1 -1
  152. package/dist/plugins/rollupRemoveUnusedImports.mjs +8 -7
  153. package/dist/plugins/rollupRemoveUnusedImports.mjs.map +1 -1
  154. package/dist/plugins/rollupRemoveUnusedImports.native.js +8 -7
  155. package/dist/plugins/rollupRemoveUnusedImports.native.js.map +1 -1
  156. package/dist/plugins/workletImportsPlugin.mjs +127 -132
  157. package/dist/plugins/workletImportsPlugin.mjs.map +1 -1
  158. package/dist/plugins/workletImportsPlugin.native.js +192 -203
  159. package/dist/plugins/workletImportsPlugin.native.js.map +1 -1
  160. package/dist/rn-commands/bundle/buildBundle.mjs +45 -79
  161. package/dist/rn-commands/bundle/buildBundle.mjs.map +1 -1
  162. package/dist/rn-commands/bundle/buildBundle.native.js +45 -85
  163. package/dist/rn-commands/bundle/buildBundle.native.js.map +1 -1
  164. package/dist/runtime/hmr-client.mjs +133 -140
  165. package/dist/runtime/hmr-client.mjs.map +1 -1
  166. package/dist/runtime/hmr-client.native.js +223 -222
  167. package/dist/runtime/hmr-client.native.js.map +1 -1
  168. package/dist/runtime/hmr-runtime.mjs +192 -194
  169. package/dist/runtime/hmr-runtime.mjs.map +1 -1
  170. package/dist/runtime/hmr-runtime.native.js +424 -411
  171. package/dist/runtime/hmr-runtime.native.js.map +1 -1
  172. package/dist/runtime/hmr-types.mjs +0 -2
  173. package/dist/runtime/hmr-types.native.js +0 -2
  174. package/dist/runtime/native-prelude.mjs +2 -1
  175. package/dist/runtime/native-prelude.mjs.map +1 -1
  176. package/dist/runtime/native-prelude.native.js +2 -1
  177. package/dist/runtime/native-prelude.native.js.map +1 -1
  178. package/dist/runtime/react-refresh-utils.mjs +23 -22
  179. package/dist/runtime/react-refresh-utils.mjs.map +1 -1
  180. package/dist/runtime/react-refresh-utils.native.js +23 -27
  181. package/dist/runtime/react-refresh-utils.native.js.map +1 -1
  182. package/dist/serve/node.mjs +49 -49
  183. package/dist/serve/node.mjs.map +1 -1
  184. package/dist/serve/node.native.js +92 -96
  185. package/dist/serve/node.native.js.map +1 -1
  186. package/dist/types.mjs +0 -2
  187. package/dist/types.native.js +0 -2
  188. package/dist/user-interface/index.mjs +245 -262
  189. package/dist/user-interface/index.mjs.map +1 -1
  190. package/dist/user-interface/index.native.js +274 -298
  191. package/dist/user-interface/index.native.js.map +1 -1
  192. package/dist/utils/assert.mjs +7 -6
  193. package/dist/utils/assert.mjs.map +1 -1
  194. package/dist/utils/assert.native.js +7 -18
  195. package/dist/utils/assert.native.js.map +1 -1
  196. package/dist/utils/bindKeypressInput.mjs +36 -38
  197. package/dist/utils/bindKeypressInput.mjs.map +1 -1
  198. package/dist/utils/bindKeypressInput.native.js +36 -38
  199. package/dist/utils/bindKeypressInput.native.js.map +1 -1
  200. package/dist/utils/coerceToArray.mjs +2 -1
  201. package/dist/utils/coerceToArray.mjs.map +1 -1
  202. package/dist/utils/coerceToArray.native.js +2 -1
  203. package/dist/utils/coerceToArray.native.js.map +1 -1
  204. package/dist/utils/connectedNativeClients.mjs +3 -2
  205. package/dist/utils/connectedNativeClients.mjs.map +1 -1
  206. package/dist/utils/connectedNativeClients.native.js +3 -2
  207. package/dist/utils/connectedNativeClients.native.js.map +1 -1
  208. package/dist/utils/createNativeDevEngine.mjs +992 -966
  209. package/dist/utils/createNativeDevEngine.mjs.map +1 -1
  210. package/dist/utils/createNativeDevEngine.native.js +1184 -1179
  211. package/dist/utils/createNativeDevEngine.native.js.map +1 -1
  212. package/dist/utils/dispose.mjs +4 -3
  213. package/dist/utils/dispose.mjs.map +1 -1
  214. package/dist/utils/dispose.native.js +6 -5
  215. package/dist/utils/dispose.native.js.map +1 -1
  216. package/dist/utils/environmentUtils.mjs +5 -4
  217. package/dist/utils/environmentUtils.mjs.map +1 -1
  218. package/dist/utils/environmentUtils.native.js +5 -4
  219. package/dist/utils/environmentUtils.native.js.map +1 -1
  220. package/dist/utils/execSync.mjs +7 -5
  221. package/dist/utils/execSync.mjs.map +1 -1
  222. package/dist/utils/execSync.native.js +8 -6
  223. package/dist/utils/execSync.native.js.map +1 -1
  224. package/dist/utils/expoRun.mjs +27 -35
  225. package/dist/utils/expoRun.mjs.map +1 -1
  226. package/dist/utils/expoRun.native.js +27 -35
  227. package/dist/utils/expoRun.native.js.map +1 -1
  228. package/dist/utils/filterViteServerResolvedUrls.mjs +24 -22
  229. package/dist/utils/filterViteServerResolvedUrls.mjs.map +1 -1
  230. package/dist/utils/filterViteServerResolvedUrls.native.js +61 -63
  231. package/dist/utils/filterViteServerResolvedUrls.native.js.map +1 -1
  232. package/dist/utils/getBoundPort.mjs +6 -5
  233. package/dist/utils/getBoundPort.mjs.map +1 -1
  234. package/dist/utils/getBoundPort.native.js +8 -12
  235. package/dist/utils/getBoundPort.native.js.map +1 -1
  236. package/dist/utils/getCacheDir.mjs +3 -1
  237. package/dist/utils/getCacheDir.mjs.map +1 -1
  238. package/dist/utils/getCacheDir.native.js +3 -1
  239. package/dist/utils/getCacheDir.native.js.map +1 -1
  240. package/dist/utils/getServerEntry.mjs +6 -4
  241. package/dist/utils/getServerEntry.mjs.map +1 -1
  242. package/dist/utils/getServerEntry.native.js +8 -11
  243. package/dist/utils/getServerEntry.native.js.map +1 -1
  244. package/dist/utils/getVitePath.mjs +42 -42
  245. package/dist/utils/getVitePath.mjs.map +1 -1
  246. package/dist/utils/getVitePath.native.js +43 -41
  247. package/dist/utils/getVitePath.native.js.map +1 -1
  248. package/dist/utils/globDir.mjs +7 -11
  249. package/dist/utils/globDir.mjs.map +1 -1
  250. package/dist/utils/globDir.native.js +10 -14
  251. package/dist/utils/globDir.native.js.map +1 -1
  252. package/dist/utils/isWithin.mjs +4 -2
  253. package/dist/utils/isWithin.mjs.map +1 -1
  254. package/dist/utils/isWithin.native.js +4 -2
  255. package/dist/utils/isWithin.native.js.map +1 -1
  256. package/dist/utils/patches.mjs +233 -255
  257. package/dist/utils/patches.mjs.map +1 -1
  258. package/dist/utils/patches.native.js +415 -460
  259. package/dist/utils/patches.native.js.map +1 -1
  260. package/dist/utils/printServerUrls.mjs +9 -7
  261. package/dist/utils/printServerUrls.mjs.map +1 -1
  262. package/dist/utils/printServerUrls.native.js +48 -51
  263. package/dist/utils/printServerUrls.native.js.map +1 -1
  264. package/dist/utils/removeUndefined.mjs +8 -7
  265. package/dist/utils/removeUndefined.mjs.map +1 -1
  266. package/dist/utils/removeUndefined.native.js +8 -7
  267. package/dist/utils/removeUndefined.native.js.map +1 -1
  268. package/dist/utils/scanDepsToOptimize.mjs +194 -161
  269. package/dist/utils/scanDepsToOptimize.mjs.map +1 -1
  270. package/dist/utils/scanDepsToOptimize.native.js +227 -197
  271. package/dist/utils/scanDepsToOptimize.native.js.map +1 -1
  272. package/dist/utils/state.mjs +18 -18
  273. package/dist/utils/state.mjs.map +1 -1
  274. package/dist/utils/state.native.js +18 -18
  275. package/dist/utils/state.native.js.map +1 -1
  276. package/dist/utils/symbolicateNativeStack.mjs +54 -54
  277. package/dist/utils/symbolicateNativeStack.mjs.map +1 -1
  278. package/dist/utils/symbolicateNativeStack.native.js +58 -58
  279. package/dist/utils/symbolicateNativeStack.native.js.map +1 -1
  280. package/dist/utils/uniq.mjs +2 -1
  281. package/dist/utils/uniq.mjs.map +1 -1
  282. package/dist/utils/uniq.native.js +2 -1
  283. package/dist/utils/uniq.native.js.map +1 -1
  284. package/dist/utils/utils.mjs +19 -19
  285. package/dist/utils/utils.mjs.map +1 -1
  286. package/dist/utils/utils.native.js +38 -40
  287. package/dist/utils/utils.native.js.map +1 -1
  288. package/dist/vendor/debugger-app/index.mjs +0 -2
  289. package/dist/vendor/debugger-app/index.native.js +0 -2
  290. package/dist/vendor/debugger-app/src/debuggerWorker.mjs +0 -2
  291. package/dist/vendor/debugger-app/src/debuggerWorker.native.js +0 -2
  292. package/dist/vendor/debugger-app/src/index.mjs +0 -2
  293. package/dist/vendor/debugger-app/src/index.native.js +0 -2
  294. package/dist/vxrn-vite-plugin.mjs +34 -33
  295. package/dist/vxrn-vite-plugin.mjs.map +1 -1
  296. package/dist/vxrn-vite-plugin.native.js +35 -34
  297. package/dist/vxrn-vite-plugin.native.js.map +1 -1
  298. package/expo-plugin.cjs +12 -6
  299. package/package.json +12 -13
  300. package/src/config/getBaseViteConfigOnly.ts +6 -0
  301. package/src/exports/prebuild.ts +40 -12
  302. package/src/patches/builtInDepPatches.ts +24 -48
  303. package/src/utils/createNativeDevEngine.test.ts +1 -1
  304. package/src/utils/createNativeDevEngine.ts +15 -9
  305. package/src/utils/scanDepsToOptimize.ts +0 -3
  306. package/types/config/getBaseViteConfigOnly.d.ts.map +1 -1
  307. package/types/config/getOptimizeDeps.d.ts.map +1 -1
  308. package/types/config/getOptionsFilled.d.ts +15 -15
  309. package/types/config/getOptionsFilled.d.ts.map +1 -1
  310. package/types/exports/build.d.ts +11 -11
  311. package/types/exports/build.d.ts.map +1 -1
  312. package/types/exports/clean.d.ts +1 -1
  313. package/types/exports/clean.d.ts.map +1 -1
  314. package/types/exports/createServer.d.ts.map +1 -1
  315. package/types/exports/dev.d.ts.map +1 -1
  316. package/types/exports/patch.d.ts.map +1 -1
  317. package/types/exports/prebuild.d.ts +3 -3
  318. package/types/exports/prebuild.d.ts.map +1 -1
  319. package/types/exports/prebuildWithoutExpo.d.ts +1 -1
  320. package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
  321. package/types/exports/runAndroid.d.ts.map +1 -1
  322. package/types/exports/runIos.d.ts.map +1 -1
  323. package/types/exports/serve.d.ts.map +1 -1
  324. package/types/patches/builtInDepPatches.d.ts.map +1 -1
  325. package/types/plugins/autoDepOptimizePlugin.d.ts.map +1 -1
  326. package/types/plugins/rollupRemoveUnusedImports.d.ts.map +1 -1
  327. package/types/runtime/hmr-client.d.ts.map +1 -1
  328. package/types/runtime/hmr-runtime.d.ts.map +1 -1
  329. package/types/runtime/hmr-types.d.ts.map +1 -1
  330. package/types/utils/createNativeDevEngine.d.ts +1 -1
  331. package/types/utils/createNativeDevEngine.d.ts.map +1 -1
  332. package/types/utils/execSync.d.ts.map +1 -1
  333. package/types/utils/getServerEntry.d.ts.map +1 -1
  334. package/types/utils/scanDepsToOptimize.d.ts.map +1 -1
  335. package/types/vxrn-vite-plugin.d.ts.map +1 -1
  336. package/dist/config/getOptimizeDeps.test.mjs +0 -20
  337. package/dist/config/getOptimizeDeps.test.mjs.map +0 -1
  338. package/dist/config/getOptimizeDeps.test.native.js +0 -39
  339. package/dist/config/getOptimizeDeps.test.native.js.map +0 -1
  340. package/dist/config/getServerOptionsFilled.test.mjs +0 -20
  341. package/dist/config/getServerOptionsFilled.test.mjs.map +0 -1
  342. package/dist/config/getServerOptionsFilled.test.native.js +0 -20
  343. package/dist/config/getServerOptionsFilled.test.native.js.map +0 -1
  344. package/dist/config/getViteServerConfig.test.mjs +0 -26
  345. package/dist/config/getViteServerConfig.test.mjs.map +0 -1
  346. package/dist/config/getViteServerConfig.test.native.js +0 -26
  347. package/dist/config/getViteServerConfig.test.native.js.map +0 -1
  348. package/dist/config/mergeUserConfig.test.mjs +0 -108
  349. package/dist/config/mergeUserConfig.test.mjs.map +0 -1
  350. package/dist/config/mergeUserConfig.test.native.js +0 -108
  351. package/dist/config/mergeUserConfig.test.native.js.map +0 -1
  352. package/dist/exports/clean.test.mjs +0 -81
  353. package/dist/exports/clean.test.mjs.map +0 -1
  354. package/dist/exports/clean.test.native.js +0 -88
  355. package/dist/exports/clean.test.native.js.map +0 -1
  356. package/dist/exports/loadEnv.test.mjs +0 -65
  357. package/dist/exports/loadEnv.test.mjs.map +0 -1
  358. package/dist/exports/loadEnv.test.native.js +0 -65
  359. package/dist/exports/loadEnv.test.native.js.map +0 -1
  360. package/dist/index.js.map +0 -1
  361. package/dist/index.mjs.map +0 -1
  362. package/dist/index.native.js.map +0 -1
  363. package/dist/plugins/autoDepOptimizePlugin.test.mjs +0 -31
  364. package/dist/plugins/autoDepOptimizePlugin.test.mjs.map +0 -1
  365. package/dist/plugins/autoDepOptimizePlugin.test.native.js +0 -39
  366. package/dist/plugins/autoDepOptimizePlugin.test.native.js.map +0 -1
  367. package/dist/plugins/resolveIdScan.test.mjs +0 -31
  368. package/dist/plugins/resolveIdScan.test.mjs.map +0 -1
  369. package/dist/plugins/resolveIdScan.test.native.js +0 -38
  370. package/dist/plugins/resolveIdScan.test.native.js.map +0 -1
  371. package/dist/plugins/rnCodegenPlugin.test.mjs +0 -239
  372. package/dist/plugins/rnCodegenPlugin.test.mjs.map +0 -1
  373. package/dist/plugins/rnCodegenPlugin.test.native.js +0 -242
  374. package/dist/plugins/rnCodegenPlugin.test.native.js.map +0 -1
  375. package/dist/plugins/serverExtensions.test.mjs +0 -106
  376. package/dist/plugins/serverExtensions.test.mjs.map +0 -1
  377. package/dist/plugins/serverExtensions.test.native.js +0 -117
  378. package/dist/plugins/serverExtensions.test.native.js.map +0 -1
  379. package/dist/runtime/hmr-types.mjs.map +0 -1
  380. package/dist/runtime/hmr-types.native.js.map +0 -1
  381. package/dist/serve/node.test.mjs +0 -60
  382. package/dist/serve/node.test.mjs.map +0 -1
  383. package/dist/serve/node.test.native.js +0 -72
  384. package/dist/serve/node.test.native.js.map +0 -1
  385. package/dist/types.mjs.map +0 -1
  386. package/dist/types.native.js.map +0 -1
  387. package/dist/utils/bindKeypressInput.test.mjs +0 -48
  388. package/dist/utils/bindKeypressInput.test.mjs.map +0 -1
  389. package/dist/utils/bindKeypressInput.test.native.js +0 -48
  390. package/dist/utils/bindKeypressInput.test.native.js.map +0 -1
  391. package/dist/utils/createNativeDevEngine.test.mjs +0 -1788
  392. package/dist/utils/createNativeDevEngine.test.mjs.map +0 -1
  393. package/dist/utils/createNativeDevEngine.test.native.js +0 -1942
  394. package/dist/utils/createNativeDevEngine.test.native.js.map +0 -1
  395. package/dist/utils/createNativeDevEngineFailure.test.mjs +0 -44
  396. package/dist/utils/createNativeDevEngineFailure.test.mjs.map +0 -1
  397. package/dist/utils/createNativeDevEngineFailure.test.native.js +0 -54
  398. package/dist/utils/createNativeDevEngineFailure.test.native.js.map +0 -1
  399. package/dist/utils/getBoundPort.test.mjs +0 -71
  400. package/dist/utils/getBoundPort.test.mjs.map +0 -1
  401. package/dist/utils/getBoundPort.test.native.js +0 -82
  402. package/dist/utils/getBoundPort.test.native.js.map +0 -1
  403. package/dist/utils/imageSizePatch.test.mjs +0 -29
  404. package/dist/utils/imageSizePatch.test.mjs.map +0 -1
  405. package/dist/utils/imageSizePatch.test.native.js +0 -30
  406. package/dist/utils/imageSizePatch.test.native.js.map +0 -1
  407. package/dist/utils/patches.test.mjs +0 -242
  408. package/dist/utils/patches.test.mjs.map +0 -1
  409. package/dist/utils/patches.test.native.js +0 -271
  410. package/dist/utils/patches.test.native.js.map +0 -1
  411. package/dist/utils/symbolicateNativeStack.test.mjs +0 -96
  412. package/dist/utils/symbolicateNativeStack.test.mjs.map +0 -1
  413. package/dist/utils/symbolicateNativeStack.test.native.js +0 -96
  414. package/dist/utils/symbolicateNativeStack.test.native.js.map +0 -1
  415. package/dist/vendor/debugger-app/index.mjs.map +0 -1
  416. package/dist/vendor/debugger-app/index.native.js.map +0 -1
  417. package/dist/vendor/debugger-app/src/debuggerWorker.mjs.map +0 -1
  418. package/dist/vendor/debugger-app/src/debuggerWorker.native.js.map +0 -1
  419. package/dist/vendor/debugger-app/src/index.mjs.map +0 -1
  420. package/dist/vendor/debugger-app/src/index.native.js.map +0 -1
  421. package/types/config/getOptimizeDeps.test.d.ts +0 -2
  422. package/types/config/getOptimizeDeps.test.d.ts.map +0 -1
  423. package/types/config/getServerOptionsFilled.test.d.ts +0 -2
  424. package/types/config/getServerOptionsFilled.test.d.ts.map +0 -1
  425. package/types/config/getViteServerConfig.test.d.ts +0 -2
  426. package/types/config/getViteServerConfig.test.d.ts.map +0 -1
  427. package/types/config/mergeUserConfig.test.d.ts +0 -2
  428. package/types/config/mergeUserConfig.test.d.ts.map +0 -1
  429. package/types/exports/clean.test.d.ts +0 -2
  430. package/types/exports/clean.test.d.ts.map +0 -1
  431. package/types/exports/loadEnv.test.d.ts +0 -2
  432. package/types/exports/loadEnv.test.d.ts.map +0 -1
  433. package/types/plugins/autoDepOptimizePlugin.test.d.ts +0 -2
  434. package/types/plugins/autoDepOptimizePlugin.test.d.ts.map +0 -1
  435. package/types/plugins/resolveIdScan.test.d.ts +0 -2
  436. package/types/plugins/resolveIdScan.test.d.ts.map +0 -1
  437. package/types/plugins/rnCodegenPlugin.test.d.ts +0 -2
  438. package/types/plugins/rnCodegenPlugin.test.d.ts.map +0 -1
  439. package/types/plugins/serverExtensions.test.d.ts +0 -2
  440. package/types/plugins/serverExtensions.test.d.ts.map +0 -1
  441. package/types/serve/node.test.d.ts +0 -2
  442. package/types/serve/node.test.d.ts.map +0 -1
  443. package/types/utils/bindKeypressInput.test.d.ts +0 -2
  444. package/types/utils/bindKeypressInput.test.d.ts.map +0 -1
  445. package/types/utils/createNativeDevEngine.test.d.ts +0 -2
  446. package/types/utils/createNativeDevEngine.test.d.ts.map +0 -1
  447. package/types/utils/createNativeDevEngineFailure.test.d.ts +0 -2
  448. package/types/utils/createNativeDevEngineFailure.test.d.ts.map +0 -1
  449. package/types/utils/getBoundPort.test.d.ts +0 -2
  450. package/types/utils/getBoundPort.test.d.ts.map +0 -1
  451. package/types/utils/imageSizePatch.test.d.ts +0 -2
  452. package/types/utils/imageSizePatch.test.d.ts.map +0 -1
  453. package/types/utils/patches.test.d.ts +0 -2
  454. package/types/utils/patches.test.d.ts.map +0 -1
  455. package/types/utils/symbolicateNativeStack.test.d.ts +0 -2
  456. package/types/utils/symbolicateNativeStack.test.d.ts.map +0 -1
@@ -1,228 +1,181 @@
1
1
  import { assertString } from "../utils/assert.native.js";
2
2
  import { bailIfExists, bailIfUnchanged } from "../utils/patches.native.js";
3
+
3
4
  var builtInDepPatches = [
4
- // @react-navigation/core 7.17 renamed createComponentForStaticNavigation to
5
- // createComponentForStaticConfigDeprecated, breaking @react-navigation/native
6
- // which still imports the old name. re-export the old name as an alias.
7
- {
8
- module: "@react-navigation/core",
9
- patchFiles: {
10
- version: ">=7.17.0 <8.0.0",
11
- "lib/module/index.js": function (contents) {
12
- assertString(contents);
13
- if (contents.includes("createComponentForStaticNavigation")) return;
14
- if (!contents.includes("createComponentForStaticConfigDeprecated")) return;
15
- return contents.replace(/export \{ createComponentForStaticConfigDeprecated as createComponentForStaticConfig,/, "export { createComponentForStaticConfigDeprecated as createComponentForStaticConfig, createComponentForStaticConfigDeprecated as createComponentForStaticNavigation,");
16
- },
17
- "lib/commonjs/index.js": function (contents) {
18
- if (!contents) return;
19
- if (contents.includes("createComponentForStaticNavigation")) return;
20
- if (!contents.includes("createComponentForStaticConfigDeprecated")) return;
21
- return contents.replace(/createComponentForStaticConfigDeprecated as createComponentForStaticConfig,/, "createComponentForStaticConfigDeprecated as createComponentForStaticConfig, createComponentForStaticConfigDeprecated as createComponentForStaticNavigation,");
22
- }
23
- }
24
- },
25
- // react-native-maps ships TypeScript source, and every map child component
26
- // declares the members decorateMapComponent installs on the prototype as
27
- // definite-assignment class fields (`getNativeComponent!: () => ...`). oxc
28
- // keeps a field declaration that has no initializer, so constructing the
29
- // component gives each instance its own `undefined` property that shadows the
30
- // prototype method, and the first render throws "this.getNativeComponent is
31
- // not a function". babel's loose class properties erase these on native, so
32
- // only the vite side breaks. oxc ignores useDefineForClassFields, so no
33
- // tsconfig or oxc option reaches this; `declare` is what the declaration
34
- // always meant and every transform erases it.
35
- {
36
- module: "react-native-maps",
37
- patchFiles: {
38
- "src/*.tsx": function (contents) {
39
- assertString(contents);
40
- var patched = contents.replace(/^(\s*)(context|getNativeComponent|getMapManagerCommand|getUIManagerCommand)!:/gm, "$1declare $2:");
41
- bailIfUnchanged(patched, contents);
42
- return patched;
43
- }
44
- }
45
- },
46
- // react-native-web doesn't export unstable_batchedUpdates but react-native does,
47
- // so libraries like @legendapp/list break when aliased to rnw on web
48
- {
49
- module: "react-native-web",
50
- patchFiles: {
51
- "dist/index.js": function (contents) {
52
- assertString(contents);
53
- bailIfExists(contents, "unstable_batchedUpdates");
54
- return `${contents}
5
+ {
6
+ module: "@react-navigation/core",
7
+ patchFiles: {
8
+ version: ">=7.17.0 <8.0.0",
9
+ "lib/module/index.js": function(contents) {
10
+ assertString(contents);
11
+ if (contents.includes("createComponentForStaticNavigation")) return;
12
+ if (!contents.includes("createComponentForStaticConfigDeprecated")) return;
13
+ return contents.replace(/export \{ createComponentForStaticConfigDeprecated as createComponentForStaticConfig,/, "export { createComponentForStaticConfigDeprecated as createComponentForStaticConfig, createComponentForStaticConfigDeprecated as createComponentForStaticNavigation,");
14
+ },
15
+ "lib/commonjs/index.js": function(contents) {
16
+ if (!contents) return;
17
+ if (contents.includes("createComponentForStaticNavigation")) return;
18
+ if (!contents.includes("createComponentForStaticConfigDeprecated")) return;
19
+ return contents.replace(/createComponentForStaticConfigDeprecated as createComponentForStaticConfig,/, "createComponentForStaticConfigDeprecated as createComponentForStaticConfig, createComponentForStaticConfigDeprecated as createComponentForStaticNavigation,");
20
+ }
21
+ }
22
+ },
23
+ {
24
+ module: "react-native-maps",
25
+ patchFiles: { "src/*.tsx": function(contents) {
26
+ assertString(contents);
27
+ var patched = contents.replace(/^(\s*)(context|getNativeComponent|getMapManagerCommand|getUIManagerCommand)!:/gm, "$1declare $2:");
28
+ bailIfUnchanged(patched, contents);
29
+ return patched;
30
+ } }
31
+ },
32
+ {
33
+ module: "react-native-web",
34
+ patchFiles: { "dist/index.js": function(contents) {
35
+ assertString(contents);
36
+ bailIfExists(contents, "unstable_batchedUpdates");
37
+ return `${contents}
55
38
  export { unstable_batchedUpdates } from 'react-dom';
56
39
  `;
57
- }
58
- }
59
- }, {
60
- module: "react",
61
- patchFiles: {
62
- version: "18.*",
63
- "compiler-runtime.js": `module.exports = require('@vxrn/vendor/react-19-compiler-runtime');`,
64
- "index.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-19');`,
65
- "jsx-dev-runtime.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-jsx-dev-19');`,
66
- "jsx-runtime.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-jsx-19');`,
67
- "package.json": function (contents) {
68
- assertString(contents);
69
- var pkg = JSON.parse(contents);
70
- if (pkg.version.startsWith("19.")) {
71
- return;
72
- }
73
- var existingExports = {
74
- ...pkg.exports
75
- };
76
- if (!pkg.exports["."]) {
77
- throw new Error(`Expected a version of React that has package.json exports defined`);
78
- }
79
- pkg.exports["."] = {
80
- "react-server": "./react.shared-subset.js",
81
- "vxrn-web": "./index.vxrn-web.js",
82
- default: "./index.js"
83
- };
84
- pkg.exports["./jsx-runtime"] = {
85
- "vxrn-web": "./jsx-runtime.vxrn-web.js",
86
- default: "./jsx-runtime.js"
87
- };
88
- pkg.exports["./compiler-runtime"] = {
89
- default: "./compiler-runtime.js"
90
- };
91
- pkg.exports["./jsx-dev-runtime"] = {
92
- "vxrn-web": "./jsx-dev-runtime.vxrn-web.js",
93
- default: "./jsx-dev-runtime.js"
94
- };
95
- bailIfUnchanged(existingExports, pkg.exports);
96
- return JSON.stringify(pkg, null, 2);
97
- },
98
- // for prod builds we have to actually change the entries:
99
- // to avoid terrible metro we have to eval :(
100
- "index.js": function (contents) {
101
- assertString(contents);
102
- return `
40
+ } }
41
+ },
42
+ {
43
+ module: "react",
44
+ patchFiles: {
45
+ version: "18.*",
46
+ "compiler-runtime.js": `module.exports = require('@vxrn/vendor/react-19-compiler-runtime');`,
47
+ "index.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-19');`,
48
+ "jsx-dev-runtime.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-jsx-dev-19');`,
49
+ "jsx-runtime.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-jsx-19');`,
50
+ "package.json": function(contents) {
51
+ assertString(contents);
52
+ var pkg = JSON.parse(contents);
53
+ if (pkg.version.startsWith("19.")) {
54
+ return;
55
+ }
56
+ var existingExports = { ...pkg.exports };
57
+ if (!pkg.exports["."]) {
58
+ throw new Error(`Expected a version of React that has package.json exports defined`);
59
+ }
60
+ pkg.exports["."] = {
61
+ "react-server": "./react.shared-subset.js",
62
+ "vxrn-web": "./index.vxrn-web.js",
63
+ default: "./index.js"
64
+ };
65
+ pkg.exports["./jsx-runtime"] = {
66
+ "vxrn-web": "./jsx-runtime.vxrn-web.js",
67
+ default: "./jsx-runtime.js"
68
+ };
69
+ pkg.exports["./compiler-runtime"] = { default: "./compiler-runtime.js" };
70
+ pkg.exports["./jsx-dev-runtime"] = {
71
+ "vxrn-web": "./jsx-dev-runtime.vxrn-web.js",
72
+ default: "./jsx-dev-runtime.js"
73
+ };
74
+ bailIfUnchanged(existingExports, pkg.exports);
75
+ return JSON.stringify(pkg, null, 2);
76
+ },
77
+ "index.js": function(contents) {
78
+ assertString(contents);
79
+ return `
103
80
  if (process.env.VXRN_REACT_19) { Object.assign(exports, eval("require('@vxrn/vendor/react-19')")) } else {
104
81
  ${contents}
105
82
  }`;
106
- },
107
- // to avoid terrible metro we have to eval :(
108
- "jsx-runtime.js": function (contents) {
109
- assertString(contents);
110
- return `
83
+ },
84
+ "jsx-runtime.js": function(contents) {
85
+ assertString(contents);
86
+ return `
111
87
  if (process.env.VXRN_REACT_19) { Object.assign(exports, eval("require('@vxrn/vendor/react-jsx-19')")) } else {
112
88
  ${contents}
113
89
  }`;
114
- }
115
- }
116
- }, {
117
- module: "react-dom",
118
- patchFiles: {
119
- version: "18.*",
120
- // for prod builds we have to actually change the entries:
121
- "index.js": function (contents) {
122
- assertString(contents);
123
- return `
90
+ }
91
+ }
92
+ },
93
+ {
94
+ module: "react-dom",
95
+ patchFiles: {
96
+ version: "18.*",
97
+ "index.js": function(contents) {
98
+ assertString(contents);
99
+ return `
124
100
  if (process.env.VXRN_REACT_19) { Object.assign(exports, eval("require('@vxrn/vendor/react-dom-19')")) } else {
125
101
  ${contents}
126
102
  }`;
127
- },
128
- "client.js": function (contents) {
129
- assertString(contents);
130
- return `
103
+ },
104
+ "client.js": function(contents) {
105
+ assertString(contents);
106
+ return `
131
107
  if (process.env.VXRN_REACT_19) { Object.assign(exports, eval("require('@vxrn/vendor/react-dom-client-19')")) } else {
132
108
  ${contents}
133
109
  }`;
134
- },
135
- "server.browser.js": function (contents) {
136
- assertString(contents);
137
- return `
110
+ },
111
+ "server.browser.js": function(contents) {
112
+ assertString(contents);
113
+ return `
138
114
  if (process.env.VXRN_REACT_19) { Object.assign(exports, require('@vxrn/vendor/react-dom-server.browser-19')) } else {
139
115
  ${contents}
140
116
  }`;
141
- },
142
- "client.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-client-19')`,
143
- "index.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-19')`,
144
- "server.browser.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-server.browser-19')`,
145
- "test-utils.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-test-utils-19')`,
146
- "package.json": function (contents) {
147
- assertString(contents);
148
- var pkg = JSON.parse(contents);
149
- if (pkg.version.startsWith("19.")) {
150
- return;
151
- }
152
- var existingExports = {
153
- ...pkg.exports
154
- };
155
- if (!pkg.exports["."]) {
156
- throw new Error(`Expected a version of React that has package.json exports defined`);
157
- }
158
- pkg.exports["."] = {
159
- "vxrn-web": "./index.vxrn-web.js",
160
- default: "./index.js"
161
- };
162
- pkg.exports["./client"] = {
163
- "vxrn-web": "./client.vxrn-web.js",
164
- default: "./client.js"
165
- };
166
- pkg.exports["./server.browser"] = {
167
- "vxrn-web": "./server.browser.vxrn-web.js",
168
- default: "./server.browser.js"
169
- };
170
- pkg.exports["./test-utils"] = {
171
- "vxrn-web": "./test-utils.vxrn-web.js",
172
- default: "./test-utils.js"
173
- };
174
- bailIfUnchanged(existingExports, pkg.exports);
175
- return JSON.stringify(pkg, null, 2);
176
- }
177
- }
178
- },
179
- // Older versions of the cli-config package will not look for `.cjs` files when loading the config. This isn't necessary for v14.x (which comes with RN 0.75). See: https://hackmd.io/@z/SJghMPN6C.
180
- {
181
- module: "@react-native-community/cli-config",
182
- patchFiles: {
183
- version: ">=13.0.0 <16.0.0",
184
- "build/readConfigFromDisk.js": function (contents) {
185
- assertString(contents);
186
- return contents.replace(`['react-native.config.js']`, `['react-native.config.js', 'react-native.config.cjs']`).replace("searchPlaces,", `searchPlaces, loaders: { '.cjs': _cosmiconfig().default.loadJs },`).replace("stopDir: rootFolder,", `stopDir: rootFolder, loaders: { '.cjs': _cosmiconfig().default.loadJs },`);
187
- }
188
- }
189
- }, {
190
- module: "react-native-reanimated",
191
- patchFiles: {
192
- // reanimated 4 ships no JSX in its `.js`. Measured against 4.5.1: all 374
193
- // files parse with SWC at `jsx: false`, and the only JSX-shaped text is
194
- // inside comments. The transform still rewrote and reformatted every one
195
- // of them, which is how a patch aimed at reanimated ended up re-printing
196
- // its nested `semver` and giving one package@version two contents on
197
- // disk. Left in place below 4 rather than deleted, because we verified 4
198
- // and not the 3.x line.
199
- version: "<4.0.0",
200
- "**/*.js": ["jsx"]
201
- }
202
- },
203
- // fix RNGH crash on RN 0.81+ new architecture
204
- // getShadowNodeFromRef crashes when findHostInstance_DEPRECATED returns null
205
- {
206
- module: "react-native-gesture-handler",
207
- patchFiles: {
208
- // no upper bound. this was capped at 2.30.0, but 2.32.0 still ships the
209
- // exact unsafe line in all three targets, so the cap silently dropped the
210
- // crash guard rather than retiring it. each replacement is a no-op when
211
- // its target is absent, so an uncapped range retires itself.
212
- version: ">=2.0.0",
213
- "lib/module/getShadowNodeFromRef.js": function (contents) {
214
- return contents === null || contents === void 0 ? void 0 : contents.replace(`return getInternalInstanceHandleFromPublicInstance(findHostInstance_DEPRECATED(ref)).stateNode.node;`, `const hostInstance = findHostInstance_DEPRECATED(ref);
215
- if (hostInstance === null || hostInstance === undefined) {
216
- return null;
217
- }
218
- const internalHandle = getInternalInstanceHandleFromPublicInstance(hostInstance);
219
- if (internalHandle === null || internalHandle === undefined) {
220
- return null;
221
- }
222
- return internalHandle.stateNode?.node ?? null;`);
223
- },
224
- "lib/commonjs/getShadowNodeFromRef.js": function (contents) {
225
- return contents === null || contents === void 0 ? void 0 : contents.replace(`return getInternalInstanceHandleFromPublicInstance(findHostInstance_DEPRECATED(ref)).stateNode.node;`, `const hostInstance = findHostInstance_DEPRECATED(ref);
117
+ },
118
+ "client.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-client-19')`,
119
+ "index.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-19')`,
120
+ "server.browser.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-server.browser-19')`,
121
+ "test-utils.vxrn-web.js": `module.exports = require('@vxrn/vendor/react-dom-test-utils-19')`,
122
+ "package.json": function(contents) {
123
+ assertString(contents);
124
+ var pkg = JSON.parse(contents);
125
+ if (pkg.version.startsWith("19.")) {
126
+ return;
127
+ }
128
+ var existingExports = { ...pkg.exports };
129
+ if (!pkg.exports["."]) {
130
+ throw new Error(`Expected a version of React that has package.json exports defined`);
131
+ }
132
+ pkg.exports["."] = {
133
+ "vxrn-web": "./index.vxrn-web.js",
134
+ default: "./index.js"
135
+ };
136
+ pkg.exports["./client"] = {
137
+ "vxrn-web": "./client.vxrn-web.js",
138
+ default: "./client.js"
139
+ };
140
+ pkg.exports["./server.browser"] = {
141
+ "vxrn-web": "./server.browser.vxrn-web.js",
142
+ default: "./server.browser.js"
143
+ };
144
+ pkg.exports["./test-utils"] = {
145
+ "vxrn-web": "./test-utils.vxrn-web.js",
146
+ default: "./test-utils.js"
147
+ };
148
+ bailIfUnchanged(existingExports, pkg.exports);
149
+ return JSON.stringify(pkg, null, 2);
150
+ }
151
+ }
152
+ },
153
+ {
154
+ module: "@react-native-community/cli-config",
155
+ patchFiles: {
156
+ version: ">=13.0.0 <16.0.0",
157
+ "build/readConfigFromDisk.js": function(contents) {
158
+ assertString(contents);
159
+ return contents.replace(`['react-native.config.js']`, `['react-native.config.js', 'react-native.config.cjs']`).replace("searchPlaces,", `searchPlaces, loaders: { '.cjs': _cosmiconfig().default.loadJs },`).replace("stopDir: rootFolder,", `stopDir: rootFolder, loaders: { '.cjs': _cosmiconfig().default.loadJs },`);
160
+ }
161
+ }
162
+ },
163
+ {
164
+ module: "react-native-reanimated",
165
+ patchFiles: {
166
+ version: "<4.0.0",
167
+ "**/*.js": ["jsx"]
168
+ }
169
+ },
170
+ {
171
+ module: "react-native-gesture-handler",
172
+ patchFiles: {
173
+ version: ">=3.0.0",
174
+ "lib/module/getShadowNodeFromRef.js": function(contents) {
175
+ return contents === null || contents === void 0 ? void 0 : contents.replace(`const hostInstance = isAlreadyHostInstance ? ref : findHostInstance_DEPRECATED(ref);
176
+
177
+ // @ts-ignore Fabric
178
+ return getInternalInstanceHandleFromPublicInstance(hostInstance).stateNode.node;`, `const hostInstance = isAlreadyHostInstance ? ref : findHostInstance_DEPRECATED(ref);
226
179
  if (hostInstance === null || hostInstance === undefined) {
227
180
  return null;
228
181
  }
@@ -231,12 +184,17 @@ ${contents}
231
184
  return null;
232
185
  }
233
186
  return internalHandle.stateNode?.node ?? null;`);
234
- },
235
- // metro uses src/ directly via "react-native" field in package.json
236
- "src/getShadowNodeFromRef.ts": function (contents) {
237
- return contents === null || contents === void 0 ? void 0 : contents.replace(`return getInternalInstanceHandleFromPublicInstance(
238
- findHostInstance_DEPRECATED(ref)
239
- ).stateNode.node;`, `const hostInstance = findHostInstance_DEPRECATED(ref);
187
+ },
188
+ "src/getShadowNodeFromRef.ts": function(contents) {
189
+ return contents === null || contents === void 0 ? void 0 : contents.replace(`const hostInstance = isAlreadyHostInstance
190
+ ? ref
191
+ : findHostInstance_DEPRECATED(ref);
192
+
193
+ // @ts-ignore Fabric
194
+ return getInternalInstanceHandleFromPublicInstance(hostInstance).stateNode
195
+ .node;`, `const hostInstance = isAlreadyHostInstance
196
+ ? ref
197
+ : findHostInstance_DEPRECATED(ref);
240
198
  if (hostInstance === null || hostInstance === undefined) {
241
199
  return null;
242
200
  }
@@ -245,40 +203,36 @@ ${contents}
245
203
  return null;
246
204
  }
247
205
  return internalHandle.stateNode?.node ?? null;`);
248
- }
249
- }
250
- }, {
251
- module: "@react-native-masked-view/masked-view",
252
- patchFiles: {
253
- "**/*.js": ["flow", "swc"]
254
- }
255
- }, {
256
- module: "react-native-vector-icons",
257
- patchFiles: {
258
- "**/*.js": ["jsx", "flow"]
259
- }
260
- }, {
261
- module: "react-native-webview",
262
- patchFiles: {
263
- "**/*.js": ["jsx"]
264
- }
265
- }, {
266
- module: "@react-native/assets-registry",
267
- patchFiles: {
268
- "**/*.js": ["flow"]
269
- }
270
- }, {
271
- module: "expo",
272
- patchFiles: {
273
- "build/**/*.js": ["jsx"]
274
- }
275
- }, {
276
- module: "expo",
277
- patchFiles: {
278
- version: ">=52.0.0 <56.0.0",
279
- "src/winter/runtime.native.ts": function (contents) {
280
- assertString(contents);
281
- return contents.replace(`
206
+ }
207
+ }
208
+ },
209
+ {
210
+ module: "@react-native-masked-view/masked-view",
211
+ patchFiles: { "**/*.js": ["flow", "swc"] }
212
+ },
213
+ {
214
+ module: "react-native-vector-icons",
215
+ patchFiles: { "**/*.js": ["jsx", "flow"] }
216
+ },
217
+ {
218
+ module: "react-native-webview",
219
+ patchFiles: { "**/*.js": ["jsx"] }
220
+ },
221
+ {
222
+ module: "@react-native/assets-registry",
223
+ patchFiles: { "**/*.js": ["flow"] }
224
+ },
225
+ {
226
+ module: "expo",
227
+ patchFiles: { "build/**/*.js": ["jsx"] }
228
+ },
229
+ {
230
+ module: "expo",
231
+ patchFiles: {
232
+ version: ">=52.0.0 <56.0.0",
233
+ "src/winter/runtime.native.ts": function(contents) {
234
+ assertString(contents);
235
+ return contents.replace(`
282
236
  // https://encoding.spec.whatwg.org/#textdecoder
283
237
  install('TextDecoder', () => require('./TextDecoder').TextDecoder);
284
238
  // https://url.spec.whatwg.org/#url
@@ -297,211 +251,168 @@ install('URL', () => URL);
297
251
  // https://url.spec.whatwg.org/#urlsearchparams
298
252
  install('URLSearchParams', () => URLSearchParams);
299
253
  `.trim());
300
- }
301
- }
302
- }, {
303
- module: "expo-modules-core",
304
- patchFiles: {
305
- version: "<=55.*",
306
- "src/**/*.ts": addNoCheck,
307
- "src/**/*.tsx": addNoCheck
308
- }
309
- }, {
310
- module: "@expo/cli",
311
- patchFiles: {
312
- version: "<=55",
313
- "build/src/export/embed/exportEmbedAsync.js": function (contents) {
314
- return contents === null || contents === void 0 ? void 0 : contents.replace("exportEmbedAsync(projectRoot, options) {", 'exportEmbedAsync(projectRoot, options) { console.warn("[one] skipping expo export:embed since it will not work properly, we just let the JS bundle build during the native build process where VxRN has control"); return;');
315
- }
316
- }
317
- }, {
318
- module: "expo-liquid-glass-view",
319
- patchFiles: {
320
- "build/**/*.js": ["jsx"]
321
- }
322
- }, {
323
- module: "expo-ios-popover-tip",
324
- patchFiles: {
325
- "build/**/*.js": ["jsx"]
326
- }
327
- }, {
328
- module: "expo-ios-text-animations",
329
- patchFiles: {
330
- "build/**/*.js": ["jsx"]
331
- }
332
- }, {
333
- module: "expo-ios-mesh-gradient",
334
- patchFiles: {
335
- "build/**/*.js": ["jsx"]
336
- }
337
- }, {
338
- module: "expo-glass-effect",
339
- patchFiles: {
340
- "build/**/*.js": ["jsx"]
341
- }
342
- }, {
343
- module: "@expo/ui",
344
- patchFiles: {
345
- "build/**/*.js": ["jsx"]
346
- }
347
- }, {
348
- module: "expo-image",
349
- patchFiles: {
350
- "build/**/*.js": ["jsx"]
351
- }
352
- }, {
353
- module: "expo-linear-gradient",
354
- patchFiles: {
355
- "build/**/*.js": ["jsx"]
356
- }
357
- }, {
358
- module: "expo-apple-authentication",
359
- patchFiles: {
360
- "build/**/*.js": ["jsx"]
361
- }
362
- }, {
363
- module: "react-native-css-interop",
364
- patchFiles: {
365
- // 2 of 53 dist files genuinely need JSX parsing, so this one is real.
366
- //
367
- // Two sibling patches were removed here, both dead. A `wrap-jsx.js` entry
368
- // tried to hoist `require("./components")` out of the function so
369
- // cssInterop registration runs, but `patches.ts` selects with
370
- // `filePatches.find(relativePath)` and `dist/**/*.js` is declared first,
371
- // so the glob shadowed it and the hoist never executed once: the patched
372
- // file on disk still has the require inside the function. A `package.json`
373
- // entry set `sideEffects` to keep components.js from being tree-shaken,
374
- // and 0.2.6 already ships exactly that value.
375
- //
376
- // So nativewind registration has never actually been hoisted by this
377
- // patch. Anyone deciding whether to keep the CSS-on-native path should
378
- // start from that, not from the assumption that it works today.
379
- "dist/**/*.js": ["jsx"]
380
- }
381
- }, {
382
- module: "expo-video",
383
- patchFiles: {
384
- "build/index.js": function (contents) {
385
- return contents === null || contents === void 0 ? void 0 : contents.replace(`export { VideoThumbnail } from './VideoThumbnail';`, ``);
386
- },
387
- "build/**/*.js": ["jsx"]
388
- }
389
- }, {
390
- module: "expo-clipboard",
391
- patchFiles: {
392
- "build/**/*.js": ["jsx"]
393
- }
394
- }, {
395
- module: "@expo/vector-icons",
396
- patchFiles: {
397
- "build/**/*.js": ["jsx"]
398
- }
399
- }, {
400
- module: "@sentry/react-native",
401
- patchFiles: {
402
- version: ">=5.6.0",
403
- "dist/**/*.js": ["jsx"]
404
- }
405
- }, {
406
- module: "@sentry/react-native",
407
- patchFiles: {
408
- version: ">=5.0.0 <5.6.0",
409
- "dist/js/utils/environment.js": function (contents) {
410
- assertString(contents);
411
- return contents.replace(`import { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';`, `import { Platform } from 'react-native';
254
+ }
255
+ }
256
+ },
257
+ {
258
+ module: "expo-modules-core",
259
+ patchFiles: {
260
+ version: "<=55.*",
261
+ "src/**/*.ts": addNoCheck,
262
+ "src/**/*.tsx": addNoCheck
263
+ }
264
+ },
265
+ {
266
+ module: "@expo/cli",
267
+ patchFiles: {
268
+ version: "<=55",
269
+ "build/src/export/embed/exportEmbedAsync.js": function(contents) {
270
+ return contents === null || contents === void 0 ? void 0 : contents.replace("exportEmbedAsync(projectRoot, options) {", "exportEmbedAsync(projectRoot, options) { console.warn(\"[one] skipping expo export:embed since it will not work properly, we just let the JS bundle build during the native build process where VxRN has control\"); return;");
271
+ }
272
+ }
273
+ },
274
+ {
275
+ module: "expo-liquid-glass-view",
276
+ patchFiles: { "build/**/*.js": ["jsx"] }
277
+ },
278
+ {
279
+ module: "expo-ios-popover-tip",
280
+ patchFiles: { "build/**/*.js": ["jsx"] }
281
+ },
282
+ {
283
+ module: "expo-ios-text-animations",
284
+ patchFiles: { "build/**/*.js": ["jsx"] }
285
+ },
286
+ {
287
+ module: "expo-ios-mesh-gradient",
288
+ patchFiles: { "build/**/*.js": ["jsx"] }
289
+ },
290
+ {
291
+ module: "expo-glass-effect",
292
+ patchFiles: { "build/**/*.js": ["jsx"] }
293
+ },
294
+ {
295
+ module: "@expo/ui",
296
+ patchFiles: { "build/**/*.js": ["jsx"] }
297
+ },
298
+ {
299
+ module: "expo-image",
300
+ patchFiles: { "build/**/*.js": ["jsx"] }
301
+ },
302
+ {
303
+ module: "expo-linear-gradient",
304
+ patchFiles: { "build/**/*.js": ["jsx"] }
305
+ },
306
+ {
307
+ module: "expo-apple-authentication",
308
+ patchFiles: { "build/**/*.js": ["jsx"] }
309
+ },
310
+ {
311
+ module: "react-native-css-interop",
312
+ patchFiles: { "dist/**/*.js": ["jsx"] }
313
+ },
314
+ {
315
+ module: "expo-video",
316
+ patchFiles: { "build/**/*.js": ["jsx"] }
317
+ },
318
+ {
319
+ module: "expo-clipboard",
320
+ patchFiles: { "build/**/*.js": ["jsx"] }
321
+ },
322
+ {
323
+ module: "@expo/vector-icons",
324
+ patchFiles: { "build/**/*.js": ["jsx"] }
325
+ },
326
+ {
327
+ module: "@sentry/react-native",
328
+ patchFiles: {
329
+ version: ">=5.6.0",
330
+ "dist/**/*.js": ["jsx"]
331
+ }
332
+ },
333
+ {
334
+ module: "@sentry/react-native",
335
+ patchFiles: {
336
+ version: ">=5.0.0 <5.6.0",
337
+ "dist/js/utils/environment.js": function(contents) {
338
+ assertString(contents);
339
+ return contents.replace(`import { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';`, `import { Platform } from 'react-native';
412
340
  const RNV = Platform.constants.reactNativeVersion;
413
341
  `);
414
- },
415
- "dist/**/*.js": ["jsx"]
416
- }
417
- }, {
418
- module: "qrcode",
419
- patchFiles: {
420
- version: "<=1.5.1",
421
- "lib/server.js": function (contents) {
422
- assertString(contents);
423
- return contents.replace(`const TerminalRenderer = require('./renderer/terminal')`, `const TerminalRenderer = require('./renderer/terminal.js')`);
424
- }
425
- }
426
- }, {
427
- module: "expo-camera",
428
- patchFiles: {
429
- "**/*.js": ["jsx"]
430
- }
431
- }, {
432
- module: "expo-blur",
433
- patchFiles: {
434
- "**/*.js": ["jsx"]
435
- }
436
- }, {
437
- module: "expo-asset",
438
- patchFiles: {
439
- // Fix: expo-asset re-exports from react-native but RN uses properties on default export, not named exports
440
- // This patch explicitly re-exports the functions so they're available as named exports
441
- "build/resolveAssetSource.native.js": function (contents) {
442
- assertString(contents);
443
- return contents.replace(`export * from 'react-native/Libraries/Image/resolveAssetSource';`, `export const pickScale = resolveAssetSource.pickScale;
342
+ },
343
+ "dist/**/*.js": ["jsx"]
344
+ }
345
+ },
346
+ {
347
+ module: "qrcode",
348
+ patchFiles: {
349
+ version: "<=1.5.1",
350
+ "lib/server.js": function(contents) {
351
+ assertString(contents);
352
+ return contents.replace(`const TerminalRenderer = require('./renderer/terminal')`, `const TerminalRenderer = require('./renderer/terminal.js')`);
353
+ }
354
+ }
355
+ },
356
+ {
357
+ module: "expo-camera",
358
+ patchFiles: { "**/*.js": ["jsx"] }
359
+ },
360
+ {
361
+ module: "expo-blur",
362
+ patchFiles: { "**/*.js": ["jsx"] }
363
+ },
364
+ {
365
+ module: "expo-asset",
366
+ patchFiles: { "build/resolveAssetSource.native.js": function(contents) {
367
+ assertString(contents);
368
+ return contents.replace(`export * from 'react-native/Libraries/Image/resolveAssetSource';`, `export const pickScale = resolveAssetSource.pickScale;
444
369
  export const setCustomSourceTransformer = resolveAssetSource.setCustomSourceTransformer;
445
370
  export const addCustomSourceTransformer = resolveAssetSource.addCustomSourceTransformer;`);
446
- }
447
- }
448
- }, {
449
- module: "whatwg-url-without-unicode",
450
- // https://github.com/onejs/one/issues/258
451
- patchFiles: {
452
- "**/*.js": function (contents) {
453
- var _contents_replace;
454
- return contents === null || contents === void 0 ? void 0 : (_contents_replace = contents.replace(/punycode\.ucs2\.decode/gm, "(punycode.ucs2decode || punycode.ucs2.decode)")) === null || _contents_replace === void 0 ? void 0 : _contents_replace.replace(/punycode\.ucs2\.encode/gm, "(punycode.ucs2encode || punycode.ucs2.encode)");
455
- }
456
- }
457
- }, {
458
- module: "@hot-updater/plugin-core",
459
- patchFiles: {
460
- version: "0.*",
461
- "dist/index.cjs": function (contents) {
462
- return contents === null || contents === void 0 ? void 0 : contents.replace('let mime = require("mime");', 'let mime = { getType: () => "application/octet-stream", getExtension: () => null };');
463
- }
464
- }
465
- },
466
- // a void TurboModule method that throws an Obj-C NSException crashes the app
467
- // with a SIGSEGV: ObjCTurboModule::performVoidMethodInvocation converts it to
468
- // a JS error (convertNSExceptionToJSError) on the TurboModule method queue,
469
- // which touches the Hermes runtime off the JS thread and corrupts the
470
- // single-threaded VM. only safe to build the JS error when the method runs
471
- // sync (on the JS thread); otherwise log. mirrors the isSync guard added for
472
- // value-returning methods in facebook/react-native#50193 (which never covered
473
- // the void path). see tests/test/IOS_PROD_CRASH.md
474
- {
475
- module: "react-native",
476
- patchFiles: {
477
- version: ">=0.81.0",
478
- "ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm": function (contents) {
479
- if (!contents) return;
480
- return contents.replace(` @try {
371
+ } }
372
+ },
373
+ {
374
+ module: "whatwg-url-without-unicode",
375
+ patchFiles: { "**/*.js": function(contents) {
376
+ var _contents_replace;
377
+ return contents === null || contents === void 0 ? void 0 : (_contents_replace = contents.replace(/punycode\.ucs2\.decode/gm, "(punycode.ucs2decode || punycode.ucs2.decode)")) === null || _contents_replace === void 0 ? void 0 : _contents_replace.replace(/punycode\.ucs2\.encode/gm, "(punycode.ucs2encode || punycode.ucs2.encode)");
378
+ } }
379
+ },
380
+ {
381
+ module: "@hot-updater/plugin-core",
382
+ patchFiles: {
383
+ version: "0.*",
384
+ "dist/index.cjs": function(contents) {
385
+ return contents === null || contents === void 0 ? void 0 : contents.replace("let mime = require(\"mime\");", "let mime = { getType: () => \"application/octet-stream\", getExtension: () => null };");
386
+ }
387
+ }
388
+ },
389
+ {
390
+ module: "react-native",
391
+ patchFiles: {
392
+ version: ">=0.86.0",
393
+ "ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm": function(contents) {
394
+ if (!contents) return;
395
+ return contents.replace(` @try {
481
396
  [inv invokeWithTarget:strongModule];
482
397
  } @catch (NSException *exception) {
483
- throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
398
+ // Void methods are always async, re-throw instead of converting to
399
+ // JSError, same as the async branch in performMethodInvocation.
400
+ @throw exception;
484
401
  } @finally {`, ` @try {
485
402
  [inv invokeWithTarget:strongModule];
486
403
  } @catch (NSException *exception) {
487
- if (shouldVoidMethodsExecuteSync_) {
488
- // sync void methods run on the JS thread \u2014 safe to build the JS error.
489
- throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
490
- } else {
491
- // async void methods run on the TurboModule method queue; building a JS
492
- // error here touches the Hermes runtime off the JS thread and corrupts
493
- // the VM (SIGSEGV). there is no JS caller to receive it, so log instead.
494
- RCTLogError(@"Exception in %s.%s: %@", moduleName, methodNameStr.c_str(), exception.reason);
495
- }
404
+ RCTLogError(@"Exception in %s.%s: %@", moduleName, methodNameStr.c_str(), exception.reason);
496
405
  } @finally {`);
497
- }
498
- }
499
- }];
406
+ }
407
+ }
408
+ }
409
+ ];
500
410
  function addNoCheck(contents) {
501
- if (!(contents === null || contents === void 0 ? void 0 : contents.includes("// @ts-nocheck"))) {
502
- return `// @ts-nocheck
411
+ if (!(contents === null || contents === void 0 ? void 0 : contents.includes("// @ts-nocheck"))) {
412
+ return `// @ts-nocheck
503
413
  ${contents}`;
504
- }
414
+ }
505
415
  }
416
+
506
417
  export { builtInDepPatches };
507
418
  //# sourceMappingURL=builtInDepPatches.native.js.map