quickjs-wasi
3.7.0 · 13 Nov 2026MIT14.3M / weekRepositoryHomepagenpmAtom feed
3.7.0 is the newest release of 3.x.
In short
1 security1 new2 changed
- Security
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 note
Minor Changes
Module evaluation now resolves to the module namespace object (its exports).
Previously, evaluating code with
EvalFlags.TYPE_MODULE(viaevalCode()orevalBytecode()) returned a promise that resolved toundefined, making it
impossible to access a module's exports from the host. The evaluation promise
is now chained so it resolves to the module's namespace object instead
matching quickjs-emscripten's behavior:using promise = vm.evalCode('export default 42', '<eval>', EvalFlags.TYPE_MODULE); vm.executePendingJobs(); const result = await vm.resolvePromise(promise); if ('value' in result) { result.value.getProp('default').consume(h => h.toNumber()); // 42 }Rejections (a throw during module evaluation) propagate through the returned
promise unchanged. Fixes #22.
Patch Changes
Improve module loader error handling:
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.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.
- Security
Resolve Dependabot security advisories by updating dev/demo dependencies and
adding pnpmoverridesfor 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.
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.