You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: doc/plan-for-new-modules-implementation.md
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ This document outlines the plan for building a new implementation to support ECM
8
8
9
9
***Phase 2** fleshes out the implementation with enough functionality that it should be useful to average users as a minimum viable product.
10
10
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.
12
12
13
13
***Phase 3** improves user experience and extends the MVP.
14
14
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.
16
16
17
17
The effort is currently in **[Phase 3](#phase-3-path-to-stability-removing---experimental-modules-flag)**.
18
18
@@ -80,13 +80,14 @@ Phase 2 fleshes out the implementation with enough functionality that it should
80
80
* Define semantics for enabling ESM treatment of source code loaded via `--eval`, STDIN, and extensionless files (both with and without shebang lines).
81
81
- 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.
82
82
- 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.
84
85
85
86
* File extension and directory index searching in ESM, behind its own flag, `--es-module-specifier-resolution`.
86
87
- See https://github.com/nodejs/modules/issues/268.
87
88
- Landed in https://github.com/nodejs/ecmascript-modules/pull/48.
88
89
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.
90
91
91
92
## Phase 3: Path to Stability: Removing `--experimental-modules` Flag
92
93
@@ -105,20 +106,20 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
105
106
* Better mechanism for creating `require` function.
106
107
- See [https://gist.github.com/SMotaal/e73c12bd801d78a3108fa30ecd303676](https://gist.github.com/SMotaal/e73c12bd801d78a3108fa30ecd303676).
107
108
-`import 'nodejs:require'`? `import.meta.require`? Or only `createRequireFromPath`?
109
+
- How about `createRequireFromPath('.')`?
108
110
109
111
* 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).
- 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.
0 commit comments