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

Add "type": "module" #254

Merged
merged 4 commits into from
Feb 4, 2022
Merged

Add "type": "module" #254

merged 4 commits into from
Feb 4, 2022

Conversation

benmccann
Copy link
Contributor

This will help add SvelteKit / Vite support (apollographql/apollo-client#8218)

Closes #240
Closes #227

@apollo-cla
Copy link

@benmccann: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@benmccann
Copy link
Contributor Author

I've signed the CLA. Thanks

@benmccann
Copy link
Contributor Author

@benjamn thanks for approving the workflow. It looks like the tests were failing since adding "type": "module" switched them to run as ESM. I've updated it so that the tests pass now if you're able to kick off the workflow again. Thanks!

The public package should still work in older versions of Node.js
(including v10), but it's a bit annoying to skip the ESM tests in
certain Node.js versions.
"mocha": "^9.0.2",
"mocha": "^9.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch that mocha@latest supports ESM syntax!

Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this @benmccann!

@benjamn benjamn merged commit 42744e6 into apollographql:main Feb 4, 2022
@benmccann benmccann deleted the type-module branch February 4, 2022 20:18
benjamn added a commit to apollographql/apollo-client that referenced this pull request Feb 4, 2022
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

Successfully merging this pull request may close these issues.

ES module support (ts-invariant\process)
3 participants