nodejs / nodejs/node

Add console.log() %c support for parity with browsers, Deno, and Bun

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

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

console stale
主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

would be fixed by https://github.com/nodejs/node/pull/49205

My attempt at a compat table of ANSI and %c:

%c ANSI
Node.js ☑️
Deno ☑️ ☑️
Bun ☑️ ☑️
Chrome ☑️ ☑️
Firefox ☑️
Safari ☑️ ?

Why this would be a good idea:

  • Feature parity with other desktop JavaScript runtimes like Deno and Bun
  • Allow documentation authors to recommend using %c instead of ANSI for more compatibility without "%c works everywhere except Node.js" clauses
  • %c is ignored in unsupported environments (like current Node.js) whereas ANSI causes jargon to be printed (particularly in Firefox). Thus, encouraging %c is more "progressive enhancement" or "graceful degradation" than ANSI ??

basically just "everyone else is doing it, so it's probably a good idea to conform to what users expect"

previous issue https://github.com/nodejs/node/issues/29605

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

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

はじめの一歩

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

調査の方向性

プルリクエスト #49205 と前の issue #29605 から始め、そこで特定されている console.log のフォーマット処理のエントリーポイントまたはテストを確認してください。Node.js が、この issue に記載された動作に従って console.log() の %c フォーマットを一貫してサポートすれば完了です。

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

評価

技術スタック
javascript, node.js
領域
cli
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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