Split out of actions/toolkit (packages/io, history kept by filter-repo). Brings the 2024 [LevK] packaging edits forward onto current upstream: - tsconfig.json: the monorepo root's compiler options inlined, no extends - jest.config.cjs: the root's ts-jest transform, rooted at tests/ (isolatedModules: ESM lib/ and sources run through CommonJS) - __tests__/ -> tests/ - package.json: test = jest, build = tsc; jest/ts-jest/typescript as devDependencies; repository, homepage, bugs on git.levk.dev - .gitignore: node_modules/, lib/, audit.json, tests/_temp/ Not carried over from 2024: version reset to 1.0.0 (dependents' ranges need upstream's numbering) and the Unlicense field (the code is MIT). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHXzGrsxfkGk8LmwrBbHNZ
25 lines
552 B
JavaScript
25 lines
552 B
JavaScript
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
clearMocks: true,
|
|
moduleFileExtensions: ['js', 'ts'],
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/tests'],
|
|
testMatch: ['**/*.test.ts'],
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
},
|
|
transform: {
|
|
'^.+\\.(ts|js)$': ['ts-jest', {
|
|
diagnostics: {warnOnly: true},
|
|
tsconfig: {
|
|
allowJs: true,
|
|
isolatedModules: true,
|
|
esModuleInterop: true,
|
|
module: 'commonjs',
|
|
moduleResolution: 'node'
|
|
}
|
|
}]
|
|
},
|
|
verbose: true
|
|
}
|