Skip to content

Commit 421efee

Browse files
doc: add blog entry v3.0
1 parent 4806ef5 commit 421efee

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Version 3.0
3+
description: "Important breaking changes and improvements in version 3.0 of @sebastianwessel/quickjs"
4+
date: 2025-07-26 12:00:00
5+
categories: release
6+
---
7+
8+
---
9+
10+
# QuickJS Version 3.0 — Breaking Changes Ahead!
11+
12+
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.
13+
14+
> If you're upgrading from a previous version, please read this post carefully to avoid runtime errors.
15+
16+
---
17+
18+
## WASM Module Must Now Be Explicitly Imported
19+
20+
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**.
21+
22+
### New Required Usage (Async):
23+
24+
```ts
25+
import variant from "@jitl/quickjs-wasmfile-release-asyncify";
26+
const { runSandboxed } = await loadAsyncQuickJs(variant);
27+
```
28+
29+
### New Required Usage (Sync):
30+
31+
```ts
32+
import variant from "@jitl/quickjs-ng-wasmfile-release-sync";
33+
const { runSandboxed } = loadQuickJs(variant);
34+
```
35+
36+
### Old Usage (No Longer Supported):
37+
38+
```ts
39+
// ❌ These will now throw an error
40+
const { runSandboxed } = await loadAsyncQuickJs();
41+
const { runSandboxed } = loadQuickJs();
42+
```
43+
44+
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.
45+
46+
---
47+
48+
🔧 **Please update your code accordingly** and consult the [README on GitHub](https://github.com/sebastianwessel/quickjs) for more examples and updated documentation.
49+
50+
👉 [Explore the QuickJS repository](https://github.com/sebastianwessel/quickjs)
51+
52+
Happy sandboxing! 🧪

0 commit comments

Comments
 (0)