Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Router source discovery misses and misreads routes in known shapes

Đang mở
#258 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
testing-qa

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
2 giờ 31 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của usabl-dev/usabl

Tất cả issue của usabl-dev/usabl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.