Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooling integrations for package.json#exports #137

Open
bmeck opened this issue Mar 1, 2022 · 1 comment
Open

Tooling integrations for package.json#exports #137

bmeck opened this issue Mar 1, 2022 · 1 comment

Comments

@bmeck
Copy link
Member

bmeck commented Mar 1, 2022

I've seen various issues with understanding the package.json#exports,imports fields.

  1. Lack of linting (E.G. package.json diagnostics in --module nodenext microsoft/TypeScript#46861 )
  2. Lack of convention. No official recommendations of ordering of conditions in typical application/framework. (E.G. https://twitter.com/AndaristRake/status/1498701683093823494 )
  3. Lack of discoverability. Understanding which path in your own package will be taken / altering the resolution of such.
  4. 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.

@ljharb
Copy link
Member

ljharb commented Mar 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants