Skip to content

Commit

Permalink
fix: use new load/create syntax for package-json
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jul 5, 2023
1 parent b252164 commit c61e037
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions workspaces/arborist/lib/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,7 @@ module.exports = cls => class Reifier extends cls {
for (const tree of updatedTrees) {
// refresh the edges so they have the correct specs
tree.package = tree.package
const pkgJson = await PackageJson.load(tree.path)
.catch(() => new PackageJson(tree.path))
const pkgJson = await PackageJson.load(tree.path, { create: true })
const {
dependencies = {},
devDependencies = {},
Expand Down

0 comments on commit c61e037

Please sign in to comment.