-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix(esm): added export mapping to package.json for proper cjs/esm entrypoints #4081
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for compassionate-pike-271cb3 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@benjie What is the way GraphQL addresses community bug fix PRs? I see GraphQL 16.8.2 got merged with a single bug fix as well and to be frank I'd say this one is equally as important because it also addresses bundlers and shipping code on modern ESM stacks. |
GraphQL is a community operated technology, so all bug fix PRs are community bug fix PRs. Contributors are encouraged to represent their fixes at a GraphQL.js WG where it can be discussed with other community members; you can add yourself to an agenda here: https://github.com/graphql/graphql-js-wg/tree/main/agendas/2024 If you can't make any meetings (for example, due to timezone concerns) then you can request someone to represent a topic for you - hopefully someone else agrees with the need for the feature and will then represent it on your behalf.
We agree that this is important; there's active research being conducted that relates to (and predates) your PR - please see #4074 for more details. |
I keep procrastinating preparing something and signing up but I do feel like I want to. The timezone should be fine just fine, I'm from The Netherlands so only 2 hours ahead of UTC. |
We’d love to see you there! Unfortunately I can’t make either of the next two meetings but I plan to be there in September. |
With the current code that doesn't define export mapping modern tooling such as vitest v1.6.0 tries to access the CJS version of GraphQL in my project (https://github.com/favware/graphql-pokemon) because it doesn't know where to find the ESM version. This subsequently causes the error:
By following the modern system of defining package entrypoints through the
exports
mapping this problem is solved because now vitest will properly access the ESM variant for graphql.