Skip to content

Switch action build to ESM for exec v3 - #450

Merged
jezdez merged 2 commits into
mainfrom
esm
Feb 26, 2026
Merged

jezdez merged 2 commits into
mainfrom
esm

Conversation

@dbast

@dbast dbast commented Feb 2, 2026

Copy link
Copy Markdown
Member

Move from CJS to ESM because @actions/exec v3 is ESM‑only and fails to bundle under ncc CJS output. Marking the package as ESM lets ncc emit ESM bundles that Node >=20 is able to run in GitHub Actions.

Also renaming the eslint config file to .cjs as adding "type": "module" makes Node treat .js files as ESM, so ESLint can't require() .eslintrc.js unless it’s renamed to .cjs.

Includes #449

dependabot Bot and others added 2 commits January 29, 2026 14:42
Bumps [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec) from 2.0.0 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/exec)

---
updated-dependencies:
- dependency-name: "@actions/exec"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Move from CJS to ESM because @actions/exec v3 is ESM‑only and fails to
bundle under ncc CJS output. Marking the package as ESM lets ncc emit ESM
bundles that Node >=20 is able to run in GitHub Actions.

Also renaming the eslint config file to .cjs as adding "type": "module"
makes Node treat .js files as ESM, so ESLint can't require() .eslintrc.js
unless it’s renamed to .cjs.
@dbast
dbast marked this pull request as ready for review February 2, 2026 10:37
@dbast
dbast requested a review from a team as a code owner February 2, 2026 10:37
@jezdez
jezdez merged commit b651292 into main Feb 26, 2026
101 checks passed
@jezdez jezdez mentioned this pull request Apr 23, 2026
3 tasks done
@goanpeca goanpeca added type:enhancement New feature or request javascript Pull requests that update Javascript code labels May 31, 2026
@goanpeca
goanpeca deleted the esm branch May 31, 2026 19:24
@goanpeca goanpeca added this to the v4.0.0 milestone May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants