New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 5978 link

Starred by 1 user

Issue metadata

Status: Fixed
Closed: Feb 2017
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: FeatureRequest

issue 1569

Sign in to add a comment

Module Evaluation should return Completion Value

Reported by, Feb 16 2017

Issue description

Version: 5.8.20
OS: all
Architecture: all

What steps will reproduce the problem?
1. Setup a v8::Module with Source of "[]"
2. Check the return value of v8::Module::Evaluate()

What is the expected output?

An Array.

What do you see instead?


Please use labels and text to provide additional information.

This is a means to get data out of ESM in order create a bridge to talk to the inside of a module for example with:

export let a;
((v) => a = v);

Would have a return value that allows an external API to set `a`.

This is useful for Node when implementing a bridge for CJS -> ESM since they need to approximate the modules to `export default module.exports` and need a way to pass in a value and get a way to set the default export's value.

Comment 1 by, Feb 16 2017

Components: API Language
Labels: -Type-Bug Hotlist-NodeJS Type-FeatureRequest
Status: Assigned (was: Untriaged)

Comment 2 by, Feb 17 2017

Returning the completion sounds reasonable and matches the spec (although unobservable within JS).

Comment 3 by, Feb 17 2017

Blocking: 1569

Comment 4 by, Feb 24 2017

Georg, can you take this one? I haven't touched the Rewriter before, and it looks like we might need a new entry point (current entry points are either for ParseInfo or tailored to do-expressions).

Comment 6 by, Feb 28 2017

Status: Fixed (was: Assigned)
Labels: Priority-2

Sign in to add a comment