quickjs-wasi
3.7.0 · 13 Nov 2026MIT14.3M / weekRepositoryHomepagenpmAtom feed
Upgrading quickjs-wasi From 2.2.0 to 3.7.0
15 releases in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 22
- new
- 18
- fixes
Before you upgrade
Tick each one off as you go- Breaking3.0.0
Security
- 3.5.0
Update quickjs-ng from v0.15.1 to v0.16.2: brings the iterator chunking/includes/join proposals, the
Error.prototype.stackaccessor proposal, a faster register-based regexp engine, a new arena allocator, and many correctness/security fixes. - 3.1.0
Resolve Dependabot security advisories by updating dev/demo dependencies and adding pnpm
overridesfor transitive packages pinned to vulnerable versions. Also move the repo-only pnpm configuration (overrides,onlyBuiltDependencies) out ofpackage.jsonand intopnpm-workspace.yamlso it is no longer included in the published package. The published artifact has no JS dependencies, so this does not affect consumers at runtime.
Release by release
- New
Add
vm.getAllocatedSize(), a constant-time read of the bytes the runtime has allocated: the valuememoryLimitis enforced against. Unlikevm.getMemoryUsage(), which walks the whole heap, its cost doesn't grow with heap size, so it suits frequent sampling.getMemoryUsage()also reports the same value as a newallocatedSizefield. - New
Update QuickJS-NG from v0.17.0 to v0.18.0. Out-of-memory errors (
InternalError: out of memory) can no longer be caught by guest code: guestcatch/finallyblocks are skipped and the error propagates to the host as aJSException, leaving the VM usable. The release also includes fixes forString.prototype.repeat,Reflect.set, computed property assignment order, template literal conversion,Date.parsewith Unicode spaces, and several memory leaks.
- New
- Fixed
Preserve native exceptions instead of dispatching a host callback when callback-name encoding fails.
- Fixed
Surface native Deferred resolver failures and release both resolvers even when invocation fails, while preserving one-shot settlement.
- Fixed
Reject failed host-function construction without retaining callbacks, preserve earlier pending exceptions on success, and roll back incomplete Promise subscriptions.
- Fixed
Propagate guest allocation and property write exceptions from host data construction instead of returning exception handles or partially populated values. Release partial conversions and preserve native exceptions across host callbacks, module loaders, and handle-scope boundaries.
- Fixed
Throw on failed host Promise construction before publishing a Deferred, release partial resolver ownership, and preserve earlier pending exceptions on success.
- Fixed
Terminate the VM and reject its host Promise observers when automatic host-Promise settlement or draining fails. Preserve the original host failure, ignore late completions after disposal, and keep private resolver handles alive across scope exit. Ordinary guest rejection remains a resolved error result; synchronous failures and
interruptHandlerinterrupts remain recoverable.
- Fixed
- Fixed
Release both deferred promise resolvers after the first settlement so the unused resolver does not retain the promise and its payload until VM disposal.
- Fixed
- Fixed
Update QuickJS-NG to v0.17.0, replacing the unreleased commit pin with an upstream release that includes WASI stack overflow protection.
- Fixed
- Fixed
Settle synchronous module namespace promises without draining unrelated guest jobs. Preserve deferred resolution for asynchronous modules and namespaces exporting
then. - Fixed
Include the wrapper's MIT license and copyright notice in the npm package.
- Fixed
- New
Add the
maxStackSizeoption andMAX_STACK_SIZEceiling so WASI stack overflow can be caught by guest JavaScript without exhausting the physical WebAssembly stack.
- New
- Security
Update quickjs-ng from v0.15.1 to v0.16.2: brings the iterator chunking/includes/join proposals, the
Error.prototype.stackaccessor proposal, a faster register-based regexp engine, a new arena allocator, and many correctness/security fixes. - New
Add
handle.className: the engine-level class name of a value (e.g."Map","Date","URL") read trap-free from the class table — unlikeconstructorName, it executes no guest code and cannot be spoofed by prototype/constructor reassignment. - New
Add
vm.markPromiseHandled(promise): suppress theonUnhandledRejectioncallback for a promise whose rejection the host observes through other means. - Fixed
resolvePromise(),Deferred.settled, and module namespace resolution now subscribe via quickjs-ng's engine-levelJS_PromiseTheninstead of a capturedPromise.prototype.then, so guest code that patchesthenorSymbol.speciescan no longer intercept or observe host promise subscriptions. - Fixed
Exceeding
memoryLimitthrowsInternalError: out of memoryagain instead of a barenull(regression in 3.3.1): the limit is now enforced in the WASI malloc layer, which reserves headroom below the limit so the OOM error object can always be constructed.
- Security
- New
Strings now cross the WASM boundary losslessly in both directions — embedded NULs and lone surrogates survive
toString(),newString(),evalCode()sources, property keys, and enumeration. - New
Add
vm.exportHandle()/vm.importHandle()for snapshot-portable handle tokens, enabling pre-snapshot captures to be re-materialized in restored VMs without executing guest code.
- New
2 other lines we could not sort, mostly version bumps
- 3.1.0
Errors thrown by
moduleLoader.load/moduleLoader.normalizenow propagate to the guest with their real message instead of being swallowed and replaced by a genericcould not load moduleerror. - 3.1.0
Returning a Promise (an
asynccallback) fromloadornormalizenow throws a clearTypeErrorexplaining that the callbacks must be synchronous, instead of coercing the Promise to source text and failing with a confusingSyntaxError. For async module sources (e.g. loading overhttps://), see the fetch-and-retry pattern documented in the README's "ES Modules" section.
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.