peachsim 0.1.1845 → 0.1.1847

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 (91) hide show
  1. package/detox/index.ts +14 -4
  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 +139 -61
  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 +14 -6
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +45 -23
  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 +138 -60
  32. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  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 +43 -19
  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 +43 -19
  48. package/dist-lib/native-app-identity-project.cjs +39 -15
  49. package/dist-lib/native-app-identity-project.mjs +39 -15
  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 +143 -65
  69. package/dist-lib/swift-compile.cjs +8 -3
  70. package/dist-lib/swift-compile.mjs +7 -3
  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 +28 -13
  78. package/dist-lib/vite.cjs +2 -2
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +2 -1
  82. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +3 -0
  83. package/package.json +1 -1
  84. package/runtime-companion.json +1 -1
  85. package/src/expo-swift-host.ts +35 -18
  86. package/src/native-firebase-config.ts +3 -3
  87. package/src/swift-compile.ts +11 -3
  88. package/src/swift-host.ts +5 -1
  89. package/src/turbo-codegen-intake.ts +41 -6
  90. package/src/turbo-source.ts +56 -24
  91. package/src/xcode-project.ts +51 -18
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1845 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1847 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
39
39
  var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
40
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
41
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
- define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "1594a888c8d4d1f26bb06e522ccbdeecf314934063ac635eedd6f4938e0684fd", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
42
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "02dac6951dc7dd8465a421670901c932ac320fc9f8fe277885b2916149d40182", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -11830,6 +11830,9 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
11830
11830
  FBAudienceNetwork: []
11831
11831
  };
11832
11832
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
11833
+ function swiftOptionalFramework(name3) {
11834
+ return OPTIONAL_FRAMEWORKS.has(name3);
11835
+ }
11833
11836
  var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
11834
11837
  var kleeneNot = (value) => value === void 0 ? void 0 : !value;
11835
11838
  var kleeneAnd = (left, right) => left === false || right === false ? false : left === true && right === true ? true : void 0;
@@ -12105,7 +12108,7 @@ function swiftTargetDependencies(files2, targets) {
12105
12108
  );
12106
12109
  const deps = new Set(
12107
12110
  (target.dependencies ?? []).flatMap(
12108
- (dependency) => dependency.kind === "target" && dependency.name !== target.name && names.has(dependency.name) ? [dependency.name] : []
12111
+ (dependency) => dependency.kind === "target" && dependency.name !== target.name && names.has(dependency.name) || dependency.kind === "product" && dependency.package === "sootsim-swift" && OPTIONAL_FRAMEWORKS.has(dependency.name) ? [dependency.name] : []
12109
12112
  )
12110
12113
  );
12111
12114
  for (const [file, contents] of Object.entries(files2)) {
@@ -12152,7 +12155,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12152
12155
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12153
12156
  var MULTI_MANIFEST_VERSION = 65;
12154
12157
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12155
- var compilerSourceDigest = true ? "68a650aed464d19c0ff2d04f5cbdd0f7d3f7c62112f5c7a1cdf3af16e5c5e750" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12158
+ var compilerSourceDigest = true ? "de4cf043c56670d57d1dccc969b1b12b70e242e3015fd98011df86b7ce82c4d6" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12156
12159
  function swiftArtifactHash(input, release, moduleRoot) {
12157
12160
  const hash = (0, import_node_crypto8.createHash)("sha256");
12158
12161
  hash.update(`swift-compile
@@ -22293,7 +22296,7 @@ function applyConditions(raw2, configuration) {
22293
22296
  );
22294
22297
  if (matches) conditional[key2.slice(0, bracket)] = value;
22295
22298
  }
22296
- return { ...plain, ...conditional };
22299
+ return [plain, conditional];
22297
22300
  }
22298
22301
  function applyOperator(value, operator) {
22299
22302
  if (operator.startsWith("default=")) return value === "" ? operator.slice(8) : value;
@@ -22470,8 +22473,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
22470
22473
  const fromFile = baseFile ? readXcconfig(baseFile, read) : {};
22471
22474
  xcconfigs.push(...read);
22472
22475
  return [
22473
- applyConditions(fromFile, name3),
22474
- applyConditions(
22476
+ ...applyConditions(fromFile, name3),
22477
+ ...applyConditions(
22475
22478
  Object.fromEntries(
22476
22479
  Object.entries(own).flatMap(
22477
22480
  ([key2, value]) => typeof value === "string" ? [[key2, value]] : Array.isArray(value) ? [[key2, list(value).join(" ")]] : []
@@ -23767,7 +23770,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
23767
23770
  const binaryFrameworks = /* @__PURE__ */ new Map();
23768
23771
  const searchedFrameworks = /* @__PURE__ */ new Map();
23769
23772
  const frameworkSearchDirectories = /* @__PURE__ */ new Set();
23773
+ const sdkFrameworks = /* @__PURE__ */ new Set();
23770
23774
  for (const { ref, settings: settings2 } of builtTargets) {
23775
+ const ldflags = settingList(settings2("OTHER_LDFLAGS"));
23776
+ ldflags.forEach((flag, index) => {
23777
+ const name3 = ldflags[index + 1];
23778
+ if ((flag === "-framework" || flag === "-weak_framework") && name3)
23779
+ sdkFrameworks.add(name3);
23780
+ });
23771
23781
  const absolute = (raw2) => import_node_path31.default.resolve(ref.project.projectDir, expand(raw2, settings2));
23772
23782
  const requested = options.nativeModules;
23773
23783
  const includeBinary = (name3, dir) => {
@@ -23884,10 +23894,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
23884
23894
  const rawPath = str(file?.path) ?? "";
23885
23895
  const name3 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
23886
23896
  if (file?.isa !== "PBXFileReference" || !name3) continue;
23887
- if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "SDKROOT" || tree2 === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
23888
- // however it is rooted: xcode links -framework <name> from the sdk
23889
- // and a stale group-relative path to it contributes nothing.
23890
- /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
23897
+ if (tree2 === "SDKROOT" || /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`)) {
23898
+ sdkFrameworks.add(name3);
23899
+ continue;
23900
+ }
23901
+ if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
23891
23902
  byProduct.has(import_node_path31.default.basename(rawPath)))
23892
23903
  continue;
23893
23904
  const resolved = fileId ? project.resolvePath(fileId) : null;
@@ -23969,6 +23980,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
23969
23980
  ...new Set(localPackageDirs.map((dir) => import_node_fs30.default.realpathSync(dir)))
23970
23981
  ].sort(),
23971
23982
  binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
23983
+ sdkFrameworks: [...sdkFrameworks].filter(
23984
+ (name3) => !binaryFrameworks.has(name3) && !byProduct.has(`${name3}.framework`)
23985
+ ).sort(),
23972
23986
  packageResolved,
23973
23987
  appTargets: appTargetNames,
23974
23988
  configuration,
@@ -24872,7 +24886,7 @@ function standinSourceDigest(srcDir = __sootsim_import_meta_dirname) {
24872
24886
  }
24873
24887
  return hash.digest("hex");
24874
24888
  }
24875
- var STANDIN_SOURCE_DIGEST = true ? "1fd57281ceaf1317ebbd3df4334dd41fce5931f51ce3a48d3b2870e4e9670d8c" : standinSourceDigest();
24889
+ var STANDIN_SOURCE_DIGEST = true ? "a6f60f933c899da637801bc8d8f40e2f842fc5d4e54188240596b705c8b167fa" : standinSourceDigest();
24876
24890
 
24877
24891
  // src/swift-standins.ts
24878
24892
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -30033,6 +30047,7 @@ function xcodeManifest(layout) {
30033
30047
  );
30034
30048
  return native ? [productDependency(native.name, native.packageDir)] : [];
30035
30049
  });
30050
+ const sdkProducts = layout.app.sdkFrameworks.filter(swiftOptionalFramework).map((name3) => `.product(name: ${JSON.stringify(name3)}, package: "sootsim-swift")`);
30036
30051
  const clangSettings = (target) => [
30037
30052
  ["cSettings", "c", target.cDefines],
30038
30053
  ["cxxSettings", "cxx", target.cxxDefines]
@@ -30055,7 +30070,7 @@ function xcodeManifest(layout) {
30055
30070
  "// swift-tools-version: 6.2",
30056
30071
  "import PackageDescription",
30057
30072
  `let package = Package(name: "app", ${layout.app.iosDeploymentTarget ? `platforms: [.iOS(${JSON.stringify(layout.app.iosDeploymentTarget)})], ` : ""}dependencies: [${[...nativePaths].map(([name3, directory]) => `.package(name: ${JSON.stringify(name3)}, path: ${JSON.stringify(directory)})`).join(", ")}], targets: [`,
30058
- ` .executableTarget(name: "${layout.app.moduleName}", dependencies: [${appProducts.join(", ")}], path: "${XCODE_APP_DIR}", ${appSettings}),`,
30073
+ ` .executableTarget(name: "${layout.app.moduleName}", dependencies: [${[...appProducts, ...sdkProducts].join(", ")}], path: "${XCODE_APP_DIR}", ${appSettings}),`,
30059
30074
  ...layout.targets.map(
30060
30075
  (target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: [${dependencies(target)}], path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${target.publicHeadersPath === void 0 ? "" : `publicHeadersPath: ${JSON.stringify(target.publicHeadersPath)}, `}${clangSettings(target)}${swiftManifestSettings(target)}${libraries(target)}),`
30061
30076
  ),
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1845 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1847 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -203,7 +203,7 @@ function isValidRuntimeVersion(value) {
203
203
  }
204
204
 
205
205
  // runtime-companion.json
206
- var runtime_companion_default = { abi: 1, sha256: "0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332", file: "node/cli-0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332.cjs" };
206
+ var runtime_companion_default = { abi: 1, sha256: "031fe7fcb9db836c5df1ddc8cf3ce1690992fc0465ae1d1210d7ef9b62547d48", file: "node/cli-031fe7fcb9db836c5df1ddc8cf3ce1690992fc0465ae1d1210d7ef9b62547d48.cjs" };
207
207
 
208
208
  // src/answeredNativePackages.ts
209
209
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1845 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1847 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1845 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1847 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -7,7 +7,7 @@ import type { AnimationClockSnapshot } from '../engine/animation-clockContract.d
7
7
  import type { AppFontWireSpec } from '../engine/config-plugin-fonts.d.ts';
8
8
  import type { ShellTransitionEvent } from '../ios/shell-transition-debug.d.ts';
9
9
  import type { AndroidGestureExclusionRect } from '../platform/android-gesture-exclusion.d.ts';
10
- import type { DuoFoldWireState } from '../settings/duo-fold-bus.d.ts';
10
+ import type { DuoFoldCloak, DuoFoldWireState } from '../settings/duo-fold-bus.d.ts';
11
11
  import type { ReactNativeConfigurationSnapshot } from '../settings/react-native-configuration.d.ts';
12
12
  import type { SootsimBootStage } from '../sootsim-event.d.ts';
13
13
  import type { TopOverlayKind } from '../top-overlay-state.d.ts';
@@ -127,6 +127,7 @@ export interface ShellInputs {
127
127
  hardwareKeyboard: boolean;
128
128
  device: ShellDeviceSync;
129
129
  duoFold: DuoFoldWireState;
130
+ duoFoldCloak: DuoFoldCloak;
130
131
  androidSystemBars: AndroidSystemBarsState;
131
132
  shellState: string;
132
133
  showSwitcher: boolean;
@@ -42,6 +42,7 @@ export type DuoFoldLook = {
42
42
  leans: boolean;
43
43
  blurs: boolean;
44
44
  };
45
+ export type DuoFoldCloak = 'held' | 'lifting' | null;
45
46
  type DuoFoldState = {
46
47
  progress: number;
47
48
  active: boolean;
@@ -56,6 +57,7 @@ type DuoFoldState = {
56
57
  sweptAt: number;
57
58
  clock: (() => number) | null;
58
59
  look: DuoFoldLook | null;
60
+ cloak: DuoFoldCloak;
59
61
  };
60
62
  export type DuoFoldWireState = Pick<DuoFoldState, 'progress' | 'active' | 'ready' | 'rest'>;
61
63
  export declare function getDuoFoldProgress(): number;
@@ -78,6 +80,7 @@ export declare function getDuoFoldLook(): DuoFoldLook | null;
78
80
  export declare function duoFoldAwaitingBackFace(): boolean;
79
81
  export declare function getDuoFoldPose(): number;
80
82
  export declare function getDuoFoldRest(): DuoFoldRest | null;
83
+ export declare function getDuoFoldCloak(): DuoFoldCloak;
81
84
  export declare function subscribeDuoFoldProgress(fn: () => void): () => void;
82
85
  export declare function publishDuoFold(patch: Partial<DuoFoldState>): void;
83
86
  export declare function duoFoldAngle(progress?: number): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1845",
3
+ "version": "0.1.1847",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332","file":"node/cli-0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332.cjs"}
1
+ {"abi":1,"sha256":"031fe7fcb9db836c5df1ddc8cf3ce1690992fc0465ae1d1210d7ef9b62547d48","file":"node/cli-031fe7fcb9db836c5df1ddc8cf3ce1690992fc0465ae1d1210d7ef9b62547d48.cjs"}
@@ -758,11 +758,16 @@ function enrichInstalledUnits(
758
758
  unit.files['Package.swift'] = expoManifest(
759
759
  unit.files,
760
760
  '',
761
- new Map(
762
- installedTargets
761
+ new Map([
762
+ ...installedTargets
763
763
  .filter((target) => included.has(target.name))
764
- .map((target) => [target.name, target]),
765
- ),
764
+ .map((target) => [target.name, target] satisfies [string, SwiftPackageTarget]),
765
+ ...installedTargets
766
+ .filter((target) => target.executable)
767
+ .map(
768
+ (target) => ['PeachExpoApp', target] satisfies [string, SwiftPackageTarget],
769
+ ),
770
+ ]),
766
771
  )
767
772
  }
768
773
  // the runtime already supplies these modules. their CocoaPods umbrella
@@ -1677,7 +1682,14 @@ function expoManifest(
1677
1682
  )
1678
1683
  return `.target(name: ${JSON.stringify(name)}, dependencies: ${JSON.stringify(dependencies)}, path: ${JSON.stringify(dir)}${declared?.resources ? ', resources: []' : ''}${configuration ? ', ' + swiftManifestSettings(configuration) : ''})`
1679
1684
  })
1680
- return `// swift-tools-version: 6.0\nimport PackageDescription\nlet package = Package(name: "PeachExpo", targets: [${declarations.join(', ')}, .executableTarget(name: "PeachExpoApp", path: "Sources/PeachExpoApp")])\n// stand-in inputs: ${generation}\n`
1685
+ // the sdk frameworks the original app links ride the entry target.
1686
+ const appProducts = (settings.get('PeachExpoApp')?.dependencies ?? []).flatMap(
1687
+ (dependency) =>
1688
+ dependency.kind === 'product' && dependency.package === 'sootsim-swift'
1689
+ ? [`.product(name: ${JSON.stringify(dependency.name)}, package: "sootsim-swift")`]
1690
+ : [],
1691
+ )
1692
+ return `// swift-tools-version: 6.0\nimport PackageDescription\nlet package = Package(name: "PeachExpo", targets: [${declarations.join(', ')}, .executableTarget(name: "PeachExpoApp", dependencies: [${appProducts.join(', ')}], path: "Sources/PeachExpoApp")])\n// stand-in inputs: ${generation}\n`
1681
1693
  }
1682
1694
 
1683
1695
  function targetSettings(units: ExpoSwiftSourceUnit[]) {
@@ -2320,21 +2332,26 @@ async function compileExpoSwiftModulesTraced(
2320
2332
  error instanceof Error ? error.message : String(error),
2321
2333
  ...(gaps.get(unit) ?? []),
2322
2334
  ].join('\n')
2323
- const appPaths = expoUnitAppPaths(unit)
2335
+ // a unit from the installed workspace carries no app source
2336
+ // location, so its errors name the build copy of its own files.
2337
+ const unitFiles = [...Object.keys(unit.files), ...expoUnitAppPaths(unit)]
2324
2338
  const errors = diagnostic.match(/^.+:\d+(?::\d+)?: error:.*$/gm) ?? []
2325
- const sourceErrors = errors.filter(
2326
- (line) =>
2327
- appPaths.some((file) => line.startsWith(`${file}:`)) &&
2339
+ const sourceErrors = errors.filter((line) => {
2340
+ const file = /^.+?(?=:\d+(?::\d+)?: error:)/.exec(line)![0]
2341
+ return (
2342
+ unitFiles.some((name) => file === name || file.endsWith(`/${name}`)) &&
2328
2343
  !/external macro implementation type|failed to load library plugin/.test(
2329
2344
  line,
2330
- ),
2331
- )
2332
- // native preparation failures name the target, not a file; they
2333
- // are input-determined like a source error, so they ride with
2334
- // them instead of hiding behind the filtered diagnostic.
2345
+ )
2346
+ )
2347
+ })
2348
+ // native preparation and link failures of a unit built alone name
2349
+ // the target or a symbol, not a file; they are input-determined
2350
+ // like a source error, so they ride with them instead of hiding
2351
+ // behind the filtered diagnostic.
2335
2352
  const targetErrors =
2336
2353
  diagnostic.match(
2337
- /^error: target .*$|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target .*$/gm,
2354
+ /^error: target .*$|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target .*$|^(?:ld(?:\.lld)?|wasm-ld): error: .*$/gm,
2338
2355
  ) ?? []
2339
2356
  const unitErrors = [...targetErrors, ...sourceErrors]
2340
2357
  if (
@@ -2344,9 +2361,9 @@ async function compileExpoSwiftModulesTraced(
2344
2361
  !(error instanceof SwiftMissingModulesError)
2345
2362
  )
2346
2363
  throw error
2347
- // a source error or a module peach does not provide holds until the
2348
- // stamp changes. the compiler also reports the same error at the
2349
- // build copy, so the app lines are enough to hold it. retrying
2364
+ // a source, target or link error, or a module peach does not provide, holds until the
2365
+ // stamp changes. the compiler reports one error at both the app
2366
+ // source and the build copy, so either line holds it. retrying
2350
2367
  // either relinks every namespace and rewrites the linked package,
2351
2368
  // so no reload would ever reuse its artifact.
2352
2369
  const missing = error instanceof SwiftMissingModulesError
@@ -549,11 +549,11 @@ function findDefaultConfigureCall(body: string, sources: readonly string[]) {
549
549
  // default app, relative to the project root, or null when it configures none.
550
550
  function readTargetGoogleServicesFile(
551
551
  projectRoot: string,
552
- xcodeproj: string,
552
+ container: string,
553
553
  target: string,
554
554
  prepareGeneratedSources = false,
555
555
  ): string | null {
556
- const app = readXcodeAppTarget(xcodeproj, target, undefined, {
556
+ const app = readXcodeAppTarget(container, target, undefined, {
557
557
  requireSources: false,
558
558
  prepareGeneratedSources,
559
559
  })
@@ -689,7 +689,7 @@ export function readNativeFirebaseConfig(
689
689
  if (selected) {
690
690
  const file = readTargetGoogleServicesFile(
691
691
  projectRoot,
692
- selected.xcodeproj,
692
+ selected.workspace ?? selected.xcodeproj,
693
693
  selected.target,
694
694
  prepareGeneratedSources,
695
695
  )
@@ -835,6 +835,11 @@ const OPTIONAL_FRAMEWORK_DEPENDENCIES: Record<string, string[]> = {
835
835
  }
836
836
  const OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES))
837
837
 
838
+ // an sdk framework the original link names that peach links only on request.
839
+ export function swiftOptionalFramework(name: string): boolean {
840
+ return OPTIONAL_FRAMEWORKS.has(name)
841
+ }
842
+
838
843
  // an import may carry attributes (`@_exported`, `@preconcurrency`) and a
839
844
  // declaration kind (`import struct Nuke.ImageRequest`).
840
845
  const SWIFT_IMPORT =
@@ -1278,9 +1283,12 @@ export function swiftTargetDependencies(
1278
1283
  )
1279
1284
  const deps = new Set(
1280
1285
  (target.dependencies ?? []).flatMap((dependency) =>
1281
- dependency.kind === 'target' &&
1282
- dependency.name !== target.name &&
1283
- names.has(dependency.name)
1286
+ (dependency.kind === 'target' &&
1287
+ dependency.name !== target.name &&
1288
+ names.has(dependency.name)) ||
1289
+ (dependency.kind === 'product' &&
1290
+ dependency.package === 'sootsim-swift' &&
1291
+ OPTIONAL_FRAMEWORKS.has(dependency.name))
1284
1292
  ? [dependency.name]
1285
1293
  : [],
1286
1294
  ),
package/src/swift-host.ts CHANGED
@@ -37,6 +37,7 @@ import {
37
37
  swiftCMainEntry,
38
38
  swiftCPredefines,
39
39
  swiftDistributionAt,
40
+ swiftOptionalFramework,
40
41
  } from './swift-compile'
41
42
  import {
42
43
  assetSymbolText,
@@ -1351,6 +1352,9 @@ function xcodeManifest(layout: XcodeLayout): string {
1351
1352
  )
1352
1353
  return native ? [productDependency(native.name, native.packageDir)] : []
1353
1354
  })
1355
+ const sdkProducts = layout.app.sdkFrameworks
1356
+ .filter(swiftOptionalFramework)
1357
+ .map((name) => `.product(name: ${JSON.stringify(name)}, package: "sootsim-swift")`)
1354
1358
  const clangSettings = (target: SwiftPackageTarget) =>
1355
1359
  (
1356
1360
  [
@@ -1384,7 +1388,7 @@ function xcodeManifest(layout: XcodeLayout): string {
1384
1388
  '// swift-tools-version: 6.2',
1385
1389
  'import PackageDescription',
1386
1390
  `let package = Package(name: "app", ${layout.app.iosDeploymentTarget ? `platforms: [.iOS(${JSON.stringify(layout.app.iosDeploymentTarget)})], ` : ''}dependencies: [${[...nativePaths].map(([name, directory]) => `.package(name: ${JSON.stringify(name)}, path: ${JSON.stringify(directory)})`).join(', ')}], targets: [`,
1387
- ` .executableTarget(name: "${layout.app.moduleName}", dependencies: [${appProducts.join(', ')}], path: "${XCODE_APP_DIR}", ${appSettings}),`,
1391
+ ` .executableTarget(name: "${layout.app.moduleName}", dependencies: [${[...appProducts, ...sdkProducts].join(', ')}], path: "${XCODE_APP_DIR}", ${appSettings}),`,
1388
1392
  ...layout.targets.map((target) =>
1389
1393
  target.systemLibrary
1390
1394
  ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),`
@@ -88,7 +88,32 @@ const RENDERER_PODS_VERSIONED = new Set([
88
88
 
89
89
  const COMPILED_SOURCE = /\.(?:c|cc|cpp|cxx|m|mm|swift)$/
90
90
 
91
- export function installedFabricSources(reactNativeRoot: string): FabricPodSources[] {
91
+ // the DevSupport sources RCTBridge.mm reaches through its inspector host
92
+ // delegate in releases 0.78 through 0.86
93
+ const LEGACY_BRIDGE_DEV_SUPPORT = [
94
+ 'RCTInspectorNetworkHelper.mm',
95
+ 'RCTInspectorUtils.mm',
96
+ 'RCTPausedInDebuggerOverlayController.mm',
97
+ ]
98
+
99
+ // the pods whose sources a legacy RCTBridge needs when no renderer compiles
100
+ const LEGACY_BRIDGE_PODS = new Set([
101
+ 'React-Core',
102
+ 'React-cxxreact',
103
+ 'React-jsinspector',
104
+ 'React-jsinspectortracing',
105
+ 'React-perflogger',
106
+ 'React-jsiexecutor',
107
+ 'Yoga',
108
+ ])
109
+
110
+ /** the pod source membership of the installed renderer. `legacyBridge` adds
111
+ * the DevSupport units RCTBridge.mm reaches; `bridgeOnly` keeps just the pods
112
+ * a legacy RCTBridge needs, for an app that mounts no renderer. */
113
+ export function installedFabricSources(
114
+ reactNativeRoot: string,
115
+ { legacyBridge = false, bridgeOnly = false } = {},
116
+ ): FabricPodSources[] {
92
117
  const root = fs.realpathSync(reactNativeRoot)
93
118
  const specs = ['React', 'ReactCommon', 'ReactApple', 'Libraries']
94
119
  .flatMap((directory) =>
@@ -101,21 +126,28 @@ export function installedFabricSources(reactNativeRoot: string): FabricPodSource
101
126
  (entry) =>
102
127
  entry.isFile() &&
103
128
  (RENDERER_PODS.has(path.basename(entry.name, '.podspec')) ||
104
- RENDERER_PODS_VERSIONED.has(path.basename(entry.name, '.podspec'))) &&
129
+ RENDERER_PODS_VERSIONED.has(path.basename(entry.name, '.podspec')) ||
130
+ (bridgeOnly &&
131
+ LEGACY_BRIDGE_PODS.has(path.basename(entry.name, '.podspec')))) &&
105
132
  entry.name.endsWith('.podspec'),
106
133
  )
107
134
  .map((entry) => path.join(entry.parentPath, entry.name))
108
135
  .concat(path.join(root, 'React-Core.podspec'))
136
+ .filter(
137
+ (file) => !bridgeOnly || LEGACY_BRIDGE_PODS.has(path.basename(file, '.podspec')),
138
+ )
109
139
  .sort()
110
140
  const required = specs.filter((file) =>
111
- RENDERER_PODS.has(path.basename(file, '.podspec')),
141
+ (bridgeOnly ? LEGACY_BRIDGE_PODS : RENDERER_PODS).has(
142
+ path.basename(file, '.podspec'),
143
+ ),
112
144
  )
113
- if (required.length !== RENDERER_PODS.size)
145
+ if (required.length !== (bridgeOnly ? LEGACY_BRIDGE_PODS : RENDERER_PODS).size)
114
146
  throw new Error(`${reactNativeRoot}: installed renderer podspecs are incomplete`)
115
147
  return specs.map((file) => {
116
148
  const directory = path.dirname(file)
117
149
  const spec = loadPodspec(file)
118
- // React-Core compiles its Default subspec and one DevSupport source
150
+ // React-Core compiles its Default subspec and the DevSupport sources it reaches
119
151
  const core = podspecName(spec) === 'React-Core'
120
152
  const files = (
121
153
  core ? [podspecSubspec(spec, 'Default')] : podspecLibrarySpecs(spec)
@@ -123,7 +155,10 @@ export function installedFabricSources(reactNativeRoot: string): FabricPodSource
123
155
  if (core) {
124
156
  files.push(
125
157
  ...podspecSourceFiles(directory, podspecSubspec(spec, 'DevSupport')).filter(
126
- (source) => path.posix.basename(source) === 'RCTDevLoadingViewSetEnabled.m',
158
+ (source) =>
159
+ path.posix.basename(source) === 'RCTDevLoadingViewSetEnabled.m' ||
160
+ (legacyBridge &&
161
+ LEGACY_BRIDGE_DEV_SUPPORT.includes(path.posix.basename(source))),
127
162
  ),
128
163
  )
129
164
  }
@@ -45,6 +45,7 @@ import { readPackageFile, relativeInside } from './swift-source-file'
45
45
  import { MAX_SWIFT_COMPILE_SOURCE_BYTES } from './swift-submit'
46
46
  import {
47
47
  installedFabricSources,
48
+ type FabricPodSources,
48
49
  installedRendererDependencyGlobs,
49
50
  runInstalledTurboCodegen,
50
51
  } from './turbo-codegen-intake'
@@ -111,6 +112,7 @@ export interface TurboSourceCollection {
111
112
  }
112
113
 
113
114
  export const TURBO_CORE_TARGET = 'TurboCore'
115
+ const TURBO_FMT_TARGET = 'TurboFmt'
114
116
  export const TURBO_ENTRY_HEADER = 'PeachTurboEntry.hpp'
115
117
 
116
118
  const REGISTRATION = 'registerCxxModuleToGlobalModuleMap'
@@ -1544,8 +1546,33 @@ export async function collectTurboSources(options: {
1544
1546
  }
1545
1547
  addUnits(REACT_NATIVE_UNITS)
1546
1548
 
1549
+ const addPodSources = (pods: FabricPodSources[]) => {
1550
+ for (const pod of pods) {
1551
+ const swift = pod.files.some((file) => file.endsWith('.swift'))
1552
+ const name = swift ? pod.module : TURBO_CORE_TARGET
1553
+ if (swift) {
1554
+ if (!pod.swiftVersion || !/^[56](?:\.0)?$/.test(pod.swiftVersion))
1555
+ throw new Error(
1556
+ pod.module + ': renderer pod must declare its Swift language version',
1557
+ )
1558
+ result.targets.push({
1559
+ ...target(name, []),
1560
+ languageMode: Number(pod.swiftVersion),
1561
+ cxxInterop: false,
1562
+ })
1563
+ result.rendererSwiftTargets.push(name)
1564
+ }
1565
+ for (const file of pod.files) {
1566
+ const collected = original(name, 'react-native', reactNative.root, file)
1567
+ if (swift)
1568
+ result.externalPodSources.push({ moduleName: pod.module, file: collected })
1569
+ }
1570
+ }
1571
+ }
1572
+
1547
1573
  let objc = false
1548
1574
  let fabric = false
1575
+ let legacyBridge = false
1549
1576
  const objcClasses = new Set<string>()
1550
1577
  // module classes no macro registers: React Native finds them by name
1551
1578
  const unregisteredObjcClasses = new Set<string>()
@@ -2081,6 +2108,11 @@ export async function collectTurboSources(options: {
2081
2108
  )
2082
2109
  addUnits(REACT_NATIVE_OBJC_UNITS)
2083
2110
  addUnits(REACT_NATIVE_OBJC_VERSIONED_UNITS, true)
2111
+ // releases 0.78 through 0.86 compile the inspector host delegate and the
2112
+ // legacy bridge class into RCTBridge.mm
2113
+ legacyBridge = /\bRCTCxxBridge\b/.test(
2114
+ fs.readFileSync(path.join(reactNative.root, 'React/Base/RCTBridge.mm'), 'utf8'),
2115
+ )
2084
2116
  if (decoratorHasPerformanceLogger)
2085
2117
  addUnits([
2086
2118
  'React/Base/RCTPerformanceLogger.mm',
@@ -2099,28 +2131,12 @@ export async function collectTurboSources(options: {
2099
2131
  )
2100
2132
  }
2101
2133
  }
2102
- if (fabric) {
2103
- for (const pod of installedFabricSources(reactNative.root)) {
2104
- const swift = pod.files.some((file) => file.endsWith('.swift'))
2105
- const name = swift ? pod.module : TURBO_CORE_TARGET
2106
- if (swift) {
2107
- if (!pod.swiftVersion || !/^[56](?:\.0)?$/.test(pod.swiftVersion))
2108
- throw new Error(
2109
- pod.module + ': renderer pod must declare its Swift language version',
2110
- )
2111
- result.targets.push({
2112
- ...target(name, []),
2113
- languageMode: Number(pod.swiftVersion),
2114
- cxxInterop: false,
2115
- })
2116
- result.rendererSwiftTargets.push(name)
2117
- }
2118
- for (const file of pod.files) {
2119
- const collected = original(name, 'react-native', reactNative.root, file)
2120
- if (swift)
2121
- result.externalPodSources.push({ moduleName: pod.module, file: collected })
2122
- }
2123
- }
2134
+ if (fabric || legacyBridge) {
2135
+ // React-Core's own compiler_flags select the Hermes executor factory
2136
+ if (!fabric) result.targets[0]!.cxxDefines = [...defines, 'USE_HERMES=1']
2137
+ addPodSources(
2138
+ installedFabricSources(reactNative.root, { legacyBridge, bridgeOnly: !fabric }),
2139
+ )
2124
2140
  const patterns = installedRendererDependencyGlobs(reactNative.root)
2125
2141
  const matchers = new Map(
2126
2142
  Object.entries(patterns).map(([name, globs]) => [name, globs.map(globRegex)]),
@@ -2131,13 +2147,29 @@ export async function collectTurboSources(options: {
2131
2147
  (name, relative) =>
2132
2148
  matchers.get(name)?.some((pattern) => pattern.test(relative)) ?? false,
2133
2149
  )) {
2134
- const key = `${core}/dependencies/${unit.name}/${unit.relative}`
2150
+ // fmt 11.0.2's FMT_STRING checks fail under clang's default constant
2151
+ // interpreter, which crashes on jsi.cpp, so fmt compiles in its own target
2152
+ const fmtUnit = unit.name === 'fmt' && !fabric
2153
+ const unitTarget = fmtUnit ? TURBO_FMT_TARGET : TURBO_CORE_TARGET
2154
+ if (fmtUnit && !result.targets.some((t) => t.name === TURBO_FMT_TARGET)) {
2155
+ result.targets.push({
2156
+ ...target(TURBO_FMT_TARGET, [TURBO_CORE_TARGET]),
2157
+ clangSettings: [
2158
+ { tool: 'cxx', flags: ['-fexperimental-new-constant-interpreter'] },
2159
+ ],
2160
+ })
2161
+ add(
2162
+ `${targetPath(TURBO_FMT_TARGET)}/include/${TURBO_FMT_TARGET}.h`,
2163
+ '#pragma once\n',
2164
+ )
2165
+ }
2166
+ const key = `${targetPath(unitTarget)}/dependencies/${unit.name}/${unit.relative}`
2135
2167
  if (add(key, unit.text)) {
2136
2168
  result.sources.push({ file: key, source: unit.source, sha256: unit.sha256 })
2137
2169
  scanText(
2138
2170
  {
2139
2171
  key,
2140
- targetName: TURBO_CORE_TARGET,
2172
+ targetName: unitTarget,
2141
2173
  label: '',
2142
2174
  root: '',
2143
2175
  relative: unit.includePath,