ESM-only with updated @octokit dependencies#2260
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Converts @actions/github to an ESM-only package (v9.0.0) and updates Octokit type references to use the supported @octokit/core/types entrypoint.
Changes:
- Switch package publishing/runtime to ESM (
type: module,exports, TSmodule/moduleResolution: node16, add.jsextensions in internal imports). - Fix public type references by importing Octokit types from
@octokit/core/types. - Update Jest config/tests and docs/release notes for the ESM-only breaking change.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/github/tsconfig.json | Switch TS emit/resolution to Node16 ESM semantics. |
| packages/github/src/utils.ts | Update local imports to .js and adjust Octokit type import path. |
| packages/github/src/internal/utils.ts | Adjust Octokit type import path to supported entrypoint. |
| packages/github/src/github.ts | Update local imports to .js and Octokit type imports. |
| packages/github/src/context.ts | Update local import to .js for ESM runtime compatibility. |
| packages/github/package.json | Mark package as ESM-only, add exports, bump version to 9.0.0, adjust test script. |
| packages/github/package-lock.json | Bump locked package version to 9.0.0. |
| packages/github/jest.config.js | Convert Jest config to ESM + enable ts-jest ESM mode and .js import mapping. |
| packages/github/tests/lib.test.ts | Update tests to ESM-friendly patterns (import.meta.url, no require). |
| packages/github/RELEASES.md | Document v9.0.0 breaking change and type fix. |
| packages/github/README.md | Document ESM-only usage and update examples. |
Files not reviewed (1)
- packages/github/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d622f93 to
21b33ca
Compare
5309251 to
3546b6e
Compare
f46aecc to
b05d26b
Compare
luketomlinson
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate
@actions/githubto ESM-only (v9.0.0) to properly support@octokit/corev7's type exports and resolve TypeScript compilation issues.Motivation
The v8.0.0 release upgraded
@octokitdependencies but had broken TypeScript types because@octokit/corev7 is ESM-only and its type exports (OctokitOptions,OctokitPlugin) can only be properly imported usingmoduleResolution: "node16". Converting@actions/githubto ESM resolves this.Breaking Changes
@actions/githubv9.0.0 is now ESM-onlyimport():Fixes: #2254