Export status is answered in three places, two of them hand-mirrored regexes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #2896 của @johnhldiver-beep — đã đóng, không merge
Đá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
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, rust, typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Read the TypeScript and JavaScript extraction entry points at src/extraction/languages/typescript.ts:110-116 and javascript.ts:68, then compare src/extraction/tree-sitter.ts:2368, 2843 with codegraph-kernel/src/tsjs/extractors.rs:301 and the resolver change in #1720. The issue calls for export status to cover the listed ES and CommonJS forms and for the resolver's per-file fact to derive from it. Done should include corpus measurement; no specific test file is named.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Three places in the codebase answer "is this name exported from this file", none of them shares an implementation, and they disagree about what counts.
isExported — the AST one. src/extraction/languages/typescript.ts:110-116 and javascript.ts:68 walk the parent chain for an export_statement ancestor. That is exact for export function f, and blind to everything else: const x = …; export { x } and every CommonJS form (module.exports, exports.x, exports["x"]) leave isExported false on the declaration's node.
isExportedLater — a regex, written because of that blindness. src/extraction/tree-sitter.ts:2368 runs one anchored regex over the file source for export default NAME / export { NAME }, and codegraph-kernel/src/tsjs/extractors.rs:301 mirrors it in Rust — two implementations that must be kept in step by hand, with only a doc comment saying so. Its single call site is the store-extraction condition at tree-sitter.ts:2843, so the fix it represents is scoped to Zustand stores rather than available generally.
A third, per-file, in the resolver. #1720 needs "does this file export anything at all" and cannot use either of the above — isExported would answer no for a CommonJS module, and isExportedLater answers a per-name question, not a per-file one. So it adds another source regex.
The result is that a CommonJS module's exports are invisible to the graph as exports, export { x } is visible only to store extraction, and the resolver re-derives a coarser version of the same fact from the same file text. Each site is individually defensible; together they mean the question has no single answer to point at, and the two regexes drift independently across a language boundary.
Worth considering: compute export status once during extraction — covering the export_statement ancestor, later export { … } / export default, and the CommonJS forms — and persist it on the node, with the per-file "exports nothing" fact derived from it. That would let #1720's guard read a stored fact instead of the file text, make CommonJS exports visible generally, and leave one implementation per language rather than two hand-mirrored regexes plus an AST walk.
Raising it as an issue rather than a PR because it touches extraction, the kernel and the resolver at once, changes what is persisted, and would want to be measured on a corpus the way the resolution changes have been — not something to fold into a PR already under review.
- Ngôn ngữ chính
- C
- Star
- 73.2k
- Fork
- 4.7k
- Merge trung bình
- 3 giờ 39 phút
- Pull request đã merge (30 ngày)
- 528
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của colbymchenry/codegraph
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#3223 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A `../` entry in package.json `workspaces` makes a folder outside the project count as a workspace package, and a call gets linked to the wrong functionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
colbymchenry/codegraph#3093 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: npm-shim spawnSync missing windowsHide flashes a console window on every MCP server launchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
colbymchenry/codegraph#3054 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
colbymchenry/codegraph#2974 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Security Vulnerabiliy] Vulnerable bundled `node.exe` detected (Node2Shell - CVE-2026-111497)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
colbymchenry/codegraph#2959 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của colbymchenry/codegraph
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
arduino/ArduinoCore-megaavr#152 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
kivy/python-for-android#3405 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Nmap
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`nuklear.h` shows old versionCó thể đã có người làm @TomJGooding đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Immediate-Mode-UI/Nuklear#1004 ·