tooling
tooling copied to clipboard
Tooling integrations for package.json#exports
I've seen various issues with understanding the package.json#exports,imports fields.
- Lack of linting (E.G. https://github.com/microsoft/TypeScript/issues/46861 )
- Lack of convention. No official recommendations of ordering of conditions in typical application/framework. (E.G. https://twitter.com/AndaristRake/status/1498701683093823494 )
- Lack of discoverability. Understanding which path in your own package will be taken / altering the resolution of such.
- Lack of specification granularity / need to be reimplemented in userland (E.G. https://twitter.com/sebmarkbage/status/1498691681750765577 )
It would be good to have some way for tooling to provide these and/or make recommendations for tools that do scaffolding and the general user of Node.js to reference.
fwiw, I'm continuing to refine https://npmjs.com/ls-exports (it's still not caught up to the latest node features), and once it's up to par, I'll be updating resolve to support both fields, using the test fixtures from list-exports for verification.