Skip to content
  • 0.8.0
  • 8ba4135
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.8.0
  • 8ba4135
  • Compare
    Choose a tag to compare
    Search for a tag

@MaxDesiatov MaxDesiatov released this Oct 21, 2020 · 20 commits to main since this release

This release introduces a few enhancements and deprecations. Namely, JSValueConstructible and JSValueConvertible were renamed to ConstructibleFromJSValue and ConvertibleToJSValue respectively. The old names are deprecated, and you should move away from using the old names in your code. Additionally, JavaScriptKit now requires the most recent 5.3 and development toolchains, but thanks to this it no longer uses unsafe flags, which prevented building other libraries depending on JavaScriptKit on other platforms.

The main user-visible enhancement is that now force casts are no longer required in client code. That is, we now allow this

let document = JSObject.global.document
let foundDivs = document.getElementsByTagName("div")

in addition to the previously available explicit style with force unwrapping:

let document = JSObject.global.document.object!
let foundDivs = document.getElementsByTagName!("div").object!

Note that the code in the first example is still dynamically typed. The Swift compiler won't warn you if you misspell names of properties or cast them to a wrong type. This feature is purely additive, and is added for convenience. You can still use force unwraps in your code interfacing with JavaScriptKit. If you're interested in a statically-typed DOM API, we recommend having a look at the DOMKit library, which is currently in development.

Lastly, JSError now conforms to the JSBridgedClass protocol, which makes it easier to integrate with idiomatic Swift code.

Closed issues:

  • Errors building example: undefined symbols (#95)
  • Documentation website is broken (#93)
  • Rename JSValueConstructible and JSValueConvertible (#87)
  • Build fails with the unsafe flags error (#6)

Merged pull requests:

Assets 2
  • 0.7.2
  • 6e84a70
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.7.2
  • 6e84a70
  • Compare
    Choose a tag to compare
    Search for a tag

@j-f1 j-f1 released this Sep 28, 2020 · 40 commits to main since this release

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

Assets 2
  • 0.7.1
  • 29fb15f
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.7.1
  • 29fb15f
  • Compare
    Choose a tag to compare
    Search for a tag

@MaxDesiatov MaxDesiatov released this Sep 27, 2020 · 41 commits to main since this release

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

Closed issues:

  • 0.7.0 unavailable on NPM (#79)
  • Automatic performance testing (#67)

Merged pull requests:

Assets 2
  • 0.7.0
  • 42ae818
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.7.0
  • 42ae818
  • Compare
    Choose a tag to compare
    Search for a tag

@MaxDesiatov MaxDesiatov released this Sep 27, 2020 · 49 commits to main since this release

This release adds multiple new types bridged from JavaScript, namely JSError, JSDate, JSTimer (which corresponds to setTimeout/setInterval calls and manages closure lifetime for you), JSString and JSPromise. We now also have documentation published automatically for the main branch.

Closed issues:

  • TypedArray improvement? (#52)

Merged pull requests:

Assets 2

@MaxDesiatov MaxDesiatov released this Sep 25, 2020

This release adds JSTypedArray generic type, renames JSObjectRef to JSObject, and makes JSClosure memory management more explicit.

Closed issues:

  • Support for JS Arrays “holes”, including the test suite (#39)
  • BigInt Support (#29)
  • Separate namespaces for methods and properties? (#27)

Merged pull requests:

Assets 2
Pre-release
Pre-release

@kateinoigakukun kateinoigakukun released this Mar 9, 2020

Update package.json
Assets 2
You can’t perform that action at this time.