Skip to content

Commit 1680f9b

Browse files
Merge pull request #105 from sebastianwessel/codex/deep-review-fixes
[codex] harden runtime cleanup and align playground release
1 parent f7dba65 commit 1680f9b

91 files changed

Lines changed: 1181 additions & 770 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ yarn-debug.log*
66
yarn-error.log*
77
lerna-debug.log*
88
.pnpm-debug.log*
9+
.DS_Store
910

1011
# Diagnostic reports (https://nodejs.org/api/report.html)
1112
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -135,4 +136,4 @@ dist
135136
src/modules/build
136137

137138
website/.vitepress/cache
138-
docs
139+
docs

CHANGELOG.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
1-
# Changelog
1+
## [unreleased]
22

3-
All notable changes to this project will be documented in this file.
3+
### 🐛 Bug Fixes
44

5-
## [unreleased]
5+
- Harden runtime cleanup and refresh deps
6+
- Align examples and timeout behavior
7+
8+
### 💼 Other
9+
10+
- Run tests serially per file to avoid bun runner timeouts
11+
12+
### 📚 Documentation
13+
14+
- Add security model and hardening guidance
15+
16+
### ⚙️ Miscellaneous Tasks
17+
18+
- Simplify release trigger and harden publish workflow
19+
- Require main branch for release workflow
20+
- Retry flaky per-file test execution once
21+
- Align release workflow with npm and jsr trusted publishing docs
22+
- Upgrade npm for trusted publisher releases
23+
- Create github release and tag after publish
24+
## [3.0.0] - 2025-07-26
625

726
### 📚 Documentation
827

928
- Add blog entry v3.0
1029
- Fix minor doc issues
30+
- Update doc
31+
- Add api doc
1132

1233
### ⚙️ Miscellaneous Tasks
1334

1435
- Remove dependency
15-
36+
- Bump to version 3
1637
## [2.3.1] - 2025-06-24
1738

1839
### ⚙️ Miscellaneous Tasks
@@ -22,7 +43,6 @@ All notable changes to this project will be documented in this file.
2243
- Update linter deps
2344
- Bump version
2445
- Bump jsr version
25-
2646
## [2.3.0] - 2025-06-21
2747

2848
### 🚀 Features
@@ -41,7 +61,6 @@ All notable changes to this project will be documented in this file.
4161
- Fix lint
4262
- Bump to version 2.3.0
4363
- Update packages
44-
4564
## [2.2.0] - 2025-04-30
4665

4766
### 🐛 Bug Fixes
@@ -66,7 +85,6 @@ All notable changes to this project will be documented in this file.
6685
- Improve typings
6786
- Minor improvements
6887
- Bump dependencies
69-
7088
## [2.1.1] - 2025-03-09
7189

7290
### 🐛 Bug Fixes
@@ -86,7 +104,6 @@ All notable changes to this project will be documented in this file.
86104
- Correct test file name
87105
- Improve provideTimingFunctions
88106
- Bump jsr version
89-
90107
## [2.1.0] - 2025-03-06
91108

92109
### 🐛 Bug Fixes
@@ -107,7 +124,6 @@ All notable changes to this project will be documented in this file.
107124
- Cleanup examples
108125
- Improve error handling
109126
- Improve tests
110-
111127
## [2.0.1] - 2025-02-28
112128

113129
### 🐛 Bug Fixes
@@ -123,7 +139,6 @@ All notable changes to this project will be documented in this file.
123139
### ⚙️ Miscellaneous Tasks
124140

125141
- Bump jsr version
126-
127142
## [2.0.0] - 2025-02-27
128143

129144
### 🚀 Features
@@ -207,7 +222,6 @@ All notable changes to this project will be documented in this file.
207222
- Update project config
208223
- Fix build
209224
- Bump jsr version
210-
211225
## [1.3.0] - 2024-07-11
212226

213227
### 🚀 Features
@@ -225,7 +239,6 @@ All notable changes to this project will be documented in this file.
225239
- Cleanup
226240
- Make Buffer and TextDecoder and TextEncoder global
227241
- Bump to v1.3
228-
229242
## [1.2.0] - 2024-07-09
230243

231244
### 🚀 Features
@@ -239,7 +252,6 @@ All notable changes to this project will be documented in this file.
239252
### ⚙️ Miscellaneous Tasks
240253

241254
- Bump to version 1.2
242-
243255
## [1.1.1] - 2024-07-08
244256

245257
### 🐛 Bug Fixes
@@ -249,7 +261,6 @@ All notable changes to this project will be documented in this file.
249261
### ⚙️ Miscellaneous Tasks
250262

251263
- Bump version to 1.1.0
252-
253264
## [1.1.0] - 2024-07-08
254265

255266
### 🚀 Features
@@ -270,7 +281,6 @@ All notable changes to this project will be documented in this file.
270281
### ⚙️ Miscellaneous Tasks
271282

272283
- Remove debug logs
273-
274284
## [1.0.0] - 2024-07-07
275285

276286
### 🚀 Features
@@ -304,5 +314,3 @@ All notable changes to this project will be documented in this file.
304314
- Update doc
305315
- Update
306316
- Update credits
307-
308-
<!-- generated by git-cliff -->

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import variant from "@jitl/quickjs-ng-wasmfile-release-sync";
2525
import { type SandboxOptions, loadQuickJs } from "@sebastianwessel/quickjs";
2626

2727
// General setup like loading and init of the QuickJS wasm
28-
// It is a ressource intensive job and should be done only once if possible
28+
// It is a resource-intensive job and should be done only once if possible
2929
const { runSandboxed } = await loadQuickJs(variant);
3030

3131
const options: SandboxOptions = {

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.15/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
33
"assist": { "actions": { "source": { "organizeImports": "on" } } },
44
"files": {
55
"includes": [

bun.lock

Lines changed: 346 additions & 302 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ bun run example:basic
2121
```
2222

2323
from the root of this repository.
24-
2524
## Server Example
2625

2726
The server example demonstrates how you can use [@sebastianwessel/quickjs](https://github.com/sebastianwessel/quickjs) inside a web server. In this example, we run a web server that spawns workers on request using the [poolifier-web-worker](https://github.com/poolifier/poolifier-web-worker) package. Each worker runs its own QuickJS sandbox and executes the given code.
@@ -34,12 +33,26 @@ bun run example:server
3433

3534
from the root of this repository. Once the server has started, open your browser and go to [http://localhost:3000/](http://localhost:3000/). You will see a simple OpenAPI (Swagger) UI.
3635

36+
If port 3000 is already in use, choose another port:
37+
38+
```sh
39+
PORT=3910 bun run example:server
40+
```
41+
3742
## Run-Tests Example
3843

39-
In the *run-tests* example, the usage of the included test runner is shown. You can test it out by running:
44+
In the *run-tests* example, the usage of the included test runner is shown.
45+
46+
Before running the tests, build the test runner library:
47+
48+
```sh
49+
bun run build:vendor
50+
```
51+
52+
You can test it out by running:
4053

4154
```sh
42-
bun run example:test
55+
bun run example:tests
4356
```
4457

4558
from the root of this repository.

example/basic/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import variant from '@jitl/quickjs-ng-wasmfile-release-sync'
22
import { loadQuickJs, type SandboxOptions } from '../../src/index.js'
33

44
// General setup like loading and init of the QuickJS wasm
5-
// It is a ressource intensive job and should be done only once if possible
5+
// It is a resource intensive job and should be done only once if possible
66
const { runSandboxed } = await loadQuickJs(variant)
77

88
const options: SandboxOptions = {

example/browser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Browser Example
22

3-
An example on how to use this library witout any build step in the browser.
3+
An example on how to use this library without any build step in the browser.
44

55
The [simple Version](./simple.html) and the [Playground version](./playground.html) are available.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<html>
1+
<html lang="en">
22
<title>@sebastianwessel/quickjs</title>
33
<body>Hello World</body>
4-
</html>
4+
</html>

example/browser/playground.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
</div>
5656
<button
5757
id="runButton"
58+
type="button"
5859
class="bg-blue-500 text-white font-semibold text-lg p-4 hover:bg-blue-700"
5960
>
6061
Run Code
@@ -93,9 +94,9 @@
9394
}
9495

9596
// =========== QuickJS =====================
96-
import { loadQuickJs } from "https://esm.sh/@sebastianwessel/quickjs@3.0.0";
97+
import { loadQuickJs } from "https://esm.sh/@sebastianwessel/quickjs@3.1.0";
9798
import "https://esm.sh/typescript";
98-
import variant from "https://esm.sh/@jitl/quickjs-wasmfile-release-sync";
99+
import variant from "https://esm.sh/@jitl/quickjs-ng-wasmfile-release-sync@0.32.0";
99100

100101
const { runSandboxed } = await loadQuickJs(variant);
101102

0 commit comments

Comments
 (0)