A typescript package to execute JavaScript and TypeScript code in a webassembly quickjs sandbox
**Describe the bug** Setting executionTimeout to non-zero value leads to an error **To Reproduce** ```js import { loadQuickJs } from "@sebastianwessel/quickjs"; import { readFileSync } from "fs"; const { runSandboxed } = await loadQuickJs(); const result = await runSandboxed(async ({ evalCode }) => { return await evalCode(`console.log(200)`, undefined, { executionTimeout: 10, }); }, {}); console.log(result); ``` **Expected behavior** Successful execution. **Screenshots** ``` { ok: false, error: { name: 'QuickJSUnwrapError', message: 'null', stack: 'QuickJSUnwrapError: null\n' + ' at QuickJSContext.unwrapResult (file:///D:/dev/qjs/node_modules/quickjs-emscripten-core/dist/chunk-JTKJZQYV.mjs:5:82)\n' + ' at file:///D:/dev/qjs/node_modules/@sebastianwessel/quickjs/dist/esm/sandbox/syncVersion/createEvalCodeFunction.js:42:45\n' + ' at file:///D:/dev/qjs/q.mjs:7:16\n' + ' at executeSandboxFunction (file:///D:/dev/qjs/node_modules/@sebastianwessel/quickjs/dist/esm/sandbox/syncVersion/executeSandboxFunction.js:8:18)\n' + ' at runSandboxed (file:///D:/dev/qjs/node_modules/@sebastianwessel/quickjs/dist/esm/loadQuickJs.js:45:30)\n' + ' at async file:///D:/dev/qjs/q.mjs:6:16' }, isSyntaxError: false } ``` **Desktop (please complete the following information):** Node 22 on Windows 10 **Additional context** This doesn't look right. https://github.com/sebastianwessel/quickjs/blob/21318d55f209547cc81b63c0e7d410e35165da52/src/sandbox/syncVersion/createEvalCodeFunction.ts#L16-L18
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by thorn0 and has received 6 comments.