From 5b9b253f2e25a124bbf6f1ba9ec102ce28a5469e Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Thu, 7 Jul 2022 14:39:58 -0700 Subject: [PATCH] Ignore pending packages in publish registry --- packages/publisher/src/publish-registry.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/publisher/src/publish-registry.ts b/packages/publisher/src/publish-registry.ts index 0474a01ace..ecc07dab69 100644 --- a/packages/publisher/src/publish-registry.ts +++ b/packages/publisher/src/publish-registry.ts @@ -232,7 +232,13 @@ async function generateRegistry(typings: readonly TypingsData[]): Promise [ typing.name, - filterTags((await pacote.packument(typing.fullNpmName, { cache: cacheDir }))["dist-tags"]), + await pacote + .packument(typing.fullNpmName, { cache: cacheDir }) + .then((packument) => filterTags(packument["dist-tags"])) + .catch((reason) => { + if (reason.code !== "E404") throw reason; + return undefined; + }), ]) ) ),