Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to ESM #969

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Convert to ESM #969

wants to merge 5 commits into from

Conversation

ncalteen
Copy link
Collaborator

This PR converts the TypeScript action template to ESM. Given that some of the core dependencies used in GitHub Actions (namely octokit/rest.js) are being converted to modules, it is necessary to make this change in new actions going forward.

The core changes are as follows:

  • Switch from @vercel/ncc to rollup for packaging the transpiled action code
  • Create separate TSConfig files for ESLint and Rollup
  • Configure Jest to handle ESM module loading and proper mocking of dependencies
  • Upgraded ESLint to 9.x (requires update from YAML to flat config format

Some additional changes that are included for convenience/ease of use:

  • Added links/references to specific linting configuration files
  • Added information on updating the CODEOWNERS file
  • Added test fixtures to stub @actions/core during unit tests
  • Added information on enforcing unit test coverage (optional)

@ncalteen ncalteen self-assigned this Nov 15, 2024
@ncalteen ncalteen requested a review from a team as a code owner November 15, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant