@codyswann/lisa 1.65.3 → 1.66.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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
6
+ /**
7
+ * Vitest Configuration - CDK Stack
8
+ *
9
+ * Re-exports CDK-specific Vitest configuration from @codyswann/lisa.
10
+ * This file exists as a local sibling for projects that import stack
11
+ * config from a relative path.
12
+ *
13
+ * @see https://vitest.dev/config/
14
+ * @module vitest.cdk
15
+ */
16
+ export {
17
+ defaultCoverageExclusions,
18
+ defaultThresholds,
19
+ getCdkVitestConfig,
20
+ mapThresholds,
21
+ mergeThresholds,
22
+ mergeVitestConfigs,
23
+ } from "@codyswann/lisa/vitest/cdk";
24
+
25
+ export type { PortableThresholds } from "@codyswann/lisa/vitest/cdk";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
6
+ /**
7
+ * Vitest Configuration - Main Entry Point (CDK)
8
+ *
9
+ * Thin wrapper around @codyswann/lisa vitest config factory.
10
+ * Customize via vitest.config.local.ts and vitest.thresholds.json.
11
+ *
12
+ * @see https://vitest.dev/config/
13
+ * @module vitest.config
14
+ */
15
+ import {
16
+ defaultThresholds,
17
+ getCdkVitestConfig,
18
+ mergeVitestConfigs,
19
+ mergeThresholds,
20
+ } from "@codyswann/lisa/vitest/cdk";
21
+
22
+ import localConfig from "./vitest.config.local";
23
+ import thresholdsOverrides from "./vitest.thresholds.json" with { type: "json" };
24
+
25
+ export default mergeVitestConfigs(
26
+ getCdkVitestConfig({
27
+ thresholds: mergeThresholds(defaultThresholds, thresholdsOverrides),
28
+ }),
29
+ localConfig
30
+ );
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Vitest Configuration - Project-Local Customizations
3
+ *
4
+ * Add project-specific Vitest settings here. This file is create-only,
5
+ * meaning Lisa will create it but never overwrite your customizations.
6
+ *
7
+ * Example:
8
+ * ```ts
9
+ * import type { ViteUserConfig } from "vitest/config";
10
+ *
11
+ * const config: ViteUserConfig = {
12
+ * resolve: {
13
+ * alias: {
14
+ * "@/": new URL("./src/", import.meta.url).pathname,
15
+ * },
16
+ * },
17
+ * };
18
+ *
19
+ * export default config;
20
+ * ```
21
+ *
22
+ * @see https://vitest.dev/config/
23
+ * @module vitest.config.local
24
+ */
25
+ import type { ViteUserConfig } from "vitest/config";
26
+
27
+ const config: ViteUserConfig = {
28
+ // Add project-specific settings here
29
+ };
30
+
31
+ export default config;
@@ -0,0 +1,8 @@
1
+ {
2
+ "global": {
3
+ "statements": 70,
4
+ "branches": 70,
5
+ "functions": 70,
6
+ "lines": 70
7
+ }
8
+ }
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "paths": [
3
- "vitest.config.ts",
4
- "vitest.config.local.ts",
5
- "vitest.thresholds.json"
3
+ "jest.config.ts",
4
+ "jest.config.local.ts",
5
+ "jest.cdk.ts",
6
+ "jest.base.ts",
7
+ "jest.thresholds.json"
6
8
  ]
7
9
  }
@@ -5,11 +5,11 @@
5
5
  "cdk": "cdk",
6
6
  "build": "tsc --noEmit",
7
7
  "prepare": "husky install || true",
8
- "test": "NODE_ENV=test jest --passWithNoTests",
9
- "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\" --passWithNoTests",
10
- "test:integration": "NODE_ENV=test jest --testPathPatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\" --passWithNoTests",
11
- "test:cov": "NODE_ENV=test jest --coverage",
12
- "test:watch": "NODE_ENV=test jest --watch"
8
+ "test": "vitest run",
9
+ "test:unit": "vitest run --exclude='**/integration/**'",
10
+ "test:integration": "vitest run test/integration",
11
+ "test:cov": "vitest run --coverage",
12
+ "test:watch": "vitest"
13
13
  },
14
14
  "dependencies": {
15
15
  "@aws-cdk/aws-amplify-alpha": "^2.235.0-alpha.0",
@@ -21,10 +21,8 @@
21
21
  "devDependencies": {
22
22
  "@codyswann/lisa": "^1.54.6",
23
23
  "aws-cdk": "^2.1104.0",
24
- "jest": "^30.0.0",
25
- "ts-jest": "^29.4.6",
26
- "@types/jest": "^30.0.0",
27
- "@jest/test-sequencer": "^30.2.0"
24
+ "vitest": "^4.1.0",
25
+ "@vitest/coverage-v8": "^4.1.0"
28
26
  },
29
27
  "bin": {
30
28
  "infrastructure": "bin/infrastructure.js"
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Vitest Configuration - CDK Stack
3
+ *
4
+ * Provides AWS CDK-specific Vitest configuration targeting
5
+ * the test/ directory with test/spec and integration-test/integration-spec patterns.
6
+ *
7
+ * Inheritance chain:
8
+ * cdk.ts (this file)
9
+ * +-- base.ts
10
+ *
11
+ * @see https://vitest.dev/config/
12
+ * @module configs/vitest/cdk
13
+ */
14
+ import type { ViteUserConfig } from "vitest/config";
15
+ /** Vite UserConfig augmented with Vitest's `test` property */
16
+ type UserConfig = ViteUserConfig;
17
+ import { defaultCoverageExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs } from "./base.js";
18
+ import type { PortableThresholds } from "./base.js";
19
+ export { defaultCoverageExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
20
+ export type { PortableThresholds };
21
+ /**
22
+ * Options for configuring the CDK Vitest config factory.
23
+ */
24
+ interface CdkVitestOptions {
25
+ /** Coverage thresholds in portable format (merged defaults + project overrides) */
26
+ readonly thresholds?: PortableThresholds;
27
+ }
28
+ /**
29
+ * Creates a Vitest configuration for AWS CDK projects.
30
+ *
31
+ * Unlike the Jest equivalent, no `ts-jest` is needed — Vitest transforms
32
+ * TypeScript natively via esbuild. CDK projects keep tests in a separate
33
+ * test/ directory and collect coverage only from lib/ and util/ since
34
+ * bin/ contains entry-point code with minimal logic.
35
+ *
36
+ * @param options - Configuration options for threshold overrides
37
+ * @param options.thresholds - Coverage thresholds in portable format
38
+ * @returns Vitest UserConfig object with node environment and CDK-specific paths
39
+ */
40
+ export declare const getCdkVitestConfig: ({ thresholds, }?: CdkVitestOptions) => UserConfig;
41
+ //# sourceMappingURL=cdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdk.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,gBAAgB;IACxB,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,qBAE5B,gBAAgB,KAAQ,UAuBzB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { defaultCoverageExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, } from "./base.js";
2
+ // Re-export base utilities for entry-point configs
3
+ export { defaultCoverageExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, };
4
+ /**
5
+ * Creates a Vitest configuration for AWS CDK projects.
6
+ *
7
+ * Unlike the Jest equivalent, no `ts-jest` is needed — Vitest transforms
8
+ * TypeScript natively via esbuild. CDK projects keep tests in a separate
9
+ * test/ directory and collect coverage only from lib/ and util/ since
10
+ * bin/ contains entry-point code with minimal logic.
11
+ *
12
+ * @param options - Configuration options for threshold overrides
13
+ * @param options.thresholds - Coverage thresholds in portable format
14
+ * @returns Vitest UserConfig object with node environment and CDK-specific paths
15
+ */
16
+ export const getCdkVitestConfig = ({ thresholds, } = {}) => ({
17
+ test: {
18
+ globals: true,
19
+ environment: "node",
20
+ root: "test",
21
+ include: [
22
+ "**/*.test.ts",
23
+ "**/*.spec.ts",
24
+ "**/*.integration-test.ts",
25
+ "**/*.integration-spec.ts",
26
+ ],
27
+ testTimeout: 10000,
28
+ coverage: {
29
+ provider: "v8",
30
+ include: ["lib/**/*.ts", "util/**/*.ts"],
31
+ exclude: [...defaultCoverageExclusions],
32
+ thresholds: mapThresholds(thresholds
33
+ ? mergeThresholds(defaultThresholds, thresholds)
34
+ : defaultThresholds),
35
+ },
36
+ },
37
+ });
38
+ //# sourceMappingURL=cdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdk.js","sourceRoot":"","sources":["../../../src/configs/vitest/cdk.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,CAAC;AAYF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,UAAU,MACU,EAAE,EAAc,EAAE,CAAC,CAAC;IACxC,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACP,cAAc;YACd,cAAc;YACd,0BAA0B;YAC1B,0BAA0B;SAC3B;QACD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;YACxC,OAAO,EAAE,CAAC,GAAG,yBAAyB,CAAC;YACvC,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Re-exports config factories and utilities from each stack module,
5
5
  * allowing downstream projects to import from a single entry point.
6
6
  *
7
- * Note: Expo and CDK stacks remain on Jest only TypeScript and NestJS
7
+ * Note: Expo remains on Jest. TypeScript, NestJS, and CDK
8
8
  * are available as Vitest configs.
9
9
  *
10
10
  * @module configs/vitest
@@ -12,4 +12,5 @@
12
12
  export * from "./base.js";
13
13
  export * from "./typescript.js";
14
14
  export * from "./nestjs.js";
15
+ export * from "./cdk.js";
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Re-exports config factories and utilities from each stack module,
5
5
  * allowing downstream projects to import from a single entry point.
6
6
  *
7
- * Note: Expo and CDK stacks remain on Jest only TypeScript and NestJS
7
+ * Note: Expo remains on Jest. TypeScript, NestJS, and CDK
8
8
  * are available as Vitest configs.
9
9
  *
10
10
  * @module configs/vitest
@@ -12,4 +12,5 @@
12
12
  export * from "./base.js";
13
13
  export * from "./typescript.js";
14
14
  export * from "./nestjs.js";
15
+ export * from "./cdk.js";
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/configs/vitest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/configs/vitest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -72,7 +72,7 @@
72
72
  "axios": ">=1.13.5"
73
73
  },
74
74
  "name": "@codyswann/lisa",
75
- "version": "1.65.3",
75
+ "version": "1.66.0",
76
76
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
77
77
  "main": "dist/index.js",
78
78
  "exports": {
@@ -94,6 +94,7 @@
94
94
  "./vitest/base": "./dist/configs/vitest/base.js",
95
95
  "./vitest/typescript": "./dist/configs/vitest/typescript.js",
96
96
  "./vitest/nestjs": "./dist/configs/vitest/nestjs.js",
97
+ "./vitest/cdk": "./dist/configs/vitest/cdk.js",
97
98
  "./tsconfig/base": "./tsconfig/base.json",
98
99
  "./tsconfig/typescript": "./tsconfig/typescript.json",
99
100
  "./tsconfig/nestjs": "./tsconfig/nestjs.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,71 +0,0 @@
1
- /**
2
- * This file is managed by Lisa.
3
- * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
- */
5
-
6
- /**
7
- * Jest Configuration - CDK Stack
8
- *
9
- * Provides AWS CDK-specific Jest configuration targeting
10
- * the test/ directory with test/spec and integration-test/integration-spec patterns.
11
- *
12
- * Inheritance chain:
13
- * jest.cdk.ts (this file)
14
- * └── jest.base.ts
15
- *
16
- * @see https://jestjs.io/docs/configuration
17
- * @module jest.cdk
18
- */
19
- import type { Config } from "jest";
20
-
21
- import {
22
- defaultCoverageExclusions,
23
- defaultThresholds,
24
- mergeConfigs,
25
- mergeThresholds,
26
- } from "./jest.base.ts";
27
-
28
- // Re-export base utilities for entry-point configs
29
- export {
30
- defaultCoverageExclusions,
31
- defaultThresholds,
32
- mergeConfigs,
33
- mergeThresholds,
34
- };
35
-
36
- /**
37
- * Options for configuring the CDK Jest config factory.
38
- */
39
- interface CdkJestOptions {
40
- /** Coverage thresholds (merged defaults + project overrides) */
41
- readonly thresholds?: Config["coverageThreshold"];
42
- }
43
-
44
- /**
45
- * Creates a Jest configuration for AWS CDK projects.
46
- *
47
- * @param options - Configuration options for threshold overrides
48
- * @param options.thresholds - Coverage thresholds (merged defaults + project overrides)
49
- * @returns Jest config object with ts-jest transform, node environment, and CDK-specific paths
50
- * @remarks CDK projects typically use CommonJS modules and keep tests in a
51
- * separate test/ directory. Coverage is collected only from lib/ and util/
52
- * directories since bin/ contains entry-point code with minimal logic.
53
- */
54
- export const getCdkJestConfig = ({
55
- thresholds = defaultThresholds,
56
- }: CdkJestOptions = {}): Config => ({
57
- testEnvironment: "node",
58
- roots: ["<rootDir>/test"],
59
- testRegex: "(.*\\.(test|spec|integration-test|integration-spec)\\.ts)$",
60
- transform: {
61
- "^.+\\.ts$": "ts-jest",
62
- },
63
- moduleFileExtensions: ["js", "json", "ts"],
64
- collectCoverageFrom: [
65
- "lib/**/*.ts",
66
- "util/**/*.ts",
67
- ...defaultCoverageExclusions,
68
- ],
69
- coverageThreshold: thresholds,
70
- testTimeout: 10000,
71
- });
@@ -1,32 +0,0 @@
1
- /**
2
- * This file is managed by Lisa.
3
- * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
- *
5
- * @jest-config-loader esbuild-register
6
- */
7
-
8
- /**
9
- * Jest Configuration - Main Entry Point (CDK)
10
- *
11
- * Thin wrapper around @codyswann/lisa jest config factory.
12
- * Customize via jest.config.local.ts and jest.thresholds.json.
13
- *
14
- * @see https://jestjs.io/docs/configuration
15
- * @module jest.config
16
- */
17
- import {
18
- defaultThresholds,
19
- getCdkJestConfig,
20
- mergeConfigs,
21
- mergeThresholds,
22
- } from "@codyswann/lisa/jest/cdk";
23
-
24
- import localConfig from "./jest.config.local.ts";
25
- import thresholdsOverrides from "./jest.thresholds.json" with { type: "json" };
26
-
27
- export default mergeConfigs(
28
- getCdkJestConfig({
29
- thresholds: mergeThresholds(defaultThresholds, thresholdsOverrides),
30
- }),
31
- localConfig
32
- );