Commit graph

2 commits

Author SHA1 Message Date
Ricky C
f27b40e6b7 chore: Change back to the function-style operation
We lose the more normal looking export in favor of the `return` statement already traditional to this action, and thus can handle await statements without an ESM conversion.

This is a separate commit from the former because I think the next major version of this action should switch to ESM, revert this commit, and use the more standard export notation in all supported languages.
2024-07-05 19:32:29 -07:00
Ricky C
d3f9a3b3fb feat: Add support for TypeScript scripts
Both of the .cts and .mts flavors. Because this action is written in CommonJS both have to compile to CommonJS in order to execute.

As it is TypeScript there's already an expectation of some slowness, so I went with the approach of running the script via the node VM module. While a cleaner approach, it has the caveat that root level await in the script doesn't work. That should become available if https://github.com/actions/github-script/issues/457 is completed.
2024-07-05 19:31:23 -07:00