ci(release-action): bundle with esbuild to support ESM-only deps#40636
ci(release-action): bundle with esbuild to support ESM-only deps#40636ggazzo wants to merge 1 commit into
Conversation
@actions/core@3, @actions/exec@3, @actions/github@9, @octokit/core@7, and @octokit/plugin-throttling@11 (bumped in #40265) are ESM-only. The existing tsc CJS output fails at require time with ERR_PACKAGE_PATH_NOT_EXPORTED. Replace `tsc` build with `tsc --noEmit && esbuild --bundle --format=cjs` so the action ships a single self-contained CJS file. No source changes.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughThe release-action build process is updated to introduce esbuild-based bundling. The build script now performs TypeScript type checking without emitting output, then bundles the entry point into a CommonJS distribution for Node 20. The esbuild dev dependency is added to support the bundling step. ChangesRelease Action Build Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40636 +/- ##
========================================
Coverage 69.64% 69.64%
========================================
Files 3338 3338
Lines 123232 123232
Branches 21989 21962 -27
========================================
Hits 85830 85830
+ Misses 34049 34046 -3
- Partials 3353 3356 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
@actions/core@3,@actions/exec@3,@actions/github@9,@octokit/core@7,@octokit/plugin-throttling@11(bumped in chore(deps): bump @actions/github to v9 to remove undici 5.29.0 #40265) are ESM-only. The existingtsc-emitted CJSdist/index.jsfails atrequiretime withERR_PACKAGE_PATH_NOT_EXPORTED, breaking theStart release candidatejob (see run 26192703525).tscbuild withtsc --noEmit && esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.js. The action now ships a single self-contained CJS bundle — ESM deps are resolved at build time. No source changes; type-checking still runs viatsc --noEmit..jsextensions on every relative import), revert chore(deps): bump @actions/github to v9 to remove undici 5.29.0 #40265 (reintroducesundici 5.29.0vulnerability). Bundling is the least-invasive fix.Test plan
yarn buildinsidepackages/release-actionproducesdist/index.jsnode -e "require('./dist/index.js')"frompackages/release-actionexits with the expected::error::Please add the GITHUB_TOKEN to the changesets action(confirms ESM@actions/coreresolves and the action entrypoint runs)Start new releaseworkflow on this branch to confirm the release-action step succeedsSummary by CodeRabbit