Vue <script setup> calls to Nuxt auto-imported composables aren't linked
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 40/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nuxt, typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Start by reproducing the gap with a small Nuxt project: an auto-imported composable such as usePermissions called from both a .ts file and a .vue <script setup>, then run codegraph callers usePermissions and compare the two lists. The issue does not name the source files that resolve calls, so first find where codegraph resolves auto-imported names for .vue files. Done when the .vue callers appear alongside the .ts ones, and the explicit-import case still works.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: codegraph 1.6.2, macOS arm64 (bundled runtime)
Project: Nuxt 4 SPA (srcDir: app/) in a pnpm monorepo, with composables auto-imported from app/composables/ and a few extra imports.dirs.
What happens
A composable such as app/composables/usePermissions.ts:
export function usePermissions() {
/* ... */
}
is called without an import (Nuxt auto-import) from both .ts composables and .vue components:
<script setup lang="ts">
const { hasPermission, loaded } = usePermissions();
</script>
codegraph callers usePermissions lists every .ts caller (14 of 14) but none of the .vue callers (0 of 5). For a composable called only from .ts files, every caller is found (34 of 34).
A .vue file that imports the composable explicitly (import { useSidebarState } from "~/composables/useSidebarState") is linked, so the gap is auto-imported calls from .vue <script setup> only.
Expected
.vue files that call an auto-imported composable appear as callers, the same as .ts files, so impact and the blast radius in codegraph_explore include the components that use it.
Why it matters
In a Nuxt app most components call composables at the top of <script setup> (about 75 components in ours), so the blast radius of a composable change misses the components.
- Ngôn ngữ chính
- C
- Star
- 73.2k
- Fork
- 4.7k
- Merge trung bình
- 2 giờ 16 phút
- Pull request đã merge (30 ngày)
- 423
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 90/100
colbymchenry/codegraph#2634 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0Có thể đã có người làm @Ancienttwo đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
colbymchenry/codegraph#2617 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Invalid regular expression: /\boperator++\s*(?:<[^<>()]*>)?\s*\(/: Nothing to repeat (v1.6.2)Đang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
colbymchenry/codegraph#2482 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
codegraph ui - does not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#1900 · 2 bình luận · 5 reaction ·
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#1700 ·
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 82/100
FujiNetWIFI/fujinet-lib#204 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
os:linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mpv-player/mpv#18649 ·
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 85/100
facebookincubator/muse-gadget-sdk#249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: nng_dial / nng_dialer_start can return NNG_ECONNSHUT and NNG_ECRYPTO, which are not documentedĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 89/100
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 78/100
micropython/micropython#19786 ·
Maintainer thường phản hồi trong vòng 1 ngày