@codyswann/lisa 8.2.11 → 8.4.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/all/copy-overwrite/scripts/lisa-work-item.mjs +50 -11
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
- package/cdk/package-lisa/package.lisa.json +1 -1
- package/dist/cli/confined-project-read.d.ts +2 -1
- package/dist/cli/confined-project-read.d.ts.map +1 -1
- package/dist/cli/confined-project-read.js +22 -5
- package/dist/cli/confined-project-read.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -1
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +5 -3
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/github-read-issue-cmd.d.ts +62 -0
- package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
- package/dist/cli/github-read-issue-cmd.js +121 -0
- package/dist/cli/github-read-issue-cmd.js.map +1 -0
- package/dist/cli/github-reader-relationships.d.ts +41 -0
- package/dist/cli/github-reader-relationships.d.ts.map +1 -0
- package/dist/cli/github-reader-relationships.js +218 -0
- package/dist/cli/github-reader-relationships.js.map +1 -0
- package/dist/cli/github-reader-target.d.ts +24 -0
- package/dist/cli/github-reader-target.d.ts.map +1 -0
- package/dist/cli/github-reader-target.js +95 -0
- package/dist/cli/github-reader-target.js.map +1 -0
- package/dist/cli/github-reader-wire.d.ts +72 -0
- package/dist/cli/github-reader-wire.d.ts.map +1 -0
- package/dist/cli/github-reader-wire.js +125 -0
- package/dist/cli/github-reader-wire.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/learnings-overflow-cmd.js +2 -2
- package/dist/cli/learnings-overflow-cmd.js.map +1 -1
- package/dist/configs/jest/expo.d.ts.map +1 -1
- package/dist/configs/jest/expo.js +6 -0
- package/dist/configs/jest/expo.js.map +1 -1
- package/dist/controls/commands/attest-workspace.d.ts +1 -7
- package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
- package/dist/controls/commands/attest-workspace.js +29 -12
- package/dist/controls/commands/attest-workspace.js.map +1 -1
- package/dist/controls/commands/declaration-check.d.ts.map +1 -1
- package/dist/controls/commands/declaration-check.js +7 -4
- package/dist/controls/commands/declaration-check.js.map +1 -1
- package/dist/controls/commands/seed.d.ts +1 -9
- package/dist/controls/commands/seed.d.ts.map +1 -1
- package/dist/controls/commands/seed.js +72 -65
- package/dist/controls/commands/seed.js.map +1 -1
- package/dist/controls/configure-road.d.ts +2 -0
- package/dist/controls/configure-road.d.ts.map +1 -1
- package/dist/controls/configure-road.js +18 -14
- package/dist/controls/configure-road.js.map +1 -1
- package/dist/controls/proof-copy.d.ts.map +1 -1
- package/dist/controls/proof-copy.js +3 -0
- package/dist/controls/proof-copy.js.map +1 -1
- package/dist/controls/proof-scratch.d.ts +42 -0
- package/dist/controls/proof-scratch.d.ts.map +1 -0
- package/dist/controls/proof-scratch.js +172 -0
- package/dist/controls/proof-scratch.js.map +1 -0
- package/dist/controls/register-evidence-rule.d.ts +2 -0
- package/dist/controls/register-evidence-rule.d.ts.map +1 -1
- package/dist/controls/register-evidence-rule.js +8 -7
- package/dist/controls/register-evidence-rule.js.map +1 -1
- package/dist/controls/register-rules.d.ts +2 -0
- package/dist/controls/register-rules.d.ts.map +1 -1
- package/dist/controls/register-rules.js.map +1 -1
- package/dist/controls/register-types.d.ts +2 -4
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/register.d.ts +2 -0
- package/dist/controls/register.d.ts.map +1 -1
- package/dist/controls/register.js +3 -1
- package/dist/controls/register.js.map +1 -1
- package/dist/controls/shipped-parts.d.ts +82 -0
- package/dist/controls/shipped-parts.d.ts.map +1 -0
- package/dist/controls/shipped-parts.js +216 -0
- package/dist/controls/shipped-parts.js.map +1 -0
- package/dist/core/learnings-document.d.ts +2 -3
- package/dist/core/learnings-document.d.ts.map +1 -1
- package/dist/core/learnings-document.js.map +1 -1
- package/dist/core/learnings-overflow.d.ts +4 -0
- package/dist/core/learnings-overflow.d.ts.map +1 -1
- package/dist/core/learnings-overflow.js +47 -24
- package/dist/core/learnings-overflow.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +18 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +101 -27
- package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
- package/dist/strategies/package-lisa-host-pins.js +29 -30
- package/dist/strategies/package-lisa-host-pins.js.map +1 -1
- package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
- package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
- package/dist/strategies/package-lisa-range-intersection.js +73 -0
- package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
- package/expo/package-lisa/package.lisa.json +8 -2
- package/harper-fabric/package-lisa/package.lisa.json +3 -2
- package/package.json +4 -4
- package/phaser/package-lisa/package.lisa.json +3 -2
- 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-configure/SKILL.md +8 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa/hooks/inject-resolved-config.mjs +23 -1
- package/plugins/lisa/rules/reference/config-resolution.md +1 -0
- package/plugins/lisa/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-agy/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +23 -1
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-copilot/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +23 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -0
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-cursor/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/inject-resolved-config.mjs +23 -1
- package/plugins/lisa-devin/rules/reference/config-resolution.md +1 -0
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-devin/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/inject-resolved-config.mjs +23 -1
- package/plugins/src/base/rules/reference/config-resolution.md +1 -0
- package/plugins/src/base/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/src/base/skills/lisa-linear-sync/SKILL.md +3 -3
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +56 -49
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +5 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +4 -1
- package/rails/copy-overwrite/lefthook.yml +3 -0
- package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
- package/rails/copy-overwrite/scripts/lisa-rails-ast-grep.mjs +31 -0
- package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +5 -0
- package/scripts/check-derived-artifacts.mjs +1 -0
- package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
- package/scripts/two-channel-couplings.json +37 -7
- package/scripts/verify-packed-learnings-contract.mjs +27 -1
- package/typescript/copy-overwrite/.prettierignore +2 -0
- package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
- package/typescript/package-lisa/package.lisa.json +3 -2
|
@@ -2,12 +2,10 @@ import type { PackageJsonPlan } from "./package-lisa-types.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Restore host dependency pins that sit ABOVE Lisa's template.
|
|
4
4
|
* @remarks
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* template simply lags a fresh advisory), the same "security write" silently
|
|
10
|
-
* walks the host BACKWARDS into the vulnerable range it had already escaped.
|
|
5
|
+
* A forced dependency range can set a security floor and a compatibility cap.
|
|
6
|
+
* Phase 1 applies it with `deepMerge`, where Lisa's value wins unconditionally.
|
|
7
|
+
* A host that has raised its floor can therefore be sent back into a vulnerable
|
|
8
|
+
* range it had already escaped without this additional comparison.
|
|
11
9
|
*
|
|
12
10
|
* This is not hypothetical: a caller repo in the portfolio pinned at
|
|
13
11
|
* `dependencies.tar >=7.5.21` was reverted to `>=7.5.19` on every `bun install`,
|
|
@@ -24,10 +22,8 @@ import type { PackageJsonPlan } from "./package-lisa-types.js";
|
|
|
24
22
|
* - Host floor above Lisa's AND the host range is a subset of Lisa's: the host
|
|
25
23
|
* admits only versions Lisa allows, so it is provably the stricter of the
|
|
26
24
|
* two. Keep the host.
|
|
27
|
-
* - Host floor above Lisa's
|
|
28
|
-
*
|
|
29
|
-
* and names both rather than picking one — silently picking one is how a
|
|
30
|
-
* lowered floor shipped in the first place.
|
|
25
|
+
* - Host floor above Lisa's with crossing ranges: use the versions admitted
|
|
26
|
+
* by both ranges. Refuse when the ranges share no versions.
|
|
31
27
|
*
|
|
32
28
|
* A value that cannot be parsed — npm's `"$name"` self-references, git URLs,
|
|
33
29
|
* `workspace:*` — is left as Phase 1 produced it, so this can only ever RAISE
|
|
@@ -35,8 +31,7 @@ import type { PackageJsonPlan } from "./package-lisa-types.js";
|
|
|
35
31
|
* @param projectJson - The host package.json as it was before Phase 1.
|
|
36
32
|
* @param afterForce - The result of Phase 1's force merge.
|
|
37
33
|
* @param fileName - Basename used in error messages.
|
|
38
|
-
* @throws {JsonMergeError} when a host pin
|
|
39
|
-
* incomparable.
|
|
34
|
+
* @throws {JsonMergeError} when a higher host pin and Lisa's pin have no overlap.
|
|
40
35
|
* @returns `afterForce` with host-side higher pins restored, plus notes.
|
|
41
36
|
*/
|
|
42
37
|
export declare function preserveHigherHostPins(projectJson: Record<string, unknown>, afterForce: Record<string, unknown>, fileName: string): PackageJsonPlan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lisa-host-pins.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-host-pins.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"package-lisa-host-pins.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-host-pins.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,MAAM,GACf,eAAe,CA4BjB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file package-lisa-host-pins.ts
|
|
3
3
|
* @description Phase 1 floor guard of the package-lisa apply: restore host
|
|
4
|
-
* dependency
|
|
5
|
-
* neither range can be proven ahead.
|
|
4
|
+
* dependency floors above Lisa's forced floor and retain shared constraints.
|
|
6
5
|
* @module strategies
|
|
7
6
|
*/
|
|
8
7
|
import semver from "semver";
|
|
9
8
|
import { asRecord, DIRECT_DEPENDENCY_SECTIONS, OVERRIDE_SECTIONS, } from "../core/override-floors.js";
|
|
10
9
|
import { JsonMergeError } from "../errors/index.js";
|
|
10
|
+
import { intersectDependencyRanges } from "./package-lisa-range-intersection.js";
|
|
11
11
|
/**
|
|
12
12
|
* Every section whose forced values are a version FLOOR rather than an
|
|
13
13
|
* assignment, and which therefore may never be merged downwards.
|
|
@@ -26,12 +26,10 @@ const FLOOR_SECTIONS = [
|
|
|
26
26
|
/**
|
|
27
27
|
* Restore host dependency pins that sit ABOVE Lisa's template.
|
|
28
28
|
* @remarks
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* template simply lags a fresh advisory), the same "security write" silently
|
|
34
|
-
* walks the host BACKWARDS into the vulnerable range it had already escaped.
|
|
29
|
+
* A forced dependency range can set a security floor and a compatibility cap.
|
|
30
|
+
* Phase 1 applies it with `deepMerge`, where Lisa's value wins unconditionally.
|
|
31
|
+
* A host that has raised its floor can therefore be sent back into a vulnerable
|
|
32
|
+
* range it had already escaped without this additional comparison.
|
|
35
33
|
*
|
|
36
34
|
* This is not hypothetical: a caller repo in the portfolio pinned at
|
|
37
35
|
* `dependencies.tar >=7.5.21` was reverted to `>=7.5.19` on every `bun install`,
|
|
@@ -48,10 +46,8 @@ const FLOOR_SECTIONS = [
|
|
|
48
46
|
* - Host floor above Lisa's AND the host range is a subset of Lisa's: the host
|
|
49
47
|
* admits only versions Lisa allows, so it is provably the stricter of the
|
|
50
48
|
* two. Keep the host.
|
|
51
|
-
* - Host floor above Lisa's
|
|
52
|
-
*
|
|
53
|
-
* and names both rather than picking one — silently picking one is how a
|
|
54
|
-
* lowered floor shipped in the first place.
|
|
49
|
+
* - Host floor above Lisa's with crossing ranges: use the versions admitted
|
|
50
|
+
* by both ranges. Refuse when the ranges share no versions.
|
|
55
51
|
*
|
|
56
52
|
* A value that cannot be parsed — npm's `"$name"` self-references, git URLs,
|
|
57
53
|
* `workspace:*` — is left as Phase 1 produced it, so this can only ever RAISE
|
|
@@ -59,8 +55,7 @@ const FLOOR_SECTIONS = [
|
|
|
59
55
|
* @param projectJson - The host package.json as it was before Phase 1.
|
|
60
56
|
* @param afterForce - The result of Phase 1's force merge.
|
|
61
57
|
* @param fileName - Basename used in error messages.
|
|
62
|
-
* @throws {JsonMergeError} when a host pin
|
|
63
|
-
* incomparable.
|
|
58
|
+
* @throws {JsonMergeError} when a higher host pin and Lisa's pin have no overlap.
|
|
64
59
|
* @returns `afterForce` with host-side higher pins restored, plus notes.
|
|
65
60
|
*/
|
|
66
61
|
export function preserveHigherHostPins(projectJson, afterForce, fileName) {
|
|
@@ -75,7 +70,7 @@ export function preserveHigherHostPins(projectJson, afterForce, fileName) {
|
|
|
75
70
|
...plan.packageJson,
|
|
76
71
|
[section]: {
|
|
77
72
|
...forcedSection,
|
|
78
|
-
...Object.fromEntries(preserved.map(pin => [pin.name, pin.
|
|
73
|
+
...Object.fromEntries(preserved.map(pin => [pin.name, pin.selectedRange])),
|
|
79
74
|
},
|
|
80
75
|
},
|
|
81
76
|
notes: [...plan.notes, ...preserved.map(formatPreservedPinNote)],
|
|
@@ -88,7 +83,7 @@ export function preserveHigherHostPins(projectJson, afterForce, fileName) {
|
|
|
88
83
|
* @param hostSection - The host's entries for this section, pre-merge
|
|
89
84
|
* @param forcedSection - The entries Phase 1 produced for this section
|
|
90
85
|
* @param fileName - Basename used in error messages
|
|
91
|
-
* @throws {JsonMergeError} on the first
|
|
86
|
+
* @throws {JsonMergeError} on the first disjoint pair of pins
|
|
92
87
|
* @returns Pins whose host value must be restored
|
|
93
88
|
*/
|
|
94
89
|
function collectPreservedPins(section, hostSection, forcedSection, fileName) {
|
|
@@ -104,17 +99,20 @@ function collectPreservedPins(section, hostSection, forcedSection, fileName) {
|
|
|
104
99
|
hostRange: hostValue,
|
|
105
100
|
forcedRange: forcedValue,
|
|
106
101
|
};
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
const selectedRange = verdict === "host"
|
|
103
|
+
? pin.hostRange
|
|
104
|
+
: intersectDependencyRanges(pin.hostRange, pin.forcedRange);
|
|
105
|
+
if (selectedRange === null) {
|
|
106
|
+
throw new JsonMergeError(fileName, formatDisjointPinMessage(pin));
|
|
109
107
|
}
|
|
110
|
-
return [pin];
|
|
108
|
+
return [{ ...pin, selectedRange }];
|
|
111
109
|
});
|
|
112
110
|
}
|
|
113
111
|
/**
|
|
114
112
|
* Decide what to do with one dependency where host and template disagree.
|
|
115
113
|
* @param hostValue - The host's range for this dependency.
|
|
116
114
|
* @param forcedValue - The range Phase 1 wrote for the same dependency.
|
|
117
|
-
* @returns Which side wins, or `
|
|
115
|
+
* @returns Which side wins, or `check-overlap` to keep both constraints.
|
|
118
116
|
*/
|
|
119
117
|
function classifyHostPin(hostValue, forcedValue) {
|
|
120
118
|
if (typeof hostValue !== "string" || typeof forcedValue !== "string") {
|
|
@@ -127,7 +125,7 @@ function classifyHostPin(hostValue, forcedValue) {
|
|
|
127
125
|
!semver.gt(hostFloor, forcedFloor)) {
|
|
128
126
|
return "template";
|
|
129
127
|
}
|
|
130
|
-
return rangeContains(forcedValue, hostValue) ? "host" : "
|
|
128
|
+
return rangeContains(forcedValue, hostValue) ? "host" : "check-overlap";
|
|
131
129
|
}
|
|
132
130
|
/**
|
|
133
131
|
* npm's exclusive-ceiling convention: the lowest possible prerelease of the
|
|
@@ -219,24 +217,25 @@ function rangeContains(outer, inner) {
|
|
|
219
217
|
* @returns Human-readable note for apply output
|
|
220
218
|
*/
|
|
221
219
|
function formatPreservedPinNote(pin) {
|
|
220
|
+
if (pin.selectedRange !== pin.hostRange) {
|
|
221
|
+
return (`Set ${pin.section}.${pin.name} to ${JSON.stringify(pin.selectedRange)}, ` +
|
|
222
|
+
`the overlap between the host's ${JSON.stringify(pin.hostRange)} and Lisa's ${JSON.stringify(pin.forcedRange)}.`);
|
|
223
|
+
}
|
|
222
224
|
return (`Kept host ${pin.section}.${pin.name} ${JSON.stringify(pin.hostRange)}: ` +
|
|
223
225
|
`it admits only versions Lisa's ${JSON.stringify(pin.forcedRange)} allows ` +
|
|
224
226
|
`and starts higher, so applying the template would lower the host's floor.`);
|
|
225
227
|
}
|
|
226
228
|
/**
|
|
227
|
-
* Format the refusal for
|
|
228
|
-
* @param pin -
|
|
229
|
+
* Format the refusal for disjoint dependency ranges.
|
|
230
|
+
* @param pin - Both ranges of the dependency.
|
|
229
231
|
* @returns Human-readable error message naming both ranges
|
|
230
232
|
*/
|
|
231
|
-
function
|
|
233
|
+
function formatDisjointPinMessage(pin) {
|
|
232
234
|
return (`${pin.section}.${pin.name} cannot be merged: the host range ` +
|
|
233
235
|
`${JSON.stringify(pin.hostRange)} starts above Lisa's ` +
|
|
234
|
-
`${JSON.stringify(pin.forcedRange)},
|
|
235
|
-
`
|
|
236
|
-
`
|
|
237
|
-
`lowered, so this apply stops instead. Reconcile the two by hand: pick one ` +
|
|
238
|
-
`range in the host package.json that satisfies both constraints, or raise ` +
|
|
239
|
-
`Lisa's template pin to cover the host's.`);
|
|
236
|
+
`${JSON.stringify(pin.forcedRange)}, and the two ranges share no versions. ` +
|
|
237
|
+
`Review the dependency constraints and update the host pin or Lisa's template ` +
|
|
238
|
+
`to agree on which versions can be installed.`);
|
|
240
239
|
}
|
|
241
240
|
/**
|
|
242
241
|
* Resolve the lowest version a range admits.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lisa-host-pins.js","sourceRoot":"","sources":["../../src/strategies/package-lisa-host-pins.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"package-lisa-host-pins.js","sourceRoot":"","sources":["../../src/strategies/package-lisa-host-pins.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,QAAQ,EACR,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF;;;;;;;;;;GAUG;AACH,MAAM,cAAc,GAAG;IACrB,GAAG,0BAA0B;IAC7B,GAAG,iBAAiB;CACZ,CAAC;AAgBX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAoC,EACpC,UAAmC,EACnC,QAAgB;IAEhB,OAAO,cAAc,CAAC,MAAM,CAC1B,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QAChB,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1D,MAAM,SAAS,GAAG,oBAAoB,CACpC,OAAO,EACP,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAC9B,aAAa,EACb,QAAQ,CACT,CAAC;QACF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO;YACL,WAAW,EAAE;gBACX,GAAG,IAAI,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AAG,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,oCAAoC;QAC9D,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,uBAAuB;QACvD,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,0CAA0C;QAC5E,+EAA+E;QAC/E,8CAA8C,CAC/C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,KAAa;IAC/B,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find every version npm admits in both valid ranges.
|
|
3
|
+
* @param host - The host's dependency range.
|
|
4
|
+
* @param forced - Lisa's dependency range.
|
|
5
|
+
* @returns A range for the intersection, or null when it is empty.
|
|
6
|
+
*/
|
|
7
|
+
export declare function intersectDependencyRanges(host: string, forced: string): string | null;
|
|
8
|
+
//# sourceMappingURL=package-lisa-range-intersection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-range-intersection.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa-range-intersection.ts"],"names":[],"mappings":"AAoEA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAMf"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import semver from "semver";
|
|
2
|
+
/**
|
|
3
|
+
* The release core an npm comparator opts into for prerelease matching.
|
|
4
|
+
* @param comparator - Comparator from a parsed npm range.
|
|
5
|
+
* @returns The release core for an explicit prerelease comparator.
|
|
6
|
+
*/
|
|
7
|
+
function prereleaseCore(comparator) {
|
|
8
|
+
if (comparator.value === "" || comparator.semver.prerelease.length === 0) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
const { major, minor, patch } = comparator.semver;
|
|
12
|
+
return `${major}.${minor}.${patch}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Project a comparator onto stable releases, excluding any prerelease opt-in.
|
|
16
|
+
* @param comparator - Comparator from a parsed npm range.
|
|
17
|
+
* @returns A stable comparator, or null when it selects only a prerelease.
|
|
18
|
+
*/
|
|
19
|
+
function stableComparator(comparator) {
|
|
20
|
+
const core = prereleaseCore(comparator);
|
|
21
|
+
if (core === null)
|
|
22
|
+
return comparator.value;
|
|
23
|
+
if (comparator.operator.startsWith(">"))
|
|
24
|
+
return `>=${core}`;
|
|
25
|
+
if (comparator.operator.startsWith("<"))
|
|
26
|
+
return `<${core}`;
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Remove duplicate and wildcard comparators from an intersection clause.
|
|
31
|
+
* @param comparators - Already parsed or constructed comparator strings.
|
|
32
|
+
* @returns A comparator set accepted by npm.
|
|
33
|
+
*/
|
|
34
|
+
function clause(comparators) {
|
|
35
|
+
return [...new Set(comparators.filter(Boolean))].join(" ") || "*";
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Intersect two comparator sets under npm's prerelease rules.
|
|
39
|
+
* @param left - The host's comparators for one arm of its range.
|
|
40
|
+
* @param right - Lisa's comparators for one arm of its range.
|
|
41
|
+
* @returns Stable and shared-prerelease clauses.
|
|
42
|
+
*/
|
|
43
|
+
function intersectClauses(left, right) {
|
|
44
|
+
const combined = [...left, ...right];
|
|
45
|
+
const stable = combined.map(stableComparator);
|
|
46
|
+
const stableArm = stable.every(value => value !== null)
|
|
47
|
+
? [clause(stable)]
|
|
48
|
+
: [];
|
|
49
|
+
const rightCores = new Set(right.map(prereleaseCore));
|
|
50
|
+
const sharedCores = new Set(left
|
|
51
|
+
.map(prereleaseCore)
|
|
52
|
+
.filter(core => core !== null && rightCores.has(core)));
|
|
53
|
+
const prereleaseArms = [...sharedCores].map(core => clause([
|
|
54
|
+
...combined.map(comparator => comparator.value),
|
|
55
|
+
`>=${core}-0`,
|
|
56
|
+
`<${core}`,
|
|
57
|
+
]));
|
|
58
|
+
return [...stableArm, ...prereleaseArms];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Find every version npm admits in both valid ranges.
|
|
62
|
+
* @param host - The host's dependency range.
|
|
63
|
+
* @param forced - Lisa's dependency range.
|
|
64
|
+
* @returns A range for the intersection, or null when it is empty.
|
|
65
|
+
*/
|
|
66
|
+
export function intersectDependencyRanges(host, forced) {
|
|
67
|
+
const forcedSets = new semver.Range(forced).set;
|
|
68
|
+
const validArms = new semver.Range(host).set
|
|
69
|
+
.flatMap(left => forcedSets.flatMap(right => intersectClauses(left, right)))
|
|
70
|
+
.filter(arm => semver.minVersion(arm) !== null);
|
|
71
|
+
return validArms.length === 0 ? null : [...new Set(validArms)].join(" || ");
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=package-lisa-range-intersection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lisa-range-intersection.js","sourceRoot":"","sources":["../../src/strategies/package-lisa-range-intersection.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;GAIG;AACH,SAAS,cAAc,CAAC,UAA6B;IACnD,IAAI,UAAU,CAAC,KAAK,KAAK,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;IAClD,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC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IACF,MAAM,cAAc,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACjD,MAAM,CAAC;QACL,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;QAC/C,KAAK,IAAI,IAAI;QACb,IAAI,IAAI,EAAE;KACX,CAAC,CACH,CAAC;IACF,OAAO,CAAC,GAAG,SAAS,EAAE,GAAG,cAAc,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAY,EACZ,MAAc;IAEd,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;IAChD,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG;SACzC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SAC3E,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAClD,OAAO,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"start:simulator:ios:staging": "cp .env.staging .env.local && STAGE=staging expo start --ios",
|
|
46
46
|
"start:staging": "cp .env.staging .env.local && STAGE=staging expo start",
|
|
47
47
|
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage",
|
|
48
|
-
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage
|
|
48
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage",
|
|
49
49
|
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathPatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
50
50
|
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest",
|
|
51
51
|
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
52
52
|
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
53
|
-
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest
|
|
53
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest",
|
|
54
54
|
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --watch"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {},
|
|
@@ -200,6 +200,9 @@
|
|
|
200
200
|
"NODE_ENV=test lisa-test-run -- jest --coverage"
|
|
201
201
|
],
|
|
202
202
|
"test:cov:unit": [
|
|
203
|
+
"LISA_COVERAGE_SCOPE=unit LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage",
|
|
204
|
+
"LISA_COVERAGE_SCOPE=unit LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo -- jest --coverage",
|
|
205
|
+
"LISA_COVERAGE_SCOPE=unit LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run -- jest --coverage",
|
|
203
206
|
"LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
204
207
|
"LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo -- jest --coverage --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
205
208
|
"LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run -- jest --coverage --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\""
|
|
@@ -212,6 +215,9 @@
|
|
|
212
215
|
"LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile expo --adapter direct -- node scripts/lisa-test-node.mjs"
|
|
213
216
|
],
|
|
214
217
|
"test:unit": [
|
|
218
|
+
"LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest",
|
|
219
|
+
"LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo -- jest",
|
|
220
|
+
"LISA_EXPO_TEST_SCOPE=unit NODE_ENV=test lisa-test-run -- jest",
|
|
215
221
|
"NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
216
222
|
"NODE_ENV=test lisa-test-run --profile expo -- jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
217
223
|
"NODE_ENV=test lisa-test-run -- jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\""
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
26
26
|
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-affected-tests.mjs --push-only --fetch scripts/fetch-test-access-map.mjs -- lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --exclude='**/integration/**'",
|
|
27
27
|
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest",
|
|
28
|
-
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs &&
|
|
28
|
+
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-typecheck.mjs"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"harperdb": "^4.7.29"
|
|
@@ -137,7 +137,8 @@
|
|
|
137
137
|
"lisa-test-run -- vitest"
|
|
138
138
|
],
|
|
139
139
|
"typecheck": [
|
|
140
|
-
"tsc --noEmit"
|
|
140
|
+
"tsc --noEmit",
|
|
141
|
+
"node scripts/lisa-typecheck.mjs"
|
|
141
142
|
]
|
|
142
143
|
},
|
|
143
144
|
"devDependencies": {
|
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"zod": "^4.6.7"
|
|
200
200
|
},
|
|
201
201
|
"name": "@codyswann/lisa",
|
|
202
|
-
"version": "8.
|
|
202
|
+
"version": "8.4.0",
|
|
203
203
|
"description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
|
|
204
204
|
"main": "dist/index.js",
|
|
205
205
|
"exports": {
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"optional": true
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
"lisaReleaseCommit": "
|
|
374
|
-
"gitHead": "
|
|
375
|
-
"lisaReleaseTag": "v8.
|
|
373
|
+
"lisaReleaseCommit": "3ced0b4e2c6225d2339e048c4bc914b653c8835e",
|
|
374
|
+
"gitHead": "3ced0b4e2c6225d2339e048c4bc914b653c8835e",
|
|
375
|
+
"lisaReleaseTag": "v8.4.0"
|
|
376
376
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
22
22
|
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-affected-tests.mjs --push-only --fetch scripts/fetch-test-access-map.mjs -- lisa-test-run --profile phaser --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
23
23
|
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest",
|
|
24
|
-
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs &&
|
|
24
|
+
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-typecheck.mjs"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@ast-grep/cli": "^0.40.4",
|
|
@@ -149,7 +149,8 @@
|
|
|
149
149
|
"lisa-test-run -- vitest"
|
|
150
150
|
],
|
|
151
151
|
"typecheck": [
|
|
152
|
-
"tsc --noEmit"
|
|
152
|
+
"tsc --noEmit",
|
|
153
|
+
"node scripts/lisa-typecheck.mjs"
|
|
153
154
|
]
|
|
154
155
|
},
|
|
155
156
|
"devDependencies": {
|
|
@@ -151,10 +151,11 @@ It prints one JSON document. Read these fields:
|
|
|
151
151
|
| `seeded` | The checks it declared just now, each with the moment it runs at. |
|
|
152
152
|
| `declared_gates` | How many checks the declaration holds now. |
|
|
153
153
|
|
|
154
|
-
- **`paved`.**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
- **`paved`.** Lisa ships checks for the whole repository's project type or for every folder
|
|
155
|
+
the audit named. The command declares the available shipped checks using each project's own
|
|
156
|
+
tasks. A folder check runs in that folder with its task runner. Already declared gates keep
|
|
157
|
+
their settings, and running the command again leaves the declarations unchanged.
|
|
158
|
+
**Go straight to step 7, and
|
|
158
159
|
skip step 8.** If
|
|
159
160
|
`declared_gates` is `0`, nothing could be declared because the repository does not yet have the
|
|
160
161
|
tasks those checks run: say so in your closing message, and that setting Lisa up for this
|
|
@@ -319,14 +320,14 @@ exist. Keep everything else in the file as it is.
|
|
|
319
320
|
|
|
320
321
|
### Step 7: Have the declaration checked against the audit
|
|
321
322
|
|
|
322
|
-
**Needs:** the declaration. **Hands on:** a declaration
|
|
323
|
+
**Needs:** the declaration. **Hands on:** a declaration supported by shipped checks or audit evidence.
|
|
323
324
|
|
|
324
325
|
```bash
|
|
325
326
|
lisa controls declaration-check
|
|
326
327
|
```
|
|
327
328
|
|
|
328
|
-
- **Exit 0.**
|
|
329
|
-
|
|
329
|
+
- **Exit 0.** Lisa reproduced the shipped folder checks from the local task manifests and
|
|
330
|
+
confirmed audit support for any parts declared from findings.
|
|
330
331
|
- **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
|
|
331
332
|
names a place the audit did not report, rests on a question nobody answered or on an answer
|
|
332
333
|
about something else, or serves a requirement the audit still asks about is refused. Correct the
|