Deprecation warning with VS Code extensions using Node.js v20+: "navigator is now a global in nodejs"

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
security

調査の方向性

Start by reading the navigator checks in lib/jsbn.js, lib/random.js, and lib/util.js, then compare their behavior under the affected Node.js versions and VS Code 1.101+. Confirm which checks are browser-specific versus valid for Node.js. Done means the deprecation warning is eliminated without breaking browser detection, entropy collection, or hardware-concurrency handling.

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

説明

Warning in VS Code 1.101+:

2025-11-02 01:39:50.792 [warning] [Deprecation Warning] 'PendingMigrationError' is deprecated. navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.
 FROM: PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.

Root Cause

Node.js v21+ introduced navigator as a global object (https://nodejs.org/en/blog/release/v21.2.0). The library contains checks like:

if (typeof navigator !== 'undefined') {
  // browser-specific code
}

It seems the following 3 places violate this rule:

  • Browser detection logic in lib/jsbn.js -> Faulty Node.JS check
  • Entropy collection in lib/random.js -> Might be faulty since some Node.JS versions have a navigator object that is unlike the browser one
  • Hardware concurrency in lib/util.js -> Technically valid
主要言語
JavaScript
スター
5.4k
フォーク
874
平均マージ
3分
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

digitalbazaar/forge のほかの issue

digitalbazaar/forge の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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