Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Dynamic Modules Status #188

Closed
Closed
@guybedford

Description

@guybedford

Update 5/11/2018: The Dynamic Modules implementation is now complete in v8, pending further review (at https://chromium-review.googlesource.com/c/v8/v8/+/1303725). This means we can have named exports in transparent interop of ESM from CJS

As you know, I've been pushing a Dynamic Modules specification for ensuring named exports on CommonJS while retaining a correct execution order in transparent initerop. This spec has been carefully worked out at https://github.com/guybedford/proposal-dynamic-modules.

While transparent interop remains a possibility, I believe this specification and work is important to follow so we can provide the best experience to users.

Initially this was created as a Stage 1 TC39 proposal, but it turns out the model is better served by having a Node-specific module record specification implemented in V8, just like Web Assembly will be its own module specification outside of TC39.

This way only a few ECMA262 specification changes are needed to support dynamic modules - tc39/ecma262#1306.

This PR was discussed at the latest TC39 meeting, and it was determined that it should only land following implementation work / feedback.

Thus, the next steps on Dynamic Modules here are:

  1. Setup the Dynamic Modules spec as a Node.js specification moving it from my personal account to the Node.js repo account. I've requested this here - transfer of dynamic-modules-proposal repo into nodejs organization admin#231
  2. Work with v8 to get an implementation together. I will be blocking off a full week or two as needed here to do the C++ work myself in the coming month, if anyone else is able to assist with this please let me know - it would be great to pair on the work.
  3. With implementation feedback from v8, get the spec changes merged back into ECMA262.

While this work all rests on a hypothetical, I hope we can all appreciate it is an important consideration on that hypothetical, and should be pushed regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions