peachsim 0.1.1841 → 0.1.1843

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 (82) hide show
  1. package/detox/index.ts +32 -0
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +25 -4
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +28 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +23 -2
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +24 -3
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +1 -1
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity-project.cjs +1 -1
  49. package/dist-lib/native-app-identity-project.mjs +1 -1
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +25 -4
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +1 -1
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/package.json +1 -1
  82. package/src/expo-native-workspace.ts +40 -1
@@ -70,6 +70,8 @@ const NATIVE_CONFIG_FILE =
70
70
  // native sources steer pod install by existing, not by content: an edit to one
71
71
  // is copied into the prepared workspace, an added or removed one rebuilds it.
72
72
  const NATIVE_SOURCE_FILE = /\.(swift|mm?|hpp?|c|cc|cpp|kt|java)$/
73
+ const NATIVE_PACKAGE_ENTRY =
74
+ /^(ios|android|.*\.podspec|expo-module\.config\.json|react-native\.config\.[cm]?[jt]s|app\.plugin\.[cm]?js)$/
73
75
 
74
76
  // every file the native prepare can read, plus the toolchain that reads it.
75
77
  // node_modules stays out: the js install reconciles it with the hashed
@@ -195,6 +197,42 @@ async function hashWorkspaceInputs(
195
197
  const hash = createHash('sha256')
196
198
  const native = createHash('sha256')
197
199
  const nativeDirectories = localPackageDirectories(root, app)
200
+ // a local package that builds no native code does not steer the prepare by
201
+ // its own version, so a release bump of it and of its lockfile entry keeps
202
+ // the prepared workspace. the app keeps its version: expo config reads it.
203
+ const versionFree = new Set(
204
+ nativeDirectories
205
+ .filter((directory) => directory !== appRelative && directory !== '')
206
+ .filter(
207
+ (directory) =>
208
+ !fs
209
+ .readdirSync(path.join(root, directory))
210
+ .some((name) => NATIVE_PACKAGE_ENTRY.test(name)),
211
+ )
212
+ .map((directory) => directory.split(path.sep).join('/')),
213
+ )
214
+ const nativeConfigBytes = (posix: string, bytes: Buffer) => {
215
+ const directory = path.posix.dirname(posix)
216
+ if (path.posix.basename(posix) === 'package.json' && versionFree.has(directory)) {
217
+ const { version: _version, ...manifest } = JSON.parse(bytes.toString('utf8'))
218
+ return JSON.stringify(manifest)
219
+ }
220
+ if (posix !== 'bun.lock') return bytes
221
+ let entry: string | null = null
222
+ return bytes
223
+ .toString('utf8')
224
+ .split('\n')
225
+ .filter((line) => {
226
+ const opened = /^ {4}"([^"]+)": \{$/.exec(line)
227
+ if (opened) entry = opened[1] ?? null
228
+ return !(
229
+ entry &&
230
+ versionFree.has(entry) &&
231
+ /^ {6}"version": "[^"]*",$/.test(line)
232
+ )
233
+ })
234
+ .join('\n')
235
+ }
198
236
  const steersNative = (relative: string) =>
199
237
  !relative.includes(path.sep) ||
200
238
  relative.startsWith(`patches${path.sep}`) ||
@@ -221,7 +259,8 @@ async function hashWorkspaceInputs(
221
259
  if (NATIVE_CONFIG_FILE.test(posix)) {
222
260
  const bytes = await fs.promises.readFile(file)
223
261
  if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes)
224
- if (steersNative(relative)) native.update(`${posix}\0`).update(bytes)
262
+ if (steersNative(relative))
263
+ native.update(`${posix}\0`).update(nativeConfigBytes(posix, bytes))
225
264
  } else {
226
265
  if (everyByte) {
227
266
  const bytes = await fs.promises.readFile(file)