microsoft / microsoft/TypeScript

Module resolution should not look for node_modules outside project roots

オープン
#52,637 コメント 7 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

Currently, module resolution looks for node_modules all the way to the root of the filesystem. However, this is slow for certain virtual filesystems, like the one used in vscode-web, which maps only a part of the file system to in-memory files and the rest to web requests. https://github.com/microsoft/vscode/pull/173591 shows the workaround needed to stop tsserver from reading these parts of the filesystem.

Instead, module resolution should not look for node_modules directories outside project roots -- at least as specified in updateOpen messages, but I think there are other ways too.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issueに記載されたupdateOpenメッセージとtsserverのワークアラウンドを起点に、モジュール解決を追跡してください。プロジェクトルートが検索範囲をどのように制限するかを確認し、その後、解決処理がそれらのルート外のnode_modulesを読み取らなくなっていることを検証し、影響を受ける動作のカバレッジを追加してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。