@codyswann/lisa 5.14.3 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdk/copy-overwrite/eslint.cdk.ts +7 -161
- package/cdk/copy-overwrite/tsconfig.eslint.json +5 -1
- package/dist/configs/jest/base.d.ts +2 -2
- package/dist/configs/jest/index.d.ts +5 -6
- package/dist/configs/jest/index.d.ts.map +1 -1
- package/dist/configs/jest/index.js +5 -6
- package/dist/configs/jest/index.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +17 -16
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/copy-overwrite/eslint.expo.ts +17 -18
- package/expo/copy-overwrite/tsconfig.eslint.json +5 -1
- package/harper-fabric/copy-overwrite/tsconfig.eslint.json +5 -1
- package/nestjs/copy-overwrite/eslint.nestjs.ts +7 -161
- package/nestjs/copy-overwrite/tsconfig.eslint.json +5 -1
- package/nestjs/copy-overwrite/tsconfig.spec.json +2 -3
- package/package.json +6 -8
- package/phaser/copy-overwrite/tsconfig.eslint.json +5 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/scripts/check-learnings-budget.ts +4 -4
- package/scripts/check-typecheck-tests.mjs +88 -20
- package/scripts/update-node-version.ts +1 -1
- package/typescript/copy-overwrite/tsconfig.eslint.json +5 -1
- package/dist/configs/jest/cdk.d.ts +0 -33
- package/dist/configs/jest/cdk.d.ts.map +0 -1
- package/dist/configs/jest/cdk.js +0 -29
- package/dist/configs/jest/cdk.js.map +0 -1
- package/dist/configs/jest/nestjs.d.ts +0 -36
- package/dist/configs/jest/nestjs.d.ts.map +0 -1
- package/dist/configs/jest/nestjs.js +0 -49
- package/dist/configs/jest/nestjs.js.map +0 -1
- package/dist/configs/jest/typescript.d.ts +0 -29
- package/dist/configs/jest/typescript.d.ts.map +0 -1
- package/dist/configs/jest/typescript.js +0 -37
- package/dist/configs/jest/typescript.js.map +0 -1
package/dist/configs/jest/cdk.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, } from "./base.js";
|
|
2
|
-
// Re-export base utilities for entry-point configs
|
|
3
|
-
export { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, };
|
|
4
|
-
/**
|
|
5
|
-
* Creates a Jest configuration for AWS CDK projects.
|
|
6
|
-
* @param options - Configuration options for threshold overrides
|
|
7
|
-
* @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
|
|
8
|
-
* @returns Jest config object with ts-jest transform, node environment, and CDK-specific paths
|
|
9
|
-
* @remarks CDK projects typically use CommonJS modules and keep tests in a
|
|
10
|
-
* separate test/ directory. Coverage is collected only from lib/ and util/
|
|
11
|
-
* directories since bin/ contains entry-point code with minimal logic.
|
|
12
|
-
*/
|
|
13
|
-
export const getCdkJestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
|
|
14
|
-
testEnvironment: "node",
|
|
15
|
-
roots: ["<rootDir>/test"],
|
|
16
|
-
testRegex: "(.*\\.(test|spec|integration-test|integration-spec)\\.ts)$",
|
|
17
|
-
transform: {
|
|
18
|
-
"^.+\\.ts$": "ts-jest",
|
|
19
|
-
},
|
|
20
|
-
moduleFileExtensions: ["js", "json", "ts"],
|
|
21
|
-
collectCoverageFrom: [
|
|
22
|
-
"lib/**/*.ts",
|
|
23
|
-
"util/**/*.ts",
|
|
24
|
-
...defaultCoverageExclusions,
|
|
25
|
-
],
|
|
26
|
-
...(thresholds !== undefined ? { coverageThreshold: thresholds } : {}),
|
|
27
|
-
testTimeout: 10000,
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=cdk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.js","sourceRoot":"","sources":["../../../src/configs/jest/cdk.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,CAAC;AAUF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,UAAU,GAAG,iBAAiB,MACZ,EAAE,EAAU,EAAE,CAAC,CAAC;IAClC,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzB,SAAS,EAAE,4DAA4D;IACvE,SAAS,EAAE;QACT,WAAW,EAAE,SAAS;KACvB;IACD,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC;IAC1C,mBAAmB,EAAE;QACnB,aAAa;QACb,cAAc;QACd,GAAG,yBAAyB;KAC7B;IACD,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Jest Configuration - NestJS Stack
|
|
3
|
-
*
|
|
4
|
-
* Provides NestJS-specific Jest configuration with extensive coverage
|
|
5
|
-
* exclusions for generated files, DTOs, entities, and modules.
|
|
6
|
-
*
|
|
7
|
-
* Inheritance chain:
|
|
8
|
-
* nestjs.ts (this file)
|
|
9
|
-
* └── base.ts
|
|
10
|
-
* @see https://jestjs.io/docs/configuration
|
|
11
|
-
* @module configs/jest/nestjs
|
|
12
|
-
*/
|
|
13
|
-
import type { Config } from "jest";
|
|
14
|
-
import { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds } from "./base.js";
|
|
15
|
-
export { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, };
|
|
16
|
-
/**
|
|
17
|
-
* Options for configuring the NestJS Jest config factory.
|
|
18
|
-
*/
|
|
19
|
-
interface NestjsJestOptions {
|
|
20
|
-
/** Coverage thresholds (merged defaults + project overrides) */
|
|
21
|
-
readonly thresholds?: Config["coverageThreshold"];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a Jest configuration for NestJS projects.
|
|
25
|
-
* @param options - Configuration options for threshold overrides
|
|
26
|
-
* @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
|
|
27
|
-
* @returns Jest config object with ts-jest transform, node environment, and NestJS-specific exclusions
|
|
28
|
-
* @remarks NestJS projects use CommonJS modules and spec.ts test file convention.
|
|
29
|
-
* Uses tsconfig.spec.json for ts-jest diagnostics because the main tsconfig.json
|
|
30
|
-
* excludes spec files from compilation — without this, path aliases used only in
|
|
31
|
-
* test files (e.g. @test-utils) fail to resolve during type checking.
|
|
32
|
-
* Coverage excludes entities, DTOs, modules, and other boilerplate files
|
|
33
|
-
* that are better validated through integration tests.
|
|
34
|
-
*/
|
|
35
|
-
export declare const getNestjsJestConfig: ({ thresholds, }?: NestjsJestOptions) => Config;
|
|
36
|
-
//# sourceMappingURL=nestjs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/configs/jest/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,CAAC;AAEF;;GAEG;AACH,UAAU,iBAAiB;IACzB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;CACnD;AAwBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,kBAEjC,iBAAsB,KAAG,MAW1B,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, } from "./base.js";
|
|
2
|
-
// Re-export base utilities for entry-point configs
|
|
3
|
-
export { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, };
|
|
4
|
-
/**
|
|
5
|
-
* NestJS-specific patterns excluded from coverage collection.
|
|
6
|
-
* These are generated or boilerplate files that don't benefit from coverage tracking.
|
|
7
|
-
*/
|
|
8
|
-
const nestjsCoverageExclusions = [
|
|
9
|
-
...defaultCoverageExclusions,
|
|
10
|
-
"!**/*.entity.ts",
|
|
11
|
-
"!**/*.dto.ts",
|
|
12
|
-
"!**/*.input.ts",
|
|
13
|
-
"!**/*.args.ts",
|
|
14
|
-
"!**/*.model.ts",
|
|
15
|
-
"!**/*.module.ts",
|
|
16
|
-
"!**/*.factory.ts",
|
|
17
|
-
"!**/*.enum.ts",
|
|
18
|
-
"!**/*.interface.ts",
|
|
19
|
-
"!**/*.constants.ts",
|
|
20
|
-
"!**/database/migrations/**",
|
|
21
|
-
"!**/database/seeds/**",
|
|
22
|
-
"!**/graphql/**",
|
|
23
|
-
"!**/main.ts",
|
|
24
|
-
];
|
|
25
|
-
/**
|
|
26
|
-
* Creates a Jest configuration for NestJS projects.
|
|
27
|
-
* @param options - Configuration options for threshold overrides
|
|
28
|
-
* @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
|
|
29
|
-
* @returns Jest config object with ts-jest transform, node environment, and NestJS-specific exclusions
|
|
30
|
-
* @remarks NestJS projects use CommonJS modules and spec.ts test file convention.
|
|
31
|
-
* Uses tsconfig.spec.json for ts-jest diagnostics because the main tsconfig.json
|
|
32
|
-
* excludes spec files from compilation — without this, path aliases used only in
|
|
33
|
-
* test files (e.g. @test-utils) fail to resolve during type checking.
|
|
34
|
-
* Coverage excludes entities, DTOs, modules, and other boilerplate files
|
|
35
|
-
* that are better validated through integration tests.
|
|
36
|
-
*/
|
|
37
|
-
export const getNestjsJestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
|
|
38
|
-
testEnvironment: "node",
|
|
39
|
-
rootDir: "src",
|
|
40
|
-
testRegex: ".*\\.spec\\.ts$",
|
|
41
|
-
transform: {
|
|
42
|
-
"^.+\\.ts$": ["ts-jest", { tsconfig: "tsconfig.spec.json" }],
|
|
43
|
-
},
|
|
44
|
-
moduleFileExtensions: ["js", "json", "ts"],
|
|
45
|
-
collectCoverageFrom: ["**/*.ts", ...nestjsCoverageExclusions],
|
|
46
|
-
...(thresholds !== undefined ? { coverageThreshold: thresholds } : {}),
|
|
47
|
-
testTimeout: 10000,
|
|
48
|
-
});
|
|
49
|
-
//# sourceMappingURL=nestjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/configs/jest/nestjs.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,CAAC;AAUF;;;GAGG;AACH,MAAM,wBAAwB,GAAsB;IAClD,GAAG,yBAAyB;IAC5B,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,oBAAoB;IACpB,oBAAoB;IACpB,4BAA4B;IAC5B,uBAAuB;IACvB,gBAAgB;IAChB,aAAa;CACd,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,GAAG,iBAAiB,MACT,EAAE,EAAU,EAAE,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM;IACvB,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE;QACT,WAAW,EAAE,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;KAC7D;IACD,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC;IAC1C,mBAAmB,EAAE,CAAC,SAAS,EAAE,GAAG,wBAAwB,CAAC;IAC7D,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Jest Configuration - TypeScript Stack
|
|
3
|
-
*
|
|
4
|
-
* Provides TypeScript/Node-specific Jest configuration.
|
|
5
|
-
* Imports shared utilities from the base module.
|
|
6
|
-
* Stack-specific configs (expo, nestjs, cdk) should import and extend this.
|
|
7
|
-
* @see https://jestjs.io/docs/configuration
|
|
8
|
-
* @module configs/jest/typescript
|
|
9
|
-
*/
|
|
10
|
-
import type { Config } from "jest";
|
|
11
|
-
import { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, worktreeTestPathIgnorePatterns } from "./base.js";
|
|
12
|
-
export { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, worktreeTestPathIgnorePatterns, };
|
|
13
|
-
/**
|
|
14
|
-
* Options for configuring the TypeScript Jest config factory.
|
|
15
|
-
*/
|
|
16
|
-
interface TypescriptJestOptions {
|
|
17
|
-
/** Coverage thresholds (merged defaults + project overrides) */
|
|
18
|
-
readonly thresholds?: Config["coverageThreshold"];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Creates a Jest configuration for TypeScript/Node projects using ts-jest.
|
|
22
|
-
* @param options - Configuration options for threshold overrides
|
|
23
|
-
* @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
|
|
24
|
-
* @returns Jest config object with ts-jest transform, ESM support, and coverage settings
|
|
25
|
-
* @remarks Uses ts-jest ESM preset for projects with "type": "module" in package.json.
|
|
26
|
-
* Projects needing CommonJS should override the preset in jest.config.local.ts.
|
|
27
|
-
*/
|
|
28
|
-
export declare const getTypescriptJestConfig: ({ thresholds, }?: TypescriptJestOptions) => Config;
|
|
29
|
-
//# sourceMappingURL=typescript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/jest/typescript.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,8BAA8B,GAC/B,CAAC;AAEF;;GAEG;AACH,UAAU,qBAAqB;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;CACnD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,kBAErC,qBAA0B,KAAG,MAwB9B,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, worktreeTestPathIgnorePatterns, } from "./base.js";
|
|
2
|
-
// Re-export base utilities for stack-specific configs to use
|
|
3
|
-
export { defaultCoverageExclusions, defaultThresholds, mergeConfigs, mergeThresholds, worktreeTestPathIgnorePatterns, };
|
|
4
|
-
/**
|
|
5
|
-
* Creates a Jest configuration for TypeScript/Node projects using ts-jest.
|
|
6
|
-
* @param options - Configuration options for threshold overrides
|
|
7
|
-
* @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
|
|
8
|
-
* @returns Jest config object with ts-jest transform, ESM support, and coverage settings
|
|
9
|
-
* @remarks Uses ts-jest ESM preset for projects with "type": "module" in package.json.
|
|
10
|
-
* Projects needing CommonJS should override the preset in jest.config.local.ts.
|
|
11
|
-
*/
|
|
12
|
-
export const getTypescriptJestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
|
|
13
|
-
preset: "ts-jest/presets/default-esm",
|
|
14
|
-
testEnvironment: "node",
|
|
15
|
-
testMatch: ["<rootDir>/tests/**/*.test.ts", "<rootDir>/src/**/*.test.ts"],
|
|
16
|
-
testPathIgnorePatterns: [
|
|
17
|
-
"/node_modules/",
|
|
18
|
-
"/dist/",
|
|
19
|
-
...worktreeTestPathIgnorePatterns(),
|
|
20
|
-
],
|
|
21
|
-
moduleNameMapper: {
|
|
22
|
-
"^(\\.{1,2}/.*)\\.js$": "$1",
|
|
23
|
-
},
|
|
24
|
-
transform: {
|
|
25
|
-
"^.+\\.tsx?$": [
|
|
26
|
-
"ts-jest",
|
|
27
|
-
{
|
|
28
|
-
useESM: true,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
extensionsToTreatAsEsm: [".ts"],
|
|
33
|
-
collectCoverageFrom: ["src/**/*.ts", ...defaultCoverageExclusions],
|
|
34
|
-
...(thresholds !== undefined ? { coverageThreshold: thresholds } : {}),
|
|
35
|
-
testTimeout: 10000,
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=typescript.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/configs/jest/typescript.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,8BAA8B,GAC/B,MAAM,WAAW,CAAC;AAEnB,6DAA6D;AAC7D,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,8BAA8B,GAC/B,CAAC;AAUF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,UAAU,GAAG,iBAAiB,MACL,EAAE,EAAU,EAAE,CAAC,CAAC;IACzC,MAAM,EAAE,6BAA6B;IACrC,eAAe,EAAE,MAAM;IACvB,SAAS,EAAE,CAAC,8BAA8B,EAAE,4BAA4B,CAAC;IACzE,sBAAsB,EAAE;QACtB,gBAAgB;QAChB,QAAQ;QACR,GAAG,8BAA8B,EAAE;KACpC;IACD,gBAAgB,EAAE;QAChB,sBAAsB,EAAE,IAAI;KAC7B;IACD,SAAS,EAAE;QACT,aAAa,EAAE;YACb,SAAS;YACT;gBACE,MAAM,EAAE,IAAI;aACb;SACF;KACF;IACD,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,mBAAmB,EAAE,CAAC,aAAa,EAAE,GAAG,yBAAyB,CAAC;IAClE,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC"}
|