Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

npm RFC #868 will block this package's install script by default

Aperta
#3,061 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
node.js

Direzione di ricerca

Inizia esaminando package.json, in particolare lo script di installazione che usa node-pre-gyp, e leggi npm RFC #868. Confronta il flusso di installazione corrente del pacchetto con il pattern optionalDependencies menzionato per esbuild, sharp e @swc/core. Il lavoro è completato quando è stato documentato o implementato un percorso di compatibilità concordato, con indicazioni nel README se gli utenti devono approvare lo script di installazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi there,

I'm reaching out because grpc is one of the most depended-on npm packages that runs an install script, and an accepted npm RFC is going to change how those scripts behave.

The RFC blocks dependency install scripts by default during npm install. That's the same thing pnpm, Yarn Berry, Bun, and Deno already do. Users opt back in per package through a new allowScripts field in package.json (or the npm approve-scripts command). The motivation is the run of supply-chain attacks over the last couple of years that used postinstall hooks to run code the moment a package landed in the tree.

For grpc, the script that's affected is:

"install": "node-pre-gyp install --fallback-to-build --library=static_library"

That script compiles a native addon, so under the new default it won't run unless the user adds grpc to their allowScripts. The change that helps your users most is shipping prebuilt binaries as optionalDependencies, the pattern esbuild, sharp, and @swc/core moved to. Most installs then need no compile step and no allowlist entry. If prebuilds aren't practical for grpc, a short note in your README showing the allowScripts line people should add will save a lot of confused issues.

I wanted to flag this early so you've got time to plan rather than find out when the install warnings start showing up. The full RFC is here: https://github.com/npm/rfcs/pull/868. Happy to answer any questions.

Lingua principale
TypeScript
Stelle
4.8k
Fork
720
Merge medio
3g 3h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di grpc/grpc-node

Tutte le issue di grpc/grpc-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.