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

Vue <script setup> calls to Nuxt auto-imported composables aren't linked

Đang mở
#2,473 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ó
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

  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 colbymchenry/codegraph

Tất cả issue của colbymchenry/codegraph

Issue tương tự

Thêm issue về C

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.