[DOCS] Explain registry reads and registry selection for npm publish --dry-run
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 85/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
- Área
- cli, documentation
Línea de trabajo
Empieza por la referencia de npm v12 a publish enlazada en el issue y comprueba cómo describe --dry-run, la selección del registry y el comportamiento sin conexión. Documenta que la validación de dry-run puede leer las versiones de los paquetes, explica la precedencia del registry descrita en el issue e incluye el ejemplo del tarball local. El trabajo estará terminado cuando la referencia explique la consulta de versiones, la selección del registry y qué no puede verificar el modo sin conexión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for this?
- I have searched the existing issues
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
- This is a CLI Docs Enhancement.
Description of Problem
The publish reference could explain that --dry-run skips the publish write while still allowing registry reads and version checks.
The same tarball can pass or fail based on which versions a registry reports.
Someone using a dry run to check a package before publishing can't tell from the docs which registry it will ask.
We reproduced this with npm 12.2.3 and Node.js 26.13.1 using loopback registries.
Set the package name and version to [email protected].
Set publishConfig.registry and npm_config_registry to different registries.
Use an isolated empty cache for each run and set npm_config_update_notifier=false to measure requests from publish itself.
npm pack --ignore-scripts
npm publish ./example-dry-run-0.0.0.tgz --dry-run --ignore-scripts
The dry run sent GET /example-dry-run to the registry in publishConfig and made no upload request.
Returning {"versions":{}} let it pass.
Returning {"versions":{"1.0.0":{"name":"example-dry-run","version":"1.0.0"}}} made it fail with “Cannot implicitly apply the "latest" tag.”
An explicit --registry pointed the version lookup at that registry.
With an empty cache, --offline stopped the package lookup.
With the notifier enabled outside CI, npm still requested /npm from the registry set in the environment.
Potential Solution
Document the version lookup and the registry order for this unscoped package.
An explicit --registry wins over publishConfig.registry, which wins over npm_config_registry.
Give a local-tarball example with --offline --no-update-notifier and explain that an offline run cannot confirm versions on the remote registry.
The maintainers confirmed that dry-run validation is intentional in the npm 11 version-check report.
Docs URL
https://docs.npmjs.com/cli/v12/commands/npm-publish/
I'm happy to open a pull request with the documentation and a focused loopback-registry test if that would help.
Posted by Claude Opus 5.5 on behalf of @boblangley after review
- Lenguaje dominante
- JavaScript
- Estrellas
- 10.3k
- Forks
- 5k
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 26
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/cli
-
[BUG] scripts/dependency-graph.js splits npm-cli-repos.txt on os.EOL, so DEPENDENCIES.md depends on the checkout's line endingsPosiblemente ocupada @saruk-vedant la tomó hace 7 días. AbiertoBug Needs Triage Triage Requested
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
npm/cli#10316 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[BUG] npm pkg delete removes the first array item for a nonexistent propertyPosiblemente ocupada @drawliin la tomó hace 42 días. Abiertocmd:delete Priority 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 2 días
-
create node pr: Node.js 20 deprecation & `DEP0040` warnings loggedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoEngineering Priority 1
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
Los mantenedores suelen responder en 2 días
-
`npm audit signatures` does not report how many packages it skipped for want of registry keysPosiblemente ocupada @greenlincoln05 la tomó hace 63 días. AbiertoPriority 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
npm/cli#10018 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
[BUG] E401 error message does not use the configured registryPosiblemente ocupada @toufiq-dev la tomó hace 66 días. AbiertoBug Priority 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
npm/cli#10014 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Issues similares
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
githubnext/gh-aw-workshop#6332 ·
Los mantenedores suelen responder en 1 día
-
App Designer bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
avniproject/avni-webapp#1858 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 96/100
hiero-ledger/hiero-sdk-js#4834 ·
Los mantenedores suelen responder en 1 día
-
[组件名称] 描述问题的标题Abierto🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Tencent/tdesign-miniprogram#4744 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Y-axis tooltip hides near the bottom of the plot while the y crosshair stays visiblePosiblemente ocupada @lazerg la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apexcharts/apexcharts.js#5449 ·
Los mantenedores suelen responder en 3 días