@diffci.com/diffci 0.3.37 → 0.3.39
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 +3 -3
- package/dist-client/src/client/agent-setup.d.ts +1 -1
- package/dist-client/src/client/agent-setup.js +1 -1
- package/dist-client/src/client/check-plan-junit.js +12 -3
- package/dist-client/src/client/command-batches.d.ts +6 -0
- package/dist-client/src/client/command-batches.js +7 -1
- package/dist-client/src/client/node-bin-launch.d.ts +10 -0
- package/dist-client/src/client/node-bin-launch.js +71 -0
- package/dist-client/src/client/verify-savings.js +18 -11
- package/node_modules/@diffci.com/core/README.md +15 -4
- package/node_modules/@diffci.com/core/dist/cache/economics-context.d.ts +4 -1
- package/node_modules/@diffci.com/core/dist/cache/economics-context.js +7 -3
- package/node_modules/@diffci.com/core/dist/cache/economics-context.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/cache/graph-cache.d.ts +1 -1
- package/node_modules/@diffci.com/core/dist/cache/graph-cache.js +5 -1
- package/node_modules/@diffci.com/core/dist/cache/graph-cache.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/ci-inference/evidence.js +1 -1
- package/node_modules/@diffci.com/core/dist/ci-inference/evidence.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/git/git-diff.d.ts +2 -0
- package/node_modules/@diffci.com/core/dist/git/git-diff.js +7 -6
- package/node_modules/@diffci.com/core/dist/git/git-diff.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/adapters/go.js +24 -7
- package/node_modules/@diffci.com/core/dist/repo/adapters/go.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/analyzer.js +16 -1
- package/node_modules/@diffci.com/core/dist/repo/analyzer.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/export-reach.d.ts +16 -0
- package/node_modules/@diffci.com/core/dist/repo/export-reach.js +113 -0
- package/node_modules/@diffci.com/core/dist/repo/export-reach.js.map +1 -0
- package/node_modules/@diffci.com/core/dist/repo/file-references.js +2 -1
- package/node_modules/@diffci.com/core/dist/repo/file-references.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/graph.js +429 -39
- package/node_modules/@diffci.com/core/dist/repo/graph.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/impact-types.d.ts +1 -1
- package/node_modules/@diffci.com/core/dist/repo/impact.d.ts +51 -0
- package/node_modules/@diffci.com/core/dist/repo/impact.js +296 -9
- package/node_modules/@diffci.com/core/dist/repo/impact.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/lockfiles.d.ts +5 -0
- package/node_modules/@diffci.com/core/dist/repo/lockfiles.js +12 -0
- package/node_modules/@diffci.com/core/dist/repo/lockfiles.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/repo-config.d.ts +5 -0
- package/node_modules/@diffci.com/core/dist/repo/repo-config.js +3 -1
- package/node_modules/@diffci.com/core/dist/repo/repo-config.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/types.d.ts +35 -1
- package/node_modules/@diffci.com/core/dist/repo/workspace-sources.d.ts +35 -0
- package/node_modules/@diffci.com/core/dist/repo/workspace-sources.js +292 -0
- package/node_modules/@diffci.com/core/dist/repo/workspace-sources.js.map +1 -0
- package/node_modules/@diffci.com/core/package.json +1 -1
- package/node_modules/@diffci.com/core/src/cache/economics-context.ts +7 -3
- package/node_modules/@diffci.com/core/src/cache/graph-cache.ts +5 -1
- package/node_modules/@diffci.com/core/src/ci-inference/evidence.ts +1 -1
- package/node_modules/@diffci.com/core/src/git/git-diff.ts +7 -6
- package/node_modules/@diffci.com/core/src/repo/adapters/go.ts +23 -7
- package/node_modules/@diffci.com/core/src/repo/analyzer.ts +15 -1
- package/node_modules/@diffci.com/core/src/repo/export-reach.ts +92 -0
- package/node_modules/@diffci.com/core/src/repo/file-references.ts +2 -1
- package/node_modules/@diffci.com/core/src/repo/graph.ts +365 -35
- package/node_modules/@diffci.com/core/src/repo/impact-types.ts +2 -0
- package/node_modules/@diffci.com/core/src/repo/impact.ts +267 -9
- package/node_modules/@diffci.com/core/src/repo/lockfiles.ts +13 -0
- package/node_modules/@diffci.com/core/src/repo/repo-config.ts +8 -1
- package/node_modules/@diffci.com/core/src/repo/types.ts +32 -1
- package/node_modules/@diffci.com/core/src/repo/workspace-sources.ts +273 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# DiffCI CLI
|
|
2
2
|
|
|
3
|
-
`@diffci.com/diffci`
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`@diffci.com/diffci` is verification for AI coding agents. It analyzes a local
|
|
4
|
+
Git checkout, runs the tests and checks a change affects when evidence is
|
|
5
|
+
complete, falls back to a full run when it is not, and leaves a receipt.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npx --yes @diffci.com/diffci@latest observe --no-send
|
|
@@ -26,7 +26,7 @@ export declare function mcpServerEntry(version: string): {
|
|
|
26
26
|
/** Adds or updates the `diffci` server and leaves every other server untouched. */
|
|
27
27
|
export declare function writeMcpConfig(repoPath: string, relativePath: string, version: string, force: boolean): string;
|
|
28
28
|
/** Kept identical to integrations/agent-plugin/skills/diffci-verify/SKILL.md (tested). */
|
|
29
|
-
export declare const DIFFCI_VERIFY_SKILL = "---\nname: diffci-verify\ndescription:
|
|
29
|
+
export declare const DIFFCI_VERIFY_SKILL = "---\nname: diffci-verify\ndescription: Verify an agent's change before reporting it ready: run the tests and checks it affects with DiffCI MCP tools or the DiffCI CLI, falling back to the full suite when unsure.\n---\n\nPass the absolute path of the edited repository as `repo` on every tool call.\n\nUse `diffci_changed_files` to inspect staged, unstaged, and non-ignored untracked\nchanges. Use `diffci_select_tests` or `diffci_explain_selection` when you need the\naffected-test plan, command, or reasons for full fallback. These tools run no tests;\ntheir counts describe test files, not passing test cases. A plan is not verification.\n\nBefore reporting an edited change ready, call `diffci_run_affected_tests`. It\nrecomputes the selection and verifies the current snapshot. Accept a passing result\nonly when `safe_to_continue` is true and `snapshot.unchanged` is true. After further\nedits, rerun verification. For a clean committed change, use `diffci_verify` with the\nintended base/head range instead; no uncommitted changes does not mean the commit\nhas been tested.\n\nIf MCP is unavailable, use the installed CLI:\n\n```bash\ndiffci verify --changed --repo /absolute/path/to/repository --json\n```\n\nIf DiffCI is not installed, use `npx \"@diffci.com/diffci@latest\" verify --changed`\nwith the same repo and JSON flags. On blocked analysis or installation failure,\nrun the repository's normal verification and report the limitation. On a test\nfailure, fix the cause and rerun. On snapshot changes from generated files, inspect\nthe files and rerun for that snapshot.\n\nReport executed command, selection scope (affected or full fallback), test-file\ncounts, outcome, and any outstanding required checks. Never infer passed suites,\ntest cases, skipped CI jobs, or measured savings from selection counts. Required\nproject CI stays authoritative.\n";
|
|
30
30
|
/**
|
|
31
31
|
* Stop hooks that run `diffci agent-stop` when the agent ends a turn (agent-stop.ts, 2026-11-06), in each
|
|
32
32
|
* agent's project hook file. Claude Code and Codex share one shape (`Stop` > group > handlers); Cursor has
|
|
@@ -81,7 +81,7 @@ export function writeMcpConfig(repoPath, relativePath, version, force) {
|
|
|
81
81
|
/** Kept identical to integrations/agent-plugin/skills/diffci-verify/SKILL.md (tested). */
|
|
82
82
|
export const DIFFCI_VERIFY_SKILL = `---
|
|
83
83
|
name: diffci-verify
|
|
84
|
-
description:
|
|
84
|
+
description: Verify an agent's change before reporting it ready: run the tests and checks it affects with DiffCI MCP tools or the DiffCI CLI, falling back to the full suite when unsure.
|
|
85
85
|
---
|
|
86
86
|
|
|
87
87
|
Pass the absolute path of the edited repository as \`repo\` on every tool call.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { posix, win32 } from "node:path";
|
|
3
3
|
import { SaxesParser } from "saxes";
|
|
4
|
+
/** A frame that may directly contain testsuite and testcase elements. */
|
|
5
|
+
function isSuiteContainer(frame) {
|
|
6
|
+
return frame?.name === "testsuite" || frame?.name === "testsuites" || frame?.nodeRoot === true;
|
|
7
|
+
}
|
|
4
8
|
const MAX_BYTES = 16 * 1024 * 1024;
|
|
5
9
|
const MAX_DEPTH = 128;
|
|
6
10
|
const MAX_TAGS = 100_000;
|
|
@@ -78,8 +82,13 @@ export function readJunit(xml, onCase) {
|
|
|
78
82
|
if (!parent && name !== "testsuite" && name !== "testsuites") {
|
|
79
83
|
invalid("The root must be testsuite or testsuites.");
|
|
80
84
|
}
|
|
81
|
-
if (name === "
|
|
82
|
-
|
|
85
|
+
if (name === "undefined" && attributes.name === "root" && parent?.name === "testsuites" && frames.length === 1) {
|
|
86
|
+
// Node's built-in junit reporter (verified on 24.16.0) writes the root test as this tag when a
|
|
87
|
+
// root-level hook fails, and nests the rest of the report inside it. It names no suite or file.
|
|
88
|
+
frame.nodeRoot = true;
|
|
89
|
+
}
|
|
90
|
+
else if (name === "testsuite" || name === "testsuites") {
|
|
91
|
+
if (parent && !isSuiteContainer(parent)) {
|
|
83
92
|
invalid("A test suite must be inside a suite container.");
|
|
84
93
|
}
|
|
85
94
|
const outer = inherited();
|
|
@@ -103,7 +112,7 @@ export function readJunit(xml, onCase) {
|
|
|
103
112
|
suites.push(suite);
|
|
104
113
|
}
|
|
105
114
|
else if (name === "testcase") {
|
|
106
|
-
if (parent
|
|
115
|
+
if (!isSuiteContainer(parent))
|
|
107
116
|
invalid("A testcase must be inside a testsuite.");
|
|
108
117
|
frame.testCase = {
|
|
109
118
|
skipped: false,
|
|
@@ -11,6 +11,12 @@ import { type CommandMeasurement } from "./verify-savings.js";
|
|
|
11
11
|
* listing a share of the files, run one after another and reported as one verification. Splitting only
|
|
12
12
|
* happens when the command ends in exactly the selected paths as plain tokens; anything else is left
|
|
13
13
|
* whole, because rewriting a command that is not understood could change what it runs.
|
|
14
|
+
*
|
|
15
|
+
* The Windows budget is 6,000 rather than 8,191 (2026-11-09): a part that still goes through `.cmd`
|
|
16
|
+
* shims (`npx.cmd`, then the runner's own) is re-expanded into further cmd.exe lines that add the node
|
|
17
|
+
* and shim paths and npm's `^` escapes. A 7,989-character part of a 282-file DentalPresence selection
|
|
18
|
+
* failed that way; measureCommand now also starts JavaScript runners with node directly
|
|
19
|
+
* (node-bin-launch.ts), and the margin covers the runners it cannot.
|
|
14
20
|
*/
|
|
15
21
|
export declare const COMMAND_LINE_LIMIT: number;
|
|
16
22
|
/**
|
|
@@ -13,8 +13,14 @@ import { measureCommand } from "./verify-savings.js";
|
|
|
13
13
|
* listing a share of the files, run one after another and reported as one verification. Splitting only
|
|
14
14
|
* happens when the command ends in exactly the selected paths as plain tokens; anything else is left
|
|
15
15
|
* whole, because rewriting a command that is not understood could change what it runs.
|
|
16
|
+
*
|
|
17
|
+
* The Windows budget is 6,000 rather than 8,191 (2026-11-09): a part that still goes through `.cmd`
|
|
18
|
+
* shims (`npx.cmd`, then the runner's own) is re-expanded into further cmd.exe lines that add the node
|
|
19
|
+
* and shim paths and npm's `^` escapes. A 7,989-character part of a 282-file DentalPresence selection
|
|
20
|
+
* failed that way; measureCommand now also starts JavaScript runners with node directly
|
|
21
|
+
* (node-bin-launch.ts), and the margin covers the runners it cannot.
|
|
16
22
|
*/
|
|
17
|
-
export const COMMAND_LINE_LIMIT = process.platform === "win32" ?
|
|
23
|
+
export const COMMAND_LINE_LIMIT = process.platform === "win32" ? 6000 : 100_000;
|
|
18
24
|
/**
|
|
19
25
|
* The runner prefix and the selected paths `command` ends with, one token each, or undefined when it does
|
|
20
26
|
* not end in exactly selected paths. Every rewrite here (batching, reordering, splitting) needs this shape.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `command` as Windows should launch it from `cwd`: `npx --no-install <bin> ...` becomes
|
|
3
|
+
* `node <script> ...` with the extra PATH entry, or `command` unchanged when that is not safe.
|
|
4
|
+
*/
|
|
5
|
+
export declare function windowsLaunch(command: string, cwd: string): {
|
|
6
|
+
command: string;
|
|
7
|
+
pathEntry?: string;
|
|
8
|
+
};
|
|
9
|
+
/** `env` with `entry` first on PATH, keeping Windows' own spelling of the key (usually `Path`). */
|
|
10
|
+
export declare function withPathEntry(env: NodeJS.ProcessEnv, entry: string): NodeJS.ProcessEnv;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { delimiter, dirname, join, relative, resolve } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Repository-local runners launched without Windows `.cmd` shims (2026-11-09).
|
|
5
|
+
*
|
|
6
|
+
* WHY. Selected TypeScript tests run as `npx --no-install tsx --test <files>`. On Windows `npx` is
|
|
7
|
+
* `npx.cmd`, which hands its arguments to node in a second cmd.exe line, and npx then starts `tsx.cmd`,
|
|
8
|
+
* a third. Each line adds the node and shim paths, and npm escapes arguments with `^`, and cmd.exe
|
|
9
|
+
* rejects any line over 8,191 characters. A DentalPresence selection of 282 files, batched into parts
|
|
10
|
+
* of at most 8,000 characters, still failed before any test ran with exit 255 and "The syntax of the
|
|
11
|
+
* command is incorrect"; `node node_modules/tsx/dist/cli.mjs` with the same files ran all 1,260 tests.
|
|
12
|
+
*
|
|
13
|
+
* WHAT. On Windows a command starting `npx --no-install <bin>` runs as `node <script>` when the
|
|
14
|
+
* package's bin is a JavaScript file reached through the repository's node_modules, with
|
|
15
|
+
* node_modules/.bin on PATH as npx would put it. Anything else (a native binary, a bin that cannot be
|
|
16
|
+
* resolved, other platforms) runs unchanged.
|
|
17
|
+
*/
|
|
18
|
+
const NPX_PREFIX = /^npx --no-install ([\w@./-]+)(?=\s|$)/;
|
|
19
|
+
const SAFE_PATH = /^[\w./@+-]+$/;
|
|
20
|
+
/** The `.bin` directory npx would use for `bin`: the nearest one at or above `cwd` that has it. */
|
|
21
|
+
function binDirectory(cwd, bin) {
|
|
22
|
+
for (let dir = resolve(cwd);; dir = dirname(dir)) {
|
|
23
|
+
const candidate = join(dir, "node_modules", ".bin");
|
|
24
|
+
if (existsSync(join(candidate, bin)) || existsSync(join(candidate, `${bin}.cmd`)))
|
|
25
|
+
return candidate;
|
|
26
|
+
if (dirname(dir) === dir)
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** The JavaScript file the npm/pnpm `sh` shim for `bin` runs with node, or undefined. */
|
|
31
|
+
function shimScript(binDir, bin) {
|
|
32
|
+
const shim = join(binDir, bin);
|
|
33
|
+
if (!existsSync(shim))
|
|
34
|
+
return undefined;
|
|
35
|
+
let text;
|
|
36
|
+
try {
|
|
37
|
+
text = readFileSync(shim, "utf8");
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
// npm: exec node "$basedir/../tsx/dist/cli.mjs" "$@" pnpm: exec node "$basedir/../tsx/dist/cli.mjs" "$@"
|
|
43
|
+
const match = /exec\s+(?:"\$basedir\/node"|node)\s+"\$basedir\/([^"$]+)"\s+"\$@"/.exec(text);
|
|
44
|
+
if (!match)
|
|
45
|
+
return undefined;
|
|
46
|
+
const script = resolve(binDir, match[1]);
|
|
47
|
+
return /\.(?:c|m)?js$/.test(script) && existsSync(script) ? script : undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* `command` as Windows should launch it from `cwd`: `npx --no-install <bin> ...` becomes
|
|
51
|
+
* `node <script> ...` with the extra PATH entry, or `command` unchanged when that is not safe.
|
|
52
|
+
*/
|
|
53
|
+
export function windowsLaunch(command, cwd) {
|
|
54
|
+
const match = NPX_PREFIX.exec(command);
|
|
55
|
+
if (!match)
|
|
56
|
+
return { command };
|
|
57
|
+
const binDir = binDirectory(cwd, match[1]);
|
|
58
|
+
const script = binDir ? shimScript(binDir, match[1]) : undefined;
|
|
59
|
+
if (!binDir || !script)
|
|
60
|
+
return { command };
|
|
61
|
+
const path = relative(cwd, script).replace(/\\/g, "/");
|
|
62
|
+
if (!SAFE_PATH.test(path))
|
|
63
|
+
return { command };
|
|
64
|
+
return { command: `node ${path}${command.slice(match[0].length)}`, pathEntry: binDir };
|
|
65
|
+
}
|
|
66
|
+
/** `env` with `entry` first on PATH, keeping Windows' own spelling of the key (usually `Path`). */
|
|
67
|
+
export function withPathEntry(env, entry) {
|
|
68
|
+
const key = Object.keys(env).find((name) => name.toUpperCase() === "PATH") ?? "PATH";
|
|
69
|
+
const current = env[key];
|
|
70
|
+
return { ...env, [key]: current ? `${entry}${delimiter}${current}` : entry };
|
|
71
|
+
}
|
|
@@ -4,6 +4,7 @@ import { existsSync, lstatSync, mkdirSync, readFileSync, writeFileSync } from "n
|
|
|
4
4
|
import { arch, cpus, platform, release, totalmem } from "node:os";
|
|
5
5
|
import { basename, dirname, resolve } from "node:path";
|
|
6
6
|
import { failingTestNames } from "./failure-baseline.js";
|
|
7
|
+
import { windowsLaunch, withPathEntry } from "./node-bin-launch.js";
|
|
7
8
|
import { runnerTestCount } from "./selected-coverage.js";
|
|
8
9
|
import { parseTestFileResults } from "./test-results.js";
|
|
9
10
|
import { classifyFailureFromEvidence, computeFailureFingerprint } from "../preflight/fingerprint.js";
|
|
@@ -252,23 +253,29 @@ export function measureCommand(command, options) {
|
|
|
252
253
|
const started = Date.now();
|
|
253
254
|
// Match the shell used by Windows package scripts, including && short-circuiting
|
|
254
255
|
// and native exit codes; Windows PowerShell 5 cannot execute those chains.
|
|
255
|
-
const
|
|
256
|
-
const
|
|
256
|
+
const windows = process.platform === "win32";
|
|
257
|
+
const shellCommand = windows ? "cmd.exe" : "sh";
|
|
258
|
+
// On Windows a repository-local runner starts as `node <script>`, not through `npx.cmd` and its bin's
|
|
259
|
+
// `.cmd` shim, each of which re-expands the arguments into another cmd.exe line (node-bin-launch.ts).
|
|
260
|
+
// The measurement still reports the command as planned.
|
|
261
|
+
const launch = windows ? windowsLaunch(command, options.cwd) : { command };
|
|
262
|
+
const shellArgv = windows ? ["/d", "/s", "/c", launch.command] : ["-c", command];
|
|
263
|
+
const env = {
|
|
264
|
+
...withoutTestRunnerContext(process.env),
|
|
265
|
+
...options.env,
|
|
266
|
+
CI: "1",
|
|
267
|
+
FORCE_COLOR: "0",
|
|
268
|
+
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
|
|
269
|
+
npm_config_yes: "true",
|
|
270
|
+
};
|
|
257
271
|
const result = spawnSync(shellCommand, shellArgv, {
|
|
258
272
|
cwd: options.cwd,
|
|
259
273
|
encoding: "utf8",
|
|
260
274
|
timeout: options.timeoutMs,
|
|
261
275
|
maxBuffer: 256 * 1024 * 1024,
|
|
262
276
|
shell: false,
|
|
263
|
-
windowsVerbatimArguments:
|
|
264
|
-
env:
|
|
265
|
-
...withoutTestRunnerContext(process.env),
|
|
266
|
-
...options.env,
|
|
267
|
-
CI: "1",
|
|
268
|
-
FORCE_COLOR: "0",
|
|
269
|
-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
|
|
270
|
-
npm_config_yes: "true",
|
|
271
|
-
},
|
|
277
|
+
windowsVerbatimArguments: windows,
|
|
278
|
+
env: launch.pathEntry ? withPathEntry(env, launch.pathEntry) : env,
|
|
272
279
|
});
|
|
273
280
|
const finishedAt = new Date().toISOString();
|
|
274
281
|
const failingTests = result.status === 0 ? [] : failingTestNames(`${result.stdout ?? ""}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://scorecard.dev/viewer/?uri=github.com/DiffCI/core)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Verification for AI coding agents.** DiffCI tells Claude Code, Codex, Cursor (or you) which tests and checks a change affects, runs them before the push instead of letting them fail at the full CI gate afterwards, and leaves a receipt of what ran and what was skipped. MIT licensed, runs locally, sends nothing by default, and falls back to the full suite whenever the evidence is incomplete.
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
11
|
npx "@diffci.com/diffci@latest" check
|
|
@@ -13,11 +13,13 @@ npx "@diffci.com/diffci@latest" check
|
|
|
13
13
|
|
|
14
14
|
Run it in any Git checkout with Node.js 22.5+. [What the output means](docs/using-diffci.md).
|
|
15
15
|
|
|
16
|
+
If DiffCI saves you CI time, a ⭐ helps others find it.
|
|
17
|
+
|
|
16
18
|
**On every pull request**, add one job beside your existing CI. Its job summary shows which tests the change affects and why, or that the full suite is needed and why. It runs no tests and skips or changes nothing:
|
|
17
19
|
|
|
18
20
|
```yaml
|
|
19
21
|
- uses: actions/checkout@v7
|
|
20
|
-
- uses: DiffCI/core@v0.3.
|
|
22
|
+
- uses: DiffCI/core@v0.3.38
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
Add `with: comment: "true"` (and `pull-requests: write` on the job) and the same answer appears on the pull request itself, updated in place on each push:
|
|
@@ -117,6 +119,12 @@ the pull request up to date with the answer, where reviewers see it. Outputs
|
|
|
117
119
|
such as `full-suite-required` and `affected-tests` let a workflow act on the
|
|
118
120
|
answer; see [outputs](docs/github-action-observer.md#outputs).
|
|
119
121
|
|
|
122
|
+
Set `verify: "true"` for a [fast check](docs/github-action-observer.md#fast-check):
|
|
123
|
+
the Action also runs the affected tests and lint/typecheck, likeliest failures
|
|
124
|
+
first, and fails within minutes when one breaks. It adds a job and skips
|
|
125
|
+
nothing, so your full test job stays as it is
|
|
126
|
+
([example](examples/github-actions-fast-check.yml)).
|
|
127
|
+
|
|
120
128
|
The [v0.3.10 corresponding source](https://github.com/DiffCI/core/tree/4c76be14cec37d94eb7df93922f3c29d202f4e65/packages/diffci-cli)
|
|
121
129
|
remains publicly available at tagged Core commit `4c76be14` (`cli-v0.3.10-source`)
|
|
122
130
|
while distribution migrates to the Core-native CLI package.
|
|
@@ -132,7 +140,7 @@ Watch → Custom → Releases and Discussions for benchmark results and support
|
|
|
132
140
|
|
|
133
141
|
This is the standalone Core engine. It analyzes local JavaScript/TypeScript repositories, supported Vue components, root Go modules, conventional Maven reactors and Python projects tested with pytest, traces dependency impact, infers GitHub Actions structure and proposes test selections with evidence and full-run fallbacks. It works without a DiffCI account, hosted service or API key. See [the release boundary](docs/release-boundary.md) for support limits.
|
|
134
142
|
|
|
135
|
-
**Want to try DiffCI in an existing repository?** Use the published CLI: `npx @diffci.com/diffci@latest check`. See [the CLI quickstart](docs/using-diffci.md) for a no-execution analysis option, prerequisites, and result interpretation. The commands below build the standalone engine from source.
|
|
143
|
+
**Want to try DiffCI in an existing repository?** Use the published CLI: `npx @diffci.com/diffci@latest check`. See [the CLI quickstart](docs/using-diffci.md) for a no-execution analysis option, prerequisites, and result interpretation. To get help setting it up and have the cases that matter to your repository fixed first, [join as a design partner](https://github.com/DiffCI/core/issues/86). Tried it already? [Share your result](https://github.com/DiffCI/core/issues/new?template=community-result.yml), including fallbacks, refusals and misses, and choose whether we may publish it. The commands below build the standalone engine from source.
|
|
136
144
|
|
|
137
145
|
## Run locally
|
|
138
146
|
|
|
@@ -233,7 +241,7 @@ What stays in Core, and never moves to Cloud, is set out in [STEWARDSHIP.md](STE
|
|
|
233
241
|
|
|
234
242
|
## Contributing
|
|
235
243
|
|
|
236
|
-
Most open work is teaching DiffCI to narrow changes it currently treats as "run everything": config files, `package.json` edits and lockfiles. Each case is small and comes with a synthetic fixture, so you don't need to learn the whole engine.
|
|
244
|
+
Most open work is teaching DiffCI to narrow changes it currently treats as "run everything": config files, `package.json` edits and lockfiles. Each case is small and comes with a synthetic fixture, so you don't need to learn the whole engine. Django, Rust and PHP support are next and split into one-PR steps: see the [Django](https://github.com/DiffCI/core/issues/87), [Rust](https://github.com/DiffCI/core/issues/62) and [PHP](https://github.com/DiffCI/core/issues/88) tracking issues, or the [Go](https://github.com/DiffCI/core/issues/76) and [Maven](https://github.com/DiffCI/core/issues/89) ones for fewer full-suite fallbacks. Pick a [good first issue](https://github.com/DiffCI/core/issues?q=is%3Aopen+label%3A%22good+first+issue%22) and see [CONTRIBUTING.md](CONTRIBUTING.md); a dev container is included.
|
|
237
245
|
|
|
238
246
|
### Contributors
|
|
239
247
|
|
|
@@ -241,7 +249,10 @@ Thank you to everyone who has improved DiffCI:
|
|
|
241
249
|
|
|
242
250
|
- <a href="https://github.com/KingEmma7"><img src="https://github.com/KingEmma7.png?size=80" width="40" height="40" alt="@KingEmma7"></a> **[Emmanuel Mawulolo Tagbor](https://github.com/KingEmma7)**: [`diffci check-plan`](docs/using-diffci.md#compare-a-plan-with-a-full-suite-junit-report) for comparing a saved plan with full-suite JUnit results ([#74](https://github.com/DiffCI/core/pull/74)), Yarn Classic lockfile narrowing ([#63](https://github.com/DiffCI/core/pull/63)), and follow-ups ([#67](https://github.com/DiffCI/core/pull/67), [#70](https://github.com/DiffCI/core/pull/70)).
|
|
243
251
|
- <a href="https://github.com/FredApps"><img src="https://github.com/FredApps.png?size=80" width="40" height="40" alt="@FredApps"></a> **[@FredApps](https://github.com/FredApps)**: five safety fixes for runtime module dependencies, Maven module resources, runner suites, deleted assets and Go runtime inputs ([#32](https://github.com/DiffCI/core/pull/32)–[#36](https://github.com/DiffCI/core/pull/36)).
|
|
252
|
+
- <a href="https://github.com/shounakjoshi88-a11y"><img src="https://github.com/shounakjoshi88-a11y.png?size=80" width="40" height="40" alt="@shounakjoshi88-a11y"></a> **[Shounak Joshi](https://github.com/shounakjoshi88-a11y)**: Go package-owned `testdata` selection, so a golden-file edit runs the owning package's tests instead of the full suite ([#85](https://github.com/DiffCI/core/pull/85)).
|
|
244
253
|
- <a href="https://github.com/bfs2021"><img src="https://github.com/bfs2021.png?size=80" width="40" height="40" alt="@bfs2021"></a> **[@bfs2021](https://github.com/bfs2021)**: `bun.lock` and `npm-shrinkwrap.json` recognition in the lockfile signal ([#64](https://github.com/DiffCI/core/pull/64)).
|
|
254
|
+
- <a href="https://github.com/sarankumar1325"><img src="https://github.com/sarankumar1325.png?size=80" width="40" height="40" alt="@sarankumar1325"></a> **[@sarankumar1325](https://github.com/sarankumar1325)**: `bun.lock` detection in CI inference ([#105](https://github.com/DiffCI/core/pull/105)), removal of dead config-file patterns with a test for every entry ([#106](https://github.com/DiffCI/core/pull/106)), a shared lockfile list so every lockfile invalidates the Vue analysis cache ([#107](https://github.com/DiffCI/core/pull/107)), a regression test for `vite.config`-only changes in Vitest projects ([#109](https://github.com/DiffCI/core/pull/109)), Go `replace` targets inside the repository modelled under root-module scope instead of forcing the full suite ([#110](https://github.com/DiffCI/core/pull/110)), a full run when only `babel.config.*` or `.babelrc*` changes, where these files used to select no tests ([#108](https://github.com/DiffCI/core/pull/108)), and the shared lockfile names in reference resolution, impact analysis and the lockfile-free dependency check, replacing three hand-written copies ([#118](https://github.com/DiffCI/core/pull/118)–[#120](https://github.com/DiffCI/core/pull/120)).
|
|
255
|
+
- <a href="https://github.com/robertwmccarty-caelum"><img src="https://github.com/robertwmccarty-caelum.png?size=80" width="40" height="40" alt="@robertwmccarty-caelum"></a> **[@robertwmccarty-caelum](https://github.com/robertwmccarty-caelum)**: the Vitest reporter/timeout config fixture and its narrowing conditions ([#53](https://github.com/DiffCI/core/issues/53#issuecomment-6514436312), landed in [#65](https://github.com/DiffCI/core/pull/65)).
|
|
245
256
|
- <a href="https://github.com/varshith84"><img src="https://github.com/varshith84.png?size=80" width="40" height="40" alt="@varshith84"></a> **[Varshith Sai Pasupuleti](https://github.com/varshith84)**: tests for transitive Vue selection and full fallback ([#16](https://github.com/DiffCI/core/pull/16)).
|
|
246
257
|
|
|
247
258
|
Every merged contribution is credited in the release notes, here, and next to the feature in the docs.
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Files that determine whether a cached Vue analysis still matches the checkout configuration.
|
|
3
|
+
* The declared Vue package can carry its own lockfile, so every lockfile name is hashed there too.
|
|
4
|
+
*/
|
|
2
5
|
export declare function economicsContext(repoPath: string): string;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
import { LOCKFILE_NAMES } from "../repo/lockfiles.js";
|
|
4
5
|
import { readRepositoryConfig } from "../repo/repo-config.js";
|
|
5
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Files that determine whether a cached Vue analysis still matches the checkout configuration.
|
|
8
|
+
* The declared Vue package can carry its own lockfile, so every lockfile name is hashed there too.
|
|
9
|
+
*/
|
|
6
10
|
export function economicsContext(repoPath) {
|
|
7
11
|
const scope = readRepositoryConfig(repoPath).vue;
|
|
8
|
-
const paths = new Set(["diffci.json", "package.json", "tsconfig.json", "go.mod", "go.sum", "go.work", "go.work.sum",
|
|
12
|
+
const paths = new Set(["diffci.json", "package.json", "tsconfig.json", "go.mod", "go.sum", "go.work", "go.work.sum", ...LOCKFILE_NAMES, ...["ts", "js", "mts", "mjs", "cts", "cjs"].map(ext => `vitest.config.${ext}`)]);
|
|
9
13
|
if (scope)
|
|
10
|
-
for (const path of ["package.json", "tsconfig.json", scope.testConfig])
|
|
14
|
+
for (const path of ["package.json", "tsconfig.json", scope.testConfig, ...LOCKFILE_NAMES])
|
|
11
15
|
paths.add(`${scope.packageRoot}/${path}`);
|
|
12
16
|
const hash = createHash("sha256").update(JSON.stringify([process.platform, process.arch, process.version]));
|
|
13
17
|
for (const path of [...paths].sort()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"economics-context.js","sourceRoot":"","sources":["../../src/cache/economics-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"economics-context.js","sourceRoot":"","sources":["../../src/cache/economics-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OA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,UAAU,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -7,7 +7,11 @@ import { resolve } from "node:path";
|
|
|
7
7
|
// 6: the profile's diffciConfig carries declared `inputs` (2026-11-05).
|
|
8
8
|
// 7: folded computed specifiers and root-absolute Vite globs have edges (2026-11-06).
|
|
9
9
|
// 8: Python projects have a graph, and the profile carries pythonSources/pythonTests (2026-11-06).
|
|
10
|
-
|
|
10
|
+
// 11: results carry export-level `bindings` (2026-11-10).
|
|
11
|
+
// 12: bindings mark computed loads that run when a module loads (2026-11-10).
|
|
12
|
+
// 13: tsd and tstyche scope type edges to their own files (typeTestGlobs) (2026-11-10).
|
|
13
|
+
// 14: path-literal edges from strings naming code files (2026-11-10).
|
|
14
|
+
export const GRAPH_CACHE_SCHEMA_VERSION = "14";
|
|
11
15
|
export function buildGraphCacheKey(inputs) {
|
|
12
16
|
const payload = JSON.stringify({
|
|
13
17
|
schema: GRAPH_CACHE_SCHEMA_VERSION,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-cache.js","sourceRoot":"","sources":["../../src/cache/graph-cache.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,6FAA6F;AAC7F,mGAAmG;AACnG,wEAAwE;AACxE,sFAAsF;AACtF,mGAAmG;AACnG,MAAM,CAAC,MAAM,0BAA0B,GAAG,
|
|
1
|
+
{"version":3,"file":"graph-cache.js","sourceRoot":"","sources":["../../src/cache/graph-cache.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,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AC,IAAI,CAAC,EAAE,CAAC;YACrB,kFAAkF;YAClF,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -60,7 +60,7 @@ export function packageFacts(repoPath) {
|
|
|
60
60
|
/** Which lockfile is committed. The repository's own statement about its package manager. */
|
|
61
61
|
export function lockfileFacts(repoPath) {
|
|
62
62
|
const facts = [];
|
|
63
|
-
for (const name of ["pnpm-lock.yaml", "yarn.lock", "package-lock.json", "bun.lockb", "npm-shrinkwrap.json"]) {
|
|
63
|
+
for (const name of ["pnpm-lock.yaml", "yarn.lock", "package-lock.json", "bun.lock", "bun.lockb", "npm-shrinkwrap.json"]) {
|
|
64
64
|
if (existsSync(join(repoPath, name))) {
|
|
65
65
|
facts.push({ kind: "lockfile.present", value: name, evidence: { file: name, text: name } });
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/ci-inference/evidence.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAI1C,0FAA0F;AAC1F,SAAS,MAAM,CAAC,MAAc,EAAE,MAAc;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACnC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AAC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AAE,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;oBACnH,CAAC;gBACH,CAAC;gBACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAA4B,CAAC,EAAE,CAAC;oBACvF,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;gBAClI,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO;QACL,GAAG,aAAa,CAAC,QAAQ,CAAC;QAC1B,GAAG,YAAY,CAAC,QAAQ,CAAC;QACzB,GAAG,aAAa,CAAC,QAAQ,CAAC;QAC1B,GAAG,gBAAgB,CAAC,QAAQ,CAAC;QAC7B,GAAG,iBAAiB,CAAC,QAAQ,CAAC;KAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -17,6 +17,8 @@ declare class GitDiffError extends Error {
|
|
|
17
17
|
export declare function parseNameStatus(buffer: Buffer): ChangedFile[];
|
|
18
18
|
export declare function parseNumstat(buffer: Buffer): Map<string, boolean>;
|
|
19
19
|
export declare function normalizeDirectories(paths: Iterable<string>): string[];
|
|
20
|
+
/** Exported for tests only: each entry must match a real configuration file name. */
|
|
21
|
+
export declare const CONFIG_PATTERNS: RegExp[];
|
|
20
22
|
/** Narrows a path-based "package.json changed" signal to whether any behaviorally-relevant field
|
|
21
23
|
* actually changed, given both versions' raw content. Returns true (never narrows) whenever either
|
|
22
24
|
* side is missing/unparseable - a file that was added, deleted, or became invalid JSON is unambiguously
|
|
@@ -5,7 +5,7 @@ import { workflowMayRunTests } from "../repo/workflow-test-steps.js";
|
|
|
5
5
|
import { npmLockAffectedDependencies } from "../repo/npm-lockfile.js";
|
|
6
6
|
import { pnpmLockAffectedDependencies } from "../repo/pnpm-lockfile.js";
|
|
7
7
|
import { yarnLockAffectedDependencies } from "../repo/yarn-lockfile.js";
|
|
8
|
-
import { LOCKFILE } from "../repo/lockfiles.js";
|
|
8
|
+
import { LOCKFILE, LOCKFILE_NAMES } from "../repo/lockfiles.js";
|
|
9
9
|
import { ciConfigPredicate, gitlabLocalIncludes, isConventionalCiConfigPath } from "./ci-config-paths.js";
|
|
10
10
|
export const EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
11
11
|
export const ZERO_SHA = "0000000000000000000000000000000000000000";
|
|
@@ -139,12 +139,12 @@ export function normalizeDirectories(paths) {
|
|
|
139
139
|
dirs.sort((a, b) => a.localeCompare(b));
|
|
140
140
|
return dirs;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
/** Exported for tests only: each entry must match a real configuration file name. */
|
|
143
|
+
export const CONFIG_PATTERNS = [
|
|
143
144
|
/^next\.config\./,
|
|
144
145
|
/^tsconfig\.json$/,
|
|
145
146
|
/^jsconfig\.json$/,
|
|
146
147
|
/^eslint\.config\./,
|
|
147
|
-
/^eslint\.rc/,
|
|
148
148
|
/^\.eslint/,
|
|
149
149
|
/^postcss\.config\./,
|
|
150
150
|
/^tailwind\.config\./,
|
|
@@ -152,6 +152,9 @@ const CONFIG_PATTERNS = [
|
|
|
152
152
|
/^prettier\.config\./,
|
|
153
153
|
/^vitest\.config\./,
|
|
154
154
|
/^jest\.config\./,
|
|
155
|
+
// babel-jest transforms every test file with these; without this a .js/.ts babel.config or .babelrc.js was
|
|
156
|
+
// classified as source with no importers and selected no tests (2026-11-11, #99).
|
|
157
|
+
/^(?:babel\.config\.|\.babelrc)/,
|
|
155
158
|
/^playwright\.config\./,
|
|
156
159
|
/^webpack\.config\./,
|
|
157
160
|
/^rollup\.config\./,
|
|
@@ -169,7 +172,6 @@ const CONFIG_PATTERNS = [
|
|
|
169
172
|
/^yarn\.lock$/,
|
|
170
173
|
/^pnpm-lock\.yaml$/,
|
|
171
174
|
/^bun\.lockb$/,
|
|
172
|
-
/^(npm|pnpm|yarn)-lock\./,
|
|
173
175
|
// Python projects (2026-11-06): what pytest, the interpreter and the installed packages are.
|
|
174
176
|
/^pyproject\.toml$/,
|
|
175
177
|
/^setup\.(?:py|cfg)$/,
|
|
@@ -294,7 +296,6 @@ export function testListEdit(oldBody, newBody) {
|
|
|
294
296
|
return { added, removed };
|
|
295
297
|
}
|
|
296
298
|
const DEPENDENCY_FIELDS = new Set(["dependencies", "devDependencies", "optionalDependencies"]);
|
|
297
|
-
const PACKAGE_LOCKFILES = ["package-lock.json", "npm-shrinkwrap.json", "yarn.lock", "pnpm-lock.yaml", "bun.lock", "bun.lockb"];
|
|
298
299
|
/** Exact root requests for the supported Classic layout. Unlike scriptRecord, never discard an
|
|
299
300
|
* invalid dependency value: an omitted root would make the lockfile attribution incomplete. */
|
|
300
301
|
function yarnDirectDependencies(content) {
|
|
@@ -808,7 +809,7 @@ export async function analyzeGitDelta(options = {}) {
|
|
|
808
809
|
const lockfileGoverns = (path) => {
|
|
809
810
|
for (let dir = posix.dirname(path);; dir = posix.dirname(dir)) {
|
|
810
811
|
const prefix = dir === "." ? "" : `${dir}/`;
|
|
811
|
-
if (
|
|
812
|
+
if (LOCKFILE_NAMES.some((name) => [baseSha, headSha].some((sha) => readFileAtSha(sha, prefix + name, repoPath) !== undefined)))
|
|
812
813
|
return true;
|
|
813
814
|
if (dir === ".")
|
|
814
815
|
return false;
|