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

Revisit the use of removeNPMAbsolutePaths

Aperta
#509 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
ci-cd, devops

Direzione di ricerca

Inizia individuando removeNPMAbsolutePaths e verifica come elabora i file package.json in node_modules. Riproduci npm ci con il package-lock.json corrente e confronta il diff risultante, incluse le modifiche al newline finale. Il lavoro è completato quando viene determinato se la pulizia è ancora necessaria in CI e vengono evitate le modifiche in conflitto descritte qui.

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

Descrizione

It appears that npm ci creates a huge diff. None of the package.json files in node_modules have a final newline. Is this something that should be done separate from this PR?

Originally posted by @RA80533 in https://github.com/github/codeql-action/issues/487#issuecomment-838000019

  • The current package-lock.json file was generated as a v2 lock file by npm 7.x. Major releases of npm prior to 7.x inserted an extra property in package.json files residing in the node_modules folder for which removeNPMAbsolutePaths was used. In other words, removeNPMAbsolutePaths no longer has anything to clean up. EDIT: This might not be true for the CI. This specific detail needs to be investigated.
  • removeNPMAbsolutePaths has the unfortunate side effect of stripping the final newline from any file it touches. npm attempts to insert a final newline if it finds that it's missing. The two work against each other to a disastrous effect. VS Code's version control integration has to be reloaded if either of them tries to undo the other because of the enormous amount of changes they make.
Lingua principale
TypeScript
Stelle
1.6k
Fork
493
Merge medio
1g 13h
PR unite (30g)
44

Guida per i contributori

Apri la guida per i contributori

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 github/codeql-action

Tutte le issue di github/codeql-action

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.