Generate projects with `engine-strict` by default
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 14 h 23 min
- PR fusionados (30 d)
- 162
Descripción
### 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.
Guía de contribución
Línea de trabajo
Comienza con el comando `new` y sigue cómo difieren los archivos de proyecto generados según el gestor de paquetes, centrándote en la salida `.npmrc` solicitada. Confirma que los proyectos nuevos que usan NPM generan `.npmrc` con `engine-strict=true`, mientras que los demás gestores de paquetes permanecen sin cambios, y verifica el comportamiento con las pruebas de generación relevantes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js, typescript
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100