Dependabot、.npmrc の自動推論を廃止
本文の状態
日本語全文を表示中
詳細モードで約1分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
GitHub Changelog
GitHub が提供する依存関係管理ツール「Dependabot」が、npm プライベートレジストリの設定ファイルである .npmrc を自動的に推測する機能を停止し、代わりに設定ファイルでの明示的なスコープ定義を推奨した。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Dependabot は、npm プライベートレジストリに対して .npmrc 設定を推測しようとしなくなります。以前は、Dependabot がロックファイルの解決済み URL から .npmrc の内容を再構築しようとしましたが、誤ったロックファイル URL や、npm、Yarn v1、Yarn Berry、pnpm 間でのロックファイル形式の違い、その他のエッジケースが頻繁にレジストリの認証失敗を引き起こしていました。
何が変わるか
これより、dependabot.yml のレジストリ定義に scope プロパティを設定できるようになります。Dependabot はこの設定を使用して、正しい .npmrc を自動的に生成します。scope が指定された場合、これはリポジトリ内のコミット済みの .npmrc ファイルを含む他のすべての .npmrc ソースよりも優先されます。これにより、レジストリ設定の権威あるソースとして dependabot.yml が機能します。
もしリポジトリに既にチェックインされた .npmrc があり、scope を設定していない場合は、Dependabot は引き続きそれを使用し続けます。scope プロパティは、コミット済みの .npmrc がない状態で Dependabot の推測機能に依存している場合にのみ必要です。
この機能を誰が利用できるか
この機能はすべての github.com ユーザーで利用可能であり、GHES 3.23 で提供開始されます。
始め方
Dependabot 設定ドキュメントを確認し、必要な npm レジストリに対して dependabot.yml に scope を追加するよう更新してください。
この投稿「Dependabot no longer infers .npmrc」は、The GitHub Blog で最初に公開されました。
原文を表示
Dependabot will no longer attempt to infer .npmrc configuration for npm private registries. Previously, Dependabot tried to reconstruct .npmrc contents from lockfile resolved URLs, but incorrect lockfile URLs, lockfile format differences across npm, Yarn v1, Yarn Berry, and pnpm, and other edge cases regularly caused registry authentication failures.
What’s changing
You can now define a scope property on registries in your dependabot.yml. Dependabot uses this to automatically generate the correct .npmrc. When scope is provided, it takes precedence over all other .npmrc sources, including any committed .npmrc file in your repository. This makes dependabot.yml the authoritative source for registry configuration.
If your repository already includes a checked-in .npmrc and you have not configured scope, Dependabot will continue to use it. The scope property is only needed when you don’t have a committed .npmrc and are relying on Dependabot’s inference.
Who can use this feature
This feature is available for all github.com users and will ship in GHES 3.23.
Get started
Review the Dependabot configuration docs and update your dependabot.yml to add scope to any npm registries that need it.
The post Dependabot no longer infers .npmrc appeared first on The GitHub Blog.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み