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

Commit 390b689

Browse files
Merge pull request #319 from nodejs/phase-3-update
Update roadmap per 2018-04-24 meeting
2 parents 0d727d9 + 79b463d commit 390b689

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/plan-for-new-modules-implementation.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This document outlines the plan for building a new implementation to support ECM
88

99
* **Phase 2** fleshes out the implementation with enough functionality that it should be useful to average users as a minimum viable product.
1010

11-
- At the completion of Phase 2, the old `--experimental-modules` implementation was [replaced](https://github.com/nodejs/node/pull/26745) with this new one (still behind the `--experimental-modules` flag). It will be released as part of Node 12, in April 2019.
11+
- At the completion of Phase 2, the old `--experimental-modules` implementation was [replaced](https://github.com/nodejs/node/pull/26745) with this new one (still behind the `--experimental-modules` flag). It was released as part of Node 12 on 2019-04-23.
1212

1313
* **Phase 3** improves user experience and extends the MVP.
1414

15-
- At the completion of Phase 3, the new implementation’s experimental flag is dropped. The goal is to “release” (drop the `--experimental-modules` flag) by when Node 12 starts LTS in October 2019.
15+
- At the completion of Phase 3, the new implementation’s experimental flag will be dropped. The goal is to “release” (drop the `--experimental-modules` flag) by when Node 12 starts LTS in October 2019.
1616

1717
The effort is currently in **[Phase 3](#phase-3-path-to-stability-removing---experimental-modules-flag)**.
1818

@@ -80,13 +80,14 @@ Phase 2 fleshes out the implementation with enough functionality that it should
8080
* Define semantics for enabling ESM treatment of source code loaded via `--eval`, STDIN, and extensionless files (both with and without shebang lines).
8181
- Proposal: [“Entry Points Proposal”](https://github.com/geoffreybooth/node-esm-entry-points-proposal) covers non-file forms of input as well as adding `--type` flag for controlling file-based input.
8282
- Landed in https://github.com/nodejs/ecmascript-modules/pull/32.
83-
- Renamed to `--entry-type` as part of upstream PR to Node.js core.
83+
- Renamed to `--entry-type` as part of upstream [PR](https://github.com/nodejs/node/pull/26745) to Node.js core.
84+
- Renamed to `--intry-type` and limited to `--eval`, `--print` and `STDIN` as part of follow-up [PR](https://github.com/nodejs/node/pull/27184) to Node.js core.
8485

8586
* File extension and directory index searching in ESM, behind its own flag, `--es-module-specifier-resolution`.
8687
- See https://github.com/nodejs/modules/issues/268.
8788
- Landed in https://github.com/nodejs/ecmascript-modules/pull/48.
8889

89-
The work through the end of Phase 2 landed in Node.js `master` as part of https://github.com/nodejs/node/pull/26745.
90+
The work through the end of Phase 2 landed in Node.js `master` as part of https://github.com/nodejs/node/pull/26745 and was released in Node 12.0.0.
9091

9192
## Phase 3: Path to Stability: Removing `--experimental-modules` Flag
9293

@@ -105,20 +106,20 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
105106
* Better mechanism for creating `require` function.
106107
- See [https://gist.github.com/SMotaal/e73c12bd801d78a3108fa30ecd303676](https://gist.github.com/SMotaal/e73c12bd801d78a3108fa30ecd303676).
107108
- `import 'nodejs:require'`? `import.meta.require`? Or only `createRequireFromPath`?
109+
- How about `createRequireFromPath('.')`?
108110

109111
* Map the paths within modules, providing similar functionality as the browser’s [import maps proposal](https://github.com/WICG/import-maps#packages-via-trailing-slashes).
110112
- Proposal: [“Package Exports Proposal”](https://github.com/jkrems/proposal-pkg-exports).
111113

112114
* Automatic entry point module type detection.
113115
- Proposal: [“Entry Points Proposal”](https://github.com/geoffreybooth/node-esm-entry-points-proposal) includes `--type=auto` flag for running `.js` files in either ESM or CommonJS based on which module system is detected.
114-
- PR: https://github.com/nodejs/ecmascript-modules/pull/55.
116+
- PR: https://github.com/nodejs/ecmascript-modules/pull/69.
115117

116118
### Needs Consensus
117119

118-
* Determine the name and functionality behind command-line flag(s) for specifying CommonJS or ESM.
119-
- See https://github.com/nodejs/modules/issues/300.
120-
- Apply to non-file inputs only? Entry point only? Package scope/mirror `package.json` `"type"`?
121-
122120
* Finalize support for (or removal of) `import` of CommonJS files and packages.
123121
- See https://github.com/nodejs/modules/issues/264.
124122
- Defaults only or named exports? Behind a flag or not?
123+
124+
* Provide a way to make ESM the default instead of CommonJS.
125+
- See https://github.com/nodejs/modules/issues/318.

0 commit comments

Comments
 (0)