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

Commit 92d23de

Browse files
Merge pull request #288 from nodejs/searching-phase2
Update Phase 2 file extension/directory index searching plan
2 parents 3dab871 + 24e1835 commit 92d23de

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

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

+5-9
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ The “minimal kernel” consists of features that the @nodejs/modules group hav
6868

6969
Phase 2 fleshes out the implementation with enough functionality that it should be useful to average users as a minimum viable product. At the completion of Phase 2, the old `--experimental-modules` implementation is replaced with this new one (still behind the `--experimental-modules` flag).
7070

71-
### Core Functionality
72-
7371
* Define semantics for importing a package entry point, e.g. `import _ from 'lodash'`
7472
- Proposal: [“File Specifier Resolution” proposal](https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal) covers bare module specifier resolution of CommonJS packages.
7573
- Landed in https://github.com/nodejs/ecmascript-modules/pull/28.
@@ -82,14 +80,9 @@ Phase 2 fleshes out the implementation with enough functionality that it should
8280
- 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.
8381
- Landed in https://github.com/nodejs/ecmascript-modules/pull/32.
8482

85-
* A loaders solution that supports all items in the [features list in our README](https://github.com/nodejs/modules/#features).
86-
- Should loaders be per package, per application or either?
87-
- Will land in Phase 2 only if an implementation without major problems (e.g. memory leaks) can be completed in time. If the problems can be isolated behind a flag specific to loaders, we could upstream a buggy implementation and unflag it after its bugs are fixed.
88-
89-
### Needs Consensus
90-
91-
* Add, or decide not to support, file extension and directory index searching in ESM.
83+
* File extension and directory index searching in ESM, behind its own flag.
9284
- See https://github.com/nodejs/modules/issues/268.
85+
- Per 2019-03-04 meeting, searching will be disabled by default in ESM but enabled via a flag; and the flag will be neutral as to which state the feature should take (similar to `--type=commonjs` / `--type=module`, where the former is currently a noop because it’s the default; but if the default changes someday, the latter would become the noop).
9386

9487

9588
## Phase 3: Path to Stability: Removing `--experimental-modules` Flag
@@ -98,6 +91,9 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
9891

9992
### UX Improvements
10093

94+
* A loaders solution that supports all items in the [features list in our README](https://github.com/nodejs/modules/#features).
95+
- Should loaders be per package, per application or either?
96+
10197
* Dual CommonJS/ESM packages: Either support packages that can both be `require`d as CommonJS and `import`ed as ESM; or decide to specifically not support dual CommonJS/ESM packages.
10298
- Proposal: https://github.com/nodejs/modules/issues/273.
10399
- PR: https://github.com/nodejs/ecmascript-modules/pull/41.

0 commit comments

Comments
 (0)