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

feat: ES Module #159

Merged
merged 15 commits into from Sep 24, 2021
Merged

feat: ES Module #159

merged 15 commits into from Sep 24, 2021

Conversation

wolfy1339
Copy link
Member

BREAKING CHANGE: Move to ESModules instead of CommonJS

@ghost ghost added this to Maintenance in JS Jun 13, 2021
@wolfy1339 wolfy1339 changed the title feat: rewrite in ESModules 🚧 feat: rewrite in ESModules Jun 13, 2021
@wolfy1339
Copy link
Member Author

wolfy1339 commented Jun 14, 2021

@gr2m There is only one regular test failure left, due to proxyquire. That module doesn't work under ESM since require() doesn't exist.

The e2e tests don't currently work. They are complaining that yargs.options() is not a function

@gr2m
Copy link
Contributor

gr2m commented Jun 14, 2021

Thanks @wolfy1339 I'll have a look

@gr2m gr2m self-assigned this Jun 14, 2021
@ghost ghost moved this from Maintenance to In progress in JS Jun 14, 2021
@gr2m
Copy link
Contributor

gr2m commented Jun 17, 2021

I'd like to resolve octokit/fixtures#425 first

@gr2m gr2m removed their assignment Jun 17, 2021
@ghost ghost moved this from In progress to Maintenance in JS Jun 17, 2021
@wolfy1339
Copy link
Member Author

From what I gather, proxyquire is equivalent to jest.mock(), and the former should work with ESM.

I think moving to Jest is going to be a requirement here

@gr2m
Copy link
Contributor

gr2m commented Jun 25, 2021

I think moving to Jest is going to be a requirement here

no problem from my side

@gr2m gr2m self-assigned this Sep 24, 2021
@ghost ghost moved this from Maintenance to In progress in JS Sep 24, 2021
@gr2m gr2m changed the title 🚧 feat: rewrite in ESModules feat: ES Module Sep 24, 2021
@gr2m
Copy link
Contributor

gr2m commented Sep 24, 2021

I use uvu in github.com/octokit/octokit-next.js and some other ESM-only Node projects and really like it so far, so I did the same here

@gr2m gr2m merged commit b3792dc into master Sep 24, 2021
JS automation moved this from In progress to Done Sep 24, 2021
@gr2m gr2m deleted the rewrite-esm branch September 24, 2021 19:07
@gr2m
Copy link
Contributor

gr2m commented Sep 24, 2021

ugh now the build fails due to vercel/pkg#1254

@gr2m
Copy link
Contributor

gr2m commented Sep 24, 2021

we might need to add a pre-build step with esbuild as described here:
vercel/pkg#782 (comment)

At this point we could as well look into Deno instead which has the single-file binary compilation built in, what do you think?

@gr2m gr2m mentioned this pull request Sep 24, 2021
@github-actions
Copy link

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants