Skip to content

Commit 1027b82

Browse files
committed
Bump version to 0.8.0, update CHANGELOG.md
1 parent 06a828e commit 1027b82

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# 0.8.0 (21 October 2020)
2+
3+
This release introduces a few enhancements and deprecations. Namely, `JSValueConstructible`
4+
and `JSValueConvertible` were renamed to `ConstructibleFromJSValue` and `ConvertibleToJSValue`
5+
respectively. The old names are deprecated, and you should move away from using the old names in
6+
your code. Additionally, JavaScriptKit now requires the most recent 5.3 and development toolchains,
7+
but thanks to this it no longer uses unsafe flags, which prevented building other libraries
8+
depending on JavaScriptKit on other platforms.
9+
10+
The main user-visible enhancement is that now force casts are no longer required in client code.
11+
That is, we know allow this
12+
13+
```swift
14+
let document = JSObject.global.document
15+
let foundDivs = document.getElementsByTagName("div")
16+
```
17+
18+
in addition to the previously available explicit style with force unwrapping:
19+
20+
```swift
21+
let document = JSObject.global.document.object!
22+
let foundDivs = document.getElementsByTagName!("div").object!
23+
```
24+
25+
Note that the code in the first example is still dynamically typed. The Swift compiler won't warn
26+
you if you misspell names of properties or cast them to a wrong type. This feature is purely
27+
additive, and is added for convenience. You can still use force unwraps in your JavaScript. If
28+
you're interested in a statically-typed DOM API, we recommend having a look at the
29+
[DOMKit](https://github.com/swiftwasm/DOMKit), which is currently in development.
30+
31+
Lastly, `JSError` now conforms to the `JSBridgedClass` protocol, which makes it easier to integrate
32+
with idiomatic Swift code.
33+
34+
**Closed issues:**
35+
36+
- Errors building example: undefined symbols ([#95](https://github.com/swiftwasm/JavaScriptKit/issues/95))
37+
- Documentation website is broken ([#93](https://github.com/swiftwasm/JavaScriptKit/issues/93))
38+
- Rename `JSValueConstructible` and `JSValueConvertible` ([#87](https://github.com/swiftwasm/JavaScriptKit/issues/87))
39+
- Build fails with the unsafe flags error ([#6](https://github.com/swiftwasm/JavaScriptKit/issues/6))
40+
41+
**Merged pull requests:**
42+
43+
- [Proposal] Add unsafe convenience methods for JSValue ([#98](https://github.com/swiftwasm/JavaScriptKit/pull/98)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
44+
- Remove all unsafe linker flags from Package.swift ([#91](https://github.com/swiftwasm/JavaScriptKit/pull/91)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
45+
- Sync package.json and package-lock.json ([#90](https://github.com/swiftwasm/JavaScriptKit/pull/90)) via [@kateinoigakukun](https://github.com/kateinoigakukun)
46+
- Rename JSValueConvertible/Constructible/Codable ([#88](https://github.com/swiftwasm/JavaScriptKit/pull/88)) via [@j-f1](https://github.com/j-f1)
47+
- 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[bot]](https://github.com/dependabot[bot])
48+
- Make `JSError` conform to `JSBridgedClass` ([#86](https://github.com/swiftwasm/JavaScriptKit/pull/86)) via [@MaxDesiatov](https://github.com/MaxDesiatov)
49+
150
# 0.7.2 (28 September 2020)
251

352
This is a bugfix release that resolves an issue with the JavaScript runtime being unavailable when installed via NPM.

package-lock.json

Lines changed: 1 addition & 1 deletion
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.7.2",
3+
"version": "0.8.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
"files": [

0 commit comments

Comments
 (0)