patternfly / patternfly/patternfly-react
Bug - react-code-editor - unsatisfied peer dependency from @monaco/react
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 862
- フォーク
- 392
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 9
説明
Describe the problem
@patternfly/react-code-editor has:
-
dependency on @monaco-editor/react
-
devDependency on monaco-editor
@monaco-editor/react has:
- peer dependency
"monaco-editor": ">= 0.25.0 [ 1"
I (@hawtio/react) have a peer+dev dependency on @patternfly/react-code-editor and during yarn install I get Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
The details:
$ yarn explain peer-requirements pce8ff
Package @patternfly/react-code-editor@npm:5.4.18 [9caf3] is requested to provide monaco-editor by its descendants
@patternfly/react-code-editor@npm:5.4.18 [9caf3]
└─ @monaco-editor/react@npm:4.7.0 [0e353] (via ]= 0.25.0 [ 1)
✘ Package @patternfly/react-code-editor@npm:5.4.18 [9caf3] does not provide monaco-editor.
At @hawtio/react level, I can't satisfy the transitive peer dependency on monaco-editor by adding it to my dependencies.
I also can't hoist the peer requirement to my package by adding monaco-editor to my peerDependencies.
How do you reproduce the problem?
See the description
Expected behavior
No warnings during yarn install.
Also @patternfly/react-code-editor should do one of these:
-
add
monaco-editorto itsdependencies -
add
monaco-editorto itspeerDependencies
adding it to devDependencies breaks the peer contract.
I verified the suggestions with my .yarnrc.yml:
packageExtensions:
"@patternfly/react-code-editor@*":
dependencies:
"monaco-editor": "^0.52.0"
when using:
peerDependencies:
"monaco-editor": "^0.52.0"
I got expected error at my @hawtio/react level:
$ yarn explain peer-requirements p3f5f3
Package @hawtio/react@workspace:packages/hawtio is requested to provide monaco-editor by its descendants
@hawtio/react@workspace:packages/hawtio
└─ @patternfly/react-code-editor@npm:5.4.18 [9caf3] (via ^0.52.0)
└─ @monaco-editor/react@npm:4.7.0 [0e353] (via ]= 0.25.0 < 1)
✘ Package @hawtio/react@workspace:packages/hawtio does not provide monaco-editor.
But this one can be fixed when @hawtio/react adds a dependency or dev dependency on monaco-editor.
And to make things more confusing - @patternfly/react-code-editor is actually satisfying peer dependency on monaco-editor from @monaco/react by adding monaco-editor to its devDependencies.
But when I (@hawtio/react) use @patternfly/react-code-editor, this peer satisfaction breaks.
I believe you have to add monaco-editor as peer dependency to @patternfly/react-code-editor.
Is this issue blocking you?
No
What is your environment?
-
OS: Linux
-
Browser (build time issue)
-
Version: 5.4.18
What is your product and what release date are you targeting?
It's Hawtio, no strict release date.
Jira Issue: PF-2361
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
@patternfly/react-code-editor パッケージのマニフェストから始め、@monaco-editor/react の peer dependency との関係で monaco-editor がどのように宣言されているかを確認します。必要に応じて依存関係の宣言を更新し、その後 yarn install を実行して、peer dependency の警告がなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100