Skip to content

Commit 9933639

Browse files
committed
fix: handle pnpm dependency fixtures
1 parent 189761d commit 9933639

3 files changed

Lines changed: 19 additions & 8 deletions

File tree

‎actions/has-installed-dependencies/action.yml‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,14 @@ runs:
153153
allInstalledDependencies = await parseDependencies(
154154
`${process.env.PACKAGE_MANAGER} list --depth=1 --json --no-color`
155155
);
156-
(allInstalledDependencies || []).reduce((accumulator, currentValue) => {
157-
return { ...accumulator, ...(currentValue?.dependencies || {}) };
158-
}, []);
156+
allInstalledDependencies = (allInstalledDependencies || []).reduce((accumulator, currentValue) => {
157+
return {
158+
...accumulator,
159+
...(currentValue?.dependencies || {}),
160+
...(currentValue?.devDependencies || {}),
161+
...(currentValue?.optionalDependencies || {}),
162+
};
163+
}, {});
159164
parser = parseNpmDependencies;
160165
break;
161166

‎tests/pnpm/pnpm-lock.yaml‎

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/pnpm/pnpm-workspace.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ allowBuilds:
1111
nx: true
1212
sharp: true
1313
unrs-resolver: true
14+
overrides:
15+
immutable@<3.8.3: ">=3.8.3"
16+
immutable@<3.8.4: ">=3.8.4"

0 commit comments

Comments
 (0)