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.
We are exposing the async-function argument type for jsDoc
type declaration support. This means that we now could do:
"npm i -D @types/github-script@github:actions/github-script"
and the add:
"@param {import('@types/github-script').AsyncFunctionArguments}
AsyncFunctionArguments".
This could obviously be done in other ways too, like using
"@typed-actions/github-script" instead. But it seems better
to use the actual source repository instead of a third-party
library to import the type declaration.
The @octokit/plugin- references are not actually (directly) used by
@action/github-script and so only serve to confuse about what exact
version of these is included in the action. The actual versions of
these plugins are set by @action/github.
Ignoring newlines, the dist/index.js file is exactly the same without
listing these dependencies in package.json.
Without this plugin, the debug setting is, effectively, meaningless as
none of the existing plugins produce log output.
The plugin writes the request options to octokit.log.debug, and response
times as *method path - status in ...ms* to octokit.log.info.