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!: Full ESM #1922
base: master
Are you sure you want to change the base?
feat!: Full ESM #1922
Conversation
@@ -1,3 +1,3 @@ | |||
#!/usr/bin/env node | |||
|
|||
require("../lib/bin/probot-receive"); | |||
import "../lib/bin/probot-receive.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we just do
import "../lib/bin/probot-receive.js"; | |
import("../lib/bin/probot-receive.js"); |
In the bin files and already apply them into beta?
Shouldnt be breaking and reducing the esm switch effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll apply this on the other branch later.
I think esm only would be too hard for now. So we most code changes are __dirname substitutions. Maybe we can reduce the use of __dirname in beta. Also what do you think of a cjs esm dual mode. Like it is done in helmet? |
Not sure how easy we can implement this (For example |
This makes Probot entirely esm-only.
This updates pkg-conf at runtime, and get-port and execa in development
I guess full esm should be the next step. Yes. |
These are the changes needed to make Probot fully ESM. This is mostly for testing purposes, requiring ESM would probably have a large impact.