Skip to content

Commit 9a3b7d5

Browse files
authored
Bump version to 0.14.0, update CHANGELOG.md (#181)
New release is required to resolve TokamakUI/Tokamak#475. I've also cleaned up formatting in `.ts` file and clarified version incompatibility error message.
1 parent 54d4a47 commit 9a3b7d5

File tree

5 files changed

+44
-33
lines changed

5 files changed

+44
-33
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
wasm-5.5.0-RELEASE
1+
wasm-5.6.0-RELEASE

CHANGELOG.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
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+
**Merged pull requests:**
6+
7+
- Reenable integration tests ([#180](https://github.com/swiftwasm/JavaScriptKit/pull/180)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
8+
- Updates for DOMKit ([#174](https://github.com/swiftwasm/JavaScriptKit/pull/174)) via [@j-f1](https://github.com/j-f1)
9+
- 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)
10+
111
# 0.13.0 (31 March 2022)
212

313
This release improves handling of JavaScript exceptions and compatibility with Xcode.
@@ -21,7 +31,7 @@ Thanks to [@kateinoigakukun](https://github.com/kateinoigakukun), [@pedrovgs](ht
2131

2232
# 0.12.0 (08 February 2022)
2333

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.
34+
This release introduces a [major refactor](https://github.com/swiftwasm/JavaScriptKit/pull/150) of the JavaScript runtime by [@j-f1] and several performance enhancements.
2535

2636
**Merged pull requests:**
2737

@@ -40,9 +50,10 @@ This is a bugfix release that removes a requirement for macOS Monterey in `Packa
4050
package. `README.md` was updated to explicitly specify that if you're building an app or a library
4151
that depends on JavaScriptKit for macOS (i.e. cross-platform code that supports both WebAssembly
4252
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.
53+
54+
- macOS Monterey that has the new Swift concurrency runtime available, or
55+
- any version of macOS that supports Swift concurrency back-deployment with Xcode 13.2 or later, or
56+
- add `.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])` in `Package.swift` manifest.
4657

4758
**Merged pull requests:**
4859

@@ -52,7 +63,7 @@ and macOS), you need either
5263

5364
This release adds support for `async`/`await` and SwiftWasm 5.5. Use the new `value` async property
5465
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
66+
`JavaScriptEventLoop` target in your `Package.swift`, `import JavaScriptEventLoop`, and call
5667
`JavaScriptEventLoop.installGlobalExecutor()` in your code before you start using `await` and `Task`
5768
APIs.
5869

@@ -64,12 +75,12 @@ compiler flags, see [`README.md`](./README.md) for more details.
6475
This new release of JavaScriptKit may work with SwiftWasm 5.4 and 5.3, but is no longer tested with
6576
those versions due to compatibility issues introduced on macOS by latest versions of Xcode.
6677

67-
Many thanks to [@j-f1], [@kateinoigakukun],
78+
Many thanks to [@j-f1], [@kateinoigakukun],
6879
and [@PatrickPijnappel] for their contributions to this release!
6980

7081
**Closed issues:**
7182

72-
- Enchancement: Add a link to the docs ([#136](https://github.com/swiftwasm/JavaScriptKit/issues/136))
83+
- Enchancement: Add a link to the docs ([#136](https://github.com/swiftwasm/JavaScriptKit/issues/136))
7384
- Use `FinalizationRegistry` to auto-deinit `JSClosure` ([#131](https://github.com/swiftwasm/JavaScriptKit/issues/131))
7485
- `make test` crashes due to `JSClosure` memory issues ([#129](https://github.com/swiftwasm/JavaScriptKit/issues/129))
7586
- Avoid manual memory management with `JSClosure` ([#106](https://github.com/swiftwasm/JavaScriptKit/issues/106))
@@ -97,7 +108,7 @@ tweaks.
97108

98109
**Merged pull requests:**
99110

100-
- Update JS dependencies in package-lock.json ([#126](https://github.com/swiftwasm/JavaScriptKit/pull/126)) via [@MaxDesiatov]
111+
- Update JS dependencies in package-lock.json ([#126](https://github.com/swiftwasm/JavaScriptKit/pull/126)) via [@MaxDesiatov]
101112
- Fix typo in method documentation ([#125](https://github.com/swiftwasm/JavaScriptKit/pull/125)) via [@revolter]
102113
- Update exported func name to match exported name ([#123](https://github.com/swiftwasm/JavaScriptKit/pull/123)) via [@kateinoigakukun]
103114
- Fix incorrect link in `JSDate` documentation ([#122](https://github.com/swiftwasm/JavaScriptKit/pull/122)) via [@revolter]
@@ -107,18 +118,18 @@ tweaks.
107118
This release contains multiple breaking changes in preparation for enabling `async`/`await`, when
108119
this feature is available in a stable SwiftWasm release. Namely:
109120

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.
121+
- `JSClosure.init(_ body: @escaping ([JSValue]) -> ())` overload is deprecated to simplify type
122+
checking. Its presence requires explicit type signatures at the place of use. It will be removed
123+
in a future version of JavaScriptKit.
124+
- `JSClosure` is no longer a subclass of `JSFunction`. These classes are not related enough to keep
125+
them in the same class hierarchy.
126+
As a result, you can no longer call `JSClosure` objects directly from Swift.
127+
- Introduced `JSOneshotClosure` for closures that are going to be called only once. You don't need
128+
to manage references to these closures manually, as opposed to `JSClosure`.
129+
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.
130+
- Removed generic parameters on `JSPromise`, now both success and failure values are always assumed
131+
to be of `JSValue` type. This also significantly simplifies type checking and allows callers to
132+
fully control type casting if needed.
122133

123134
**Closed issues:**
124135

@@ -200,7 +211,7 @@ with idiomatic Swift code.
200211
- Update toolchain version, script, and `README.md` ([#96](https://github.com/swiftwasm/JavaScriptKit/pull/96)) via [@MaxDesiatov]
201212
- [Proposal] Add unsafe convenience methods for JSValue ([#98](https://github.com/swiftwasm/JavaScriptKit/pull/98)) via [@kateinoigakukun]
202213
- 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]
214+
- Sync package.json and package-lock.json ([#90](https://github.com/swiftwasm/JavaScriptKit/pull/90)) via [@kateinoigakukun]
204215
- Rename JSValueConvertible/Constructible/Codable ([#88](https://github.com/swiftwasm/JavaScriptKit/pull/88)) via [@j-f1]
205216
- 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]
206217
- Make `JSError` conform to `JSBridgedClass` ([#86](https://github.com/swiftwasm/JavaScriptKit/pull/86)) via [@MaxDesiatov]
@@ -278,10 +289,10 @@ This release adds `JSTypedArray` generic type, renames `JSObjectRef` to `JSObjec
278289
- Clean up the `JSObjectRef` API ([#28](https://github.com/swiftwasm/JavaScriptKit/pull/28)) via [@j-f1]
279290
- Remove unused `Tests` directory ([#32](https://github.com/swiftwasm/JavaScriptKit/pull/32)) via [@MaxDesiatov]
280291

281-
[@MaxDesiatov]: https://github.com/MaxDesiatov
292+
[@maxdesiatov]: https://github.com/MaxDesiatov
282293
[@j-f1]: https://github.com/j-f1
283294
[@kateinoigakukun]: https://github.com/kateinoigakukun
284295
[@yonihemi]: https://github.com/yonihemi
285-
[@PatrickPijnappel]: https://github.com/PatrickPijnappel
296+
[@patrickpijnappel]: https://github.com/PatrickPijnappel
286297
[@revolter]: https://github.com/revolter
287298
[@dependabot]: https://github.com/dependabot

Runtime/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export class SwiftRuntime {
2929
this._instance = instance;
3030
if (this.exports.swjs_library_version() != this.version) {
3131
throw new Error(
32-
`The versions of JavaScriptKit are incompatible. ${this.exports.swjs_library_version()} != ${
32+
`The versions of JavaScriptKit are incompatible.
33+
WebAssembly runtime ${this.exports.swjs_library_version()} != JS runtime ${
3334
this.version
3435
}`
3536
);
@@ -177,10 +178,9 @@ export class SwiftRuntime {
177178
},
178179

179180
swjs_decode_string: (bytes_ptr: pointer, length: number) => {
180-
const bytes = this.memory.bytes().subarray(
181-
bytes_ptr,
182-
bytes_ptr + length
183-
);
181+
const bytes = this.memory
182+
.bytes()
183+
.subarray(bytes_ptr, bytes_ptr + length);
184184
const string = this.textDecoder.decode(bytes);
185185
return this.memory.retain(string);
186186
},
@@ -330,7 +330,7 @@ export class SwiftRuntime {
330330
false,
331331
this.memory
332332
);
333-
isException = false
333+
isException = false;
334334
} finally {
335335
if (isException) {
336336
JSValue.write(

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "javascript-kit-swift",
3-
"version": "0.13.0",
3+
"version": "0.14.0",
44
"description": "A runtime library of JavaScriptKit which is Swift framework to interact with JavaScript through WebAssembly.",
55
"main": "Runtime/lib/index.js",
66
"module": "Runtime/lib/index.mjs",

0 commit comments

Comments
 (0)