Extension resolution assumes JS/TS candidates; a .vue/.svelte sibling can still diverge from the bundler
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript, vite
- Domain
- testing-qa, tooling
Research direction
Start by locating resolveFileAtPath and the code that reads project configuration; the issue does not name file paths or tests. Check how resolve.extensions is parsed and how candidate paths are selected, then run the relevant resolver tests. Done means a base with a matching non-JS extension such as .vue or .svelte is treated as ambiguous and disclosed rather than attributed to a JS/TS candidate.
Written by the indexing model from the issue text.
Description
Follow-up to #226.
What is wrong
resolveFileAtPath discloses when more than one JS/TS candidate file exists, which closes the common false-coverage case. But it only probes JS/TS suffixes (.mjs .js .mts .ts .jsx .tsx and index variants). If a project's resolve.extensions includes a non-JS framework extension (for example .vue or .svelte) and both Widget.vue and Widget.tsx exist, Vite may load Widget.vue while usabl sees a single JS candidate (Widget.tsx) and attributes it.
Why it matters
Low in practice for usabl's current React/PatternFly domain: the mis-picked .tsx would be a file the bundler does not render, so no real barrier is missed, and usabl scans .tsx/.jsx UI files anyway. Tracked so it is not forgotten if usabl targets multi-framework apps.
Fix
Parse the project's resolve.extensions and treat a base with any extra candidate (including non-JS) as ambiguous, disclosing rather than picking a JS/TS file.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from usabl-dev/usabl
-
area: engine bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictOpenarea: assistants bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area: engine bug security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedOpenarea: overlay bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
area: engine enhancement performance
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
db-ux-design-system/core-web#8613 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug:new
Difficulty 1/5 Under an hour Newbie friendliness 78/100
callstackincubator/simlock#934 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gchq/LD-Explorer#286 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
foxglove/mcap#1907 · 1 comment ·
Maintainers usually reply within 1 day