Skip to content

Commit

Permalink
feat: treating unpublished dpackages as if they were new (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair authored May 7, 2021
1 parent d2884be commit b033dda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/write-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ export const writePackage = async (
let doc = await packument(packageName);

let latest = undefined;

let newPackage = false;
let drainedBody: false | Buffer = false;
if (!doc) {
if (!doc || doc?.time?.unpublished) {
// this is a completely new package.
newPackage = true;
drainedBody = await drainRequest(req);
Expand Down

0 comments on commit b033dda

Please sign in to comment.