Skip to content

Update CHANGELOG.md for JavaScriptKit 0.10.0 #119

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 3 commits into from
Jan 21, 2021
Merged
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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# 0.10.0 (21 January 2021)

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.

**Closed issues:**

- DOMKit? ([#21](https://github.com/swiftwasm/JavaScriptKit/issues/21))

**Merged pull requests:**

- Simplify `JSPromise` API ([#115](https://github.com/swiftwasm/JavaScriptKit/pull/115)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
- Create `FUNDING.yml` ([#117](https://github.com/swiftwasm/JavaScriptKit/pull/117)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
- Major API change on `JSClosure` ([#113](https://github.com/swiftwasm/JavaScriptKit/pull/113)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
- Update `package.json` to lockfileVersion 2 ([#114](https://github.com/swiftwasm/JavaScriptKit/pull/114)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
- Bump `ini` from 1.3.5 to 1.3.8 in `/Example` ([#111](https://github.com/swiftwasm/JavaScriptKit/pull/111)) via [@dependabot[bot]](https://github.com/dependabot[bot])
- Update doc comment in `JSTypedArray.swift` ([#110](https://github.com/swiftwasm/JavaScriptKit/pull/110)) via [@MaxDesiatov](https://github.com/MaxDesiatov)

# 0.9.0 (27 November 2020)

This release introduces support for catching `JSError` instances in Swift from throwing JavaScript
Expand Down