fix(release): retain npm duplicate-version fallback

This commit is contained in:
Victor Araújo
2026-07-21 14:09:11 -03:00
parent 91443501fb
commit 9169a70184
2 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -31,11 +31,12 @@ describe("release publish", () => {
});
});
it("recognizes npm's existing-version machine codes without matching registry prose", () => {
it("recognizes npm's existing-version machine codes and registry-precheck prose", () => {
expect(isVersionAlreadyPublished("npm error code E409\nnpm error Cannot publish over existing version")).toBe(
true,
);
expect(isVersionAlreadyPublished("npm error code EPUBLISHCONFLICT")).toBe(true);
expect(isVersionAlreadyPublished("You cannot publish over the previously published versions: 1.2.3.")).toBe(true);
expect(isVersionAlreadyPublished("cannot publish over the previously published version")).toBe(false);
});
});