lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.32k stars 481 forks source link

let CLI accept .cjs config files #1634

Closed rdsfj closed 1 month ago

rdsfj commented 1 month ago

Hello 👋 I opened an issue (#1630) a couple of days ago and found some time today to open this PR.

The CLI is a CJS package, so all modules it imports must be CJS. tsoa configs are located outside the CLI, potentially in an ESM package. To force these configs to be treated as CJS, they need to have the .cjs extension and the CLI must accept them.

Closes #1630.

All Submissions:

Closing issues

closes #1630

Potential Problems With The Approach

None I can think of. In the long run, I think it's worth considering to move the CLI package to ESM.

Test plan

rdsfj commented 1 month ago

Hey @WoH, thanks for having a look! I see you ran the pipeline and it seems to me that two jobs failed because yarn install failed or was too slow. Would you mind restarting to give it another try?