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

Description
"type" in package.json has a few affects:
- when loading the main entrypoint of the process or a worker thread it can determine which loader to use: ESM loader (if package.type is "module") vs CJS loader (if type is anything else? [this seems a forwards compat bug?] )
- manipulates format resolution within its package boundary
- .js and extension-less files in particular
- also .node
- causes the CJS loader to error for CJS format files that end in
.js within that package boundary (not extension-less files?)
We should probably document and/or bugfix these if they are not the expected behavior.