Generate projects with `engine-strict` by default
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 14時間 23分
- マージ済み PR(30日)
- 162
説明
### Command
new
### Description
It is quite easy to install a package incompatible with the current Node runtime. NPM only emits a warning by default which is easily overlooked. Once the package is installed, running it may result in unpredictable behavior, or might even work in the short term and then suddenly fail seemingly randomly in the future due to unrelated updates or changes to executed code paths which suddenly become incompatible with the currently installed Node version.
### Describe the solution you'd like
New projects should generate an `.npmrc` with `engine-strict=true` by default when using NPM as the package manager.
https://docs.npmjs.com/cli/v11/using-npm/config#engine-strict
This opts-in to a stricter environment which emits a hard error when installing a package incompatible with the current Node environment.
Yarn and pnpm already use the strict behavior by default, so this aligns with the broader direction of the package manager ecosystem.
Spin off from https://github.com/angular/angular-cli/issues/30547.
コントリビューションガイド
調査の方向性
`new`コマンドから始め、要求された `.npmrc` の出力に焦点を当てながら、パッケージマネージャーごとに生成されるプロジェクトファイルがどのように異なるかを追跡します。NPM を使用する新しいプロジェクトでは `engine-strict=true` を含む `.npmrc` が生成され、他のパッケージマネージャーは変更されないことを確認し、関連する生成テストで動作を検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js, typescript
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100