Packages

quickjs-wasi

3.7.0 · 13 Nov 2026MIT14.3M / weekRepositoryHomepagenpmAtom feed

Your version

3.1.0

21 Jul 2026Where it was published

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 overrides for transitive packages pinned to vulnerable versions. Also move the repo-only pnpm configuration (overrides, onlyBuiltDependencies) out of package.json and into pnpm-workspace.yaml so 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 (via evalCode() or
    evalBytecode()) returned a promise that resolved to undefined, 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.normalize now propagate
      to the guest with their real message instead of being swallowed and replaced
      by a generic could not load module error.

    • Returning a Promise (an async callback) from load or normalize now
      throws a clear TypeError explaining that the callbacks must be synchronous,
      instead of coercing the Promise to source text and failing with a confusing
      SyntaxError. For async module sources (e.g. loading over https://), 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 pnpm overrides for transitive packages pinned to vulnerable versions.
    Also move the repo-only pnpm configuration (overrides, onlyBuiltDependencies)
    out of package.json and into pnpm-workspace.yaml so 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.