chore(tables): own fractional-indexing in-house, drop runtime dep#4900
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit c40199c. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR ports the
Confidence Score: 5/5Safe to merge — the in-house port is byte-identical to the upstream package across exhaustive, randomized, and boundary-exercising test cases, and the only call site is unchanged. The port faithfully reproduces the CC0 algorithm — carry/borrow arithmetic in incrementInteger/decrementInteger, common-prefix midpoint recursion, and all four branches of generateKeyBetween are all correct. The differential test suite is thorough: 40-key exhaustive enumeration, 5-seed × 400-step random insert simulation, 5 000-step rollover runs, and 2 000-step deep-fraction tests all confirm byte-identical output. The only changed call site in order-key.ts is a mechanical import-path swap with no signature changes. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before
A1[order-key.ts] -->|import| B1[fractional-indexing npm\nruntime dep]
end
subgraph After
A2[order-key.ts] -->|import via @/ alias| B2[lib/fractional-indexing/\nfractional-indexing.ts\nin-house port]
T[fractional-indexing.test.ts] -->|oracle comparison| C2[fractional-indexing npm\ndevDependency only]
T -->|tests| B2
end
Reviews (1): Last reviewed commit: "chore(tables): own fractional-indexing i..." | Re-trigger Greptile |
Summary
fractional-indexingalgorithm in-house atapps/sim/lib/fractional-indexing/(verbatim TS port of the CC0 upstream, mirrors the pptx-renderer library layout)order-key.tswrapper at the in-house module; no call sites change (it's the only importer)fractional-indexingfrom runtimedependenciestodevDependencies— kept only as the differential-test oracleType of Change
Testing
bun run test apps/sim/lib/fractional-indexing/— 7/7 pass (in-house ≡ upstream)bun run test apps/sim/lib/table/— 197/197 passbun run lintclean,bun run check:api-validation:strictpassed,tsc --noEmitcleanChecklist