patternfly / patternfly/patternfly-react
Packages do not specify an `exports` field
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 862
- フォーク
- 392
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 9
説明
Packages in the workspaces should set the exports field in the package.json file. As Node.JS doesn't read the module field, the ESM output may be skipped if the exports field is not added.
Specifying the exports field also prevents modules that are written in ESM from being interpreted as CommmonJS. For example, it is currently possible to make the following import:
import foo from "@patternfly/react-drag-drop/dist/esm/next/components/DragDrop/DragButton"
Since there is no type specified this file would be considered CommonJS, even though the source is actually written in ESM.
The exports field supplants the main and module fields, which should be removed when the exports field is introduced. This would be considered a breaking change.
This is part of a series of issues resulting from publication linting introduced under #10764
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
workspace の package.json ファイルと、#10764 の公開用 linting のコンテキストを確認します。パッケージに exports エントリを追加し、該当する場合は不要になった main フィールドと module フィールドを削除して、ドキュメント化された ESM import が Node.js によって正しく解決されることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js
- 領域
- build-system, release
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100