@diffci.com/diffci 0.1.3 → 0.1.4

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@diffci.com/diffci.svg)](https://www.npmjs.com/package/@diffci.com/diffci)
4
4
  [![npm provenance](https://img.shields.io/badge/npm-provenance-blue)](https://docs.npmjs.com/generating-provenance-statements)
5
- [![GitHub Action](https://img.shields.io/badge/action-DiffCI%2FDiffCI.com%40v1-blue)](https://github.com/DiffCI/DiffCI.com)
5
+ [![GitHub Action](https://img.shields.io/badge/action-DiffCI%2FDiffCI.com%40v0.1.4-blue)](https://github.com/DiffCI/DiffCI.com)
6
6
 
7
7
  DiffCI is a deterministic, change-aware CI planner: given a commit or PR, it builds a real TypeScript
8
8
  dependency graph, computes what's actually reachable from the changed files, and proposes which CI
@@ -20,7 +20,7 @@ npx @diffci.com/diffci@latest verify-workflow
20
20
  Or install it as a non-blocking GitHub Action:
21
21
 
22
22
  ```yaml
23
- - uses: DiffCI/DiffCI.com@v1
23
+ - uses: DiffCI/DiffCI.com@v0.1.4
24
24
  ```
25
25
 
26
26
  The promise is deliberately narrow: DiffCI observes your CI and reports what it would have selected.
@@ -136,7 +136,7 @@ npm run research:sandbox:deploy
136
136
  DiffCI is intended to be installable as infrastructure, not only as a hosted shadow experiment:
137
137
 
138
138
  ```yaml
139
- - uses: DiffCI/DiffCI.com@v1
139
+ - uses: DiffCI/DiffCI.com@v0.1.4
140
140
  ```
141
141
 
142
142
  ```bash
@@ -101,6 +101,10 @@ function commandText(run) {
101
101
  return run
102
102
  .split("\n")
103
103
  .map((line) => line.replace(/(^|\s)#.*$/, "$1").replace(/[a-z][a-z0-9+.-]*:\/\/\S+/gi, " "))
104
+ // A literal npm registry tag removal neither installs nor invokes the observer. Match the
105
+ // entire line, with only a literal `|| true` allowed, so appended observer commands and shell
106
+ // substitutions still take the conservative inspection path. Other script lines remain intact.
107
+ .filter((line) => !/^\s*npm(?:\.cmd)?\s+dist-tag\s+(?:rm|remove)\s+@?[\w./-]+\s+[\w.-]+(?:\s*\|\|\s*true)?\s*$/.test(line))
104
108
  .join("\n");
105
109
  }
106
110
  /**
@@ -551,7 +551,13 @@ export async function buildDependencyGraph(options = {}) {
551
551
  const entryPointPaths = new Set(profile.entryPoints.map((e) => e.path));
552
552
  const vueSources = contributions.some((item) => item.id === "vue")
553
553
  ? files.filter((file) => /\.[cm]?[jt]sx?$/.test(file)).map((file) => join(repoPath, file)) : [];
554
- let { program, options: compilerOptions, resolvedViaProjectReferences } = createProgram(repoPath, profile.sourceRoots, vueSources);
554
+ // Compiler include/exclude controls typechecking, not the runner's test universe. Parse every
555
+ // discovered JS/TS test so source changes can reach tests outside the compiler's root files.
556
+ // Adding those tests only as leaf nodes silently loses their dependency edges (ky, 2026-09-19).
557
+ const testSources = profile.testFilePaths
558
+ .filter((file) => /\.[cm]?[jt]sx?$/.test(file))
559
+ .map((file) => join(repoPath, file));
560
+ let { program, options: compilerOptions, resolvedViaProjectReferences } = createProgram(repoPath, profile.sourceRoots, [...vueSources, ...testSources]);
555
561
  let moduleResolutionCache = ts.createModuleResolutionCache(repoPath, (x) => x, compilerOptions);
556
562
  const sourceFiles = program
557
563
  .getSourceFiles()
@@ -690,21 +696,8 @@ export async function buildDependencyGraph(options = {}) {
690
696
  adapterBlockers.push("Unresolved Vue dependencies require full validation");
691
697
  }
692
698
  profile.adapterBlockers = [...adapterBlockers];
693
- // Nested-package test visibility (2026-08-24, biomejs/biome finding): `internalSourcePaths` above is
694
- // strictly the TS PROGRAM's own file list (createProgram()'s `include`/nested-tsconfig-merged
695
- // fileNames) - so a package whose own tsconfig deliberately excludes its test directory (a real,
696
- // common pattern; confirmed verbatim on biome: `packages/@biomejs/js-api/tsconfig.json` has
697
- // `"exclude": ["./tests", "./dist"], "include": ["./src"]`) NEVER contributes those files to the
698
- // program, so they never became graph nodes and `totalTestsInGraph` stayed 0 even though
699
- // `profile.testFilePaths` (the separate, tsconfig-agnostic glob walk in analyzer.ts's discoverTests())
700
- // already found them correctly. Source-ROOT discovery itself was already correct (the 2026-08-21
701
- // zod/trpc fallback already lists `packages`/`crates` as roots for exactly this monorepo shape) - the
702
- // gap was narrower: the graph never incorporated what that walk found. Fix: union in any test file
703
- // discoverTests() found that the TS program's own file list missed, as an ADDITIONAL leaf node
704
- // (isTest true; no import edges - we have no real resolution info for a file the type-checker was
705
- // never asked to see, so dependency-graph traversal through it is honestly absent, not guessed at).
706
- // This does NOT add Rust visibility of any kind - testFilePaths only ever contains files already
707
- // matched by the JS/TS test-file patterns; a `.rs` test is never in it and stays "unknown" as before.
699
+ // Keep adapter-provided test identities visible as well. JS/TS tests are parsed above; their
700
+ // imports must not be replaced by disconnected leaf nodes merely because tsconfig excludes them.
708
701
  for (const testPath of profile.testFilePaths) {
709
702
  if (!internalSourcePaths.has(testPath) && !assetPaths.has(testPath))
710
703
  internalSourcePaths.add(testPath);
@@ -29,7 +29,7 @@ jobs:
29
29
  - uses: actions/checkout@v4
30
30
  with:
31
31
  fetch-depth: 0
32
- - uses: DiffCI/DiffCI.com@v1
32
+ - uses: DiffCI/DiffCI.com@v0.1.4
33
33
  ```
34
34
 
35
35
  For the strongest supply-chain posture, pin the Action to a full commit SHA. `npx @diffci.com/diffci@latest verify-workflow`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diffci.com/diffci",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "DiffCI - deterministic change-aware CI planning",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {