Closed matthewh closed 5 months ago
Wow, that seems to be a very elegant answer 👍🏻
@orta this broke TS files.
https://github.com/jest-community/eslint-plugin-jest/pull/1615#issuecomment-2178122035
Can confirm that this upgrade is breaking our DangerJS checks in our pipeline that is using TypeScript files.
@SimenB I'll see if I can track down the eslint-plugin-jest issue. @terrymun Can you please point me to the pipeline you are referring to?
Seems like it was an easy fix.
if (safeConfig.compilerOptions.module) {
if (!esm) {
safeConfig.compilerOptions.module = "commonjs"
} else {
safeConfig.compilerOptions.module = "es6"
}
}
Will open another MR.
Closing the loop here. Followup MR to adjust compiler options properly here https://github.com/danger/danger-js/pull/1456. Sorry I missed this on the first pass 😞
Fix is deploying, thanks!
Greetings!
I submit this PR as a possible solution for #1180. I did what worked for me but given the number of variations of projects and typescript configurations that are in the wild there could be other issues that the danger development team is aware of.
General
If the dangerfile is an mts file, use typescript to transpile it to mjs and run the mjs variant instead.
tsconfig.json changes
Bump
moduleResolution
fromnode
tonode16
.With
node
With
node16