Skip to content

fix(engine): declare web-tree-sitter/tree-sitter-wasms as root devDependencies - #9242

Merged
JSONbored merged 1 commit into
mainfrom
fix/root-tree-sitter-deps
Jul 27, 2026
Merged

fix(engine): declare web-tree-sitter/tree-sitter-wasms as root devDependencies#9242
JSONbored merged 1 commit into
mainfrom
fix/root-tree-sitter-deps

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Follow-up to #9234. Pinning `web-tree-sitter` back to `^0.20.8` fixed the engine's own `tsc` build, but changed npm's hoisting decision: both `web-tree-sitter` and `tree-sitter-wasms` ended up nested under `packages/loopover-engine/node_modules/` only, breaking `test/unit/repo-map.test.ts` (a pre-existing root-level test that imports both directly) — `Cannot find package 'web-tree-sitter'`. This was failing `validate-tests` on every open PR based on current `main`.

Declares both as explicit root `devDependencies` (matching the engine's pinned version), so they resolve from root-level tests regardless of hoisting.

Test plan

  • `npx vitest run test/unit/repo-map.test.ts` — 35/35 passing (was failing with "Cannot find package 'web-tree-sitter'" before this fix)
  • `npx tsc --noEmit -p tsconfig.json --incremental false` — clean

…endencies

test/unit/repo-map.test.ts imports both directly from the repo root, but they
were only declared under packages/loopover-engine/package.json. Pinning
web-tree-sitter back to ^0.20.8 (#9234) changed npm's hoisting decision and
left both packages nested under packages/loopover-engine/node_modules/ only,
breaking that root-level test's module resolution in CI. Declaring them as
root devDependencies (matching the engine's pinned version) makes them
resolvable from root-level tests regardless of hoisting.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 27, 2026
@JSONbored
JSONbored merged commit 75b5498 into main Jul 27, 2026
2 of 3 checks passed
@JSONbored
JSONbored deleted the fix/root-tree-sitter-deps branch July 27, 2026 08:55
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@029ea49). Learn more about missing BASE report.
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9242   +/-   ##
=======================================
  Coverage        ?   95.21%           
=======================================
  Files           ?      729           
  Lines           ?    59151           
  Branches        ?    20947           
=======================================
  Hits            ?    56321           
  Misses          ?     1613           
  Partials        ?     1217           
Flag Coverage Δ
backend 95.21% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant