probot
probot copied to clipboard
Support ESM apps
Fixes #1684.
This would require Node 14, which is a breaking change, but Node 14 is the oldest still supported LTS version, so I think it's not a problem
The tests work locally, I dont know why they fail on actions
The fail is related to https://github.com/nodejs/node/issues/35889. --experimental-vm-modules is only required in Jest, not when actually using the app. I'm not sure what's the best way to proceed here. Trying to run the different code in the tests defeats the point of the tests
Thanks for looking at this.
I'm no expert on this CJS/ESM stuff, but is it possible to change the tsconfig
settings so that you transpile to JavaScript that uses ESM import
s instead of the require
?
Yes, that is possible, but would require more major refactoring changes to be native ESM.
I can try to do that, but it could break some apps using probot, it'd require a lot of testing.
Part of #1821.