Skip to content

Bump to core-3.0.0, move to vitest, support ESM modules#587

Merged
ncipollo merged 4 commits intomainfrom
ncipollo/bump-core-3.0.0
Feb 1, 2026
Merged

Bump to core-3.0.0, move to vitest, support ESM modules#587
ncipollo merged 4 commits intomainfrom
ncipollo/bump-core-3.0.0

Conversation

@ncipollo
Copy link
Owner

@ncipollo ncipollo commented Feb 1, 2026

Note

Medium Risk
Moderate risk because it changes the module system to ESM and updates GitHub Actions dependencies/test tooling, which can affect runtime imports and CI behavior despite minimal functional logic changes.

Overview
Moves the project to ESM and Vitest-based testing. Tests are migrated from Jest to vitest, including new __mocks__ for @actions/core and fs, updated mocking patterns, and updated imports to use explicit .js extensions.

Updates tooling/config. Enables Biome v2 linting/organize-imports configuration, adds a vitest.config.ts with coverage thresholds, bumps @actions/core to ^3.0.0, and expands .gitignore for Copilot/Claude local settings.

Written by Cursor Bugbot for commit c4c6215. This will update automatically on new commits. Configure here.

@ncipollo ncipollo force-pushed the ncipollo/bump-core-3.0.0 branch from 3b68110 to 3d2921a Compare February 1, 2026 21:44
export const createReadStream = vi.fn()
export const statSync = vi.fn()
export const readFileSync = vi.fn()
export const writeFileSync = vi.fn()
Copy link

Choose a reason for hiding this comment

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

Unused writeFileSync mock export

Low Severity

writeFileSync is exported as a mock function but is never used in any source or test file in the codebase. This is dead code that should be removed.

Fix in Cursor Fix in Web

@ncipollo ncipollo merged commit 3f97343 into main Feb 1, 2026
4 checks passed
@ncipollo ncipollo deleted the ncipollo/bump-core-3.0.0 branch February 1, 2026 22:51
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

const commit = "commit"
const discussionCategory = "discussionCategory"
const generateReleaseNotes = true
const _generateReleaseNotes = true
Copy link

Choose a reason for hiding this comment

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

Unused constant _generateReleaseNotes is dead code

Low Severity

The constant _generateReleaseNotes is declared but never used anywhere in the file. The createAction function uses a literal default value generateReleaseNotes = true directly in its parameter list, making this constant unnecessary dead code.

Fix in Cursor Fix in Web

const mockGetInput = vi.mocked(core.getInput)
const mockGetBooleanInput = vi.mocked(core.getBooleanInput)
const mockReadFileSync = vi.mocked(fs.readFileSync)
const _mockStatSync = vi.mocked(fs.statSync)
Copy link

Choose a reason for hiding this comment

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

Unused mock variable _mockStatSync is dead code

Low Severity

The variable _mockStatSync is created via vi.mocked(fs.statSync) but is never used in any test. Unlike mockReadFileSync and mockExistsSync which are used for setting up mock behaviors, this mock wrapper serves no purpose in the tests.

Fix in Cursor Fix in Web

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.

1 participant