Repository navigation
release publish: the reveal waits for the registry to serve every published version (#4244) - #4247
Merged
Merged
Conversation
…lished version before its install check (#4244) npm accepts a publish minutes before npm view and npm install find it, and the 0.124.35 reveal failed twice on that lag. The audit now polls npm view for each version until all answer, up to registryWait seconds (default 600), naming the ones still missing when it gives up, and installs once more after an ETARGET or ERESOLVE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4244.
npm accepts a publish before
npm viewandnpm installfind it. Publishing 0.124.35 uploaded all 24 packages, then failed the reveal's install check twice, on ERESOLVE and then ETARGET, until the registry caught up.packages/core/src/lifecycle/publish-npm.ts: before installing what it published, the audit runsnpm view <name>@<version> versionfor each package every 10 s until all answer. AfterregistryWaitseconds (new on the npm declaration, default 600) it stops withpublish-npm-not-served, naming the packages still missing, before any install. An install that fails with ETARGET or ERESOLVE waits, checks again, and installs once more.PublishDepstakessleepandnow, so the tests never wait.FAKE_NPM_LAG(a version is not served for the next n views after its publish) andFAKE_NPM_INSTALL_ETARGET.reference/publish-targets: theregistryWaitrow and the wait.Tests: five new cases in
publish-targets.test.ts(served at once, served late, never served, ETARGET then success, a second ETARGET fails the audit). The publish unit suites pass (40),scripts/passes (239),release-publish-targets.e2epasses with its call list updated for the views, and the docs prose and citation lints pass.