Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jitl/quickjs-ffi-types

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jitl/quickjs-ffi-types - npm Package Versions

23

0.31.0

Diff

Changelog

Source

v0.31.0

  • #137
    • Add quickjs-for-quickjs, a package that can run inside quickjs, so you can put quickjs inside your quickjs.
    • Possibly breaking: Fix a build system bug that made commonjs or esm variants include both types, thus being larger than they needed to be. After upgrading a variant to this release, you should verify that it can be imported/required as expected. You may need to add additional variants if you were using an "esm" variant from both cjs and esm.
jitl
published 0.30.0 •

Changelog

Source

v0.30.0

  • #200 Inspect and iterate handles, equality, changes to result types, changes to debug logging.
  • #195 Export setDebugMode

Collection & Iteration

  • For objects and arrays: add context.getOwnPropertyNames(handle, options) to iterate the key or array index handles.
  • For arrays: add context.getLength(handle) which reads handle.length and returns it as a number or undefined to make writing for (i=0;i<length;i++) loops easier.
  • For iterable collections like Map, Set, Array: add context.getIterator(handle) calls handle[Symbol.iterator]() and then exposes the result as an IterableIterator to host javascript.

Usability improvements

  • The SuccessOrFail<T, QuickJSHandle> return type is largely replaced with a new return type DisposableSuccess<T> | DisposableFail<QuickJSHandle>. The new type implements result.unwrap() as a replacement for context.unwrapResult(result). It also implements dispose() directly, so you no longer need to distinguish between success and failure to clean up.
  • add context.callMethod(handle, 'methodName'), this makes it easier to call methods like context.callMethod(handle, 'keys') or context.callMethod('values') which can be used with the new iterator.

Equality

  • Added context.eq(a, b), context.sameValue(a, b), context.sameValueZero(a, b)

Debug logging changes

Debug logging is now disabled by default, even when using a DEBUG variant. It can be enabled on a runtime-by-runtime basis with runtime.setDebugMode(boolean) or context.runtime.setDebugMode(boolean), or globally using setDebugMode(boolean). As with before, you should use a DEBUG variant to see logs from the WebAssembly C code.

jitl
published 0.29.2 •

Changelog

Source

v0.29.2

  • #179 Add a work-around for a bug in Webkit ARM to quickjs build variants. quickjs-ng is still affected by this bug.
jitl
published 0.29.1 •

Changelog

Source

v0.29.1

  • #161 Fix a bug where context.evalCode(..., { type: 'module' }) would return success when some kinds of error occurred when using quickjs variants.
    • Also adds context.getPromiseState(handle) to resolve promises synchronously.
jitl
published 0.29.0 •

Changelog

Source

v0.29.0

  • #154 ESModule exports
    • context.evalCode(code, filename, { type: "module" }) or when code is detected to be a module: now returns a handle to the module's exports, or a promise handle that resolves to the module's exports.
    • Added context.getPromiseState(handle) which returns the state of a promise handle, and can be unwrapped with context.unwrapResult(promiseState).
  • #159 add LICENSE file and SPDX license identifiers to all packages.
jitl
published 0.28.0 •

Changelog

Source

v0.28.0

  • #155 Update library versions and add versions to documentation.
    • quickjs version 2024-01-13+229b07b9 vendored to quickjs-emscripten on 2024-02-11.
      • Evaluating a ES Module with context.evalCode(...) now returns a Promise object instead of undefined.
    • quickjs-ng version git+229b07b9 vendored to quickjs-emscripten on 2024-02-11.
jitl
published 0.27.0 •

Changelog

Source

v0.27.0

  • #147 Support providing and retrieving WebAssembly.Memory
    • Fixes #146 by adding wasmMemory: WebAssembly.Memory option for newVariant, and mod.getWasmMemory() method for QuickJS[Async]WASMModule.
    • Fixes #138 by
      • removing internal use of using statement.
      • Use ESBuild Symbol.for('Symbol.dispose') if Symbol.dispose isn't defined globally.
jitl
published 0.26.1-rc.0 •

jitl
published 0.26.0 •

Changelog

Source

v0.26.0

  • #136, #116 (thanks to @GrantMatejka) Expose ability to configure Context's intrinsic objects.
  • #135 (thanks to @saghul) Add quickjs-ng variants. quickjs-ng is a fork of quickjs under active development. It implements more EcmaScript standards and removes some of quickjs's custom language features like BigFloat.
  • #134 Support using statement for Disposable. If you using value = vm.unwrapResult(vm.evalCode("1+1")), the value will be automatically disposed when the scope exits.
  • #133 WebAssembly loading options & Cloudflare Worker support. Added an example of using quickjs-emscripten in a Cloudflare Worker.
jitl
published 0.25.1 •

Changelog

Source

v0.25.1

  • #130 Fix some README and docs quibbles.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc