angular / angular/angular-cli

Generate projects with `engine-strict` by default

Aberta
#31,271 0 comentários 0 reações 0 responsáveis Ver no GitHub
area: @schematics/angular feature
Linguagem predominante
TypeScript
Estrelas
27k
Forks
11.8k
Merge médio
14h 23min
PRs com merge (30d)
162

Descrição

### 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.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo comando `new` e acompanhe como os arquivos de projeto gerados diferem por gerenciador de pacotes, com foco na saída `.npmrc` solicitada. Confirme que novos projetos usando NPM geram `.npmrc` com `engine-strict=true`, enquanto os outros gerenciadores de pacotes permanecem inalterados, e verifique o comportamento com os testes de geração relevantes.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
node.js, typescript
Domínio
cli
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.