Skip to content

Conversation

@Justin-JHG
Copy link
Owner

@Justin-JHG Justin-JHG commented Mar 30, 2025

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

ref actions/typescript-action#969

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
@Justin-JHG Justin-JHG requested a review from Copilot March 30, 2025 21:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request converts the action template to ESM, updating the build and test configurations accordingly. Key changes include switching to Rollup for packaging, creating dedicated TSConfig files for ESLint and Rollup, and updating several GitHub workflow configurations.

Reviewed Changes

Copilot reviewed 32 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eslint.config.mjs New ESLint configuration in ESM using the FlatCompat API
action.yml Standardized quoting and formatting for action metadata
README.md Updated documentation with improved wording and formatting
CODE_OF_CONDUCT.md Minor formatting adjustments and wording updates
.markdown-lint.yml Added markdown linting configuration
.github/workflows/update-main-version.yml New workflow to update the main version tag
.github/workflows/linter.yml Workflow file for running Super Linter on the codebase
.github/workflows/codeql.yml Updated CodeQL configuration including a revised cron schedule
.github/workflows/ci.yml Added CI workflows for TypeScript tests and action testing
.github/workflows/check-dist.yml Modified the build step to use a consolidated bundling command
.github/dependabot.yml Updated dependency configuration with consistent quoting
Files not reviewed (9)
  • .eslintignore: Language not supported
  • .eslintrc.json: Language not supported
  • .gitattributes: Language not supported
  • .github/workflows/test.yml: Language not supported
  • .github/workflows/update-main-veresion.yml: Language not supported
  • .node-version: Language not supported
  • .prettierignore: Language not supported
  • .prettierrc.json: Language not supported
  • .vscode/launch.json: Language not supported
Comments suppressed due to low confidence (2)

.github/workflows/check-dist.yml:46

  • The build step now uses only 'npm run bundle', which replaces the previous separate build and package commands. Please verify that 'npm run bundle' performs all necessary build tasks.
run: npm run bundle

.github/workflows/codeql.yml:11

  • The cron schedule for CodeQL analysis has been updated from the previous configuration. Ensure that the new expression '31 7 * * 3' aligns with the intended analysis timing.
- cron: "31 7 * * 3"

@Justin-JHG Justin-JHG merged commit 08c82e0 into main Mar 31, 2025
21 checks passed
@Justin-JHG Justin-JHG deleted the bump-eslint branch March 31, 2025 01:04
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.

2 participants