Skip to content

QuickJS Version 3.0 — Breaking Changes Ahead!

We're excited to announce Version 3.0 of @sebastianwessel/quickjs! This release introduces a breaking change in how the WASM module is loaded, improving security and providing a clearer separation between the runtime and its dependencies.

If you're upgrading from a previous version, please read this post carefully to avoid runtime errors.


WASM Module Must Now Be Explicitly Imported

To comply with stricter security restrictions in Node.js and to allow better customization, the loadAsyncQuickJs and loadQuickJs functions no longer provide default module fallbacks.

New Required Usage (Async):

ts
import variant from "@jitl/quickjs-wasmfile-release-asyncify";
const { runSandboxed } = await loadAsyncQuickJs(variant);

New Required Usage (Sync):

ts
import variant from "@jitl/quickjs-ng-wasmfile-release-sync";
const { runSandboxed } = loadQuickJs(variant);

Old Usage (No Longer Supported):

ts
// ❌ These will now throw an error
const { runSandboxed } = await loadAsyncQuickJs();
const { runSandboxed } = loadQuickJs();

This change ensures that the host application explicitly declares which WASM variant it intends to use, improving clarity and maintainability — especially in advanced environments like bundlers or serverless runtimes.


🔧 Please update your code accordingly and consult the README on GitHub for more examples and updated documentation.

👉 Explore the QuickJS repository

Happy sandboxing! 🧪