[RRFC] Include a `globallink` install strategy
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- developer-experience, tooling
Direzione di ricerca
Inizia esaminando la strategia di installazione linked esistente e il comando clean-install, quindi confronta il comportamento proposto con il global store di PNPM. L’issue non indica file di implementazione o test; per considerarlo completato sarebbe necessario concordare un design per l’archiviazione globale, il riutilizzo delle dipendenze, la pulizia e gli override della configurazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Motivation ("The Why")
There's no doubt that NPM is the butt of a lot of memes relating to how heavy the local node_modules folder can get. Especially on big projects, and when working on multiple big projects over time, the duplication of the same packages across different project spaces can cause a significant impact on hard drive space. A tool already exists to address this issues: PNPM. However, PNPM is not a 1-for-1 replacement - there are some quirks with the commands, and while for the most part it works, these nuances can get in the way of efficient package management, including when sharing code among developers (especially in the Open Source community).
A globallink install strategy should be included to address this and would work similar to how the linked strategy works now. However, instead of the packages being saved in ./node_modules/.store, they would be saved in /path/to/npm/global/node_modules/.store.
This will also cause an update to the clean-install command where the packages (and exact dependencies) for a project are deleted from the global store and re-installed.
Of course, this install strategy can be overridden by specifying a different type at the command line or local config.
How
Current Behaviour
The hoisting of packages to the root of the node modules folder helps to deduplicate packages across the project. However, this is only localised to the project. As an example, I work on many web apps that all use SvelteKit and I need to download and store the entire SvelteKit package every time for each project (36MB). Add on the extra frameworks that I use, and that number starts to add up pretty quickly to a couple hundred megabytes.
Desired Behaviour
By specifying the install-strategy as globallink all the packages would be installed into a global store. npm would resolve the package requirements of an install command, determine that a package exists within the store which meets the version criteria and links to it instead of downloading it again. If no package in the store meets the criteria, one is simply downloaded.
I might be oversimplifying the complexity, but the implementation could be an increase in capability of the linked install strategy, in that the store that it points to is the global store, rather than the local one.
- Lingua principale
- JavaScript
- Stelle
- 780
- Fork
- 266
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di npm/rfcs
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Issue simili
-
docs: add SECURITY.md vulnerability reporting policyForse già presa @AK-Lmn l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
flisk-sh/linux2wasm#12 ·
I maintainer di solito rispondono entro 1 giorno
-
possible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Mintplex-Labs/anything-llm#7388 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 60/100
I maintainer di solito rispondono entro 1 giorno
-
v6: Minified bootstrap.min.css is missing header infoForse già presa @lazerg l’ha presa oggi. Apertabug build confirmed has-pr v6
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[workshop-sync] workshop/side-quest-26-01-forecast-costs.md: forecast default history window is inaccurateForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
githubnext/gh-aw-workshop#6332 ·
I maintainer di solito rispondono entro 1 giorno