diff --git a/README.md b/README.md index d4e22737..1e465af5 100644 --- a/README.md +++ b/README.md @@ -360,21 +360,19 @@ without introducing asynchronous host code, described by the type [JSPromiseStat ```typescript type JSPromiseState = - | { type: 'pending', error: Error } - | { type: 'fulfilled', value: QuickJSHandle, notAPromise?: boolean } - | { type: 'rejected', error: QuickJSHandle } + | { type: "pending"; error: Error } + | { type: "fulfilled"; value: QuickJSHandle; notAPromise?: boolean } + | { type: "rejected"; error: QuickJSHandle } ``` The result conforms to the `SuccessOrFail` type returned by `context.evalCode`, so you can use `context.unwrapResult(context.getPromiseState(promiseHandle))` to assert a promise is settled successfully and retrieve its value. Calling `context.unwrapResult` on a pending or rejected promise will throw an error. ```typescript -const promiseHandle = context.evalCode(`Promise.resolve(42)`); -const resultHandle = context.unwrapResult( - context.getPromiseState(promiseHandle) -); -context.getNumber(resultHandle) === 42; // true -resultHandle.dispose(); -promiseHandle.dispose(); +const promiseHandle = context.evalCode(`Promise.resolve(42)`) +const resultHandle = context.unwrapResult(context.getPromiseState(promiseHandle)) +context.getNumber(resultHandle) === 42 // true +resultHandle.dispose() +promiseHandle.dispose() ``` [JSPromiseState]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#jspromisestate diff --git a/doc/README.md b/doc/README.md index 8783b48f..d2bae266 100644 --- a/doc/README.md +++ b/doc/README.md @@ -60,6 +60,8 @@ main() - [`Lifetime.consume(fn)`](#lifetimeconsumefn) - [Exposing APIs](#exposing-apis) - [Promises](#promises) + - [context.getPromiseState(handle)](#contextgetpromisestatehandle) + - [context.resolvePromise(handle)](#contextresolvepromisehandle) - [Asyncify](#asyncify) - [Async module loader](#async-module-loader) - [Async on host, sync in QuickJS](#async-on-host-sync-in-quickjs) @@ -352,8 +354,36 @@ execute immediately. Your code needs to explicitly call gives your code maximum control to _schedule_ when QuickJS will block the host's event loop by resuming execution. -To work with QuickJS handles that contain a promise inside the environment, you -can convert the QuickJSHandle into a native promise using +To work with QuickJS handles that contain a promise inside the environment, +there are two options: + +##### context.getPromiseState(handle) + +You can synchronously peek into a QuickJS promise handle and get its state +without introducing asynchronous host code, described by the type [JSPromiseState][]: + +```typescript +type JSPromiseState = + | { type: "pending"; error: Error } + | { type: "fulfilled"; value: QuickJSHandle; notAPromise?: boolean } + | { type: "rejected"; error: QuickJSHandle } +``` + +The result conforms to the `SuccessOrFail` type returned by `context.evalCode`, so you can use `context.unwrapResult(context.getPromiseState(promiseHandle))` to assert a promise is settled successfully and retrieve its value. Calling `context.unwrapResult` on a pending or rejected promise will throw an error. + +```typescript +const promiseHandle = context.evalCode(`Promise.resolve(42)`) +const resultHandle = context.unwrapResult(context.getPromiseState(promiseHandle)) +context.getNumber(resultHandle) === 42 // true +resultHandle.dispose() +promiseHandle.dispose() +``` + +[JSPromiseState]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#jspromisestate + +##### context.resolvePromise(handle) + +You can convert the QuickJSHandle into a native promise using `context.resolvePromise()`. Take care with this API to avoid 'deadlocks' where the host awaits a guest promise, but the guest cannot make progress until the host calls `runtime.executePendingJobs()`. The simplest way to avoid this kind diff --git a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md index 44eb1522..ef0303d1 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md @@ -309,7 +309,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1145) +[packages/quickjs-emscripten-core/src/context.ts:1160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1160) *** @@ -374,6 +374,7 @@ will result in an error. > **dump**(`handle`): `any` Dump a JSValue to Javascript in a best-effort fashion. +If the value is a promise, dumps the promise's state. Returns `handle.toString()` if it cannot be serialized to JSON. #### Parameters @@ -390,7 +391,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -[packages/quickjs-emscripten-core/src/context.ts:971](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L971) +[packages/quickjs-emscripten-core/src/context.ts:972](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L972) *** @@ -424,7 +425,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1128](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1128) +[packages/quickjs-emscripten-core/src/context.ts:1143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1143) *** @@ -1335,7 +1336,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -[packages/quickjs-emscripten-core/src/context.ts:1000](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1000) +[packages/quickjs-emscripten-core/src/context.ts:1015](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1015) *** diff --git a/doc/quickjs-emscripten-core/classes/QuickJSContext.md b/doc/quickjs-emscripten-core/classes/QuickJSContext.md index d14abac7..2cfd6a25 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSContext.md @@ -333,7 +333,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1145) +[packages/quickjs-emscripten-core/src/context.ts:1160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1160) *** @@ -402,6 +402,7 @@ will result in an error. > **dump**(`handle`): `any` Dump a JSValue to Javascript in a best-effort fashion. +If the value is a promise, dumps the promise's state. Returns `handle.toString()` if it cannot be serialized to JSON. #### Parameters @@ -414,7 +415,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -[packages/quickjs-emscripten-core/src/context.ts:971](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L971) +[packages/quickjs-emscripten-core/src/context.ts:972](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L972) *** @@ -444,7 +445,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1128](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1128) +[packages/quickjs-emscripten-core/src/context.ts:1143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1143) *** @@ -1225,7 +1226,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -[packages/quickjs-emscripten-core/src/context.ts:1000](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1000) +[packages/quickjs-emscripten-core/src/context.ts:1015](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1015) *** diff --git a/doc/quickjs-emscripten/README.md b/doc/quickjs-emscripten/README.md index dbddd880..51d0235e 100644 --- a/doc/quickjs-emscripten/README.md +++ b/doc/quickjs-emscripten/README.md @@ -53,12 +53,15 @@ main() - [Safely evaluate Javascript code](#safely-evaluate-javascript-code) - [Interfacing with the interpreter](#interfacing-with-the-interpreter) - [Runtime](#runtime) + - [EcmaScript Module Exports](#ecmascript-module-exports) - [Memory Management](#memory-management) - [`using` statement](#using-statement) - [Scope](#scope) - [`Lifetime.consume(fn)`](#lifetimeconsumefn) - [Exposing APIs](#exposing-apis) - [Promises](#promises) + - [context.getPromiseState(handle)](#contextgetpromisestatehandle) + - [context.resolvePromise(handle)](#contextresolvepromisehandle) - [Asyncify](#asyncify) - [Async module loader](#async-module-loader) - [Async on host, sync in QuickJS](#async-on-host-sync-in-quickjs) @@ -371,8 +374,38 @@ execute immediately. Your code needs to explicitly call gives your code maximum control to _schedule_ when QuickJS will block the host's event loop by resuming execution. -To work with QuickJS handles that contain a promise inside the environment, you -can convert the QuickJSHandle into a native promise using +To work with QuickJS handles that contain a promise inside the environment, +there are two options: + +##### context.getPromiseState(handle) + +You can synchronously peek into a QuickJS promise handle and get its state +without introducing asynchronous host code, described by the type [JSPromiseState][]: + +```typescript +type JSPromiseState = + | { type: 'pending', error: Error } + | { type: 'fulfilled', value: QuickJSHandle, notAPromise?: boolean } + | { type: 'rejected', error: QuickJSHandle } +``` + +The result conforms to the `SuccessOrFail` type returned by `context.evalCode`, so you can use `context.unwrapResult(context.getPromiseState(promiseHandle))` to assert a promise is settled successfully and retrieve its value. Calling `context.unwrapResult` on a pending or rejected promise will throw an error. + +```typescript +const promiseHandle = context.evalCode(`Promise.resolve(42)`); +const resultHandle = context.unwrapResult( + context.getPromiseState(promiseHandle) +); +context.getNumber(resultHandle) === 42; // true +resultHandle.dispose(); +promiseHandle.dispose(); +``` + +[JSPromiseState]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#jspromisestate + +##### context.resolvePromise(handle) + +You can convert the QuickJSHandle into a native promise using `context.resolvePromise()`. Take care with this API to avoid 'deadlocks' where the host awaits a guest promise, but the guest cannot make progress until the host calls `runtime.executePendingJobs()`. The simplest way to avoid this kind diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md index ca1c1f52..71088c78 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md @@ -309,7 +309,7 @@ socket.on("data", chunk => { #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1274 +packages/quickjs-emscripten-core/dist/index.d.ts:1275 *** @@ -374,6 +374,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:890 > **dump**(`handle`): `any` Dump a JSValue to Javascript in a best-effort fashion. +If the value is a promise, dumps the promise's state. Returns `handle.toString()` if it cannot be serialized to JSON. #### Parameters @@ -390,7 +391,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1227 +packages/quickjs-emscripten-core/dist/index.d.ts:1228 *** @@ -424,7 +425,7 @@ socket.write(dataLifetime?.value) #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1261 +packages/quickjs-emscripten-core/dist/index.d.ts:1262 *** @@ -1335,7 +1336,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1234 +packages/quickjs-emscripten-core/dist/index.d.ts:1235 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md b/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md index 143338ef..433751ca 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md @@ -50,7 +50,7 @@ Synchronous evalCode is not supported. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1457 +packages/quickjs-emscripten-core/dist/index.d.ts:1458 *** @@ -80,7 +80,7 @@ See the documentation for [QuickJSWASMModule#evalCode](QuickJSWASMModule.md#eval #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1469 +packages/quickjs-emscripten-core/dist/index.d.ts:1470 *** @@ -104,7 +104,7 @@ and provide the [CustomizeVariantOptions#wasmMemory](../interfaces/CustomizeVari #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1413 +packages/quickjs-emscripten-core/dist/index.d.ts:1414 *** @@ -130,7 +130,7 @@ be disposed when the context is disposed. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1455 +packages/quickjs-emscripten-core/dist/index.d.ts:1456 *** @@ -156,7 +156,7 @@ concurrent async actions, create multiple WebAssembly modules. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1449 +packages/quickjs-emscripten-core/dist/index.d.ts:1450 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSContext.md b/doc/quickjs-emscripten/classes/QuickJSContext.md index da69eb70..2f8b8477 100644 --- a/doc/quickjs-emscripten/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSContext.md @@ -333,7 +333,7 @@ socket.on("data", chunk => { #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1274 +packages/quickjs-emscripten-core/dist/index.d.ts:1275 *** @@ -402,6 +402,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:890 > **dump**(`handle`): `any` Dump a JSValue to Javascript in a best-effort fashion. +If the value is a promise, dumps the promise's state. Returns `handle.toString()` if it cannot be serialized to JSON. #### Parameters @@ -414,7 +415,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1227 +packages/quickjs-emscripten-core/dist/index.d.ts:1228 *** @@ -444,7 +445,7 @@ socket.write(dataLifetime?.value) #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1261 +packages/quickjs-emscripten-core/dist/index.d.ts:1262 *** @@ -1225,7 +1226,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1234 +packages/quickjs-emscripten-core/dist/index.d.ts:1235 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSWASMModule.md b/doc/quickjs-emscripten/classes/QuickJSWASMModule.md index 73821977..001b46d8 100644 --- a/doc/quickjs-emscripten/classes/QuickJSWASMModule.md +++ b/doc/quickjs-emscripten/classes/QuickJSWASMModule.md @@ -81,7 +81,7 @@ with name `"InternalError"` and message `"interrupted"`. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1403 +packages/quickjs-emscripten-core/dist/index.d.ts:1404 *** @@ -101,7 +101,7 @@ and provide the [CustomizeVariantOptions#wasmMemory](../interfaces/CustomizeVari #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1413 +packages/quickjs-emscripten-core/dist/index.d.ts:1414 *** @@ -123,7 +123,7 @@ be disposed when the context is disposed. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1377 +packages/quickjs-emscripten-core/dist/index.d.ts:1378 *** @@ -145,7 +145,7 @@ loading for one or more [QuickJSContext](QuickJSContext.md)s inside the runtime. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1371 +packages/quickjs-emscripten-core/dist/index.d.ts:1372 *** diff --git a/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md b/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md index 6d3ff6af..f256e383 100644 --- a/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md +++ b/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md @@ -51,7 +51,7 @@ freed all the memory you've ever allocated. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1659 +packages/quickjs-emscripten-core/dist/index.d.ts:1660 ## Properties @@ -61,7 +61,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1659 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1657 +packages/quickjs-emscripten-core/dist/index.d.ts:1658 *** @@ -71,7 +71,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1657 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1658 +packages/quickjs-emscripten-core/dist/index.d.ts:1659 ## Methods @@ -85,7 +85,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1658 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1664 +packages/quickjs-emscripten-core/dist/index.d.ts:1665 *** @@ -99,7 +99,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1664 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1663 +packages/quickjs-emscripten-core/dist/index.d.ts:1664 *** @@ -123,7 +123,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1663 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1662 +packages/quickjs-emscripten-core/dist/index.d.ts:1663 *** @@ -141,7 +141,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1662 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1665 +packages/quickjs-emscripten-core/dist/index.d.ts:1666 *** @@ -163,7 +163,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1665 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1661 +packages/quickjs-emscripten-core/dist/index.d.ts:1662 *** @@ -185,7 +185,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1661 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1660 +packages/quickjs-emscripten-core/dist/index.d.ts:1661 *** diff --git a/doc/quickjs-emscripten/exports.md b/doc/quickjs-emscripten/exports.md index d4e5b291..f01b0ca6 100644 --- a/doc/quickjs-emscripten/exports.md +++ b/doc/quickjs-emscripten/exports.md @@ -571,7 +571,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:80 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1531 +packages/quickjs-emscripten-core/dist/index.d.ts:1532 *** @@ -624,7 +624,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:531 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1472 +packages/quickjs-emscripten-core/dist/index.d.ts:1473 *** @@ -1265,7 +1265,7 @@ const getDebugModule = memoizePromiseFactory(() => newQuickJSWASMModule(DEBUG_SY #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1530 +packages/quickjs-emscripten-core/dist/index.d.ts:1531 *** @@ -1394,7 +1394,7 @@ const quickjs = new newQuickJSAsyncWASMModuleFromVariant( #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1519 +packages/quickjs-emscripten-core/dist/index.d.ts:1520 *** @@ -1456,7 +1456,7 @@ const quickjs = new newQuickJSWASMModuleFromVariant( #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1494 +packages/quickjs-emscripten-core/dist/index.d.ts:1495 *** @@ -1483,7 +1483,7 @@ This may be necessary in Cloudflare Workers, which can't compile WebAssembly mod #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1574 +packages/quickjs-emscripten-core/dist/index.d.ts:1575 *** @@ -1506,7 +1506,7 @@ Interrupt execution if it's still running after this time. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1582 +packages/quickjs-emscripten-core/dist/index.d.ts:1583 *** diff --git a/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md b/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md index cb58c455..499b4557 100644 --- a/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md +++ b/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md @@ -29,7 +29,7 @@ The enumerable properties of this object will be passed verbatim, although they #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1566 +packages/quickjs-emscripten-core/dist/index.d.ts:1567 *** @@ -69,7 +69,7 @@ Often `''` (empty string) #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1564 +packages/quickjs-emscripten-core/dist/index.d.ts:1565 *** @@ -101,7 +101,7 @@ Debug logger #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1568 +packages/quickjs-emscripten-core/dist/index.d.ts:1569 *** @@ -113,7 +113,7 @@ If given, Emscripten will compile the WebAssembly.Module from these bytes. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1536 +packages/quickjs-emscripten-core/dist/index.d.ts:1537 *** @@ -125,7 +125,7 @@ If given, Emscripten will try to load the WebAssembly module data from this loca #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1534 +packages/quickjs-emscripten-core/dist/index.d.ts:1535 *** @@ -137,7 +137,7 @@ If given, use the Memory when instantiating the WebAssembly.Instance. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1540 +packages/quickjs-emscripten-core/dist/index.d.ts:1541 *** @@ -149,7 +149,7 @@ If given, Emscripten will instantiate the WebAssembly.Instance from this existin #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1538 +packages/quickjs-emscripten-core/dist/index.d.ts:1539 *** @@ -161,7 +161,7 @@ If given, we will provide the source map to Emscripten directly. This may only b #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1544 +packages/quickjs-emscripten-core/dist/index.d.ts:1545 *** @@ -173,7 +173,7 @@ If given, Emscripten will try to load the source map for the WebAssembly module #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1542 +packages/quickjs-emscripten-core/dist/index.d.ts:1543 *** diff --git a/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md b/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md index 51bb0992..2a3f285a 100644 --- a/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md +++ b/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md @@ -27,7 +27,7 @@ To remove the limit, set to `0`. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1313 +packages/quickjs-emscripten-core/dist/index.d.ts:1314 *** @@ -39,7 +39,7 @@ Memory limit, in bytes, of WebAssembly heap memory used by the QuickJS VM. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1308 +packages/quickjs-emscripten-core/dist/index.d.ts:1309 *** @@ -51,7 +51,7 @@ Module loader for any `import` statements or expressions. #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1317 +packages/quickjs-emscripten-core/dist/index.d.ts:1318 *** @@ -64,7 +64,7 @@ See [shouldInterruptAfterDeadline](../exports.md#shouldinterruptafterdeadline). #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1304 +packages/quickjs-emscripten-core/dist/index.d.ts:1305 *** diff --git a/doc/quickjs-emscripten/namespaces/errors/README.md b/doc/quickjs-emscripten/namespaces/errors/README.md index 5e344614..f1515484 100644 --- a/doc/quickjs-emscripten/namespaces/errors/README.md +++ b/doc/quickjs-emscripten/namespaces/errors/README.md @@ -39,7 +39,7 @@ #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1621 +packages/quickjs-emscripten-core/dist/index.d.ts:1622 *** @@ -49,7 +49,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1621 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1623 +packages/quickjs-emscripten-core/dist/index.d.ts:1624 *** @@ -59,7 +59,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1623 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1625 +packages/quickjs-emscripten-core/dist/index.d.ts:1626 *** @@ -69,7 +69,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1625 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1627 +packages/quickjs-emscripten-core/dist/index.d.ts:1628 *** @@ -79,7 +79,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1627 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1629 +packages/quickjs-emscripten-core/dist/index.d.ts:1630 *** @@ -89,7 +89,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1629 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1631 +packages/quickjs-emscripten-core/dist/index.d.ts:1632 *** @@ -99,7 +99,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1631 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1633 +packages/quickjs-emscripten-core/dist/index.d.ts:1634 *** @@ -109,7 +109,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1633 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1635 +packages/quickjs-emscripten-core/dist/index.d.ts:1636 *** @@ -119,7 +119,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1635 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1637 +packages/quickjs-emscripten-core/dist/index.d.ts:1638 *** @@ -129,7 +129,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1637 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1639 +packages/quickjs-emscripten-core/dist/index.d.ts:1640 ## Variables @@ -139,7 +139,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1639 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1621 +packages/quickjs-emscripten-core/dist/index.d.ts:1622 *** @@ -149,7 +149,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1621 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1623 +packages/quickjs-emscripten-core/dist/index.d.ts:1624 *** @@ -159,7 +159,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1623 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1625 +packages/quickjs-emscripten-core/dist/index.d.ts:1626 *** @@ -169,7 +169,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1625 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1627 +packages/quickjs-emscripten-core/dist/index.d.ts:1628 *** @@ -179,7 +179,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1627 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1629 +packages/quickjs-emscripten-core/dist/index.d.ts:1630 *** @@ -189,7 +189,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1629 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1631 +packages/quickjs-emscripten-core/dist/index.d.ts:1632 *** @@ -199,7 +199,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1631 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1633 +packages/quickjs-emscripten-core/dist/index.d.ts:1634 *** @@ -209,7 +209,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1633 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1635 +packages/quickjs-emscripten-core/dist/index.d.ts:1636 *** @@ -219,7 +219,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1635 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1637 +packages/quickjs-emscripten-core/dist/index.d.ts:1638 *** @@ -229,7 +229,7 @@ packages/quickjs-emscripten-core/dist/index.d.ts:1637 #### Source -packages/quickjs-emscripten-core/dist/index.d.ts:1639 +packages/quickjs-emscripten-core/dist/index.d.ts:1640 *** diff --git a/variants.json b/variants.json index 76887949..a5b926c5 100644 --- a/variants.json +++ b/variants.json @@ -6,7 +6,7 @@ "packageJson": { "name": "@jitl/quickjs-wasmfile-debug-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -73,7 +73,7 @@ "packageJson": { "name": "@jitl/quickjs-wasmfile-debug-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -140,7 +140,7 @@ "packageJson": { "name": "@jitl/quickjs-wasmfile-release-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -207,7 +207,7 @@ "packageJson": { "name": "@jitl/quickjs-wasmfile-release-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -274,7 +274,7 @@ "packageJson": { "name": "@jitl/quickjs-ng-wasmfile-debug-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -341,7 +341,7 @@ "packageJson": { "name": "@jitl/quickjs-ng-wasmfile-debug-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -408,7 +408,7 @@ "packageJson": { "name": "@jitl/quickjs-ng-wasmfile-release-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -475,7 +475,7 @@ "packageJson": { "name": "@jitl/quickjs-ng-wasmfile-release-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -542,7 +542,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-cjs-debug-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a universal (Node and Browser compatible) CommonJS module.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -599,7 +599,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-cjs-debug-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a universal (Node and Browser compatible) CommonJS module.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -656,7 +656,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-cjs-release-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a universal (Node and Browser compatible) CommonJS module.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -713,7 +713,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-cjs-release-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a universal (Node and Browser compatible) CommonJS module.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -770,7 +770,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-mjs-debug-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a NodeJS ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -823,7 +823,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-mjs-debug-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a NodeJS ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -876,7 +876,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-mjs-release-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a NodeJS ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -929,7 +929,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-mjs-release-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a NodeJS ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -982,7 +982,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-browser-debug-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a browser ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -1037,7 +1037,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-browser-debug-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a browser ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -1092,7 +1092,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-browser-release-sync", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a browser ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" }, @@ -1147,7 +1147,7 @@ "packageJson": { "name": "@jitl/quickjs-singlefile-browser-release-asyncify", "license": "MIT", - "version": "0.29.0", + "version": "0.29.1", "description": "Variant of quickjs library: Variant with the WASM data embedded into a browser ESModule.", "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/justjake/quickjs-emscripten" },