mirror of
https://github.com/actions/stale.git
synced 2026-08-22 00:23:12 +01:00
refactor: update imports to use ES module syntax and improve test structure (#1350)
- Changed import statements across multiple files to use the .js extension for ES module compatibility. - Refactored test files to utilize jest's unstable_mockModule for mocking core actions. - Removed unnecessary spy instances in tests, replacing them with direct mocked function calls. - Updated TypeScript configuration to target ES2022 and use NodeNext module resolution. - Removed the tsconfig.spec.json file and adjusted the main tsconfig.json to exclude test files.
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"target": "ES2022" /* Emit ES2022-compatible JavaScript. */,
|
||||
"module": "NodeNext" /* Use Node.js ESM module semantics. */,
|
||||
"moduleResolution": "NodeNext" /* Resolve modules using Node.js ESM rules. */,
|
||||
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"isolatedModules": true /* Improve compatibility with the NodeNext Jest/ts-jest pipeline. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
"useUnknownInCatchVariables": false /* Default catch clause variables as 'unknown' instead of 'any'. */
|
||||
//"sourceMap": true
|
||||
},
|
||||
"include": ["src", "__tests__"]
|
||||
"exclude": ["__tests__", "jest.config.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user