You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+42-23
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,21 @@
1
+
# 0.14.0 (8 April 2022)
2
+
3
+
This is a breaking release that enables full support for SwiftWasm 5.6 and lays groundwork for future updates to [DOMKit](https://github.com/swiftwasm/DOMKit/).
4
+
5
+
- The `ConvertibleToJSValue` conformance on `Array` and `Dictionary` has been swapped from the `== ConvertibleToJSValue` case to the `: ConvertibleToJSValue` case.
6
+
- This means that e.g. `[String]` is now `ConvertibleToJSValue`, but `[ConvertibleToJSValue]` no longer conforms;
7
+
- the `jsValue()` method still works in both cases;
8
+
- to adapt existing code, use one of these approaches:
9
+
- use generics where possible (for single-type arrays)
10
+
- call `.map { $0.jsValue() }` (or `mapValues`) to get an array/dictionary of `JSValue` which you can then use as `ConvertibleToJSValue`
11
+
- add `.jsValue` to the end of all of the values in the array/dictionary literal.
12
+
13
+
**Merged pull requests:**
14
+
15
+
- Reenable integration tests ([#180](https://github.com/swiftwasm/JavaScriptKit/pull/180)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
16
+
- Updates for DOMKit ([#174](https://github.com/swiftwasm/JavaScriptKit/pull/174)) via [@j-f1](https://github.com/j-f1)
17
+
- Add 5.6 release and macOS 12 with Xcode 13.3 to CI matrix ([#176](https://github.com/swiftwasm/JavaScriptKit/pull/176)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
18
+
1
19
# 0.13.0 (31 March 2022)
2
20
3
21
This release improves handling of JavaScript exceptions and compatibility with Xcode.
@@ -21,7 +39,7 @@ Thanks to [@kateinoigakukun](https://github.com/kateinoigakukun), [@pedrovgs](ht
21
39
22
40
# 0.12.0 (08 February 2022)
23
41
24
-
This release introduces a [major refactor](https://github.com/swiftwasm/JavaScriptKit/pull/150) of the JavaScript runtime by [@j-f1] and several performance enhancements.
42
+
This release introduces a [major refactor](https://github.com/swiftwasm/JavaScriptKit/pull/150) of the JavaScript runtime by [@j-f1] and several performance enhancements.
25
43
26
44
**Merged pull requests:**
27
45
@@ -40,9 +58,10 @@ This is a bugfix release that removes a requirement for macOS Monterey in `Packa
40
58
package. `README.md` was updated to explicitly specify that if you're building an app or a library
41
59
that depends on JavaScriptKit for macOS (i.e. cross-platform code that supports both WebAssembly
42
60
and macOS), you need either
43
-
* macOS Monterey that has the new Swift concurrency runtime available, or
44
-
* any version of macOS that supports Swift concurrency back-deployment with Xcode 13.2 or later, or
45
-
* add `.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])` in `Package.swift` manifest.
61
+
62
+
- macOS Monterey that has the new Swift concurrency runtime available, or
63
+
- any version of macOS that supports Swift concurrency back-deployment with Xcode 13.2 or later, or
64
+
- add `.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])` in `Package.swift` manifest.
46
65
47
66
**Merged pull requests:**
48
67
@@ -52,7 +71,7 @@ and macOS), you need either
52
71
53
72
This release adds support for `async`/`await` and SwiftWasm 5.5. Use the new `value` async property
54
73
on a `JSPromise` instance to `await` for its result. You'll have to add a dependency on the new
55
-
`JavaScriptEventLoop` target in your `Package.swift`, `import JavaScriptEventLoop`, and call
74
+
`JavaScriptEventLoop` target in your `Package.swift`, `import JavaScriptEventLoop`, and call
56
75
`JavaScriptEventLoop.installGlobalExecutor()` in your code before you start using `await` and `Task`
57
76
APIs.
58
77
@@ -64,12 +83,12 @@ compiler flags, see [`README.md`](./README.md) for more details.
64
83
This new release of JavaScriptKit may work with SwiftWasm 5.4 and 5.3, but is no longer tested with
65
84
those versions due to compatibility issues introduced on macOS by latest versions of Xcode.
66
85
67
-
Many thanks to [@j-f1], [@kateinoigakukun],
86
+
Many thanks to [@j-f1], [@kateinoigakukun],
68
87
and [@PatrickPijnappel] for their contributions to this release!
69
88
70
89
**Closed issues:**
71
90
72
-
- Enchancement: Add a link to the docs ([#136](https://github.com/swiftwasm/JavaScriptKit/issues/136))
91
+
- Enchancement: Add a link to the docs ([#136](https://github.com/swiftwasm/JavaScriptKit/issues/136))
73
92
- Use `FinalizationRegistry` to auto-deinit `JSClosure` ([#131](https://github.com/swiftwasm/JavaScriptKit/issues/131))
74
93
-`make test` crashes due to `JSClosure` memory issues ([#129](https://github.com/swiftwasm/JavaScriptKit/issues/129))
75
94
- Avoid manual memory management with `JSClosure` ([#106](https://github.com/swiftwasm/JavaScriptKit/issues/106))
@@ -97,7 +116,7 @@ tweaks.
97
116
98
117
**Merged pull requests:**
99
118
100
-
- Update JS dependencies in package-lock.json ([#126](https://github.com/swiftwasm/JavaScriptKit/pull/126)) via [@MaxDesiatov]
119
+
- Update JS dependencies in package-lock.json ([#126](https://github.com/swiftwasm/JavaScriptKit/pull/126)) via [@MaxDesiatov]
101
120
- Fix typo in method documentation ([#125](https://github.com/swiftwasm/JavaScriptKit/pull/125)) via [@revolter]
102
121
- Update exported func name to match exported name ([#123](https://github.com/swiftwasm/JavaScriptKit/pull/123)) via [@kateinoigakukun]
103
122
- Fix incorrect link in `JSDate` documentation ([#122](https://github.com/swiftwasm/JavaScriptKit/pull/122)) via [@revolter]
@@ -107,18 +126,18 @@ tweaks.
107
126
This release contains multiple breaking changes in preparation for enabling `async`/`await`, when
108
127
this feature is available in a stable SwiftWasm release. Namely:
109
128
110
-
*`JSClosure.init(_ body: @escaping ([JSValue]) -> ())` overload is deprecated to simplify type
111
-
checking. Its presence requires explicit type signatures at the place of use. It will be removed
112
-
in a future version of JavaScriptKit.
113
-
*`JSClosure` is no longer a subclass of `JSFunction`. These classes are not related enough to keep
114
-
them in the same class hierarchy.
115
-
As a result, you can no longer call `JSClosure` objects directly from Swift.
116
-
* Introduced `JSOneshotClosure` for closures that are going to be called only once. You don't need
117
-
to manage references to these closures manually, as opposed to `JSClosure`.
118
-
However, they can only be called a single time from the JS side. Subsequent invocation attempts will raise a fatal error on the Swift side.
119
-
* Removed generic parameters on `JSPromise`, now both success and failure values are always assumed
120
-
to be of `JSValue` type. This also significantly simplifies type checking and allows callers to
121
-
fully control type casting if needed.
129
+
-`JSClosure.init(_ body: @escaping ([JSValue]) -> ())` overload is deprecated to simplify type
130
+
checking. Its presence requires explicit type signatures at the place of use. It will be removed
131
+
in a future version of JavaScriptKit.
132
+
-`JSClosure` is no longer a subclass of `JSFunction`. These classes are not related enough to keep
133
+
them in the same class hierarchy.
134
+
As a result, you can no longer call `JSClosure` objects directly from Swift.
135
+
- Introduced `JSOneshotClosure` for closures that are going to be called only once. You don't need
136
+
to manage references to these closures manually, as opposed to `JSClosure`.
137
+
However, they can only be called a single time from the JS side. Subsequent invocation attempts will raise a fatal error on the Swift side.
138
+
- Removed generic parameters on `JSPromise`, now both success and failure values are always assumed
139
+
to be of `JSValue` type. This also significantly simplifies type checking and allows callers to
140
+
fully control type casting if needed.
122
141
123
142
**Closed issues:**
124
143
@@ -200,7 +219,7 @@ with idiomatic Swift code.
200
219
- Update toolchain version, script, and `README.md` ([#96](https://github.com/swiftwasm/JavaScriptKit/pull/96)) via [@MaxDesiatov]
201
220
-[Proposal] Add unsafe convenience methods for JSValue ([#98](https://github.com/swiftwasm/JavaScriptKit/pull/98)) via [@kateinoigakukun]
202
221
- Remove all unsafe linker flags from Package.swift ([#91](https://github.com/swiftwasm/JavaScriptKit/pull/91)) via [@kateinoigakukun]
203
-
- Sync package.json and package-lock.json ([#90](https://github.com/swiftwasm/JavaScriptKit/pull/90)) via [@kateinoigakukun]
222
+
- Sync package.json and package-lock.json ([#90](https://github.com/swiftwasm/JavaScriptKit/pull/90)) via [@kateinoigakukun]
204
223
- Rename JSValueConvertible/Constructible/Codable ([#88](https://github.com/swiftwasm/JavaScriptKit/pull/88)) via [@j-f1]
205
224
- Bump @actions/core from 1.2.2 to 1.2.6 in /ci/perf-tester ([#89](https://github.com/swiftwasm/JavaScriptKit/pull/89)) via [@dependabot]
206
225
- Make `JSError` conform to `JSBridgedClass` ([#86](https://github.com/swiftwasm/JavaScriptKit/pull/86)) via [@MaxDesiatov]
@@ -278,10 +297,10 @@ This release adds `JSTypedArray` generic type, renames `JSObjectRef` to `JSObjec
278
297
- Clean up the `JSObjectRef` API ([#28](https://github.com/swiftwasm/JavaScriptKit/pull/28)) via [@j-f1]
279
298
- Remove unused `Tests` directory ([#32](https://github.com/swiftwasm/JavaScriptKit/pull/32)) via [@MaxDesiatov]
0 commit comments