chore(mcp): convert lib/local-branch.js to TypeScript (Phase 2 of #7291) - #7416
chore(mcp): convert lib/local-branch.js to TypeScript (Phase 2 of #7291)#7416jaytbarimbao-collab wants to merge 1 commit into
Conversation
…Nbored#7291) Convert packages/loopover-mcp/lib/local-branch.js to real TypeScript, using the tsc build pipeline landed in Phase 1 (JSONbored#7409). Types only; runtime behavior is byte-identical (the compiled lib/local-branch.js changes only in tsc formatting and the elision of an already-dead node:path `join` import). Remove the now-unused `@ts-expect-error package helper is plain JS` directives above the dynamic local-branch.js imports in test/unit/local-branch.test.ts and test/unit/local-scorer-adapter.test.ts, which now resolve to the typed .ts source. Closes JSONbored#7329
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7416 +/- ##
==========================================
- Coverage 91.27% 91.20% -0.08%
==========================================
Files 716 716
Lines 72972 72994 +22
Branches 21527 21635 +108
==========================================
- Hits 66605 66572 -33
+ Misses 5327 5322 -5
- Partials 1040 1100 +60
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-20 08:32:05 UTC
Review summary Nits — 6 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Phase 2 of the
packages/loopover-mcpTypeScript migration (#7291): convertlib/local-branch.jsto real TypeScript, using thetscbuild pipeline landed in Phase 1 (#7409).lib/local-branch.js→lib/local-branch.ts(592 lines). Types only — runtime behavior is byte-identical. The compiledlib/local-branch.jsdiffers from the original only in tsc formatting, normalized trailing commas, and the elision of an already-deadnode:pathjoinimport (imported but never called in the original).noUncheckedIndexedAccessandexactOptionalPropertyTypes: provably-in-bounds index accesses use non-null assertions (which erase at compile time — no new runtime branches), and optional fields that may receiveundefinedare declared?: T | undefined..jsextension (NodeNext), matching the Phase 1 files.Test adjustment
Removes the now-unused
// @ts-expect-error package helper is plain JS ...directives above the dynamicimport("../../packages/loopover-mcp/lib/local-branch.js")calls intest/unit/local-branch.test.ts(8) andtest/unit/local-scorer-adapter.test.ts(7). Those imports resolved to the untyped plain.jsbefore this conversion (hence the directive); they now resolve to the typed.tssource, so the directives would otherwise failvalidate-codeas unused.Verification
npm run build(mcp package):tsccompile +node --checkverify both pass.npx vitest run test/unit/local-branch.test.ts test/unit/local-scorer-adapter.test.ts: 66/66 pass.tsc -p tsconfig.json --noEmit: clean.Closes #7329