Skip to content

Commit

Permalink
Merge pull request #1267 from dynamoose/publishUpdatePackageLockCorre…
Browse files Browse the repository at this point in the history
…ctly

Fixing issue where publish doesn't update version for `package-lock.json` file correctly for v2 of lock file
  • Loading branch information
fishcharlie committed Sep 12, 2021
2 parents a3e15da + 3005533 commit d6fe253
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions publish/index.js
Expand Up @@ -89,6 +89,9 @@ let package = require("../package.json");
let fileContents = await fs.readFile(currentPath);
const fileContentsJSON = JSON.parse(fileContents);
fileContentsJSON.version = results.version;
if (fileContentsJSON.packages && fileContentsJSON.packages[""]) {
fileContentsJSON.packages[""].version = results.version;
}
fileContents = JSON.stringify(fileContentsJSON, null, 2);
await fs.writeFile(currentPath, `${fileContents}\n`);
};
Expand Down

1 comment on commit d6fe253

@vercel
Copy link

@vercel vercel bot commented on d6fe253 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.