feat(DEP0192): migrate internal TLS imports to `node:tls`

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
tooling

調査の方向性

Start by reading existing codemods and their fixtures to learn how this repository handles imports, aliases, and unresolved cases. Add a codemod for the listed _tls_common and _tls_wrap exports, preserving bindings and avoiding collisions; include the requested fixtures. Done means supported imports migrate to node:tls, while unsupported or unresolved cases are reported or skipped as specified.

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

説明

good first issue human help wanted

Description

Node.js 27.0.0-alpha.0.0.0 removes the _tls_common and _tls_wrap modules under DEP0192.

Add a codemod that migrates imports of their public equivalents to node:tls:

  • _tls_common: SecureContext and createSecureContext.
  • _tls_wrap: TLSSocket, Server, createServer, and connect.

Support specifiers with and without node:, CommonJS destructuring and property access, ESM imports, and aliases. Handle literal dynamic imports when their accessed exports can be resolved.

Additional Information

  • Preserve local binding names and avoid import collisions.
  • Namespace imports can be migrated only when all uses are understood and refer to equivalent public exports.
  • Report unsupported internal exports, such as translatePeerCertificate, for manual migration.
  • Skip namespace objects that escape into unknown code, computed exports that cannot be resolved, and dynamic module specifiers.
  • Include fixtures for supported exports, mixed supported/unsupported imports, aliases, and already migrated code.

Examples

-const { createSecureContext: makeContext } = require('_tls_common');
+const { createSecureContext: makeContext } = require('node:tls');

-import { TLSSocket, connect as tlsConnect } from 'node:_tls_wrap';
+import { TLSSocket, connect as tlsConnect } from 'node:tls';

 const context = makeContext(options);
 const socket = tlsConnect(connectionOptions);

Refs

主要言語
TypeScript
スター
85
フォーク
58
平均マージ
1日 21時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

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

nodejs/userland-migrations のほかの issue

nodejs/userland-migrations の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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