@codyswann/lisa 4.42.6 → 4.43.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/README.md +4 -0
- package/all/copy-overwrite/scripts/check-orphaned-branches.mjs +7 -0
- package/all/copy-overwrite/scripts/lib/process-tree-runner.mjs +12 -2
- package/all/copy-overwrite/scripts/lisa-cross-worktree-guard.mjs +4 -0
- package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +2 -0
- package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +31 -3
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +4 -0
- package/all/copy-overwrite/scripts/lisa-work-item.mjs +13 -0
- package/dist/cli/doctor-readiness-delivery.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-delivery.js +13 -6
- package/dist/cli/doctor-readiness-delivery.js.map +1 -1
- package/dist/cli/doctor-readiness-deploy-outcome.d.ts +9 -0
- package/dist/cli/doctor-readiness-deploy-outcome.d.ts.map +1 -0
- package/dist/cli/doctor-readiness-deploy-outcome.js +87 -0
- package/dist/cli/doctor-readiness-deploy-outcome.js.map +1 -0
- package/dist/cli/doctor-readiness-workflows.d.ts +8 -0
- package/dist/cli/doctor-readiness-workflows.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-workflows.js +1 -0
- package/dist/cli/doctor-readiness-workflows.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +1 -1
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +1 -0
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/cdk.d.ts +2 -2
- package/dist/configs/vitest/cdk.d.ts.map +1 -1
- package/dist/configs/vitest/cdk.js +5 -2
- package/dist/configs/vitest/cdk.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts +47 -0
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -0
- package/dist/configs/vitest/coverage-reports-directory.js +131 -0
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -0
- package/dist/configs/vitest/harper-fabric.d.ts +2 -2
- package/dist/configs/vitest/harper-fabric.d.ts.map +1 -1
- package/dist/configs/vitest/harper-fabric.js +5 -2
- package/dist/configs/vitest/harper-fabric.js.map +1 -1
- package/dist/configs/vitest/nestjs.d.ts +2 -2
- package/dist/configs/vitest/nestjs.d.ts.map +1 -1
- package/dist/configs/vitest/nestjs.js +5 -2
- package/dist/configs/vitest/nestjs.js.map +1 -1
- package/dist/configs/vitest/phaser.d.ts +2 -2
- package/dist/configs/vitest/phaser.d.ts.map +1 -1
- package/dist/configs/vitest/phaser.js +5 -2
- package/dist/configs/vitest/phaser.js.map +1 -1
- package/dist/configs/vitest/typescript.d.ts +2 -2
- package/dist/configs/vitest/typescript.d.ts.map +1 -1
- package/dist/configs/vitest/typescript.js +5 -2
- package/dist/configs/vitest/typescript.js.map +1 -1
- package/dist/core/deploy-release-dependence.d.ts +72 -0
- package/dist/core/deploy-release-dependence.d.ts.map +1 -0
- package/dist/core/deploy-release-dependence.js +236 -0
- package/dist/core/deploy-release-dependence.js.map +1 -0
- package/dist/core/github-actions-condition.d.ts +78 -0
- package/dist/core/github-actions-condition.d.ts.map +1 -0
- package/dist/core/github-actions-condition.js +307 -0
- package/dist/core/github-actions-condition.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +24 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +45 -24
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/migrations/deploy-outcome-guard-edit.d.ts +11 -0
- package/dist/migrations/deploy-outcome-guard-edit.d.ts.map +1 -0
- package/dist/migrations/deploy-outcome-guard-edit.js +184 -0
- package/dist/migrations/deploy-outcome-guard-edit.js.map +1 -0
- package/dist/migrations/deploy-outcome-guard-yaml.d.ts +91 -0
- package/dist/migrations/deploy-outcome-guard-yaml.d.ts.map +1 -0
- package/dist/migrations/deploy-outcome-guard-yaml.js +180 -0
- package/dist/migrations/deploy-outcome-guard-yaml.js.map +1 -0
- package/dist/migrations/ensure-deploy-outcome-guard.d.ts +41 -0
- package/dist/migrations/ensure-deploy-outcome-guard.d.ts.map +1 -0
- package/dist/migrations/ensure-deploy-outcome-guard.js +238 -0
- package/dist/migrations/ensure-deploy-outcome-guard.js.map +1 -0
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +3 -0
- package/dist/migrations/index.js.map +1 -1
- package/expo/copy-overwrite/scripts/bdd/baseline.mjs +26 -7
- package/package.json +5 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- package/plugins/lisa/hooks/threshold-ratchet.mjs +6 -0
- package/plugins/lisa/hooks/worktree-binding-guard.mjs +31 -3
- package/plugins/lisa/scripts/design-variable-ids.mjs +2 -0
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/lisa/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/design-variable-ids.mjs +2 -0
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- 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-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/threshold-ratchet.mjs +6 -0
- package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +31 -3
- package/plugins/lisa-copilot/scripts/design-variable-ids.mjs +2 -0
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/threshold-ratchet.mjs +6 -0
- package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +31 -3
- package/plugins/lisa-cursor/scripts/design-variable-ids.mjs +2 -0
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- 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-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-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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-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-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-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-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/scripts/ingest-git.mjs +2 -0
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/scripts/ingest-git.mjs +2 -0
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/scripts/ingest-git.mjs +2 -0
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/scripts/ingest-git.mjs +2 -0
- package/plugins/src/base/hooks/threshold-ratchet.mjs +6 -0
- package/plugins/src/base/hooks/worktree-binding-guard.mjs +31 -3
- package/plugins/src/base/scripts/design-variable-ids.mjs +2 -0
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/bootstrap-store.mjs +3 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +3 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs +4 -0
- package/plugins/src/base/skills/lisa-setup-workstation/scripts/workstation.mjs +3 -0
- package/plugins/src/wiki/scripts/ingest-git.mjs +2 -0
- package/rails/copy-overwrite/scripts/check-threshold-ratchet.mjs +6 -0
- package/scripts/check-merge-driver-registration.mjs +2 -0
- package/scripts/check-probe-absence-direction.mjs +611 -0
- package/scripts/check-test-case-executed.mjs +184 -0
- package/scripts/install-generated-artifact-merge-driver.mjs +7 -1
- package/scripts/lib/shell-guard-refusal-coverage.mjs +18 -19
- package/typescript/copy-overwrite/scripts/check-threshold-ratchet.mjs +6 -0
- package/typescript/copy-overwrite/scripts/lisa-mutation.mjs +4 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory under `coverage/` holding one run's isolated output.
|
|
3
|
+
*
|
|
4
|
+
* Nested under `coverage/` rather than placed beside it so the single
|
|
5
|
+
* `coverage/` entry every shipped `.gitignore` already carries keeps covering
|
|
6
|
+
* it, and so the coverage artifacts of a checkout stay in one findable place.
|
|
7
|
+
*/
|
|
8
|
+
export declare const COVERAGE_RUNS_DIR = ".runs";
|
|
9
|
+
/**
|
|
10
|
+
* Environment variable pinning the reports directory to a caller-chosen path.
|
|
11
|
+
*
|
|
12
|
+
* For the environment where isolation is not needed and a STABLE path is —
|
|
13
|
+
* a CI job that runs one suite and then uploads `coverage/lcov.info`. Such a
|
|
14
|
+
* job is the single writer of its own workspace, so the collision this module
|
|
15
|
+
* prevents cannot arise there, and the caller pinning the path is the caller
|
|
16
|
+
* taking responsibility for that.
|
|
17
|
+
*
|
|
18
|
+
* Honoured verbatim. Vitest resolves a relative value against the project root
|
|
19
|
+
* exactly as it resolves its own default, so both forms work.
|
|
20
|
+
*/
|
|
21
|
+
export declare const COVERAGE_REPORTS_DIR_ENV = "LISA_COVERAGE_REPORTS_DIR";
|
|
22
|
+
/**
|
|
23
|
+
* Builds the relative reports directory for one run.
|
|
24
|
+
*
|
|
25
|
+
* Separated from {@link coverageReportsDirectory} so tests can state the
|
|
26
|
+
* identity rather than mine it out of a memoized process-wide value.
|
|
27
|
+
* @param owner - Process id owning the run
|
|
28
|
+
* @param startedAt - Epoch milliseconds the directory was named
|
|
29
|
+
* @param suffix - Opaque random suffix, free of `-`
|
|
30
|
+
* @returns Root-relative path, POSIX-separated as Vitest's own default is.
|
|
31
|
+
*/
|
|
32
|
+
export declare function coverageRunDirectory(owner: number, startedAt: number, suffix: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Resolves the coverage reports directory for this run.
|
|
35
|
+
* @param environment - Environment to read; defaults to this process's.
|
|
36
|
+
* @returns A value for Vitest's `coverage.reportsDirectory`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function coverageReportsDirectory(environment?: NodeJS.ProcessEnv): string;
|
|
39
|
+
/**
|
|
40
|
+
* Discards the memoized value.
|
|
41
|
+
*
|
|
42
|
+
* Test-only. Exported because the memo is the one piece of state here, and a
|
|
43
|
+
* suite that could not clear it would have to assert against whichever value
|
|
44
|
+
* an unrelated earlier case happened to allocate.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resetCoverageReportsDirectory(): void;
|
|
47
|
+
//# sourceMappingURL=coverage-reports-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage-reports-directory.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAiEA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAKpE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAYD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,GAAE,MAAM,CAAC,UAAgB,GACnC,MAAM,CAUR;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-run isolation of the Vitest coverage reports directory.
|
|
3
|
+
*
|
|
4
|
+
* ## The defect this exists to prevent
|
|
5
|
+
*
|
|
6
|
+
* Vitest derives the coverage provider's scratch directory from
|
|
7
|
+
* `coverage.reportsDirectory` and offers no separate knob for it:
|
|
8
|
+
*
|
|
9
|
+
* ```js
|
|
10
|
+
* this.coverageFilesDirectory = resolve(this.options.reportsDirectory, ".tmp");
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* and its initialisation then removes BOTH, recursively, before a single test
|
|
14
|
+
* file is globbed:
|
|
15
|
+
*
|
|
16
|
+
* ```js
|
|
17
|
+
* if (clean && existsSync(this.options.reportsDirectory)) await rm(...)
|
|
18
|
+
* if (existsSync(this.coverageFilesDirectory)) await rm(...)
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Read against a fixed default of `coverage/`, that is a shared mutable path:
|
|
22
|
+
* a second run starting in the same checkout deletes the first run's live
|
|
23
|
+
* scratch, and the first run reaches the end of its coverage phase with nothing
|
|
24
|
+
* to merge. Measured twice in one evening on one machine
|
|
25
|
+
* (CodySwannGT/lisa#3911), and the cost lands late — the coverage phase is the
|
|
26
|
+
* expensive stretch of the push gate, so the collision is discovered only after
|
|
27
|
+
* roughly 24 minutes have already been spent.
|
|
28
|
+
*
|
|
29
|
+
* ## Isolation, not coordination
|
|
30
|
+
*
|
|
31
|
+
* Each run gets a reports directory nothing else knows about, named from the
|
|
32
|
+
* run's OWN identity rather than from the repository path. Two runs in one
|
|
33
|
+
* checkout then cannot see each other's scratch, so vitest's unconditional
|
|
34
|
+
* `rm` reaches only paths its own process created.
|
|
35
|
+
*
|
|
36
|
+
* This deliberately introduces no lock, no lease, no liveness probe and no
|
|
37
|
+
* pre-run sweep:
|
|
38
|
+
*
|
|
39
|
+
* - a **lock or lease** serialises runs that have no reason to be serialised,
|
|
40
|
+
* and needs a liveness rule to release one held by a dead process — the same
|
|
41
|
+
* ownership adjudication that makes shared scratch hard in the first place;
|
|
42
|
+
* - a **sweep of the shared directory** is the failure rather than the fix:
|
|
43
|
+
* cleaning a directory two runs share is precisely what deletes the other
|
|
44
|
+
* run's files.
|
|
45
|
+
*
|
|
46
|
+
* The naming scheme is the one the scratch namespace already proved for the
|
|
47
|
+
* same class of collision — `run-<pid>-<startedAt>-<suffix>`, reused here via
|
|
48
|
+
* {@link runRootName} rather than re-spelled, so the two cannot drift apart.
|
|
49
|
+
*
|
|
50
|
+
* ## What this does not change
|
|
51
|
+
*
|
|
52
|
+
* The gate's ability to say UNPROVABLE rather than FAILED when a run produced
|
|
53
|
+
* no coverage number survives untouched, because the classifier that draws
|
|
54
|
+
* that distinction is keyed on the scratch FILENAME (`coverage-<n>.json`) and
|
|
55
|
+
* explicitly not on the directory — see `COVERAGE_SCRATCH_ENOENT` in
|
|
56
|
+
* `all/copy-overwrite/scripts/lib/gate-failure-diagnosis.mjs`. Moving the
|
|
57
|
+
* directory is the one change this file makes, and it is the one input that
|
|
58
|
+
* classifier does not read.
|
|
59
|
+
* @module configs/vitest/coverage-reports-directory
|
|
60
|
+
*/
|
|
61
|
+
import { randomBytes } from "node:crypto";
|
|
62
|
+
import { env, pid } from "node:process";
|
|
63
|
+
import { runRootName } from "./scratch-namespace-authority.js";
|
|
64
|
+
/**
|
|
65
|
+
* Directory under `coverage/` holding one run's isolated output.
|
|
66
|
+
*
|
|
67
|
+
* Nested under `coverage/` rather than placed beside it so the single
|
|
68
|
+
* `coverage/` entry every shipped `.gitignore` already carries keeps covering
|
|
69
|
+
* it, and so the coverage artifacts of a checkout stay in one findable place.
|
|
70
|
+
*/
|
|
71
|
+
export const COVERAGE_RUNS_DIR = ".runs";
|
|
72
|
+
/**
|
|
73
|
+
* Environment variable pinning the reports directory to a caller-chosen path.
|
|
74
|
+
*
|
|
75
|
+
* For the environment where isolation is not needed and a STABLE path is —
|
|
76
|
+
* a CI job that runs one suite and then uploads `coverage/lcov.info`. Such a
|
|
77
|
+
* job is the single writer of its own workspace, so the collision this module
|
|
78
|
+
* prevents cannot arise there, and the caller pinning the path is the caller
|
|
79
|
+
* taking responsibility for that.
|
|
80
|
+
*
|
|
81
|
+
* Honoured verbatim. Vitest resolves a relative value against the project root
|
|
82
|
+
* exactly as it resolves its own default, so both forms work.
|
|
83
|
+
*/
|
|
84
|
+
export const COVERAGE_REPORTS_DIR_ENV = "LISA_COVERAGE_REPORTS_DIR";
|
|
85
|
+
/** Bytes of randomness disambiguating two runs started in the same millisecond. */
|
|
86
|
+
const SUFFIX_BYTES = 4;
|
|
87
|
+
/**
|
|
88
|
+
* Builds the relative reports directory for one run.
|
|
89
|
+
*
|
|
90
|
+
* Separated from {@link coverageReportsDirectory} so tests can state the
|
|
91
|
+
* identity rather than mine it out of a memoized process-wide value.
|
|
92
|
+
* @param owner - Process id owning the run
|
|
93
|
+
* @param startedAt - Epoch milliseconds the directory was named
|
|
94
|
+
* @param suffix - Opaque random suffix, free of `-`
|
|
95
|
+
* @returns Root-relative path, POSIX-separated as Vitest's own default is.
|
|
96
|
+
*/
|
|
97
|
+
export function coverageRunDirectory(owner, startedAt, suffix) {
|
|
98
|
+
return `coverage/${COVERAGE_RUNS_DIR}/${runRootName(owner, startedAt, suffix)}`;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The path this process's coverage output belongs in.
|
|
102
|
+
*
|
|
103
|
+
* Memoized rather than recomputed. Every stack factory calls this, a project's
|
|
104
|
+
* `vitest.config.ts` may merge several of them, and a run whose scratch and
|
|
105
|
+
* whose reports disagreed about their directory would reproduce the defect
|
|
106
|
+
* inside the fix.
|
|
107
|
+
*/
|
|
108
|
+
const pinned = { current: undefined };
|
|
109
|
+
/**
|
|
110
|
+
* Resolves the coverage reports directory for this run.
|
|
111
|
+
* @param environment - Environment to read; defaults to this process's.
|
|
112
|
+
* @returns A value for Vitest's `coverage.reportsDirectory`.
|
|
113
|
+
*/
|
|
114
|
+
export function coverageReportsDirectory(environment = env) {
|
|
115
|
+
const override = environment[COVERAGE_REPORTS_DIR_ENV];
|
|
116
|
+
if (override !== undefined && override.trim() !== "")
|
|
117
|
+
return override;
|
|
118
|
+
pinned.current ??= coverageRunDirectory(pid, Date.now(), randomBytes(SUFFIX_BYTES).toString("hex"));
|
|
119
|
+
return pinned.current;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Discards the memoized value.
|
|
123
|
+
*
|
|
124
|
+
* Test-only. Exported because the memo is the one piece of state here, and a
|
|
125
|
+
* suite that could not clear it would have to assert against whichever value
|
|
126
|
+
* an unrelated earlier case happened to allocate.
|
|
127
|
+
*/
|
|
128
|
+
export function resetCoverageReportsDirectory() {
|
|
129
|
+
pinned.current = undefined;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=coverage-reports-directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage-reports-directory.js","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE,mFAAmF;AACnF,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAa,EACb,SAAiB,EACjB,MAAc;IAEd,OAAO,YAAY,iBAAiB,IAAI,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC;AAClF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,GAAoC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAEvE;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,cAAiC,GAAG;IAEpC,MAAM,QAAQ,GAAG,WAAW,CAAC,wBAAwB,CAAC,CAAC;IACvD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IAEtE,MAAM,CAAC,OAAO,KAAK,oBAAoB,CACrC,GAAG,EACH,IAAI,CAAC,GAAG,EAAE,EACV,WAAW,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1C,CAAC;IACF,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;AAC7B,CAAC"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @module configs/vitest/harper-fabric
|
|
6
6
|
*/
|
|
7
7
|
import type { ViteUserConfig } from "vitest/config";
|
|
8
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
8
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
9
9
|
import type { PortableThresholds } from "./base.js";
|
|
10
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
10
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
11
11
|
export type { PortableThresholds };
|
|
12
12
|
/**
|
|
13
13
|
* Options for configuring the Harper/Fabric Vitest config factory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harper-fabric.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,yBAAyB;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,kBAEzC,yBAA8B,KAAG,
|
|
1
|
+
{"version":3,"file":"harper-fabric.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,yBAAyB;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,kBAEzC,yBAA8B,KAAG,cA8BlC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
1
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
3
3
|
/**
|
|
4
4
|
* Creates a Vitest configuration for Harper/Fabric projects.
|
|
5
5
|
* @param options - Configuration options
|
|
@@ -20,6 +20,9 @@ export const getHarperFabricVitestConfig = ({ thresholds, } = {}) => ({
|
|
|
20
20
|
testTimeout: 10000,
|
|
21
21
|
coverage: {
|
|
22
22
|
provider: "v8",
|
|
23
|
+
// Per-run, so a sibling run in this checkout cannot delete this
|
|
24
|
+
// run's live scratch. See configs/vitest/coverage-reports-directory.
|
|
25
|
+
reportsDirectory: coverageReportsDirectory(),
|
|
23
26
|
include: ["src/**/*.ts"],
|
|
24
27
|
exclude: [
|
|
25
28
|
...defaultCoverageExclusions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,UAAU,MACmB,EAAE,EAAkB,EAAE,CAAC,CAAC;IACrD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,iBAAiB;aAClB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/vitest/harper-fabric.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,UAAU,MACmB,EAAE,EAAkB,EAAE,CAAC,CAAC;IACrD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,gEAAgE;YAChE,qEAAqE;YACrE,gBAAgB,EAAE,wBAAwB,EAAE;YAC5C,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,iBAAiB;aAClB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import type { ViteUserConfig } from "vitest/config";
|
|
14
14
|
/** Vite UserConfig augmented with Vitest's `test` property */
|
|
15
15
|
type UserConfig = ViteUserConfig;
|
|
16
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions } from "./base.js";
|
|
16
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions } from "./base.js";
|
|
17
17
|
import type { PortableThresholds } from "./base.js";
|
|
18
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
18
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
19
19
|
export type { PortableThresholds };
|
|
20
20
|
/**
|
|
21
21
|
* Options for configuring the NestJS Vitest config factory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAwBD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAwBD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,UAuB5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
|
|
1
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
|
|
2
2
|
// Re-export base utilities for entry-point configs
|
|
3
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
3
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
4
4
|
/**
|
|
5
5
|
* NestJS-specific patterns excluded from coverage collection.
|
|
6
6
|
* These are generated or boilerplate files that don't benefit from coverage tracking.
|
|
@@ -47,6 +47,9 @@ export const getNestjsVitestConfig = ({ thresholds = defaultThresholds, } = {})
|
|
|
47
47
|
testTimeout: 10000,
|
|
48
48
|
coverage: {
|
|
49
49
|
provider: "v8",
|
|
50
|
+
// Per-run, so a sibling run in this checkout cannot delete this
|
|
51
|
+
// run's live scratch. See configs/vitest/coverage-reports-directory.
|
|
52
|
+
reportsDirectory: coverageReportsDirectory(),
|
|
50
53
|
include: ["**/*.ts"],
|
|
51
54
|
exclude: [...nestjsCoverageExclusions, ...worktreeExclusions()],
|
|
52
55
|
thresholds: mapThresholds(thresholds),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAYF;;;GAGG;AACH,MAAM,wBAAwB,GAAsB;IAClD,GAAG,yBAAyB;IAC5B,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,sBAAsB;IACtB,eAAe;IACf,YAAY;CACb,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,GAAG,iBAAiB,MACP,EAAE,EAAc,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,SAAS,CAAC;YACpB,OAAO,EAAE,CAAC,GAAG,wBAAwB,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAC/D,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/configs/vitest/nestjs.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,mDAAmD;AACnD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAYF;;;GAGG;AACH,MAAM,wBAAwB,GAAsB;IAClD,GAAG,yBAAyB;IAC5B,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,sBAAsB;IACtB,eAAe;IACf,YAAY;CACb,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,GAAG,iBAAiB,MACP,EAAE,EAAc,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,gEAAgE;YAChE,qEAAqE;YACrE,gBAAgB,EAAE,wBAAwB,EAAE;YAC5C,OAAO,EAAE,CAAC,SAAS,CAAC;YACpB,OAAO,EAAE,CAAC,GAAG,wBAAwB,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAC/D,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @module configs/vitest/phaser
|
|
9
9
|
*/
|
|
10
10
|
import type { ViteUserConfig } from "vitest/config";
|
|
11
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
11
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles } from "./base.js";
|
|
12
12
|
import type { PortableThresholds } from "./base.js";
|
|
13
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
13
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
14
14
|
export type { PortableThresholds };
|
|
15
15
|
/**
|
|
16
16
|
* Options for configuring the Phaser Vitest config factory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phaser.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"phaser.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,mBAAmB;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAEnC,mBAAwB,KAAG,cAiC5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
1
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
|
|
2
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, };
|
|
3
3
|
/**
|
|
4
4
|
* Creates a Vitest configuration for Phaser projects.
|
|
5
5
|
* @param options - Configuration options
|
|
@@ -20,6 +20,9 @@ export const getPhaserVitestConfig = ({ thresholds, } = {}) => ({
|
|
|
20
20
|
testTimeout: 10000,
|
|
21
21
|
coverage: {
|
|
22
22
|
provider: "v8",
|
|
23
|
+
// Per-run, so a sibling run in this checkout cannot delete this
|
|
24
|
+
// run's live scratch. See configs/vitest/coverage-reports-directory.
|
|
25
|
+
reportsDirectory: coverageReportsDirectory(),
|
|
23
26
|
include: ["src/**/*.ts"],
|
|
24
27
|
exclude: [
|
|
25
28
|
...defaultCoverageExclusions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phaser.js","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,MACa,EAAE,EAAkB,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,cAAc,CAAC;QACnD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,aAAa;gBACb,eAAe;gBACf,iBAAiB;gBACjB,mBAAmB;aACpB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"phaser.js","sourceRoot":"","sources":["../../../src/configs/vitest/phaser.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAYF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,MACa,EAAE,EAAkB,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,cAAc,CAAC;QACnD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,gEAAgE;YAChE,qEAAqE;YACrE,gBAAgB,EAAE,wBAAwB,EAAE;YAC5C,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,cAAc;gBACd,aAAa;gBACb,eAAe;gBACf,iBAAiB;gBACjB,mBAAmB;aACpB;YACD,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import type { ViteUserConfig } from "vitest/config";
|
|
10
10
|
/** Vite UserConfig augmented with Vitest's `test` property */
|
|
11
11
|
type UserConfig = ViteUserConfig;
|
|
12
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions } from "./base.js";
|
|
12
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions } from "./base.js";
|
|
13
13
|
import type { PortableThresholds } from "./base.js";
|
|
14
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
14
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
15
15
|
export type { PortableThresholds };
|
|
16
16
|
/**
|
|
17
17
|
* Options for configuring the TypeScript Vitest config factory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/typescript.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,uBAAuB;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GAAI,kBAEvC,uBAA4B,KAAG,
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/typescript.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8DAA8D;AAC9D,KAAK,UAAU,GAAG,cAAc,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,uBAAuB;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GAAI,kBAEvC,uBAA4B,KAAG,UAsBhC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
|
|
1
|
+
import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
|
|
2
2
|
// Re-export base utilities for stack-specific configs to use
|
|
3
|
-
export { coverageGlobalSetup, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
3
|
+
export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Vitest configuration for TypeScript/Node projects.
|
|
6
6
|
*
|
|
@@ -25,6 +25,9 @@ export const getTypescriptVitestConfig = ({ thresholds = defaultThresholds, } =
|
|
|
25
25
|
testTimeout: 10000,
|
|
26
26
|
coverage: {
|
|
27
27
|
provider: "v8",
|
|
28
|
+
// Per-run, so a sibling run in this checkout cannot delete this
|
|
29
|
+
// run's live scratch. See configs/vitest/coverage-reports-directory.
|
|
30
|
+
reportsDirectory: coverageReportsDirectory(),
|
|
28
31
|
include: ["src/**/*.ts"],
|
|
29
32
|
exclude: [...defaultCoverageExclusions, ...worktreeExclusions()],
|
|
30
33
|
thresholds: mapThresholds(thresholds),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/configs/vitest/typescript.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,6DAA6D;AAC7D,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAYF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,UAAU,GAAG,iBAAiB,MACH,EAAE,EAAc,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAChE,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/configs/vitest/typescript.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAInB,6DAA6D;AAC7D,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAYF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,UAAU,GAAG,iBAAiB,MACH,EAAE,EAAc,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;QACpC,WAAW,EAAE,CAAC,GAAG,kBAAkB,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;QAChE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACnD,OAAO,EAAE,CAAC,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,gEAAgE;YAChE,qEAAqE;YACrE,gBAAgB,EAAE,wBAAwB,EAAE;YAC5C,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAChE,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** The minimal job shape this analysis reads. */
|
|
2
|
+
export interface DependenceJob {
|
|
3
|
+
/** The job's key in the workflow's `jobs:` map. */
|
|
4
|
+
readonly id: string;
|
|
5
|
+
/** The job's display `name:`, or `""` when it declares none. */
|
|
6
|
+
readonly name?: string;
|
|
7
|
+
/** Ids of the jobs this one declares in `needs:`. */
|
|
8
|
+
readonly needs: readonly string[];
|
|
9
|
+
/** The job's `if:` text, or `""` when it declares none. */
|
|
10
|
+
readonly ifCondition: string;
|
|
11
|
+
/** Deployment environments the job declares, if any. */
|
|
12
|
+
readonly environment?: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
/** What one job's release dependence turned out to be. */
|
|
15
|
+
export type ReleaseDependence =
|
|
16
|
+
/** The job runs when the release succeeds and skips when it fails. */
|
|
17
|
+
{
|
|
18
|
+
readonly kind: "skips-on-failed-release";
|
|
19
|
+
readonly release: string;
|
|
20
|
+
}
|
|
21
|
+
/** The release result does not decide whether this job runs. */
|
|
22
|
+
| {
|
|
23
|
+
readonly kind: "independent";
|
|
24
|
+
}
|
|
25
|
+
/** The condition could not be read, so nothing is claimed either way. */
|
|
26
|
+
| {
|
|
27
|
+
readonly kind: "unreadable";
|
|
28
|
+
readonly reason: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Whether an upstream job is the one that cuts the release.
|
|
32
|
+
*
|
|
33
|
+
* Name-based, and that is a stated limit rather than an oversight: a host free
|
|
34
|
+
* to name its jobs anything can name this one something with neither word in
|
|
35
|
+
* it, and such a job is not recognised. The alternative — treating every
|
|
36
|
+
* upstream job as release-like — would report a deploy that skips because an
|
|
37
|
+
* unrelated optional job failed, which is a different property.
|
|
38
|
+
* @param job - The candidate upstream job
|
|
39
|
+
* @returns True when the job looks like the release
|
|
40
|
+
*/
|
|
41
|
+
export declare function isReleaseJob(job: DependenceJob): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether a job ships something to an environment.
|
|
44
|
+
*
|
|
45
|
+
* A declared `environment:` is the name-independent half: GitHub's deployment
|
|
46
|
+
* environments exist for exactly this kind of job, so a host that used one has
|
|
47
|
+
* said what the job is without Lisa having to guess from its id.
|
|
48
|
+
* @param job - The candidate job
|
|
49
|
+
* @returns True when the job looks like a deploy
|
|
50
|
+
*/
|
|
51
|
+
export declare function isDeployJob(job: DependenceJob): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Decide whether the release result is what makes this job skip.
|
|
54
|
+
* @param job - The job under analysis
|
|
55
|
+
* @param release - The id of the upstream release job
|
|
56
|
+
* @returns What the two evaluations established
|
|
57
|
+
*/
|
|
58
|
+
export declare function releaseDependence(job: DependenceJob, release: string): ReleaseDependence;
|
|
59
|
+
/** One deploy job whose run depends on the release having succeeded. */
|
|
60
|
+
export interface SkippingDeployJob {
|
|
61
|
+
/** The job that skips. */
|
|
62
|
+
readonly job: DependenceJob;
|
|
63
|
+
/** The upstream release job whose failure skips it. */
|
|
64
|
+
readonly release: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Find every deploy job in one workflow that skips when its release fails.
|
|
68
|
+
* @param jobs - Every job the workflow declares
|
|
69
|
+
* @returns The deploy jobs that go silent on a failed release
|
|
70
|
+
*/
|
|
71
|
+
export declare function deployJobsSkippedByFailedRelease(jobs: readonly DependenceJob[]): readonly SkippingDeployJob[];
|
|
72
|
+
//# sourceMappingURL=deploy-release-dependence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-release-dependence.d.ts","sourceRoot":"","sources":["../../src/core/deploy-release-dependence.ts"],"names":[],"mappings":"AA+DA,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,0DAA0D;AAC1D,MAAM,MAAM,iBAAiB;AAC3B,sEAAsE;AACpE;IAAE,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACxE,gEAAgE;GAC9D;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE;AAClC,yEAAyE;GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAc7D;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAExD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAMvD;AA8ID;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,MAAM,GACd,iBAAiB,CAoBnB;AAED,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,SAAS,aAAa,EAAE,GAC7B,SAAS,iBAAiB,EAAE,CAiB9B"}
|