Relative JS imports with a query string (`./foo.js?v=123`) are not resolved
メンテナーはふだん 1 日以内に返信
@mirzasnowy がすでに取り組んでいます。
2026年10月30日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, python, typescript
調査の方向性
extractors/resolution.py の _resolve_js_module_path(855~856行目)付近を読み、extractors/markdown.py の289行目付近の処理と比較してください。クエリ文字列やフラグメントを含む相対 JavaScript および TypeScript 指定子がどのように解決されるかを確認し、関連する解決テストを実行してください。./foo.js?v=123 がファントムノードを作成せずに ./foo.js として解決されれば完了です。issue では特定のテストファイルは指定されていません。
索引モデルが issue の本文から書いたものです。
説明
Version: graphify 0.9.93 (graphifyy), extract --code-only, GRAPHIFY_BACKEND=none
Description
ES module imports that include a cache-busting query string are not resolved to the target file:
import { foo } from './lib/foo.js?v=134';
Instead of an imports_from edge to lib/foo.js, graphify creates a phantom node (e.g. ref_foo_js_v_134) and the real file gets no inbound edge. Symbol imports and cross-file calls are lost as well, since they depend on the module resolving.
Impact (real project, 93 JS files)
- Phantom
_v_nodes: 96 → 0 after stripping the suffix - Inbound imports_from edges for the most-used module: 0 → 29
- Symbol imports: 30 → 413
- About 400 cross-file
callsedges recovered
Root cause
extractors/resolution.py, lines 855-856 (_resolve_js_module_path): relative specifiers are resolved with start_dir / raw without stripping the ?query / #fragment part. The Markdown extractor already strips it (extractors/markdown.py:289), so applying the same normalization to relative JS/TS specifiers should fix it.
Also present on v8 (default branch) as of 0a8cd4e1e342235fe53e881fb5d591bf0460071f (resolution.py lines 868-869).
Current workaround
Copy the tree to a temp dir, strip the suffix with sed -E 's/(\.js)\?v=[0-9]+/\1/g', and extract from the copy.
Expected behavior
./foo.js?v=123 resolves to ./foo.js, as browsers and bundlers do for module resolution.
Related: #2849 lists one ../styles.css?url import under "Resource-query import is unresolved". It looks like the same root cause.
- 主要言語
- Python
- スター
- 124k
- フォーク
- 11.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Graphify-Labs/graphify のほかの issue
-
Cache the claude backend system prompt via Anthropic prompt caching対応中かも @Jvxoq が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4835 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4831 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
Graphify-Labs/graphify#4829 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)対応中かも @Deepjyoti-Sarmah が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4563 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates対応中かも @bercedev が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Graphify-Labs/graphify#4546 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Graphify-Labs/graphify の issue をすべて見る
似ている issue
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
btclib-org/btclib-node#2158 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dbt-msft/dbt-sqlserver#897 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Gathin23/cleanyourtv#2770 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vllm-project/vllm#64845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dekobon/big-code-analysis#1729 ·
メンテナーはふだん 1 日以内に返信