perf: upgrade pierre diffs#386
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryUpgrades
Confidence Score: 5/5Safe to merge — the change is a focused dependency bump with a small, correct additive update to the color-remap table. All three files are well-contained: the lockfile reflects clean dependency resolution, the version range in package.json is consistent, and the two new color entries in pierre.ts follow exactly the same established pattern as the existing ones. The normalizeHighlightedColor lookup handles unknown keys gracefully (returns the raw color), so even if a color were missing from the table it would degrade silently rather than crash. No logic was restructured and no existing behavior was altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Pierre HAST token\n(inline style: color:#...)"] --> B["parseStyleValue()\ncache parsed CSS"]
B --> C["normalizeHighlightedColor(color, theme)"]
C --> D{"color in\nRESERVED_PIERRE_TOKEN_COLORS\n[appearance]?"}
D -- "Yes\n(e.g. #ff6762, #ff855e dark\n#d52c36, #d5512f light)" --> E["→ theme.syntaxColors['keyword']\nor theme.syntaxColors['string']"]
D -- "No\n(all other hues)" --> F["→ pass through unchanged"]
E --> G["RenderSpan.fg"]
F --> G
G --> H["flattenedHighlightedLineCache\n(WeakMap per node)"]
Reviews (1): Last reviewed commit: "perf: upgrade pierre diffs" | Re-trigger Greptile |
Summary
@pierre/diffsfrom^1.1.19to^1.2.2Benchmark notes
Local
bun run bench -- --samples 3showed parser-focused wins versus the pre-upgrade baseline:bootstrap-load/git_parse_patch_ms:15.30ms → 6.26mschangeset-parse/balanced_changeset_parse_patch_ms:6.77ms → 3.47mschangeset-parse/large_single_file_parse_patch_ms:2.68ms → 1.19mslarge-stream/cold_first_frame_mswas noisier/slower in the same run, so this PR keeps only the dependency upgrade for focused review.Validation
bun test src/ui/diff/pierre.test.tsbun run typecheckbun run format:checkbun run lintbun run bench -- --samples 3 --out /tmp/hunk-perf/final.jsonThis PR description was generated by Pi using OpenAI GPT-5