Open
Conversation
…SValue payloads using the shared helpers, enabling `[JSValue]` round-trips in both directions (`Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift`). - Extended JSValue test inputs with array and optional-array cases plus a JS-imported array echo to exercise the new path (`Plugins/BridgeJS/Tests/BridgeJSToolTests/Inputs/MacroSwift/JSValue.swift`). - Updated codegen/link snapshots to reflect the new JSValue array glue (`Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSCodegenTests/JSValue.swift`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSCodegenTests/JSValue.json`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.js`, `Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.d.ts`). Tests: `UPDATE_SNAPSHOTS=1 swift test --package-path ./Plugins/BridgeJS`. Next step: run `make unittest SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-11-03-a-wasm32-unknown-wasip1` for the full runtime suite if you want end-to-end validation.
…tional JSValue arrays, using tmp stacks and JSValue helpers, and Swift intrinsics gained Optional<[JSValue]> bridging (`Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift`, `Sources/JavaScriptKit/BridgeJSIntrinsics.swift`). - Expanded runtime coverage with JSValue array round-trips (including optionals) on both import and export paths plus JS prelude wiring and d.ts definitions (`Tests/BridgeJSRuntimeTests/ExportAPITests.swift`, `Tests/BridgeJSRuntimeTests/ImportAPITests.swift`, `Tests/BridgeJSRuntimeTests/bridge-js.d.ts`, `Tests/prelude.mjs`), and regenerated BridgeJS outputs (`Tests/BridgeJSRuntimeTests/Generated/*`, `Tests/BridgeJSGlobalTests/Generated/*`, plugin outputs). - Runtime tests now include JSValue array cases and all suites pass with the prescribed SDK. Tests: `make unittest SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-11-03-a-wasm32-unknown-wasip1`.
[JSValue]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable BridgeJS glue to lower/lift JSValue arrays and optionals using shared JSValue helpers