Skip to content

Commit 93bf0aa

Browse files
fix(test_downstream_projects): Fix for packages with only dependencies or devDependencies block
1 parent 0c0a336 commit 93bf0aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_downstream_projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function installUpstreamDeps(upstreamPackages) {
9090

9191
upstreamPackages.forEach(upstream => {
9292
const package = JSON.parse(fs.readFileSync('package.json'));
93-
const yalcDep = package.dependencies[upstream] || package.devDependencies[upstream];
93+
const yalcDep = (package.dependencies || {})[upstream] || (package.devDependencies || {})[upstream];
9494
package.resolutions = package.resolutions || {};
9595
package.resolutions[upstream] = yalcDep;
9696
fs.writeFileSync('package.json', JSON.stringify(package, null, 2));

0 commit comments

Comments
 (0)