Skip to content

Releases: swiftwasm/JavaScriptKit

0.19.1

06 Feb 10:17
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.19.0...0.19.1

0.19.0

16 Jan 12:57
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.18.0...0.19.0

0.18.0

13 Mar 14:16
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.17.0...0.18.0

0.17.0

03 Oct 17:46
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.16.0...0.17.0

0.16.0

22 Aug 11:55
Compare
Choose a tag to compare

This release contains significant performance improvements, API enhancements for JSPromise / JSBigInt / JSClosure, and documentation improvements.

Merged pull requests:

0.15.0

19 May 13:30
2d7bc96
Compare
Choose a tag to compare

This is a major release that adds new features and fixes issues. Specifically:

  • BigInt and BigInt-based JSTypedArray types are now supported. Now, when passing Int64 values from Swift, they will be mapped to BigInt values on the JavaScript side.
  • The constructor property on JSBridgedClass is now an Optional, which allows bridging JavaScript classes that aren't available in every browser or environment.
  • JavaScriptKit runtime files are now supplied as SwiftPM resources. This allows us to resolve a long-standing issue in carton that could lead to a version mismatch between JavaScriptKit dependency in Package.swift or Package.resolved and carton’s bundled JavaScriptKit runtime version.
  • The JSSymbol type has been added, enabling support for JavaScript Symbol values, including accessing Symbol-keyed properties on objects.

Source breaking changes

UInt64.jsValue and Int64.jsValue, which are a part of JavaScriptKit module, have been moved into JavaScriptBigIntSupport module since their implementation changed to require JS-BigInt-integration to avoid implicit casts from 64-bit integer to JS number type.

If you want to keep the behavior so far, please cast the 64-bit integer values to Double.

Merged pull requests:

0.14.0

08 Apr 08:44
9a3b7d5
Compare
Choose a tag to compare

This is a breaking release that enables full support for SwiftWasm 5.6 and lays groundwork for future updates to DOMKit.

Specifically:

  • The ConvertibleToJSValue conformance on Array and Dictionary has been swapped from the == ConvertibleToJSValue case to the : ConvertibleToJSValue case.
    • This means that e.g. [String] is now ConvertibleToJSValue, but [ConvertibleToJSValue] no longer conforms;
    • the jsValue() method still works in both cases;
    • to adapt existing code, use one of these approaches:
      • use generics where possible (for single-type arrays)
      • call .map { $0.jsValue() } (or mapValues) to get an array/dictionary of JSValue which you can then use as ConvertibleToJSValue
      • add .jsValue to the end of all of the values in the array/dictionary literal.

Merged pull requests:

0.13.0

31 Mar 22:12
2011cc0
Compare
Choose a tag to compare

This release improves handling of JavaScript exceptions and compatibility with Xcode.

Thanks to @kateinoigakukun, @pedrovgs, and @valeriyvan for contributions!

Closed issues:

  • UserAgent support? (#169)
  • Compile error on macOS 12.2.1 (#167)

Merged pull requests:

0.12.0

09 Feb 03:24
6c31bad
Compare
Choose a tag to compare

This release introduces a major refactor of the JavaScript runtime by [@j-f1] and several performance enhancements.

Merged pull requests:

  • Add Hashable conformance to JSObject (#162) via @yonihemi
  • Add test for detached ArrayBuffer (#154) via @yonihemi
  • Fix detached ArrayBuffer errors (#153) via @yonihemi
  • Split runtime into multiple files (#150) via @j-f1
  • Add a way for Swift code to access raw contents of a Typed Array (#151) via @yonihemi
  • Prevent installGlobalExecutor() from running more than once (#152) via @yonihemi
  • Return from runtime functions instead of taking a pointer where possible (#147) via @j-f1
  • Use TypedArray.set to copy a bunch of bytes (#146) via @kateinoigakukun

0.11.1

22 Nov 17:46
309e63c
Compare
Choose a tag to compare

This is a bugfix release that removes a requirement for macOS Monterey in Package.swift for this 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.

Merged pull requests: