quickjs-wasi-reactor 0.0.8 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,8 @@ This package provides a JavaScript/TypeScript implementation for running QuickJS
11
11
  - [go-quickjs-wasi-reactor](https://github.com/aperturerobotics/go-quickjs-wasi-reactor) - Go implementation with wazero
12
12
  - [go-quickjs-wasi](https://github.com/paralin/go-quickjs-wasi) - Go implementation for command model (blocking)
13
13
  - [paralin/quickjs](https://github.com/paralin/quickjs) - QuickJS-NG fork with reactor build target
14
- - [QuickJS-NG reactor PR](https://github.com/quickjs-ng/quickjs/pull/1307) - Upstream PR for reactor support
14
+ - [QuickJS-NG reactor PR](https://github.com/quickjs-ng/quickjs/pull/1308) - Upstream PR for reactor support
15
+ - [QuickJS-NG event loop PR](https://github.com/quickjs-ng/quickjs/pull/1307) - Upstream PR for non-blocking event loop
15
16
 
16
17
  ## Installation
17
18
 
@@ -190,33 +191,6 @@ function runFrame() {
190
191
  requestAnimationFrame(runFrame);
191
192
  ```
192
193
 
193
- ### Browser Integration with Animation Frames
194
-
195
- ```typescript
196
- const qjs = await loadQuickJS("/path/to/qjs-wasi.wasm");
197
- qjs.initStdModule();
198
-
199
- qjs.eval(`
200
- let frame = 0
201
- function tick() {
202
- console.log("Frame:", frame++)
203
- if (frame < 60) os.setTimeout(tick, 16)
204
- }
205
- tick()
206
- `);
207
-
208
- // Cooperative scheduling with browser
209
- function runFrame() {
210
- const result = qjs.loopOnce();
211
- if (result >= 0) {
212
- requestAnimationFrame(runFrame);
213
- } else {
214
- qjs.destroy();
215
- }
216
- }
217
- requestAnimationFrame(runFrame);
218
- ```
219
-
220
194
  ## API
221
195
 
222
196
  ### `loadQuickJS(wasmSource, options?)`
package/dist/version.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** QuickJS-NG version string */
2
- export declare const VERSION = "v0.11.0-wasi29-reactor-r8";
2
+ export declare const VERSION = "v0.12.1";
3
3
  /** Download URL for the WASM binary */
4
- export declare const DOWNLOAD_URL = "https://github.com/paralin/quickjs/releases/download/v0.11.0-wasi29-reactor-r8/qjs-wasi-reactor.wasm";
4
+ export declare const DOWNLOAD_URL = "https://github.com/quickjs-ng/quickjs/releases/download/v0.12.1/qjs-wasi-reactor.wasm";
5
5
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,eAAO,MAAM,OAAO,8BAA8B,CAAA;AAElD,uCAAuC;AACvC,eAAO,MAAM,YAAY,yGAAyG,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,eAAO,MAAM,OAAO,YAAY,CAAA;AAEhC,uCAAuC;AACvC,eAAO,MAAM,YAAY,0FAA0F,CAAA"}
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Auto-generated by update-quickjs.bash
2
2
  // Do not edit manually
3
3
  /** QuickJS-NG version string */
4
- export const VERSION = 'v0.11.0-wasi29-reactor-r8';
4
+ export const VERSION = 'v0.12.1';
5
5
  /** Download URL for the WASM binary */
6
- export const DOWNLOAD_URL = 'https://github.com/paralin/quickjs/releases/download/v0.11.0-wasi29-reactor-r8/qjs-wasi-reactor.wasm';
6
+ export const DOWNLOAD_URL = 'https://github.com/quickjs-ng/quickjs/releases/download/v0.12.1/qjs-wasi-reactor.wasm';
7
7
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,uBAAuB;AAEvB,gCAAgC;AAChC,MAAM,CAAC,MAAM,OAAO,GAAG,2BAA2B,CAAA;AAElD,uCAAuC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,sGAAsG,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,uBAAuB;AAEvB,gCAAgC;AAChC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAA;AAEhC,uCAAuC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,uFAAuF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickjs-wasi-reactor",
3
- "version": "0.0.8",
3
+ "version": "0.12.1",
4
4
  "description": "JavaScript harness for QuickJS-NG WASI reactor model",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "release:version": "npm version patch -m \"release: v%s\" --no-git-tag-version",
34
34
  "release:version:minor": "npm version minor -m \"release: v%s\" --no-git-tag-version",
35
35
  "release:commit": "git reset && git add package.json && git commit -s -m \"release: v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\")",
36
- "release:publish": "git push && git push --tags && npm run build && npm publish"
36
+ "release:publish": "git push && git push --tags"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
@@ -54,12 +54,13 @@
54
54
  "homepage": "https://github.com/aperturerobotics/js-quickjs-wasi-reactor#readme",
55
55
  "devDependencies": {
56
56
  "@eslint/js": "^9.39.2",
57
+ "@types/node": "^25.0.6",
57
58
  "@typescript/native-preview": "^7.0.0-dev.20260106.1",
58
59
  "eslint": "^9.39.2",
59
60
  "eslint-config-prettier": "^10.1.8",
60
61
  "prettier": "^3.0.0",
61
62
  "typescript": "^5.0.0",
62
63
  "typescript-eslint": "^8.52.0",
63
- "vitest": "^2.0.0"
64
+ "vitest": "^4.0.0"
64
65
  }
65
66
  }
package/qjs-wasi.wasm CHANGED
Binary file
package/src/version.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Do not edit manually
3
3
 
4
4
  /** QuickJS-NG version string */
5
- export const VERSION = 'v0.11.0-wasi29-reactor-r8'
5
+ export const VERSION = 'v0.12.1'
6
6
 
7
7
  /** Download URL for the WASM binary */
8
- export const DOWNLOAD_URL = 'https://github.com/paralin/quickjs/releases/download/v0.11.0-wasi29-reactor-r8/qjs-wasi-reactor.wasm'
8
+ export const DOWNLOAD_URL = 'https://github.com/quickjs-ng/quickjs/releases/download/v0.12.1/qjs-wasi-reactor.wasm'