@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.
Files changed (99) hide show
  1. package/cdk/copy-overwrite/eslint.cdk.ts +7 -161
  2. package/cdk/copy-overwrite/tsconfig.eslint.json +5 -1
  3. package/dist/configs/jest/base.d.ts +2 -2
  4. package/dist/configs/jest/index.d.ts +5 -6
  5. package/dist/configs/jest/index.d.ts.map +1 -1
  6. package/dist/configs/jest/index.js +5 -6
  7. package/dist/configs/jest/index.js.map +1 -1
  8. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  9. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.js +17 -16
  12. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  13. package/expo/copy-overwrite/eslint.expo.ts +17 -18
  14. package/expo/copy-overwrite/tsconfig.eslint.json +5 -1
  15. package/harper-fabric/copy-overwrite/tsconfig.eslint.json +5 -1
  16. package/nestjs/copy-overwrite/eslint.nestjs.ts +7 -161
  17. package/nestjs/copy-overwrite/tsconfig.eslint.json +5 -1
  18. package/nestjs/copy-overwrite/tsconfig.spec.json +2 -3
  19. package/package.json +6 -8
  20. package/phaser/copy-overwrite/tsconfig.eslint.json +5 -1
  21. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-agy/plugin.json +1 -1
  24. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  27. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  31. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo-agy/plugin.json +1 -1
  38. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  49. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  52. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  59. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-rails-agy/plugin.json +1 -1
  66. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  70. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  73. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  77. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  80. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  84. package/scripts/check-learnings-budget.ts +4 -4
  85. package/scripts/check-typecheck-tests.mjs +88 -20
  86. package/scripts/update-node-version.ts +1 -1
  87. package/typescript/copy-overwrite/tsconfig.eslint.json +5 -1
  88. package/dist/configs/jest/cdk.d.ts +0 -33
  89. package/dist/configs/jest/cdk.d.ts.map +0 -1
  90. package/dist/configs/jest/cdk.js +0 -29
  91. package/dist/configs/jest/cdk.js.map +0 -1
  92. package/dist/configs/jest/nestjs.d.ts +0 -36
  93. package/dist/configs/jest/nestjs.d.ts.map +0 -1
  94. package/dist/configs/jest/nestjs.js +0 -49
  95. package/dist/configs/jest/nestjs.js.map +0 -1
  96. package/dist/configs/jest/typescript.d.ts +0 -29
  97. package/dist/configs/jest/typescript.d.ts.map +0 -1
  98. package/dist/configs/jest/typescript.js +0 -37
  99. package/dist/configs/jest/typescript.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills and a hand-written migration warning hook.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.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": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, 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": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -40,7 +40,7 @@ type BudgetChecker = Pick<
40
40
  "checkLearningsBudget" | "formatBudgetVerdict" | "formatDiagnosticPath"
41
41
  >;
42
42
 
43
- const REPO_ROOT = path.resolve(import.meta.dir, "..");
43
+ const REPO_ROOT = path.resolve(import.meta.dirname, "..");
44
44
 
45
45
  const TEMPLATE_LEARNINGS_FILE = path.resolve(
46
46
  REPO_ROOT,
@@ -221,7 +221,7 @@ async function check(checker: BudgetChecker, file: string): Promise<void> {
221
221
  * @returns Canonical budget-checker functions
222
222
  */
223
223
  async function loadBudgetChecker(): Promise<BudgetChecker> {
224
- const packageRoot = path.resolve(import.meta.dir, "..");
224
+ const packageRoot = path.resolve(import.meta.dirname, "..");
225
225
  const sourceTypescript = path.join(
226
226
  packageRoot,
227
227
  "src",
@@ -247,7 +247,7 @@ async function loadBudgetChecker(): Promise<BudgetChecker> {
247
247
  async function loadOverflowResolver(): Promise<
248
248
  typeof OverflowPathModule.resolveLearningsOverflowFile
249
249
  > {
250
- const packageRoot = path.resolve(import.meta.dir, "..");
250
+ const packageRoot = path.resolve(import.meta.dirname, "..");
251
251
  const sourceTypescript = path.join(
252
252
  packageRoot,
253
253
  "src",
@@ -269,7 +269,7 @@ async function loadOverflowResolver(): Promise<
269
269
  async function loadConfiguredLearningsResolver(): Promise<
270
270
  typeof ConfiguredPathModule.resolveLearningsFileFromRawConfig
271
271
  > {
272
- const packageRoot = path.resolve(import.meta.dir, "..");
272
+ const packageRoot = path.resolve(import.meta.dirname, "..");
273
273
  const sourceTypescript = path.join(
274
274
  packageRoot,
275
275
  "src",
@@ -40,6 +40,13 @@
40
40
  * token out of this header to decide the gate is probeable at all — without it
41
41
  * this sits in that sweep's declared blind spot.
42
42
  *
43
+ * `--project` POINTS IT AT ANOTHER PROGRAM. `tsconfig.eslint.json` is the
44
+ * program ESLint's type-aware rules read their types from; it once reported
45
+ * 5,294 errors while lint passed, so those rules were reasoning over `any` and
46
+ * error types (CodySwannGT/lisa#4927). `bun run typecheck:eslint` runs this
47
+ * same gate over it — same rules, same refusals, no exemption list — so that
48
+ * program cannot rot unseen again. Without the flag it checks the test program.
49
+ *
43
50
  * WHAT IS DELIBERATELY NOT DONE HERE: the declared `lib` is not widened. tsc
44
51
  * emits "Try changing the 'lib' compiler option to 'es2023' or later" on the
45
52
  * ES2023 array APIs, and taking that suggestion would have erased the
@@ -66,8 +73,40 @@ const DEFAULT_ROOT = path.resolve(
66
73
  ".."
67
74
  );
68
75
 
69
- /** The gate's name, as it prints in both the report and the refusal. */
70
- const GATE = "type-correctness (tests)";
76
+ /** The project the gate compiles when no `--project` is given. */
77
+ const DEFAULT_PROJECT = "tsconfig.tests.json";
78
+
79
+ /**
80
+ * How each known program is named in the report and the refusal. The test
81
+ * program's wording is a contract: `gate-failure-diagnosis.mjs` and the tests
82
+ * pinning this gate read it.
83
+ * @type {Readonly<Record<string, { gate: string, program: string }>>}
84
+ */
85
+ const PROGRAMS = {
86
+ "tsconfig.tests.json": {
87
+ gate: "type-correctness (tests)",
88
+ program: "the test program",
89
+ },
90
+ "tsconfig.eslint.json": {
91
+ gate: "type-correctness (eslint program)",
92
+ program: "the ESLint program",
93
+ },
94
+ };
95
+
96
+ /**
97
+ * Name a program for the report: a known one by its fixed wording, any other
98
+ * by its config file, so a new project never prints as the test program.
99
+ * @param {string} project - The tsconfig path, relative to the root.
100
+ * @returns {{ gate: string, program: string }} The gate name and program noun.
101
+ */
102
+ export function describeProgram(project) {
103
+ return (
104
+ PROGRAMS[project] ?? {
105
+ gate: `type-correctness (${project})`,
106
+ program: `the ${project} program`,
107
+ }
108
+ );
109
+ }
71
110
 
72
111
  /**
73
112
  * Where the compiler is spawned from, relative to the root: the TypeScript
@@ -117,16 +156,17 @@ function parseDiagnostics(output) {
117
156
  * NO FILE IS NAMED HERE, deliberately: nothing was compiled, so nothing is
118
157
  * known about any file.
119
158
  *
159
+ * @param {{ gate: string, program: string }} named - The program's names.
120
160
  * @param {string} because - Why the measurement could not happen.
121
161
  * @param {string} fix - The action that repairs THIS cause. Named per call
122
162
  * site rather than fixed, because telling someone to install dependencies
123
163
  * they already have is how a refusal gets dismissed as noise.
124
164
  * @returns {string} The refusal block.
125
165
  */
126
- function refuseUnmeasurable(because, fix) {
166
+ function refuseUnmeasurable(named, because, fix) {
127
167
  return cannotMeasure({
128
- gate: GATE,
129
- denial: "that the test program type-checks",
168
+ gate: named.gate,
169
+ denial: `that ${named.program} type-checks`,
130
170
  because,
131
171
  remedy: `${fix} No file was compiled, so nothing was established about any of them.`,
132
172
  });
@@ -135,9 +175,11 @@ function refuseUnmeasurable(because, fix) {
135
175
  /**
136
176
  * Run the gate.
137
177
  * @param {string} root - Directory to resolve the project under.
178
+ * @param {string} [project] - The tsconfig to compile, relative to the root.
138
179
  * @returns {number} The process exit code.
139
180
  */
140
- export function main(root) {
181
+ export function main(root, project = DEFAULT_PROJECT) {
182
+ const named = describeProgram(project);
141
183
  // PRECONDITION. Checked before the spawn rather than inferred from it: the
142
184
  // spawn SUCCEEDS with an empty `node_modules` — node starts, and it is node
143
185
  // that cannot find the module — so `tsc.error` never fires and the failure
@@ -146,6 +188,7 @@ export function main(root) {
146
188
  if (missing.length > 0) {
147
189
  console.error(
148
190
  refuseUnmeasurable(
191
+ named,
149
192
  `the TypeScript native compiler (tsgo) is not installed — no file at ${missing[0]}.`,
150
193
  `Run \`${INSTALL_COMMAND}\`, then re-run this gate.`
151
194
  )
@@ -161,7 +204,7 @@ export function main(root) {
161
204
  "--pretty",
162
205
  "false",
163
206
  "-p",
164
- path.join(root, "tsconfig.tests.json"),
207
+ path.join(root, project),
165
208
  ],
166
209
  { cwd: root, encoding: "utf-8", maxBuffer: 64 * 1024 * 1024 }
167
210
  );
@@ -189,6 +232,7 @@ export function main(root) {
189
232
  .find(Boolean);
190
233
  console.error(
191
234
  refuseUnmeasurable(
235
+ named,
192
236
  `tsgo exited ${tsc.status} without emitting one diagnostic this gate ` +
193
237
  `could parse, so the check had no subject.` +
194
238
  `${firstLine ? ` First output line: ${firstLine}` : ""}`,
@@ -201,7 +245,7 @@ export function main(root) {
201
245
  const offenders = [...errorsByFile.keys()].sort();
202
246
  const totalErrors = [...errorsByFile.values()].reduce((sum, n) => sum + n, 0);
203
247
  console.log(
204
- `${GATE}: ${errorsByFile.size} file(s) with ${totalErrors} error(s).`
248
+ `${named.gate}: ${errorsByFile.size} file(s) with ${totalErrors} error(s).`
205
249
  );
206
250
 
207
251
  if (offenders.length > 0) {
@@ -212,32 +256,56 @@ export function main(root) {
212
256
  }
213
257
  console.error("");
214
258
  console.error(
215
- "Fix each at its cause. There is no exemption list: every file in the"
259
+ "Fix each at its cause. There is no exemption list: every file in"
216
260
  );
217
- console.error("test program is type-checked, and one error fails it.");
261
+ console.error(`${named.program} is type-checked, and one error fails it.`);
218
262
  return 1;
219
263
  }
220
264
 
221
- console.log("✅ The test program type-checks with no errors.");
265
+ const program =
266
+ named.program.charAt(0).toUpperCase() + named.program.slice(1);
267
+ console.log(`✅ ${program} type-checks with no errors.`);
222
268
  return 0;
223
269
  }
224
270
 
225
271
  /**
226
- * Resolve the root from `--root <dir>`, defaulting to the repository.
272
+ * Read the value following `flag`, or undefined when the flag is absent.
227
273
  * @param {ReadonlyArray<string>} argv - Arguments after the script name.
228
- * @returns {string} The absolute root.
274
+ * @param {string} flag - The flag, e.g. `--root`.
275
+ * @returns {string | undefined} The flag's value.
229
276
  */
230
- export function rootFrom(argv) {
231
- const flag = argv.indexOf("--root");
232
- if (flag === -1) return DEFAULT_ROOT;
233
- const value = argv[flag + 1];
277
+ function flagValue(argv, flag) {
278
+ const index = argv.indexOf(flag);
279
+ if (index === -1) return undefined;
280
+ const value = argv[index + 1];
234
281
  if (value === undefined) {
235
- console.error("check-typecheck-tests: --root requires a value");
282
+ console.error(`check-typecheck-tests: ${flag} requires a value`);
236
283
  process.exit(2);
237
284
  }
238
- return path.resolve(value);
285
+ return value;
286
+ }
287
+
288
+ /**
289
+ * Resolve the root from `--root <dir>`, defaulting to the repository.
290
+ * @param {ReadonlyArray<string>} argv - Arguments after the script name.
291
+ * @returns {string} The absolute root.
292
+ */
293
+ export function rootFrom(argv) {
294
+ const value = flagValue(argv, "--root");
295
+ return value === undefined ? DEFAULT_ROOT : path.resolve(value);
296
+ }
297
+
298
+ /**
299
+ * Resolve the project from `--project <tsconfig>`, relative to the root and
300
+ * defaulting to the test program.
301
+ * @param {ReadonlyArray<string>} argv - Arguments after the script name.
302
+ * @returns {string} The tsconfig path relative to the root.
303
+ */
304
+ export function projectFrom(argv) {
305
+ return flagValue(argv, "--project") ?? DEFAULT_PROJECT;
239
306
  }
240
307
 
241
308
  if (invokedAsScript(import.meta.url)) {
242
- process.exit(main(rootFrom(process.argv.slice(2))));
309
+ const argv = process.argv.slice(2);
310
+ process.exit(main(rootFrom(argv), projectFrom(argv)));
243
311
  }
@@ -136,7 +136,7 @@ function readNvmrcVersion(): string {
136
136
  * Extracts the major version from a semver string
137
137
  */
138
138
  function getMajorVersion(version: string): string {
139
- return version.split(".")[0];
139
+ return version.split(".").at(0) ?? version;
140
140
  }
141
141
 
142
142
  /**
@@ -1,12 +1,16 @@
1
1
  {
2
+ "//": "The program ESLint's type-aware rules read types from. It must resolve what the code really uses, or those rules see `any` and error types. It sets no `types` list, so it inherits the host's own (tsconfig.json, tsconfig.local.json) instead of overriding it; one here would also drop any ambient @types package the host names. This stack runs Vitest with `globals: true`, so `files` adds Vitest's global declarations on top. allowJs without checkJs lets TypeScript files import local .js/.mjs modules with inferred types instead of `any`, without type-checking the JavaScript.",
2
3
  "extends": "./tsconfig.json",
3
4
  "compilerOptions": {
4
5
  "rootDir": ".",
5
6
  "noEmit": true,
6
7
  "allowImportingTsExtensions": true,
7
8
  "module": "preserve",
8
- "moduleResolution": "bundler"
9
+ "moduleResolution": "bundler",
10
+ "allowJs": true,
11
+ "checkJs": false
9
12
  },
13
+ "files": ["node_modules/vitest/globals.d.ts"],
10
14
  "include": ["**/*.ts"],
11
15
  "exclude": ["node_modules", "dist", "build", "worktrees"]
12
16
  }
@@ -1,33 +0,0 @@
1
- /**
2
- * Jest Configuration - CDK Stack
3
- *
4
- * Provides AWS CDK-specific Jest 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
- * @see https://jestjs.io/docs/configuration
11
- * @module configs/jest/cdk
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 CDK Jest config factory.
18
- */
19
- interface CdkJestOptions {
20
- /** Coverage thresholds (merged defaults + project overrides) */
21
- readonly thresholds?: Config["coverageThreshold"];
22
- }
23
- /**
24
- * Creates a Jest configuration for AWS CDK 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 CDK-specific paths
28
- * @remarks CDK projects typically use CommonJS modules and keep tests in a
29
- * separate test/ directory. Coverage is collected only from lib/ and util/
30
- * directories since bin/ contains entry-point code with minimal logic.
31
- */
32
- export declare const getCdkJestConfig: ({ thresholds, }?: CdkJestOptions) => Config;
33
- //# sourceMappingURL=cdk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cdk.d.ts","sourceRoot":"","sources":["../../../src/configs/jest/cdk.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,cAAc;IACtB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;CACnD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,kBAE9B,cAAmB,KAAG,MAevB,CAAC"}