mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2026-05-31 00:12:03 +08:00
* chore: merge all Dependabot dependency updates with fixes - Update @actions/core/exec/github/io to v3/v9 (ESM-only) - Update @eslint/js to v10, @typescript-eslint/* to 8.58, eslint-plugin-jest/prettier - Update jest 29→30, typescript 5.8→6.0, @types/jest/node, prettier, rimraf, ts-jest - Update lodash 4.17→4.18 (yarn.lock only) - Add CJS test stubs for ESM-only @actions/* packages - Update tsconfig.json: target es2022, add types for node+jest - Update jest.config.js: moduleNameMapper for stubs, remove jest-circus runner - Fix new lint rules: preserve-caught-error and no-useless-assignment Agent-Logs-Url: https://github.com/JamesIves/github-pages-deploy-action/sessions/2a6d68c0-eab5-4c98-a927-2525b124ca87 Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com> * refactor: convert project to proper ESM - package.json: add "type": "module" for ESM runtime + nodenext compilation - tsconfig.json: module/moduleResolution → nodenext (ESM output with .js extensions) - src/*.ts: add .js extensions to all relative imports - __tests__/*.test.ts: add .js to relative imports, remove jest.mock() factories for @actions/* - jest.config.js → jest.config.cjs: CJS jest config, moduleNameMapper strips .js for ts-jest - __mocks__/@actions/*.js + package.json: proper Jest manual mocks (CJS, with functional implementations for integration tests) replacing __tests__/stubs/ workaround - eslint.config.mjs: ignore __mocks__/** instead of __tests__/stubs/** Agent-Logs-Url: https://github.com/JamesIves/github-pages-deploy-action/sessions/c73b8f61-87f7-4eab-8e99-d363a69f6e66 Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
23 lines
554 B
JavaScript
23 lines
554 B
JavaScript
module.exports = {
|
|
clearMocks: true,
|
|
moduleFileExtensions: ['js', 'ts'],
|
|
testEnvironment: 'node',
|
|
testMatch: ['**/*.test.ts'],
|
|
moduleNameMapper: {
|
|
// Map .js relative imports back to source .ts files for ts-jest
|
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
},
|
|
transform: {
|
|
'^.+\\.ts$': [
|
|
'ts-jest',
|
|
{
|
|
tsconfig: {module: 'commonjs', moduleResolution: 'node'}
|
|
}
|
|
]
|
|
},
|
|
verbose: true,
|
|
setupFiles: ['<rootDir>/__tests__/env.js'],
|
|
collectCoverage: true,
|
|
collectCoverageFrom: ['src/*.ts', '!src/constants.ts']
|
|
}
|