Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Update packages, migrate to ESM#1760

Open
Samirat wants to merge 9 commits into
mainfrom
samirat/esm_migration_and_package_update
Open

Update packages, migrate to ESM#1760
Samirat wants to merge 9 commits into
mainfrom
samirat/esm_migration_and_package_update

Conversation

@Samirat

@Samirat Samirat commented May 20, 2026

Copy link
Copy Markdown

Description

  • Update cache to the most recent version published from toolkit (v6)
  • Migrate to ESM (required in order to consume new packages)

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?

  • Local Tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Samirat Samirat requested a review from a team as a code owner May 20, 2026 19:51
Copilot AI review requested due to automatic review settings May 20, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.1 and related @actions/* majors; update release notes and docs to reference actions/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

Comment thread package.json
Comment thread package.json Outdated
Comment thread __tests__/saveImpl.test.ts Outdated
Comment thread __tests__/saveImpl.test.ts Outdated
Comment thread __tests__/saveImpl.test.ts Outdated
Comment thread __tests__/saveImpl.test.ts Outdated
Comment thread __tests__/actionUtils.test.ts
Comment thread __tests__/restoreImpl.test.ts
Comment thread README.md Outdated
Comment thread README.md Outdated
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.

3 participants