0.15.0
This is a major release that adds new features and fixes issues. Specifically:
BigInt
andBigInt
-basedJSTypedArray
types are now supported. Now, when passingInt64
values from Swift, they will be mapped toBigInt
values on the JavaScript side.- The
constructor
property onJSBridgedClass
is now anOptional
, 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 inPackage.swift
orPackage.resolved
and carton’s bundled JavaScriptKit runtime version. - The
JSSymbol
type has been added, enabling support for JavaScriptSymbol
values, including accessingSymbol
-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:
- Improve JSKit diagnostics for use-after-free of JSClosure (#195) via @kateinoigakukun
- Gracefully handle unavailable
JSBridgedClass
(#190) via @MaxDesiatov - Supply JSKit runtime in SwiftPM resources (#193) via @MaxDesiatov
- Test with Node.js's WASI implementation (#192) via @kateinoigakukun
- Add support for BigInts and BigInt-based TypedArrays (#184) via @j-f1
- Update toolchain references to 5.6.0 in
README.md
(#189) via @MaxDesiatov - Bump async from 2.6.3 to 2.6.4 in /Example (#188) via @dependabot
- Remove outdated
BigInt
supportFIXME
fromJSTypedArray
(#187) via @MaxDesiatov - Cleanup & improvements to perf-tester (#186) via @j-f1
- Re-add support for Symbol objects via JSSymbol (#183) via @j-f1
- Fix JSValueDecoder (#185) via @j-f1
- Fix deprecation warning in
JSFunction.swift
(#182) via @MaxDesiatov