harness-everything 0.36.0 → 0.36.1

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.
@@ -163,6 +163,20 @@ function changePaths(change) {
163
163
  return change.kind === 'rename' ? [change.from, change.to] : [change.path];
164
164
  }
165
165
 
166
+ // #335: a path with no candidate artifact. The old endpoint of an identified rename and a
167
+ // deleted path are both baseline-only. Derivation annotates them; it never removes them from
168
+ // scope.paths, so an unannotated caller keeps the pre-existing fail-closed behavior.
169
+ function baselinePathFacts(changes) {
170
+ const entries = [];
171
+ for (const change of changes) {
172
+ if (change.kind === 'deleted') entries.push({ path: change.path, reason: 'deleted' });
173
+ else if (change.kind === 'rename') {
174
+ entries.push({ path: change.from, reason: 'rename-from', renameTo: change.to });
175
+ }
176
+ }
177
+ return entries.sort((left, right) => compareText(left.path, right.path));
178
+ }
179
+
166
180
  function uniqueSorted(values) {
167
181
  return [...new Set(values.filter(value => typeof value === 'string'))].sort(compareText);
168
182
  }
@@ -1465,6 +1479,7 @@ function deriveDocFacts({ base, candidate, config, inventory } = {}) {
1465
1479
  governedTouched,
1466
1480
  governedPaths: uniqueSorted(contextualChanges.filter(change => change.oldGoverned || change.newGoverned)
1467
1481
  .flatMap(changePaths)),
1482
+ baselinePaths: baselinePathFacts(contextualChanges),
1468
1483
  newGovernedPaths: newGovernedFiles.map(change => change.newPath).sort(compareText),
1469
1484
  derivedAffected,
1470
1485
  derivedPaths,
@@ -1540,6 +1555,13 @@ function deriveDocObligations(facts) {
1540
1555
  ...(facts.citedReqs || []).map(item => item && item.file)]) : []
1541
1556
  };
1542
1557
  const inventoryEnvelope = validFacts ? copyInventoryEnvelope(facts.inventory) : undefined;
1558
+ const baselineByPath = new Map((validFacts && Array.isArray(facts.baselinePaths) ? facts.baselinePaths : [])
1559
+ .filter(entry => entry && typeof entry.path === 'string')
1560
+ .map(entry => [entry.path, {
1561
+ path: entry.path,
1562
+ reason: entry.reason,
1563
+ ...(typeof entry.renameTo === 'string' ? { renameTo: entry.renameTo } : {})
1564
+ }]));
1543
1565
  const requirementFacts = {
1544
1566
  citedReqs: validFacts && Array.isArray(facts.citedReqs) ? facts.citedReqs : [],
1545
1567
  reqUpdates: validFacts && Array.isArray(facts.reqUpdates) ? facts.reqUpdates : [],
@@ -1558,11 +1580,16 @@ function deriveDocObligations(facts) {
1558
1580
  capability: item.capability,
1559
1581
  strength: strengths.get(item.capability) || item.strength,
1560
1582
  applicability: applicable.has(item.capability) ? 'applicable' : unknown.has(item.capability) ? 'unknown' : 'N/A',
1561
- scope: {
1562
- paths: uniqueSorted(scopePaths[item.capability] || []),
1563
- ...(item.capability === 'requirement-sync' && requirementFacts.requirementScopeUnknown
1564
- ? { requirementIds: 'unknown' } : {})
1565
- },
1583
+ scope: (() => {
1584
+ const paths = uniqueSorted(scopePaths[item.capability] || []);
1585
+ const baselinePaths = paths.filter(path => baselineByPath.has(path)).map(path => baselineByPath.get(path));
1586
+ return {
1587
+ paths,
1588
+ ...(baselinePaths.length ? { baselinePaths } : {}),
1589
+ ...(item.capability === 'requirement-sync' && requirementFacts.requirementScopeUnknown
1590
+ ? { requirementIds: 'unknown' } : {})
1591
+ };
1592
+ })(),
1566
1593
  acceptance: item.acceptance,
1567
1594
  ...(item.capability === 'requirement-sync' ? requirementFacts : {})
1568
1595
  }));
package/sbom.cdx.json CHANGED
@@ -2,23 +2,23 @@
2
2
  "$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.7",
5
- "serialNumber": "urn:uuid:81cf2be0-d984-5cb9-9eee-bcd04849c7b9",
5
+ "serialNumber": "urn:uuid:74100c9d-ebbb-559a-8ab0-a9ac5fd581c6",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-10-18T23:18:17.342Z",
8
+ "timestamp": "2026-10-20T03:51:47.041Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "0.36.0"
13
+ "version": "0.36.1"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@0.36.0",
18
+ "bom-ref": "pkg:npm/harness-everything@0.36.1",
19
19
  "name": "harness-everything",
20
- "version": "0.36.0",
21
- "purl": "pkg:npm/harness-everything@0.36.0"
20
+ "version": "0.36.1",
21
+ "purl": "pkg:npm/harness-everything@0.36.1"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -1999,7 +1999,7 @@
1999
1999
  ]
2000
2000
  },
2001
2001
  {
2002
- "ref": "pkg:npm/harness-everything@0.36.0",
2002
+ "ref": "pkg:npm/harness-everything@0.36.1",
2003
2003
  "dependsOn": [
2004
2004
  "pkg:npm/%40commitlint/cli@19.8.1",
2005
2005
  "pkg:npm/%40commitlint/config-conventional@19.8.1",