Support providing AbortSignal to the `fs.stat` functions
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
What is the problem this feature will solve?
Currently fs.stat does not support providing an AbortSignal to fail-fast during teardown, unlike basically all other fs operations
What is the feature you are proposing to solve the problem?
That the StatOptions object have a new field signal?: AbortSignal and when that signal emits an "abort" event the underlying OS FS actions is aborted an the callback parameter of stat is called with an AbortError and undefined.
Futhermore, the async version of stat would also support this option but instead would reject the promise with an AbortError.
What alternatives have you considered?
None, this needs to be implemented within the VM
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず fs.stat と StatOptions のエントリーポイントを特定し、既存の fs 操作がどのように AbortSignal を受け付け、AbortError を伝播するかを比較します。コールバックベースの stat が中断後に AbortError と undefined を返し、Promise ベースのバージョンが AbortError で reject され、基盤となるファイルシステム操作が停止すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, nodejs
- 領域
- backend-api-design, operating-systems
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100