From c61e0376408240590bfc712fe9fdadd7dc9a48bc Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 3 Jul 2023 08:48:22 -0700 Subject: [PATCH] fix: use new load/create syntax for package-json --- workspaces/arborist/lib/arborist/reify.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index 22ea432ee48d6..020038b409bb1 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -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 = {},