Skip to content

Commit b577dca

Browse files
- Snapshots refreshed via UPDATE_SNAPSHOTS=1 swift test --package-path ./Plugins/BridgeJS; TS2Swift snapshots now expect throws(JSException).
- Regenerated BridgeJS-generated Swift bindings with `./Utilities/bridge-js-generate.sh`, updating `Benchmarks/Sources/Generated/BridgeJS.Macros.swift`, `Examples/PlayBridgeJS/Sources/PlayBridgeJS/Generated/BridgeJS.Macros.swift`, and `Tests/BridgeJSRuntimeTests/Generated/BridgeJS.Macros.swift`. - Skill used: `bridgejs-development`. Tests: `UPDATE_SNAPSHOTS=1 swift test --package-path ./Plugins/BridgeJS` (pass). Next: `make unittest SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-11-03-a-wasm32-unknown-wasip1` if you want full runtime coverage.
1 parent 464eb1c commit b577dca

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

Benchmarks/Sources/Generated/BridgeJS.Macros.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
88

9-
@JSFunction func benchmarkHelperNoop() throws (JSException) -> Void
9+
@JSFunction func benchmarkHelperNoop() throws(JSException) -> Void
1010

11-
@JSFunction func benchmarkHelperNoopWithNumber(_ n: Double) throws (JSException) -> Void
11+
@JSFunction func benchmarkHelperNoopWithNumber(_ n: Double) throws(JSException) -> Void
1212

13-
@JSFunction func benchmarkRunner(_ name: String, _ body: JSObject) throws (JSException) -> Void
13+
@JSFunction func benchmarkRunner(_ name: String, _ body: JSObject) throws(JSException) -> Void

Examples/PlayBridgeJS/Sources/PlayBridgeJS/Generated/BridgeJS.Macros.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
88

9-
@JSFunction func createTS2Swift() throws (JSException) -> TS2Swift
9+
@JSFunction func createTS2Swift() throws(JSException) -> TS2Swift
1010

1111
@JSClass struct TS2Swift {
12-
@JSFunction func convert(_ ts: String) throws (JSException) -> String
12+
@JSFunction func convert(_ ts: String) throws(JSException) -> String
1313
}

Tests/BridgeJSRuntimeTests/Generated/BridgeJS.Macros.swift

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,60 @@
66

77
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
88

9-
@JSFunction func jsRoundTripVoid() throws (JSException) -> Void
9+
@JSFunction func jsRoundTripVoid() throws(JSException) -> Void
1010

11-
@JSFunction func jsRoundTripNumber(_ v: Double) throws (JSException) -> Double
11+
@JSFunction func jsRoundTripNumber(_ v: Double) throws(JSException) -> Double
1212

13-
@JSFunction func jsRoundTripBool(_ v: Bool) throws (JSException) -> Bool
13+
@JSFunction func jsRoundTripBool(_ v: Bool) throws(JSException) -> Bool
1414

15-
@JSFunction func jsRoundTripString(_ v: String) throws (JSException) -> String
15+
@JSFunction func jsRoundTripString(_ v: String) throws(JSException) -> String
1616

17-
@JSFunction func jsThrowOrVoid(_ shouldThrow: Bool) throws (JSException) -> Void
17+
@JSFunction func jsThrowOrVoid(_ shouldThrow: Bool) throws(JSException) -> Void
1818

19-
@JSFunction func jsThrowOrNumber(_ shouldThrow: Bool) throws (JSException) -> Double
19+
@JSFunction func jsThrowOrNumber(_ shouldThrow: Bool) throws(JSException) -> Double
2020

21-
@JSFunction func jsThrowOrBool(_ shouldThrow: Bool) throws (JSException) -> Bool
21+
@JSFunction func jsThrowOrBool(_ shouldThrow: Bool) throws(JSException) -> Bool
2222

23-
@JSFunction func jsThrowOrString(_ shouldThrow: Bool) throws (JSException) -> String
23+
@JSFunction func jsThrowOrString(_ shouldThrow: Bool) throws(JSException) -> String
2424

2525
enum FeatureFlag: String {
2626
case foo = "foo"
2727
case bar = "bar"
2828
}
2929
extension FeatureFlag: _BridgedSwiftEnumNoPayload, _BridgedSwiftRawValueEnum {}
3030

31-
@JSFunction func jsRoundTripFeatureFlag(_ flag: FeatureFlag) throws (JSException) -> FeatureFlag
31+
@JSFunction func jsRoundTripFeatureFlag(_ flag: FeatureFlag) throws(JSException) -> FeatureFlag
3232

3333
@JSClass struct JsGreeter {
3434
@JSGetter var name: String
35-
@JSSetter func setName(_ value: String) throws (JSException)
35+
@JSSetter func setName(_ value: String) throws(JSException)
3636
@JSGetter var `prefix`: String
37-
@JSFunction init(_ name: String, _ `prefix`: String) throws (JSException)
38-
@JSFunction func greet() throws (JSException) -> String
39-
@JSFunction func changeName(_ name: String) throws (JSException) -> Void
37+
@JSFunction init(_ name: String, _ `prefix`: String) throws(JSException)
38+
@JSFunction func greet() throws(JSException) -> String
39+
@JSFunction func changeName(_ name: String) throws(JSException) -> Void
4040
}
4141

42-
@JSFunction func runAsyncWorks() throws (JSException) -> JSPromise
42+
@JSFunction func runAsyncWorks() throws(JSException) -> JSPromise
4343

44-
@JSFunction(jsName: "$jsWeirdFunction") func _jsWeirdFunction() throws (JSException) -> Double
44+
@JSFunction(jsName: "$jsWeirdFunction") func _jsWeirdFunction() throws(JSException) -> Double
4545

4646
@JSClass(jsName: "$WeirdClass") struct _WeirdClass {
47-
@JSFunction init() throws (JSException)
48-
@JSFunction(jsName: "method-with-dashes") func method_with_dashes() throws (JSException) -> String
47+
@JSFunction init() throws(JSException)
48+
@JSFunction(jsName: "method-with-dashes") func method_with_dashes() throws(JSException) -> String
4949
}
5050

51-
@JSFunction(from: .global) func parseInt(_ string: String) throws (JSException) -> Double
51+
@JSFunction(from: .global) func parseInt(_ string: String) throws(JSException) -> Double
5252

5353
@JSClass(from: .global) struct Animal {
5454
@JSGetter var name: String
55-
@JSSetter func setName(_ value: String) throws (JSException)
55+
@JSSetter func setName(_ value: String) throws(JSException)
5656
@JSGetter var age: Double
57-
@JSSetter func setAge(_ value: Double) throws (JSException)
57+
@JSSetter func setAge(_ value: Double) throws(JSException)
5858
@JSGetter var isCat: Bool
59-
@JSSetter func setIsCat(_ value: Bool) throws (JSException)
60-
@JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws (JSException)
61-
@JSFunction func bark() throws (JSException) -> String
62-
@JSFunction func getIsCat() throws (JSException) -> Bool
59+
@JSSetter func setIsCat(_ value: Bool) throws(JSException)
60+
@JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws(JSException)
61+
@JSFunction func bark() throws(JSException) -> String
62+
@JSFunction func getIsCat() throws(JSException) -> Bool
6363
}
6464

6565
@JSGetter(from: .global) var globalObject1: JSObject

0 commit comments

Comments
 (0)