quickjs-wasi
3.7.0 · 13 Nov 2026MIT14.3M / weekRepositoryHomepagenpmAtom feed
Upgrading quickjs-wasi From 2.0.1 to 2.2.0
2 releases in betweenevery note read
Reading releases, release notes and advisories…
Security
- 2.2.0
Add
intrinsicsoption toQuickJS.create()for controlling which built-in JavaScript features are available in the VM. Pass a bitmask ofIntrinsics.*flags to create a minimal sandbox — for example, omitIntrinsics.PROXYto disallowProxy, or omitIntrinsics.DATEto removeDate. Useful for security hardening or reducing memory usage. Note:Intrinsics.EVALmust be included forvm.evalCode()to work; without it, only pre-compiled bytecode viavm.evalBytecode()can be executed.
Release by release
- Security
Add
intrinsicsoption toQuickJS.create()for controlling which built-in JavaScript features are available in the VM. Pass a bitmask ofIntrinsics.*flags to create a minimal sandbox — for example, omitIntrinsics.PROXYto disallowProxy, or omitIntrinsics.DATEto removeDate. Useful for security hardening or reducing memory usage. Note:Intrinsics.EVALmust be included forvm.evalCode()to work; without it, only pre-compiled bytecode viavm.evalBytecode()can be executed. - New
Add
vm.compile()andvm.evalBytecode()for bytecode compilation. Compile JavaScript source to a portableUint8Arraybytecode without executing it, then execute it later — even in a different VM instance. Also addsCompileFlags.STRIP_SOURCEandCompileFlags.STRIP_DEBUGfor smaller bytecode output. - New
Add
timezoneOffsetoption toQuickJS.create()for configuring the timezone used byDateinside the sandbox. Defaults to'host'which mirrors the host environment's timezone. Can also be set to a fixed offset in minutes or a callback for DST-aware logic. - New
Expose
CryptoandSubtleCryptoas global constructors in the crypto extension, matching the Web Crypto API spec. All three crypto constructors (Crypto,SubtleCrypto,CryptoKey) now throwTypeError: Illegal constructorwhen called withnew, and supportinstanceofchecks (e.g.crypto instanceof Crypto).
- Security
- New
Add
EvalFlagsconstants export and an optionalflagsparameter toevalCode(). TheEvalFlags.ASYNCflag enables native top-levelawaitsupport in evaluated scripts — the result is a Promise that resolves to the script's completion value. This is cleaner than wrapping code in an async IIFE, as it preserves last-expression-value semantics and avoids regex-basedawaitdetection. - New
Add Uint8Array base64/hex methods to the base64 extension per the TC39 proposal-arraybuffer-base64 (Stage 4):
Uint8Array.prototype.toBase64(),Uint8Array.prototype.toHex(),Uint8Array.fromBase64(),Uint8Array.fromHex(),Uint8Array.prototype.setFromBase64(), andUint8Array.prototype.setFromHex(). - New
Update QuickJS-ng from v0.12.1 to v0.13.0. Includes bug fixes for FinalizationRegistry, async generators, regex engine, Iterator, and TypedArray, as well as performance improvements for String.prototype.concat, Promise creation, regexp operations, and context creation.
- New
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.