Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Router source discovery misses and misreads routes in known shapes

Aperta
#258 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Read the router source discovery logic and the ground truth documentation that records its limits; the payload does not name their file paths. Start by reproducing the listed probes, including the valid /[//]/ regular expression, and compare discovery results across the fallback, data-router, and init merge readers. Done means routes in the listed shapes are handled consistently, or their limits remain documented with usabl.routes.json as the stated remedy.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: setup bug

What

Route discovery from router source matches raw text. Known cases, each verified by probe:

  • A <Route> whose element attribute precedes its path is not found (the pattern stops at the nested component's self-close).
  • A commented-out route is matched like a real one; for a duplicate path the first match wins in the fallback and data-router readers, while the init merge lets the later match win.
  • A path written as an expression (path={ROUTES.home}) is not read.
  • A > inside any JSX attribute string ends the tag early and drops the route.
  • A ) inside a string or comment in the router call argument drops every route after it.
  • A create*Router( inside a string, template interpolation, or comment is taken as the call.

A route the parser never recovers leaves no coverage gap behind, so a change to a shared file can read as fully checked while that screen is never scanned.

What ships now

The limits are documented in the ground truth beside the other discovery limits, with the remedy: author usabl.routes.json, which takes precedence. An attempted fix that blanked comments before matching was reverted because it treated the valid regular expression /[//]/ as a comment and produced a verified verdict with a route missing.

Direction

A lexer-aware parse (string, template, regular expression, and comment states) or a real TypeScript parse of the router file. Related: #227.

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
2h 48m
PR unite (30g)
8

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di usabl-dev/usabl

Tutte le issue di usabl-dev/usabl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.