modules: runtime deprecate subpath folder mappings
This creates an explicit runtime deprecation warning when using the folder mappings in "exports"
or "imports"
.
The implicit documentation deprecation was already made when the exports patterns PR was landed in https://github.com/nodejs/node/pull/34718 and fully replaced all documentation references to this.
The warning is carefully scoped to not apply to external packages in node_modules, unless explicitly using the --pending-deprecation
flag.
Tests are included for local and external, require and import, imports and exports and self-resolution cases.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines -
documentation is changed or added