expo-modules-jsi 58.0.3 → 58.0.5

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 (20) hide show
  1. package/CHANGELOG.md +8 -4
  2. package/apple/Package.swift +6 -0
  3. package/apple/Sources/ExpoModulesJSI/Runtime/Values/JavaScriptPromise.swift +1 -1
  4. package/apple/scripts/build-xcframework.sh +6 -2
  5. package/apple/scripts/generate-modulemap.sh +29 -22
  6. package/package.json +1 -2
  7. package/apple/.generated/module.modulemap +0 -7
  8. package/apple/Products/ExpoModulesJSI.xcframework/Info.plist +0 -107
  9. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64/.build-hash +0 -0
  10. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
  11. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64_x86_64-maccatalyst/.build-hash +0 -0
  12. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64_x86_64-maccatalyst/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
  13. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64_x86_64-simulator/.build-hash +0 -0
  14. package/apple/Products/ExpoModulesJSI.xcframework/ios-arm64_x86_64-simulator/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
  15. package/apple/Products/ExpoModulesJSI.xcframework/macos-arm64_x86_64/.build-hash +0 -0
  16. package/apple/Products/ExpoModulesJSI.xcframework/macos-arm64_x86_64/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
  17. package/apple/Products/ExpoModulesJSI.xcframework/tvos-arm64/.build-hash +0 -0
  18. package/apple/Products/ExpoModulesJSI.xcframework/tvos-arm64/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
  19. package/apple/Products/ExpoModulesJSI.xcframework/tvos-arm64_x86_64-simulator/.build-hash +0 -0
  20. package/apple/Products/ExpoModulesJSI.xcframework/tvos-arm64_x86_64-simulator/ExpoModulesJSI.framework/ExpoModulesJSI +0 -0
package/CHANGELOG.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # Changelog
2
2
 
3
- ## Unpublished
3
+ ## 58.0.5
4
4
 
5
- ### 🛠 Breaking changes
5
+ ### Patch Changes
6
6
 
7
- ### 🎉 New features
7
+ - Force-bump all packages, due to migration to changesets. ([#50762](https://github.com/expo/expo/pull/50762) by [@kitten](https://github.com/kitten))
8
+
9
+ ## 58.0.4 — 2026-09-25
8
10
 
9
11
  ### 🐛 Bug fixes
10
12
 
11
- ### 💡 Others
13
+ - [iOS] Fix the `.swiftinterface` failing to compile with Xcode 27 (Swift 6.4), because a C++ type extension was no longer stripped from it. ([#50569](https://github.com/expo/expo/pull/50569) by [@chrfalch](https://github.com/chrfalch))
14
+ - [iOS] Fix the xcframework build phase failing iOS archives under Xcode 27. ([#50587](https://github.com/expo/expo/pull/50587) by [@tsapeta](https://github.com/tsapeta))
15
+ - [iOS] Fix the xcframework build warning about jsi headers missing from the umbrella header. ([#50588](https://github.com/expo/expo/pull/50588) by [@tsapeta](https://github.com/tsapeta))
12
16
 
13
17
  ## 58.0.3 — 2026-09-21
14
18
 
@@ -99,6 +99,12 @@ let package = Package(
99
99
  "-Xfrontend",
100
100
  "-clang-header-expose-decls=has-expose-attr",
101
101
 
102
+ // Xcode 27 reports a warning left on a SwiftCompile task as "the following command
103
+ // failed with exit code 0 but produced no further output" and fails the host app's
104
+ // build phase, with nothing pointing at the cause. This group is the one that has
105
+ // actually bitten us, so reject it at the line that causes it.
106
+ "-Werror", "ImplicitStrongCapture",
107
+
102
108
  // Module map for the `jsi` Clang module, generated by build-xcframework.sh
103
109
  // before xcodebuild runs.
104
110
  "-Xcc", "-fmodule-map-file=\(generatedModuleMap)",
@@ -242,7 +242,7 @@ public struct JavaScriptPromise: JavaScriptType, ~Copyable {
242
242
  // thread, the same hop `resolve` and `reject` make. `@JavaScriptActor` does not get there on
243
243
  // its own: its executor runs jobs inline on the calling thread. `execute` runs the closure
244
244
  // inline when the caller is already on the JavaScript thread.
245
- try await runtime.execute { [longLivedState] in
245
+ try await runtime.execute { [longLivedState, deferredPromise] in
246
246
  let onFulfilled = runtime.createFunction { [weak deferredPromise] this, arguments in
247
247
  guard let deferredPromise else { return .undefined }
248
248
  let value = arguments[0]
@@ -78,6 +78,9 @@ SOURCE_FILES=(
78
78
  "${PACKAGE_DIR}/scripts/build-xcframework.sh"
79
79
  "${PACKAGE_DIR}/scripts/create-stub-xcframework.sh"
80
80
  "${PACKAGE_DIR}/scripts/xcframework-helpers.sh"
81
+ # Defines the `jsi` module the slices compile against, so its contents change
82
+ # the build output the same way a source file does.
83
+ "${PACKAGE_DIR}/scripts/generate-modulemap.sh"
81
84
  # JSI headers we compile against. `cat` follows the symlinks CocoaPods
82
85
  # installs into Pods/Headers/Public so the real header contents get hashed.
83
86
  "${PODS_ROOT}/Headers/Public/React-jsi/jsi/jsi.h"
@@ -284,7 +287,8 @@ build_slice() {
284
287
 
285
288
  # Strip declarations from public .swiftinterface that external consumers can't resolve:
286
289
  # - C++ type extensions (__ObjC) — entire blocks including their closing braces
287
- # e.g. "extension __ObjC.expo.CppError : Swift.Error { ... }"
290
+ # e.g. "extension __ObjC.expo.CppError : Swift.Error { ... }", or with the module
291
+ # selectors Swift 6.4 prints: "extension __ObjC::expo.__ObjC::CppError : Swift::Error { ... }"
288
292
  # - Package-internal conformances (_ConstraintThatIsNotPartOfTheAPIOfThisLibrary)
289
293
  # e.g. "extension Swift.Optional : where Wrapped : _Constraint... {}"
290
294
  # - @usableFromInline attributes preceding the _Constraint protocol definition
@@ -297,7 +301,7 @@ build_slice() {
297
301
  # filename, failing with "can't read …: No such file or directory".
298
302
  while IFS= read -r swiftinterface; do
299
303
  local stripped_swiftinterface="${swiftinterface}.stripped"
300
- sed '/^extension __ObjC\./,/^}/d;/^@usableFromInline$/{N;/_ConstraintThatIsNotPartOfTheAPIOfThisLibrary/d;};/_ConstraintThatIsNotPartOfTheAPIOfThisLibrary/d' "$swiftinterface" > "$stripped_swiftinterface"
304
+ sed -E '/^extension __ObjC(\.|::)/,/^}/d;/^@usableFromInline$/{N;/_ConstraintThatIsNotPartOfTheAPIOfThisLibrary/d;};/_ConstraintThatIsNotPartOfTheAPIOfThisLibrary/d' "$swiftinterface" > "$stripped_swiftinterface"
301
305
  mv "$stripped_swiftinterface" "$swiftinterface"
302
306
  done < <(find "${modules_dir}/${PACKAGE_NAME}.swiftmodule" -name '*.swiftinterface')
303
307
 
@@ -2,15 +2,14 @@
2
2
  #
3
3
  # Writes `.generated/module.modulemap` for the `jsi` Clang module.
4
4
  #
5
- # The umbrella header is referenced by absolute path so the modulemap works
6
- # regardless of where Pods lives. The `Pods/Headers/Public` path exists in
7
- # non-frameworks and prebuilt-RN layouts; under static frameworks +
8
- # source-built RN it doesn't, so we fall back to the canonical RN source.
9
- # Stored outside `.build/` so SwiftPM state can be wiped without losing this
10
- # file.
5
+ # Headers are referenced by absolute path so the modulemap works regardless of
6
+ # where Pods lives. The `Pods/Headers/Public` path exists in non-frameworks and
7
+ # prebuilt-RN layouts; under static frameworks + source-built RN it doesn't, so
8
+ # we fall back to the canonical RN source. Stored outside `.build/` so SwiftPM
9
+ # state can be wiped without losing this file.
11
10
  #
12
11
  # Idempotent: re-running with the same inputs rewrites identical content.
13
- # Switching PODS_ROOT updates the umbrella header path.
12
+ # Switching PODS_ROOT updates the header paths.
14
13
  #
15
14
  # Used by build-xcframework.sh and test.sh; can also be run manually before
16
15
  # opening the package in Xcode.
@@ -36,32 +35,40 @@ GENERATED_DIR="${PACKAGE_DIR}/.generated"
36
35
  GENERATED_MODULE_MAP="${GENERATED_DIR}/module.modulemap"
37
36
  mkdir -p "$GENERATED_DIR"
38
37
 
39
- JSI_UMBRELLA="${PODS_ROOT}/Headers/Public/React-jsi/jsi/jsi.h"
40
- if [[ ! -f "$JSI_UMBRELLA" ]]; then
38
+ JSI_HEADER="${PODS_ROOT}/Headers/Public/React-jsi/jsi/jsi.h"
39
+ if [[ ! -f "$JSI_HEADER" ]]; then
41
40
  # Resolution order matches build-xcframework.sh: RN_ROOT (forwarded by the
42
41
  # build script), REACT_NATIVE_PATH (exported by Xcode for hosts like Expo Go
43
42
  # that build RN from a submodule), node resolve, then a relative fallback.
44
43
  RN="${RN_ROOT:-${REACT_NATIVE_PATH:-$(node -p 'require("path").dirname(require.resolve("react-native/package.json"))' 2>/dev/null || echo "${PODS_ROOT}/../../node_modules/react-native")}}"
45
- JSI_UMBRELLA="${RN}/ReactCommon/jsi/jsi/jsi.h"
44
+ JSI_HEADER="${RN}/ReactCommon/jsi/jsi/jsi.h"
46
45
  fi
47
- [[ -f "$JSI_UMBRELLA" ]] || { echo "error: cannot locate jsi.h" >&2; exit 1; }
46
+ [[ -f "$JSI_HEADER" ]] || { echo "error: cannot locate jsi.h" >&2; exit 1; }
48
47
 
49
- # The umbrella header doesn't include `instrumentation.h`, so declare it explicitly.
50
- # Otherwise including it warns about a missing `jsi.instrumentation` submodule.
51
- JSI_INSTRUMENTATION="$(dirname "$JSI_UMBRELLA")/instrumentation.h"
52
- JSI_EXTRA_HEADERS=""
53
- if [[ -f "$JSI_INSTRUMENTATION" ]]; then
54
- JSI_EXTRA_HEADERS="
55
- header \"${JSI_INSTRUMENTATION}\""
56
- fi
48
+ JSI_DIR="$(dirname "$JSI_HEADER")"
49
+
50
+ # The two headers this package includes, listed one by one instead of behind an `umbrella header`.
51
+ # An umbrella claims every header sitting next to jsi.h, and the JSI pod ships several that jsi.h
52
+ # doesn't include (decorator.h, hermes-interfaces.h, JSIDynamic.h, jsilib.h, threadsafe.h). Clang
53
+ # warns "umbrella header for module 'jsi' does not include header ..." once per file, on every
54
+ # build of every slice. JSIDynamic.h would also pull in folly.
55
+ # jsi-inl.h needs no entry: jsi.h includes it, and Clang takes it textually from there.
56
+ JSI_HEADERS=""
57
+ for header in jsi.h instrumentation.h; do
58
+ if [[ -f "${JSI_DIR}/${header}" ]]; then
59
+ JSI_HEADERS="${JSI_HEADERS}
60
+ header \"${JSI_DIR}/${header}\""
61
+ fi
62
+ done
57
63
 
58
64
  # Avoid touching the file when contents would be identical, so the xcframework
59
65
  # hash cache and Xcode don't see a spurious change when inputs are unchanged.
60
- NEW_CONTENT="module jsi {
61
- umbrella header \"${JSI_UMBRELLA}\"${JSI_EXTRA_HEADERS}
66
+ #
67
+ # No `module * { export * }`: inferred submodules require an umbrella, and with headers listed
68
+ # explicitly there are no submodules to infer.
69
+ NEW_CONTENT="module jsi {${JSI_HEADERS}
62
70
 
63
71
  export *
64
- module * { export * }
65
72
  }"
66
73
  if [[ ! -f "$GENERATED_MODULE_MAP" ]] || [[ "$(cat "$GENERATED_MODULE_MAP")" != "$NEW_CONTENT" ]]; then
67
74
  printf '%s\n' "$NEW_CONTENT" > "$GENERATED_MODULE_MAP"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-jsi",
3
- "version": "58.0.3",
3
+ "version": "58.0.5",
4
4
  "description": "The JavaScript Interface for Expo Modules",
5
5
  "main": "index.js",
6
6
  "sideEffects": [],
@@ -41,7 +41,6 @@
41
41
  "./apple/scripts/test.sh"
42
42
  ]
43
43
  },
44
- "gitHead": "ebb1fd7569c9c9e172cb9abd73dfede027c1d674",
45
44
  "scripts": {
46
45
  "benchmark": "TEST_RUNNER_EXPO_BENCHMARK=1 DESTINATION=\"${DESTINATION:-platform=macOS,variant=Mac Catalyst}\" apple/scripts/test.sh -configuration Release -only-testing Benchmarks -enableCodeCoverage NO",
47
46
  "build:xcframework": "apple/scripts/build-xcframework.sh",
@@ -1,7 +0,0 @@
1
- module jsi {
2
- umbrella header "/Users/alanhughes/Work/expo/packages/expo-modules-jsi/.expo-prebuild/pods-stage/Headers/Public/React-jsi/jsi/jsi.h"
3
- header "/Users/alanhughes/Work/expo/packages/expo-modules-jsi/.expo-prebuild/pods-stage/Headers/Public/React-jsi/jsi/instrumentation.h"
4
-
5
- export *
6
- module * { export * }
7
- }
@@ -1,107 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>AvailableLibraries</key>
6
- <array>
7
- <dict>
8
- <key>BinaryPath</key>
9
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
10
- <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
12
- <key>LibraryPath</key>
13
- <string>ExpoModulesJSI.framework</string>
14
- <key>SupportedArchitectures</key>
15
- <array>
16
- <string>arm64</string>
17
- </array>
18
- <key>SupportedPlatform</key>
19
- <string>ios</string>
20
- </dict>
21
- <dict>
22
- <key>BinaryPath</key>
23
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
24
- <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-maccatalyst</string>
26
- <key>LibraryPath</key>
27
- <string>ExpoModulesJSI.framework</string>
28
- <key>SupportedArchitectures</key>
29
- <array>
30
- <string>arm64</string>
31
- <string>x86_64</string>
32
- </array>
33
- <key>SupportedPlatform</key>
34
- <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>maccatalyst</string>
37
- </dict>
38
- <dict>
39
- <key>BinaryPath</key>
40
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
41
- <key>LibraryIdentifier</key>
42
- <string>ios-arm64_x86_64-simulator</string>
43
- <key>LibraryPath</key>
44
- <string>ExpoModulesJSI.framework</string>
45
- <key>SupportedArchitectures</key>
46
- <array>
47
- <string>arm64</string>
48
- <string>x86_64</string>
49
- </array>
50
- <key>SupportedPlatform</key>
51
- <string>ios</string>
52
- <key>SupportedPlatformVariant</key>
53
- <string>simulator</string>
54
- </dict>
55
- <dict>
56
- <key>BinaryPath</key>
57
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
58
- <key>LibraryIdentifier</key>
59
- <string>macos-arm64_x86_64</string>
60
- <key>LibraryPath</key>
61
- <string>ExpoModulesJSI.framework</string>
62
- <key>SupportedArchitectures</key>
63
- <array>
64
- <string>arm64</string>
65
- <string>x86_64</string>
66
- </array>
67
- <key>SupportedPlatform</key>
68
- <string>macos</string>
69
- </dict>
70
- <dict>
71
- <key>BinaryPath</key>
72
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
73
- <key>LibraryIdentifier</key>
74
- <string>tvos-arm64</string>
75
- <key>LibraryPath</key>
76
- <string>ExpoModulesJSI.framework</string>
77
- <key>SupportedArchitectures</key>
78
- <array>
79
- <string>arm64</string>
80
- </array>
81
- <key>SupportedPlatform</key>
82
- <string>tvos</string>
83
- </dict>
84
- <dict>
85
- <key>BinaryPath</key>
86
- <string>ExpoModulesJSI.framework/ExpoModulesJSI</string>
87
- <key>LibraryIdentifier</key>
88
- <string>tvos-arm64_x86_64-simulator</string>
89
- <key>LibraryPath</key>
90
- <string>ExpoModulesJSI.framework</string>
91
- <key>SupportedArchitectures</key>
92
- <array>
93
- <string>arm64</string>
94
- <string>x86_64</string>
95
- </array>
96
- <key>SupportedPlatform</key>
97
- <string>tvos</string>
98
- <key>SupportedPlatformVariant</key>
99
- <string>simulator</string>
100
- </dict>
101
- </array>
102
- <key>CFBundlePackageType</key>
103
- <string>XFWK</string>
104
- <key>XCFrameworkFormatVersion</key>
105
- <string>1.0</string>
106
- </dict>
107
- </plist>