[FEATURE] Allow satisfies to throw errors
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- tooling
Direzione di ricerca
Start with functions/satisfies.js and the referenced error location in classes/range.js. Reproduce the invalid range during npm install using the package.json example, then trace how satisfies handles it. Done means the invalid range is distinguishable from an invalid version and produces the requested range error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What / Why
It would be nice to have
satisfiesthrow an error so that we may see that the range does not satisfy due to an invalid range as opposed to an invalid version. The range error that we'd like to see is here: https://github.com/npm/node-semver/blob/cb1ca1d5480a6c07c12ac31ba5f2071ed530c4ed/classes/range.js#L41
When
- When verifying engine versions during
npm install - When adding a dependency to package.json during
npm install
Where
- npm/node-semver
How
Current Behavior
Create an empty project with the following package.json:
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"engines": {
"node": ">=6.5.0 !15"
},
"engineStrict": true
}
Run npm install and you get:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=6.5.0 !15' },
npm WARN EBADENGINE current: { node: 'v16.11.1', npm: '8.0.0' }
npm WARN EBADENGINE }
up to date, audited 1 package in 414ms
found 0 vulnerabilities
Expected Behavior
Create an empty project with the following package.json:
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"engines": {
"node": ">=6.5.0 !15"
},
"engineStrict": true
}
Run npm install and ideally get something like:
npm WARN EBADENGINE Invalid SemVer Range: >=6.5.0 !15
up to date, audited 1 package in 414ms
found 0 vulnerabilities
Who
- n/a
References
- n/a
- Lingua principale
- JavaScript
- Stelle
- 5.5k
- Fork
- 622
- Merge medio
- 4g 23h
- PR unite (30g)
- 4
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/node-semver
-
[BUG] minVersion returns 0.0.0 when a 0.0.0 prerelease is the true minimumForse già presa @thisisshivamtiwari l’ha presa 1 giorno fa. ApertaBug Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
npm/node-semver#934 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
[BUG] new Range(comparator).test() throws TypeError for a prerelease versionForse già presa @Boulea7 l’ha presa 28 giorni fa. ApertaBug Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
npm/node-semver#908 ·
I maintainer di solito rispondono entro 4 giorni
-
semver:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
npm/node-semver#108 · 6 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
[BUG] intersects() still returns true for an empty range against "*" (follow-up to #521)Forse già presa @json-open-source l’ha presa 27 giorni fa. ApertaBug Needs Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
npm/node-semver#909 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
[BUG] `* || 1.2.3-alpha` won't match `1.2.3-alpha` (when includePrerelease = false)Forse già presa @x0Lazarus l’ha presa 34 giorni fa. ApertaBug Needs Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
npm/node-semver#906 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di npm/node-semver
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
feimacode/open-design-agent-kit#66 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
xojs/eslint-config-xo#134 ·
-
FEATURE REQUEST
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
linuxmint/cinnamon-spices-extensions#1193 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
huggingface/transformers.js#1839 ·
I maintainer di solito rispondono entro 1 giorno