mirror of
https://github.com/expo/explore.git
synced 2026-11-15 17:32:23 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10e5ee3cfe | ||
|
|
cdf2a0dd0d | ||
|
|
4bcedd33a5 | ||
|
|
b8e6b9cf7d |
No files matched your search
@@ -8,7 +8,7 @@ The same workflow supports Expo Router and React Navigation applications on iOS.
|
||||
|
||||
Expo Router inventory comes from route files and layouts. React Navigation inventory comes from statically readable JSX or object screen registrations and navigator hierarchies. Linking determines entry paths independently of route discovery. Unsupported computed declarations and unresolved paths remain diagnostics; analysis does not execute the app to guess their values.
|
||||
|
||||
`changes` starts with the exact two-dot Git diff and dependency impact, then adds, independently on each revision, the routes one navigation step before or after an affected route. Layout or screen guards do not count as steps. Forwarding routes have no screenshot of their own, so their redirect chains are followed to the first screen. `all` selects the full inventory. Source context does not imply a visible modification.
|
||||
`changes` starts with the exact two-dot Git diff and dependency impact (a JavaScript or TypeScript file whose two revisions parse to the same syntax tree, differing only in comments or in whitespace the compiler and JSX transform drop, reaches no screen; a comment a compiler reads, such as `@jsx` or `#__PURE__`, still counts), then adds, independently on each revision, the routes one navigation step before or after an affected route. Layout or screen guards do not count as steps. Forwarding routes have no screenshot of their own, so their redirect chains are followed to the first screen. `all` selects the full inventory. Source context does not imply a visible modification.
|
||||
|
||||
Before app build or simulator allocation, CI regenerates the canonical plan in fresh processes and compares bytes. A mismatch fails with diagnostic plans and their diff. Run identities, timestamps, absolute checkout paths, screenshots, and cache hits are excluded from planning data. Tests also vary enumeration order and checkout location.
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { createHash } from "node:crypto";
|
||||
import { canonicalizeSourceChanges, type SourceChange } from "./git-diff.js";
|
||||
import type { SourceChangeSummary } from "./change-summary.js";
|
||||
import { hasRuntimeChange, readSourceSnapshot, surfaceDependencies, type SourceSnapshot } from "./dependency-graph.js";
|
||||
import { sameCodeIgnoringTrivia } from "./trivia.js";
|
||||
import { discoverRoutes, type DiscoverRouteOptions } from "./route-inventory.js";
|
||||
import { sourceRouteNames, validateSourceRoutes, type SourceRoute } from "../contracts/source-route.js";
|
||||
import { navigationCaptureContext, type NavigationGraph } from "../contracts/navigation-graph.js";
|
||||
@@ -120,7 +121,15 @@ export function createSourceCapturePlan(options: CapturePlanOptions): SourceCapt
|
||||
const headRoutes = checkedRoutes(options.headRoutes, headInventory.routes, "head");
|
||||
const base = surfaceDependencies(baseRoutes, options.baseFiles, options.platform);
|
||||
const head = surfaceDependencies(headRoutes, options.headFiles, options.platform);
|
||||
const changes = canonicalizeSourceChanges(options.changedFiles).filter(change => !/(?:^|\/)surfaces?\.json$/.test(change.path));
|
||||
// A file whose two versions differ only in comments or whitespace compiles to the same program, so it changes no screen.
|
||||
// Parsed once per path: every surface that imports a shared file asks about it.
|
||||
const trivia = new Map<string, boolean>();
|
||||
const triviaOnly = (path: string) => {
|
||||
if (!trivia.has(path)) trivia.set(path, sameCodeIgnoringTrivia(path, options.baseFiles.get(path), options.headFiles.get(path)));
|
||||
return trivia.get(path)!;
|
||||
};
|
||||
const changes = canonicalizeSourceChanges(options.changedFiles).filter(change => !/(?:^|\/)surfaces?\.json$/.test(change.path)
|
||||
&& !(change.status === "modified" && triviaOnly(change.path)));
|
||||
const changedPaths = new Set(changes.flatMap(change => [change.path, ...("previousPath" in change ? [change.previousPath] : [])]));
|
||||
const externalRuntimeChange = hasRuntimeChange(options.externalChanges ?? []);
|
||||
const unresolved = [...new Set([...base.unresolved, ...head.unresolved,
|
||||
@@ -138,7 +147,7 @@ export function createSourceCapturePlan(options: CapturePlanOptions): SourceCapt
|
||||
const headSurface = headById.get(id) ?? null;
|
||||
const dependencies = new Set([...(baseSurface?.sourceFiles ?? []), ...(headSurface?.sourceFiles ?? [])]);
|
||||
const touched = [...changedPaths].filter(path => dependencies.has(path)).sort();
|
||||
const sourceChanged = baseSurface && headSurface && [...dependencies].some(path => options.baseFiles.get(path) !== options.headFiles.get(path));
|
||||
const sourceChanged = baseSurface && headSurface && [...dependencies].some(path => options.baseFiles.get(path) !== options.headFiles.get(path) && !triviaOnly(path));
|
||||
const definitionChanged = baseSurface && headSurface && canonicalJSON(baseSurface) !== canonicalJSON(headSurface);
|
||||
// A redirect renders no interface: only its own declaration can change what it does, so
|
||||
// imported or app-wide edits cannot make it a reviewable difference.
|
||||
|
||||
@@ -3,6 +3,7 @@ import ts from "typescript";
|
||||
import { parseTwoDotNameStatus, type SourceChange } from "./git-diff.js";
|
||||
import type { SourceCapturePlan } from "./capture-plan.js";
|
||||
import { DEFAULT_GLOBAL_IMPACT_PATHS } from "./impact.js";
|
||||
import { sameCodeIgnoringTrivia } from "./trivia.js";
|
||||
import { sourceImpactKinds, sourceImpactSentences } from "../contracts/source-change.js";
|
||||
|
||||
export type SourceLineRange = { start: number; end: number };
|
||||
@@ -376,10 +377,13 @@ function changedPaths(change: SourceChange): string[] {
|
||||
return [change.path, ...("previousPath" in change ? [change.previousPath] : [])];
|
||||
}
|
||||
|
||||
/** A modified file whose program did not change (comments or whitespace only) leaves no evidence: it changes no screen. */
|
||||
type FileEvidence = Omit<SourceFileChangeSummary, "relation"> | { triviaOnly: true };
|
||||
|
||||
function fileEvidence(options: {
|
||||
baseProject: string; headProject: string; baseSha: string; headSha: string;
|
||||
change: SourceChange; budget: { remaining: number };
|
||||
}): Omit<SourceFileChangeSummary, "relation"> {
|
||||
}): FileEvidence {
|
||||
const { change } = options;
|
||||
const previousPath = "previousPath" in change ? change.previousPath : undefined;
|
||||
const base = readBlob(options.baseProject, options.baseSha, previousPath ?? change.path, options.budget);
|
||||
@@ -392,6 +396,7 @@ function fileEvidence(options: {
|
||||
baseStart: Number(match[1]), baseLines: Number(match[2] ?? 1),
|
||||
headStart: Number(match[3]), headLines: Number(match[4] ?? 1),
|
||||
}));
|
||||
if (change.status === "modified" && !base.truncated && !head.truncated && sameCodeIgnoringTrivia(change.path, base.source, head.source)) return { triviaOnly: true };
|
||||
const extracted = base.truncated || head.truncated ? undefined : codeFacts(change.path, base.source ?? "", head.source ?? "");
|
||||
const facts = extracted?.length ? extracted : [{
|
||||
kind: "code" as const,
|
||||
@@ -461,7 +466,7 @@ export function createSourceChangeSummaries(options: {
|
||||
], 4 * 1024 * 1024).stdout));
|
||||
if (changes.length > SOURCE_CHANGE_SUMMARY_LIMITS.changedFiles) throw new Error("Source summary exceeds changed-file limit");
|
||||
const globals = new Set<string>([...DEFAULT_GLOBAL_IMPACT_PATHS.filter((path) => !path.endsWith("/")), "tsconfig.json"]);
|
||||
const cache = new Map<string, Omit<SourceFileChangeSummary, "relation">>();
|
||||
const cache = new Map<string, FileEvidence>();
|
||||
const budget = { remaining: SOURCE_CHANGE_SUMMARY_LIMITS.totalSourceBytes };
|
||||
const summaries: Record<string, SourceChangeSummary> = {};
|
||||
for (const surface of plan.surfaces) {
|
||||
@@ -480,18 +485,23 @@ export function createSourceChangeSummaries(options: {
|
||||
!/^(?:\.github\/|docs\/|tests?\/|scripts\/)|(?:\.md$|\.(?:test|spec)\.[jt]sx?$)/.test(path)
|
||||
))));
|
||||
}
|
||||
const selected = relevant.sort((left, right) => {
|
||||
const ranked = relevant.sort((left, right) => {
|
||||
const rank = { route: 0, "declared-source": 1, dependency: 2, global: 3 };
|
||||
return rank[relation(surface, left)] - rank[relation(surface, right)] || left.path.localeCompare(right.path);
|
||||
}).slice(0, SOURCE_CHANGE_SUMMARY_LIMITS.filesPerSurface);
|
||||
const files = selected.map((change): SourceFileChangeSummary => {
|
||||
});
|
||||
// A comment-only file leaves no evidence, so it does not take one of the surface's file slots either.
|
||||
const files: SourceFileChangeSummary[] = [];
|
||||
let considered = 0;
|
||||
for (const change of ranked) {
|
||||
if (files.length === SOURCE_CHANGE_SUMMARY_LIMITS.filesPerSurface) break;
|
||||
considered += 1;
|
||||
let evidence = cache.get(change.path);
|
||||
if (!evidence) {
|
||||
evidence = fileEvidence({ ...options, baseSha: plan.baseSha, headSha: plan.headSha, change, budget });
|
||||
cache.set(change.path, evidence);
|
||||
}
|
||||
return { ...evidence, relation: relation(surface, change) };
|
||||
});
|
||||
if (!("triviaOnly" in evidence)) files.push({ ...evidence, relation: relation(surface, change) });
|
||||
}
|
||||
const impact: SourceChangeSummary["impact"] = files.some((file) => file.relation === "route" || file.relation === "declared-source")
|
||||
? "direct" : files.some((file) => file.relation === "dependency") ? "dependency"
|
||||
: globalImpact || (surface.status === "modified" && plan.conservative) ? "global"
|
||||
@@ -501,7 +511,7 @@ export function createSourceChangeSummaries(options: {
|
||||
baseSha: plan.baseSha, headSha: plan.headSha, impact,
|
||||
summary: summaryText(surface, impact, files),
|
||||
files,
|
||||
truncated: relevant.length > selected.length || files.some((file) => file.truncated),
|
||||
truncated: ranked.length > considered || files.some((file) => file.truncated),
|
||||
};
|
||||
}
|
||||
return summaries;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
import ts from "typescript";
|
||||
|
||||
const code = /\.([cm]?[jt]sx?)$/;
|
||||
/** Comments a compiler or bundler reads: JSX pragmas, Flow, pure annotations, Fast Refresh, Haste names and import hints. */
|
||||
const directive = /[@#]\s*(?:jsx\w*|flow|noflow|__[A-Z_]+__|refresh|providesModule)\b[^\r\n*]*|webpack[A-Z]\w*\s*:[^\r\n*]*|@vite-ignore/g;
|
||||
|
||||
function scriptKind(path: string): ts.ScriptKind {
|
||||
const extension = code.exec(path)?.[1] ?? "";
|
||||
if (extension === "tsx") return ts.ScriptKind.TSX;
|
||||
if (extension.endsWith("ts")) return ts.ScriptKind.TS;
|
||||
if (extension === "jsx") return ts.ScriptKind.JSX;
|
||||
return ts.ScriptKind.JS;
|
||||
}
|
||||
|
||||
/**
|
||||
* JSX text as the JSX transform keeps it (Babel's `cleanJSXElementLiteralChild`): each line is trimmed where it meets a
|
||||
* line break, blank lines are dropped and the rest are joined by a space. Space within a line is kept, and so is a tab.
|
||||
*/
|
||||
function jsxText(raw: string): string {
|
||||
const lines = raw.split(/\r\n|\n|\r/);
|
||||
let last = 0;
|
||||
lines.forEach((line, index) => { if (/[^ \t]/.test(line)) last = index; });
|
||||
let text = "";
|
||||
lines.forEach((line, index) => {
|
||||
let trimmed = index > 0 ? line.replace(/^[ \t]+/, "") : line;
|
||||
if (index < lines.length - 1) trimmed = trimmed.replace(/[ \t]+$/, "");
|
||||
if (trimmed) text += index === last ? trimmed : `${trimmed} `;
|
||||
});
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* The program a file compiles to, in order: its syntax tree's nodes and tokens, JSX text as the transform keeps it, and
|
||||
* any directive comment. Other comments and the whitespace between tokens are not part of it. The tree keeps a line
|
||||
* break that changes the program (`return` then a value on the next line), and drops one that does not.
|
||||
*/
|
||||
function tokens(path: string, text: string): string[] | undefined {
|
||||
const file = ts.createSourceFile(path, text, ts.ScriptTarget.Latest, false, scriptKind(path));
|
||||
const { parseDiagnostics } = file as unknown as { parseDiagnostics?: unknown[] };
|
||||
if (!parseDiagnostics || parseDiagnostics.length > 0) return undefined;
|
||||
const out: string[] = [];
|
||||
const directives = (trivia: string): void => {
|
||||
for (const [match] of trivia.matchAll(directive)) out.push(`directive:${match.replace(/\s+/g, " ").trim()}`);
|
||||
};
|
||||
const visit = (node: ts.Node): void => {
|
||||
if (ts.isJsxExpression(node) && !node.expression) return directives(text.slice(node.pos, node.end)); // `{/* a comment */}` compiles to nothing
|
||||
if (node.kind >= ts.SyntaxKind.FirstJSDocNode && node.kind <= ts.SyntaxKind.LastJSDocNode) return; // a comment the parser attaches, read below as trivia
|
||||
if (node.kind === ts.SyntaxKind.JsxText) {
|
||||
const value = jsxText(text.slice(node.pos, node.end));
|
||||
if (value) out.push(`${node.kind}:${value}`);
|
||||
return;
|
||||
}
|
||||
if (node.getChildCount(file) === 0) {
|
||||
directives(text.slice(node.pos, node.getStart(file)));
|
||||
if (node.kind !== ts.SyntaxKind.EndOfFileToken) out.push(`${node.kind}:${node.getText(file)}`);
|
||||
return;
|
||||
}
|
||||
out.push(`${node.kind}(`);
|
||||
node.getChildren(file).forEach(visit);
|
||||
out.push(")");
|
||||
};
|
||||
visit(file);
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether two versions of a JavaScript or TypeScript file compile to the same program: the same syntax tree with the
|
||||
* same tokens, so only comments, blank lines, indentation or line endings differ. Such an edit cannot change what a
|
||||
* screen renders, so the planner does not treat it as a change to the files that import it. JSX text keeps the
|
||||
* whitespace the transform keeps (a space inside a `<Text>` renders), a comment a compiler reads (`@jsx`, `#__PURE__`)
|
||||
* counts, a file that does not parse is never called the same, and neither are two identical texts: a diff entry a
|
||||
* caller supplies for them is theirs to explain (a mode change, a fixture).
|
||||
*/
|
||||
export function sameCodeIgnoringTrivia(path: string, base: string | undefined, head: string | undefined): boolean {
|
||||
if (base === undefined || head === undefined || !code.test(path)) return false;
|
||||
if (base === head) return false;
|
||||
const before = tokens(path, base);
|
||||
const after = before && tokens(path, head);
|
||||
return Boolean(before && after && before.length === after.length && before.every((token, index) => token === after[index]));
|
||||
}
|
||||
@@ -36,6 +36,55 @@ test("changed routes include ancestors and descendants without ancestor sibling
|
||||
assert.equal(result.surfaces.find(row=>row.headSurface.route==="/end").status,"unchanged");
|
||||
});
|
||||
|
||||
test("a comment or whitespace-only edit to an imported file changes no surface; an edit to its tokens does", () => {
|
||||
const theme = "export const theme = { tint: 'blue' };\n";
|
||||
const files = [["app/one.tsx", 'import { theme } from "../src/theme"; export default () => theme;'], ["app/two.tsx", page], ["src/theme.ts", theme]];
|
||||
const head = (text) => [files[0], files[1], ["src/theme.ts", text]];
|
||||
const change = [{ status: "modified", path: "src/theme.ts" }];
|
||||
for (const text of ["// Palette.\nexport const theme = { tint: 'blue' };\n", "/** The palette, attached to the declaration as JSDoc. */\nexport const theme = { tint: 'blue' };\n", "export const theme = {\n tint: 'blue' /* default */\n};\r\n", theme + "\n\n"]) {
|
||||
const result = plan({ base: files, head: head(text), changes: change });
|
||||
assert.deepEqual(result.surfaces.map((row) => [row.status, row.reasons]), [["unchanged", []], ["unchanged", []]], text);
|
||||
assert.deepEqual(selectedPaths(result), []);
|
||||
}
|
||||
for (const text of ["export const theme = { tint: 'red' };\n", "export const theme = { tint: 'blue' }\n", "export const theme = { tint: 'blue' };; \n", "export const theme = { tint: 'blue' ;\n"]) {
|
||||
assert.equal(plan({ base: files, head: head(text), changes: change }).surfaces[0].status, "modified", text);
|
||||
}
|
||||
// JSX text keeps its whitespace: a space inside a Text is rendered.
|
||||
const jsx = (text) => [["app/one.tsx", `import {Text} from "react-native"; export default () => <Text>${text}</Text>;`]];
|
||||
assert.equal(plan({ base: jsx("a"), head: jsx(" a "), changes: [{ status: "modified", path: "app/one.tsx" }] }).surfaces[0].status, "modified");
|
||||
assert.equal(plan({ base: jsx("a"), head: jsx("{/* note */}a"), changes: [{ status: "modified", path: "app/one.tsx" }] }).surfaces[0].status, "unchanged");
|
||||
});
|
||||
|
||||
test("a line break, JSX space or compiler comment that changes the program is a change; re-wrapping is not", () => {
|
||||
const status = (path, before, after) => plan({ base: [[path, before]], head: [[path, after]], changes: [{ status: "modified", path }] }).surfaces[0].status;
|
||||
const screen = (body) => `import {Text, View} from "react-native"; export default function Screen({ n, a, b }) { ${body} }`;
|
||||
// Automatic semicolon insertion: the same tokens, a different program.
|
||||
for (const [before, after] of [
|
||||
['return "hello";', 'return\n"hello";'],
|
||||
['return /* x */ "hello";', 'return /*\n*/ "hello";'],
|
||||
["return (\n<View/>);", "return\n(<View/>);"],
|
||||
["a\n++b; return null;", "a++\nb; return null;"],
|
||||
]) assert.equal(status("app/one.tsx", screen(before), screen(after)), "modified", after);
|
||||
// The JSX transform keeps space within a line, and trims it only where a line breaks.
|
||||
for (const [before, after] of [["<Text>a</Text>", "<Text> a</Text>"], ["<Text>{n} items</Text>", "<Text>{n}items</Text>"], ["<Text>{a} {b}</Text>", "<Text>{a} {b}</Text>"]]) {
|
||||
assert.equal(status("app/one.tsx", screen(`return ${before};`), screen(`return ${after};`)), "modified", after);
|
||||
}
|
||||
for (const [before, after] of [
|
||||
["return (<View><Text>hello world</Text></View>);", "return (\n <View>\n <Text>\n hello\n world\n </Text>\n </View>\n);"],
|
||||
["return f(a, b);", "return f(\n a,\n b\n);"],
|
||||
]) assert.equal(status("app/one.tsx", screen(before), screen(after)), "unchanged", after);
|
||||
// A comment a compiler or bundler reads is not trivia.
|
||||
for (const [before, after] of [
|
||||
["/** @jsxImportSource react */\n", "/** @jsxImportSource other */\n"],
|
||||
["/** @jsx h */\n", "/** @jsx g */\n"],
|
||||
["", "// @flow\n"],
|
||||
]) assert.equal(status("app/one.jsx", `${before}export default () => <a/>;`, `${after}export default () => <a/>;`), "modified", after);
|
||||
assert.equal(status("app/one.tsx", screen("return f();"), screen("return /*#__PURE__*/ f();")), "modified");
|
||||
assert.equal(status("app/one.tsx", screen("return <Text>a</Text>;"), screen("return <Text>{/* @jsx h */}a</Text>;")), "modified");
|
||||
// An ordinary JSDoc tag is still a comment.
|
||||
assert.equal(status("app/one.tsx", `/** @param n a count */\n${screen("return null;")}`, `/**\n * @param n the count\n * @returns nothing\n */\n${screen("return null;")}`), "unchanged");
|
||||
});
|
||||
|
||||
test("source snapshots detect modifications even when a caller omits a diff entry", () => {
|
||||
const result=plan({base:[["app/one.tsx",page]],head:[["app/one.tsx",page.replace("null","<View/>")]]});
|
||||
assert.equal(result.surfaces[0].status,"modified");
|
||||
@@ -136,7 +185,7 @@ test("package.json changes are app-wide unless they only touch scripts that inst
|
||||
test("app-wide inputs that no route imports mark every surface modified", () => {
|
||||
const files = [["app/one.tsx", page], ["app/two.tsx", page], ["package.json", JSON.stringify({ main: "index.js" })], ["index.js", "import 'expo-router/entry';"]];
|
||||
for (const path of ["eas.json", ".env", ".env.production", "tailwind.config.js", "postcss.config.cjs", "index.js"]) {
|
||||
const head = files.some(([name]) => name === path) ? files.map(([name, text]) => [name, name === path ? `${text}\n` : text]) : [...files, [path, "{}"]];
|
||||
const head = files.some(([name]) => name === path) ? files.map(([name, text]) => [name, name === path ? `${text};` : text]) : [...files, [path, "{}"]];
|
||||
assert.deepEqual(selectedPaths(plan({ base: files, head, changes: [{ status: files.some(([name]) => name === path) ? "modified" : "added", path }] })), ["/one", "/two"], path);
|
||||
}
|
||||
assert.deepEqual(selectedPaths(plan({ base: files, head: [...files, ["docs/eas.json", "{}"]], changes: [{ status: "added", path: "docs/eas.json" }] })), []);
|
||||
|
||||
@@ -228,6 +228,29 @@ test("summary bounds retain blob identities and explicitly mark omitted source e
|
||||
assert.ok(Object.values(results).every((result) => result.summary.length <= SOURCE_CHANGE_SUMMARY_LIMITS.summaryCharacters));
|
||||
});
|
||||
|
||||
test("a comment-only edit to an imported file leaves no source evidence and no imported impact", (t) => {
|
||||
const repo = repository(t,
|
||||
{ "src/theme.ts": "export const tint = 'blue';\n", "src/label.ts": "export const label = 'Before';\n" },
|
||||
{ "src/theme.ts": "// Palette.\nexport const tint = 'blue';\n", "src/label.ts": "export const label = 'After';\n" });
|
||||
const entry = surface("home", "src/home.tsx", ["src/theme.ts", "src/label.ts"]);
|
||||
const result = summarize(repo, plan(repo, [tracked(entry, ["src/label.ts"])])).home;
|
||||
assert.equal(result.impact, "dependency");
|
||||
assert.deepEqual(result.files.map((file) => file.path), ["src/label.ts"]);
|
||||
assert.equal(result.truncated, false);
|
||||
});
|
||||
|
||||
test("comment-only files do not take the file slots of a real change", (t) => {
|
||||
const comments = Array.from({ length: SOURCE_CHANGE_SUMMARY_LIMITS.filesPerSurface }, (_, index) => `src/a${index}.ts`);
|
||||
const repo = repository(t,
|
||||
{ ...Object.fromEntries(comments.map((path) => [path, "export const value = 1;\n"])), "src/z-theme.ts": "export const tint = 'blue';\n" },
|
||||
{ ...Object.fromEntries(comments.map((path) => [path, "// Note.\nexport const value = 1;\n"])), "src/z-theme.ts": "export const tint = 'red';\n" });
|
||||
const entry = surface("home", "src/home.tsx", [...comments, "src/z-theme.ts"]);
|
||||
const result = summarize(repo, plan(repo, [tracked(entry, ["src/z-theme.ts"])])).home;
|
||||
assert.equal(result.impact, "dependency");
|
||||
assert.deepEqual(result.files.map((file) => file.path), ["src/z-theme.ts"]);
|
||||
assert.equal(result.truncated, false);
|
||||
});
|
||||
|
||||
test("unrelated surfaces remain unchanged and exact SHA validation rejects an ungrounded comparison", (t) => {
|
||||
const repo = repository(t, { "README.md": "Before\n" }, { "README.md": "After\n" });
|
||||
const entry = surface("unrelated", "src/unrelated.tsx");
|
||||
|
||||
Reference in new issue
Block a user