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

Commit 09703f6

Browse files
Merge pull request #382 from nodejs/update-roadmap
Update Phase 3 per current status
2 parents be5aa48 + bce3459 commit 09703f6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,15 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
9696
### In Progress
9797

9898
* A loaders solution that supports all items in the [features list in our README](https://github.com/nodejs/modules/#features).
99-
- Should loaders be per package, per application or either?
99+
- Discussion: https://github.com/nodejs/modules/issues/351.
100+
- Design: https://docs.google.com/document/d/1J0zDFkwxojLXc36t2gcv1gZ-QnoTXSzK1O6mNAMlync/edit#heading=h.xzp5p5pt8hlq.
100101
- **Status**: In development.
101102

102-
* `"exports"` field: for consumers of a package, map the paths of deep imports to provide encapsulation (an explicit public API); pretty specifiers (no file exensions or paths that include things like `dist/`) and flexibility for future package versions renaming or moving files without affecting the package’s public API. Applies to both ESM and CommonJS.
103-
- Proposal: [Package Exports Proposal](https://github.com/jkrems/proposal-pkg-exports).
104-
- Partial upstream PR: https://github.com/nodejs/node/pull/28568.
105-
- **Status**: Upstream PR submitted.
106-
107-
* Reference package root via the package’s name.
103+
* Shortcut to resolve to package root.
108104
- Proposal: [Package `"name"` Resolution Proposal](https://github.com/guybedford/package-name-resolution).
109105
- Discussion: https://github.com/nodejs/modules/issues/306.
110-
- **Status**: Seeking consensus.
106+
- Upstream PR: https://github.com/nodejs/node/pull/29327 (proposes `@` instead of package name).
107+
- **Status**: Upstream PR submitted.
111108

112109
* Limited module type detection.
113110
- PR: https://github.com/nodejs/ecmascript-modules/pull/69.
@@ -116,12 +113,11 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
116113

117114
* Dual CommonJS/ESM packages: Either support packages with both CommonJS and ESM sources that can be used in either environment; or decide to specifically not support dual CommonJS/ESM packages.
118115
- Status quo is current `--experimental-modules` behavior: `"main"` points to exactly one file, and all file extensions are mandatory (by default), so there is no possibility of an `import` specifier pointing to different files in ESM versus CommonJS. Recommended practice for dual packages is to have `"main"` point to the CommonJS entry point and have users use a deep import, e.g. `/module.mjs`, to access ESM entry point.
119-
- PR to document status quo: https://github.com/nodejs/node/pull/27957.
120116
- Proposal for new `package.json` field for ESM entry point: https://github.com/nodejs/modules/issues/273.
121-
- PR for new `package.json` field: https://github.com/nodejs/ecmascript-modules/pull/41.
122-
- Status summary: https://github.com/nodejs/modules/issues/273#issuecomment-492408041.
117+
- PR for above proposal: https://github.com/nodejs/ecmascript-modules/pull/41.
118+
- PR is currently blocked because of this issue: https://github.com/nodejs/modules/issues/371.
123119
- Proposal for `require` of ESM: https://github.com/nodejs/modules/issues/299.
124-
- **Status**: Status quo has consensus and will ship absent any other proposals achieving consensus. “New field” proposal lacks consensus. “`require` of ESM” proposal awaiting implementation and consensus.
120+
- **Status**: Status quo has consensus and will ship absent any other proposals achieving consensus. “New field” proposal is [blocked](https://github.com/nodejs/modules/issues/371). “`require` of ESM” proposal awaiting implementation and consensus.
125121

126122
* Finalize behavior of `import` of CommonJS files and packages.
127123
- Overview: https://github.com/nodejs/modules/issues/264.
@@ -135,6 +131,10 @@ Phase 3 improves user experience and extends the MVP. Phase 3 is malleable based
135131
* Better mechanism for creating `require` function: `createRequire`.
136132
- Landed in https://github.com/nodejs/node/pull/27405 and shipped in 12.2.0.
137133

134+
* `"exports"` field: for consumers of a package, map the paths of deep imports to provide encapsulation (an explicit public API); pretty specifiers (no file exensions or paths that include things like `dist/`) and flexibility for future package versions renaming or moving files without affecting the package’s public API. Applies to both ESM and CommonJS.
135+
- Proposal: [Package Exports Proposal](https://github.com/jkrems/proposal-pkg-exports).
136+
- Landed in https://github.com/nodejs/node/pull/28568 and shipped in 12.7.0 behind `--experimental-exports`. Further improvements are being made as additional PRs against core.
137+
138138
### Tabled
139139

140140
* Provide a way to make ESM the default instead of CommonJS.

0 commit comments

Comments
 (0)