Skip to content

Commit 8a88a92

Browse files
committed
Merge branch 'main' of github.com:swiftwasm/JavaScriptKit into next
2 parents 96738fb + aa521a1 commit 8a88a92

File tree

20 files changed

+2915
-2593
lines changed

20 files changed

+2915
-2593
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ jobs:
88
name: Build and Test
99
strategy:
1010
matrix:
11-
os: [macOS-10.15, Ubuntu-18.04]
11+
os: [macos-10.15, macos-11, ubuntu-18.04, ubuntu-20.04]
12+
toolchain:
13+
- wasm-5.3.1-RELEASE
14+
- wasm-5.4.0-RELEASE
15+
- wasm-5.5-SNAPSHOT-2021-09-01-a
1216
runs-on: ${{ matrix.os }}
1317
steps:
1418
- name: Checkout
@@ -21,5 +25,6 @@ jobs:
2125
export SWIFTENV_ROOT="$HOME/.swiftenv"
2226
export PATH="$SWIFTENV_ROOT/bin:$PATH"
2327
eval "$(swiftenv init -)"
24-
make bootstrap
28+
SWIFT_VERSION=${{ matrix.toolchain }} make bootstrap
29+
echo ${{ matrix.toolchain }} > .swift-version
2530
make test

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# 0.10.1 (29 April 2021)
2+
3+
This is a minor patch release that includes updates to our dependencies and minor documentation
4+
tweaks.
5+
6+
**Closed issues:**
7+
8+
- Do you accept contributions for wrappers over JavaScript objects? ([#124](https://github.com/swiftwasm/JavaScriptKit/issues/124))
9+
- Can't read from a file using `JSPromise` ([#121](https://github.com/swiftwasm/JavaScriptKit/issues/121))
10+
- TypeError when trying to implement a `JSBridgedClass` for `WebSocket.send` ([#120](https://github.com/swiftwasm/JavaScriptKit/issues/120))
11+
12+
**Merged pull requests:**
13+
14+
- Update JS dependencies in package-lock.json ([#126](https://github.com/swiftwasm/JavaScriptKit/pull/126)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
15+
- Fix typo in method documentation ([#125](https://github.com/swiftwasm/JavaScriptKit/pull/125)) via [@revolter](https://github.com/revolter)
16+
- Update exported func name to match exported name ([#123](https://github.com/swiftwasm/JavaScriptKit/pull/123)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
17+
- Fix incorrect link in `JSDate` documentation ([#122](https://github.com/swiftwasm/JavaScriptKit/pull/122)) via [@revolter](https://github.com/revolter)
18+
19+
# 0.10.0 (21 January 2021)
20+
21+
This release contains multiple breaking changes in preparation for enabling `async`/`await`, when
22+
this feature is available in a stable SwiftWasm release. Namely:
23+
24+
* `JSClosure.init(_ body: @escaping ([JSValue]) -> ())` overload is deprecated to simplify type
25+
checking. Its presence requires explicit type signatures at the place of use. It will be removed
26+
in a future version of JavaScriptKit.
27+
* `JSClosure` is no longer a subclass of `JSFunction`. These classes are not related enough to keep
28+
them in the same class hierarchy.
29+
As a result, you can no longer call `JSClosure` objects directly from Swift.
30+
* Introduced `JSOneshotClosure` for closures that are going to be called only once. You don't need
31+
to manage references to these closures manually, as opposed to `JSClosure`.
32+
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.
33+
* Removed generic parameters on `JSPromise`, now both success and failure values are always assumed
34+
to be of `JSValue` type. This also significantly simplifies type checking and allows callers to
35+
fully control type casting if needed.
36+
37+
**Closed issues:**
38+
39+
- DOMKit? ([#21](https://github.com/swiftwasm/JavaScriptKit/issues/21))
40+
41+
**Merged pull requests:**
42+
43+
- Simplify `JSPromise` API ([#115](https://github.com/swiftwasm/JavaScriptKit/pull/115)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
44+
- Create `FUNDING.yml` ([#117](https://github.com/swiftwasm/JavaScriptKit/pull/117)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
45+
- Major API change on `JSClosure` ([#113](https://github.com/swiftwasm/JavaScriptKit/pull/113)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
46+
- Update `package.json` to lockfileVersion 2 ([#114](https://github.com/swiftwasm/JavaScriptKit/pull/114)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
47+
- Bump `ini` from 1.3.5 to 1.3.8 in `/Example` ([#111](https://github.com/swiftwasm/JavaScriptKit/pull/111)) via [@dependabot](https://github.com/dependabot)
48+
- Update doc comment in `JSTypedArray.swift` ([#110](https://github.com/swiftwasm/JavaScriptKit/pull/110)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
49+
150
# 0.9.0 (27 November 2020)
251

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

Example/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ JavaScriptKitExample:
77

88
dist/JavaScriptKitExample.wasm: JavaScriptKitExample
99
mkdir -p dist
10-
cp ./JavaScriptKitExample/.build/debug/JavaScriptKitExample $@
10+
cp ./JavaScriptKitExample/.build/debug/JavaScriptKitExample.wasm $@
1111

1212
node_modules:
1313
npm ci

0 commit comments

Comments
 (0)