Skip to content

Conversation

@danwkennedy
Copy link
Contributor

@danwkennedy danwkennedy commented Jan 28, 2026

Description

We're upgrading all the packages in this repo to ESM modules. @actions/core can go next since @actions/exec and @actions/http-client are already modules.

@danwkennedy danwkennedy requested a review from a team as a code owner January 28, 2026 21:18
Copilot AI review requested due to automatic review settings January 28, 2026 21:18
Copy link
Contributor

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 PR converts the @actions/core package from CommonJS to ESM (ECMAScript Modules), introducing a breaking change that requires a major version bump to 3.0.0. CommonJS consumers will need to use dynamic import() instead of require().

Changes:

  • Convert module system from CommonJS to ESM with appropriate TypeScript configuration
  • Add .js extensions to all internal import statements as required by ESM
  • Update package.json with "type": "module" and exports field configuration
  • Upgrade dependencies to ESM-compatible versions (@actions/exec@3.0.0, @actions/http-client@4.0.0)

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/package.json Added "type": "module", exports field, bumped version to 3.0.0, updated dependencies to ESM versions
packages/core/package-lock.json Updated lockfile with new dependency versions and their transitive dependencies
packages/core/tsconfig.json Added module and moduleResolution settings for Node16 ESM support
packages/core/src/core.ts Added .js extensions to all internal imports
packages/core/src/utils.ts Added .js extensions to internal imports
packages/core/src/oidc-utils.ts Added .js extension to core import
packages/core/src/file-command.ts Added .js extension to utils import
packages/core/src/command.ts Added .js extension to utils import
packages/core/tests/core.test.ts Added .js extensions to internal imports in tests
packages/core/tests/summary.test.ts Added .js extension to summary import
packages/core/tests/platform.test.ts Added .js extension to core import
packages/core/tests/path-utils.test.ts Added .js extension to path-utils import
packages/core/tests/command.test.ts Added .js extension to command import
packages/core/RELEASES.md Added 3.0.0 release notes documenting the ESM conversion and minor formatting improvements
jest.config.js Added module name mappers for @actions/core, @actions/exec, and @actions/http-client/lib/interfaces, updated transformIgnorePatterns
Files not reviewed (1)
  • packages/core/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danwkennedy danwkennedy merged commit ed3ea3b into main Jan 29, 2026
27 of 29 checks passed
@schneidergithub
Copy link

Man this breaking change might create havoc and a support surge, good luck!

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.

4 participants