Skip to content

Commit f8ed2a0

Browse files
chore(deps): upgrade @pierre/diffs to 1.5.2 and @pierre/trees to beta.6 (#16644)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent d021f57 commit f8ed2a0

22 files changed

Lines changed: 505 additions & 951 deletions

‎apps/mobile/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
},
132132
"devDependencies": {
133133
"@effect/vitest": "catalog:",
134-
"@pierre/trees": "1.0.0-beta.4",
134+
"@pierre/trees": "1.0.0-beta.6",
135135
"@types/react": "~19.3.0",
136136
"@types/react-dom": "~19.2.3",
137137
"babel-preset-expo": "~58.0.8",

‎apps/mobile/src/features/review/reviewModel.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { parsePatchFiles } from "@pierre/diffs/utils/parsePatchFiles";
22
import type { ChangeTypes, FileDiffMetadata } from "@pierre/diffs/types";
33
import type { ThreadCheckpointSummary } from "@t3tools/client-runtime/state/thread-checkpoints";
44
import type { ReviewDiffPreviewSource } from "@t3tools/contracts";
5-
import { unquoteGitPatchPath } from "@t3tools/shared/gitPatchPath";
65
import * as Arr from "effect/Array";
76
import { pipe } from "effect/Function";
87
import * as Order from "effect/Order";
@@ -374,8 +373,8 @@ function buildRenderableRows(file: FileDiffMetadata): ReadonlyArray<ReviewRender
374373
}
375374

376375
function mapRenderableFile(file: FileDiffMetadata): ReviewRenderableFile {
377-
const path = unquoteGitPatchPath(file.name || file.prevName || "");
378-
const previousPath = file.prevName ? unquoteGitPatchPath(file.prevName) : null;
376+
const path = file.name || file.prevName || "";
377+
const previousPath = file.prevName || null;
379378
const additions = file.hunks.reduce((total, hunk) => total + hunk.additionLines, 0);
380379
const deletions = file.hunks.reduce((total, hunk) => total + hunk.deletionLines, 0);
381380
const cacheKey = file.cacheKey ?? `${previousPath ?? "none"}:${path}:${file.type}`;

‎apps/web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@legendapp/list": "catalog:",
2626
"@noble/hashes": "catalog:",
2727
"@pierre/diffs": "catalog:",
28-
"@pierre/trees": "1.0.0-beta.4",
28+
"@pierre/trees": "1.0.0-beta.6",
2929
"@t3tools/client-runtime": "workspace:*",
3030
"@t3tools/contracts": "workspace:*",
3131
"@t3tools/shared": "workspace:*",

‎apps/web/src/components/diffs/AnnotatableCodeView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface DiffCommentAnnotationGroup {
3535
}
3636

3737
type DiffCommentLineAnnotation = DiffLineAnnotation<DiffCommentAnnotationGroup>;
38-
export type AnnotatableCodeViewHandle = CodeViewHandle<DiffCommentAnnotationGroup>;
38+
export type AnnotatableCodeViewHandle = CodeViewHandle<DiffCommentAnnotationGroup, undefined>;
3939
const EMPTY_REVIEW_COMMENTS: ReadonlyArray<ReviewCommentContext> = [];
4040

4141
function annotationSide(range: SelectedLineRange): AnnotationSide {

‎apps/web/src/components/diffs/StyledDiffCodeView.test.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ vi.mock("@pierre/diffs/worker/worker.js?worker", async () => {
9898

9999
vi.mock("@pierre/diffs/react", async (importOriginal) => ({
100100
...(await importOriginal<typeof import("@pierre/diffs/react")>()),
101-
CodeView: (props: CodeViewProps) => {
101+
CodeView: (props: CodeViewProps<undefined, undefined>) => {
102102
return props.items?.map((item) =>
103103
item.type === "file" ? <FileOutput key={item.id} file={item.file} /> : null,
104104
);
@@ -115,6 +115,7 @@ function FileOutput({ file }: { file: FileContents }) {
115115
testState.renderPools.push(pool);
116116
const renderer = new FileRenderer(
117117
{ theme: "pierre-dark", preferredHighlighter: "shiki-wasm" },
118+
undefined,
118119
render,
119120
pool,
120121
);
@@ -301,8 +302,10 @@ describe("code-view worker lifecycle", () => {
301302
expect(pool.getStats().totalWorkers).toBe(2);
302303
expect(testState.terminations).toHaveLength(0);
303304
await act(async () => renderer!.update(renderViews(0)));
305+
// Pierre gives up on a held startup after 10 seconds; the idle timer then tears the pool down.
306+
const timedOut = expect(pending).rejects.toThrow("worker initialization timed out");
304307
await vi.advanceTimersByTimeAsync(30_000);
305-
await pending;
308+
await timedOut;
306309
await Promise.all(testState.terminations);
307310
await act(async () => {
308311
for (const deliver of testState.heldResponses) deliver();

‎apps/web/src/components/diffs/StyledDiffCodeView.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,16 @@ const DIFF_VIEW_UNSAFE_CSS = `${DIFF_SURFACE_THEME_UNSAFE_CSS}
261261
`;
262262

263263
export type StyledDiffCodeViewOptions<LAnnotation> = Omit<
264-
NonNullable<CodeViewProps<LAnnotation>["options"]>,
264+
NonNullable<CodeViewProps<LAnnotation, undefined>["options"]>,
265265
"unsafeCSS" | "itemMetrics" | "layout"
266266
>;
267267

268268
type StyledDiffCodeViewProps<LAnnotation> = (
269-
| Omit<ControlledCodeViewProps<LAnnotation>, "options">
270-
| Omit<UncontrolledCodeViewProps<LAnnotation>, "options">
269+
| Omit<ControlledCodeViewProps<LAnnotation, undefined>, "options">
270+
| Omit<UncontrolledCodeViewProps<LAnnotation, undefined>, "options">
271271
) & {
272272
readonly options?: StyledDiffCodeViewOptions<LAnnotation>;
273-
readonly viewerRef?: Ref<CodeViewHandle<LAnnotation>>;
273+
readonly viewerRef?: Ref<CodeViewHandle<LAnnotation, undefined>>;
274274
/**
275275
* Appended to the shared stylesheet inside the viewer's shadow root, for a surface that has
276276
* to restyle chrome the viewer owns — such as replacing its per-file line counts.

0 commit comments

Comments
 (0)