Update packages, migrate to ESM#1760
Open
Samirat wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the action to the latest @actions/* toolkit majors (cache v6) and attempts to migrate the repository/tooling to ESM, including updating documentation references and adjusting the Jest test setup for ESM.
Changes:
- Bump action/toolkit dependencies to
@actions/cache@^6.0.1and related@actions/*majors; update release notes and docs to referenceactions/cache@v6. - Switch the package to ESM (
"type": "module") and update TS compiler settings for newer Node/ES targets. - Migrate Jest configuration/tests to an ESM-compatible setup (
jest.config.ts,unstable_mockModule, ESM transforms).
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updates TS target/module settings for ESM + modern Node, adjusts excludes. |
| tips-and-workarounds.md | Updates usage examples to actions/cache@v6. |
| RELEASES.md | Adds v6.0.0 changelog entry. |
| README.md | Updates docs to reference actions/cache@v6 and notes v6 changes. |
| package.json | Bumps version/deps, sets ESM package type, updates Jest invocation. |
| jest.config.ts | Adds new TS-based Jest config for ESM + ts-jest. |
| jest.config.js | Removes previous CJS Jest config. |
| examples.md | Updates usage examples to actions/cache@v6. |
| caching-strategies.md | Updates usage examples to actions/cache@v6 / restore/save @v6. |
| tests/stateProvider.test.ts | Migrates tests to ESM-style mocking/imports. |
| tests/saveOnly.test.ts | Migrates tests to ESM-style mocking/imports. |
| tests/saveImpl.test.ts | Migrates tests to ESM-style mocking/imports; adjusts warning expectations. |
| tests/save.test.ts | Migrates tests to ESM-style mocking/imports. |
| tests/restoreOnly.test.ts | Migrates tests to ESM-style mocking/imports. |
| tests/restoreImpl.test.ts | Migrates tests to ESM-style mocking/imports; adjusts error simulation. |
| tests/restore.test.ts | Migrates tests to ESM-style mocking/imports. |
| tests/actionUtils.test.ts | Migrates tests to ESM-style mocking/imports; simplifies assertions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 15/18 changed files
- Comments generated: 6
boxofyellow
reviewed
May 20, 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.
Description
Motivation and Context
Related to https://github.com/github/c2c-actions-support/issues/6176 and in general this package needed more work to keep it from falling farther out of date.
The ESM migration is necessary in order to consume any new versions of the cache package
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: