Switch build output to ESM format and update entrypoints

Changed the build script to output ES modules instead of CommonJS. Updated action.yml to reference .js files instead of .cjs, and clarified proxy support logic in bootstrap.js.
This commit is contained in:
Parker Brown
2025-08-22 13:16:17 -07:00
parent 6423fe3683
commit 21c1159e4d
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -133,5 +133,5 @@ outputs:
description: "GitHub App slug"
runs:
using: "node24"
main: "dist/bootstrap.cjs"
post: "dist/post.cjs"
main: "dist/bootstrap.js"
post: "dist/post.js"
+1 -1
View File
@@ -1,4 +1,4 @@
// Enable env-based proxy support (honors explicit opt-out if caller set NODE_USE_ENV_PROXY)
// Enable env-based proxy support before loading the main bundle (unless caller explicitly set NODE_USE_ENV_PROXY)
if (process.env.NODE_USE_ENV_PROXY == null) {
process.env.NODE_USE_ENV_PROXY = "1";
}
+1 -1
View File
@@ -8,7 +8,7 @@
"node": ">=24.4.0"
},
"scripts": {
"build": "esbuild bootstrap.js main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --packages=bundle",
"build": "esbuild bootstrap.js main.js post.js --bundle --outdir=dist --format=esm --platform=node --packages=bundle",
"test": "c8 --100 ava tests/index.js",
"coverage": "c8 report --reporter html",
"postcoverage": "open-cli coverage/index.html"