Skip to content

Bump version to 0.14.0, update CHANGELOG.md #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
wasm-5.5.0-RELEASE
wasm-5.6.0-RELEASE
57 changes: 34 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 0.14.0 (8 April 2022)

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/).

**Merged pull requests:**

- Reenable integration tests ([#180](https://github.com/swiftwasm/JavaScriptKit/pull/180)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
- Updates for DOMKit ([#174](https://github.com/swiftwasm/JavaScriptKit/pull/174)) via [@j-f1](https://github.com/j-f1)
- 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)

# 0.13.0 (31 March 2022)

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

# 0.12.0 (08 February 2022)

This release introduces a [major refactor](https://github.com/swiftwasm/JavaScriptKit/pull/150) of the JavaScript runtime by [@j-f1] and several performance enhancements.
This release introduces a [major refactor](https://github.com/swiftwasm/JavaScriptKit/pull/150) of the JavaScript runtime by [@j-f1] and several performance enhancements.

**Merged pull requests:**

Expand All @@ -40,9 +50,10 @@ This is a bugfix release that removes a requirement for macOS Monterey in `Packa
package. `README.md` was updated to explicitly specify that if you're building an app or a library
that depends on JavaScriptKit for macOS (i.e. cross-platform code that supports both WebAssembly
and macOS), you need either
* macOS Monterey that has the new Swift concurrency runtime available, or
* any version of macOS that supports Swift concurrency back-deployment with Xcode 13.2 or later, or
* add `.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])` in `Package.swift` manifest.

- macOS Monterey that has the new Swift concurrency runtime available, or
- any version of macOS that supports Swift concurrency back-deployment with Xcode 13.2 or later, or
- add `.unsafeFlags(["-Xfrontend", "-disable-availability-checking"])` in `Package.swift` manifest.

**Merged pull requests:**

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

This release adds support for `async`/`await` and SwiftWasm 5.5. Use the new `value` async property
on a `JSPromise` instance to `await` for its result. You'll have to add a dependency on the new
`JavaScriptEventLoop` target in your `Package.swift`, `import JavaScriptEventLoop`, and call
`JavaScriptEventLoop` target in your `Package.swift`, `import JavaScriptEventLoop`, and call
`JavaScriptEventLoop.installGlobalExecutor()` in your code before you start using `await` and `Task`
APIs.

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

Many thanks to [@j-f1], [@kateinoigakukun],
Many thanks to [@j-f1], [@kateinoigakukun],
and [@PatrickPijnappel] for their contributions to this release!

**Closed issues:**

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

**Merged pull requests:**

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

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

**Closed issues:**

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

[@MaxDesiatov]: https://github.com/MaxDesiatov
[@maxdesiatov]: https://github.com/MaxDesiatov
[@j-f1]: https://github.com/j-f1
[@kateinoigakukun]: https://github.com/kateinoigakukun
[@yonihemi]: https://github.com/yonihemi
[@PatrickPijnappel]: https://github.com/PatrickPijnappel
[@patrickpijnappel]: https://github.com/PatrickPijnappel
[@revolter]: https://github.com/revolter
[@dependabot]: https://github.com/dependabot
12 changes: 6 additions & 6 deletions Runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class SwiftRuntime {
this._instance = instance;
if (this.exports.swjs_library_version() != this.version) {
throw new Error(
`The versions of JavaScriptKit are incompatible. ${this.exports.swjs_library_version()} != ${
`The versions of JavaScriptKit are incompatible.
WebAssembly runtime ${this.exports.swjs_library_version()} != JS runtime ${
this.version
}`
);
Expand Down Expand Up @@ -177,10 +178,9 @@ export class SwiftRuntime {
},

swjs_decode_string: (bytes_ptr: pointer, length: number) => {
const bytes = this.memory.bytes().subarray(
bytes_ptr,
bytes_ptr + length
);
const bytes = this.memory
.bytes()
.subarray(bytes_ptr, bytes_ptr + length);
const string = this.textDecoder.decode(bytes);
return this.memory.retain(string);
},
Expand Down Expand Up @@ -330,7 +330,7 @@ export class SwiftRuntime {
false,
this.memory
);
isException = false
isException = false;
} finally {
if (isException) {
JSValue.write(
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "javascript-kit-swift",
"version": "0.13.0",
"version": "0.14.0",
"description": "A runtime library of JavaScriptKit which is Swift framework to interact with JavaScript through WebAssembly.",
"main": "Runtime/lib/index.js",
"module": "Runtime/lib/index.mjs",
Expand Down