Skip to content

Conversation

@justjake
Copy link
Owner

@justjake justjake commented Feb 26, 2024

Fixes #160

New versions of quickjs library return Promise<void> when evaluating a module.

Our wrapper code unwrapped this implicit promise if it's resolved and return the module exports, and replace a pending promise with pending Promise<ModuleExports>.

However, our code passed through the rejected promise value as a success result back to the caller, who probably isn't expecting a promise.

With this PR, we consider the sync rejected module evaluation promise as an error, restoring the behavior of errors thrown during evaluation.

Also: context.dump(val) now inspects promises

@justjake justjake merged commit f07790d into main Mar 10, 2024
@justjake justjake deleted the jake--missing-module-error branch March 10, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants