Update @actions/core to v3#70
Merged
AnHeuermann merged 1 commit intoOpenModelica:mainfrom Feb 3, 2026
Merged
Conversation
18d2829 to
cad9952
Compare
AnHeuermann
requested changes
Feb 2, 2026
Member
AnHeuermann
left a comment
There was a problem hiding this comment.
Move the mocks into __fixtures__/core.ts if possible.
Comment on lines
+25
to
+37
| const debugMock = jest | ||
| .fn<(message: string) => void>() | ||
| .mockImplementation(msg => console.log(`::debug::${msg}`)) | ||
| const infoMock = jest | ||
| .fn<(message: string) => void>() | ||
| .mockImplementation(msg => console.log(`::info::${msg}`)) | ||
| const errorMock = jest | ||
| .fn<(message: string | Error) => void>() | ||
| .mockImplementation(msg => console.log(`::error::${msg}`)) | ||
| const getInputMock = | ||
| jest.fn<(name: string, options?: { required?: boolean }) => string>() | ||
| const setFailedMock = jest.fn<(message: string | Error) => void>() | ||
| const setOutputMock = jest.fn<(name: string, value: unknown) => void>() |
Member
There was a problem hiding this comment.
@JKRT can you move all the mocking definitions to fixture/core.ts like in https://github.com/actions/typescript-action/blob/main/__fixtures__/core.ts?
Member
There was a problem hiding this comment.
The import is done in https://github.com/actions/typescript-action/blob/main/__tests__/main.test.ts#L8-L14
7484054 to
24e2194
Compare
Member
Author
AnHeuermann
approved these changes
Feb 3, 2026
Member
AnHeuermann
left a comment
There was a problem hiding this comment.
We need to fix the pip upgrade error on Windows in another PR an then this is good to go.
This updates @actions/core from v2 to v3, which is an ESM-only package. Changes required for ESM compatibility: - Add jest.config.mjs with ts-jest ESM preset - Update test script to use --experimental-vm-modules - Update test files to use jest.unstable_mockModule() for ESM mocking - Import jest from @jest/globals instead of using globals - Use dynamic imports after setting up mocks - Fix __dirname usage in src/collect.ts using import.meta.url Fixes OpenModelica#66 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
24e2194 to
0926b75
Compare
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.
This updates @actions/core from v2 to v3, which is an ESM-only package.
Changes required for ESM compatibility:
Fixes #66
@AnHeuermann Let's see how this goes