[FEATURE] Allow satisfies to throw errors
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, node.js
- Área
- tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 5.5k
- Forks
- 622
- Merge medio
- 4 d 23 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de npm/node-semver
-
[BUG] minVersion returns 0.0.0 when a 0.0.0 prerelease is the true minimumPosiblemente ocupada @thisisshivamtiwari la tomó hace 1 día. AbiertoBug Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
npm/node-semver#934 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
[BUG] new Range(comparator).test() throws TypeError for a prerelease versionPosiblemente ocupada @Boulea7 la tomó hace 28 días. AbiertoBug Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
npm/node-semver#908 ·
Los mantenedores suelen responder en 4 días
-
semver:major
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
npm/node-semver#108 · 6 comentarios ·
Los mantenedores suelen responder en 4 días
-
[BUG] intersects() still returns true for an empty range against "*" (follow-up to #521)Posiblemente ocupada @json-open-source la tomó hace 27 días. AbiertoBug Needs Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
npm/node-semver#909 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
[BUG] `* || 1.2.3-alpha` won't match `1.2.3-alpha` (when includePrerelease = false)Posiblemente ocupada @x0Lazarus la tomó hace 34 días. AbiertoBug Needs Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
npm/node-semver#906 · 1 comentario ·
Los mantenedores suelen responder en 4 días
Todos los issues de npm/node-semver
Issues similares
-
FEATURE REQUEST
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
linuxmint/cinnamon-spices-extensions#1193 ·
Los mantenedores suelen responder en 1 día
-
ds-bot collides with dsh-argp: tool "recall" is already registered, Bot layer never activatesAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Fei2411/DeepSeek-Bot#703 ·
-
area:web first-timers-only good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
career-ops-hq/career-ops#6264 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
catppuccin/firefox#21 ·
-
[Server Submission]: Wiro AIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
cline/mcp-marketplace#3394 ·