@epic-web/workshop-utils 6.87.2 → 6.87.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -107,18 +107,20 @@ async function checkDependenciesWithNpmLs(rootDir, expectedDependencies, package
|
|
|
107
107
|
// Use the detected package manager, defaulting to npm
|
|
108
108
|
// pnpm has compatible ls output format
|
|
109
109
|
const command = packageManager === 'pnpm' ? 'pnpm' : 'npm';
|
|
110
|
+
const lsArgs = command === 'npm'
|
|
111
|
+
? ['ls', '--depth=0', '--json', '--include=dev', ...expectedDependencies]
|
|
112
|
+
: ['ls', '--depth=0', '--json', ...expectedDependencies];
|
|
110
113
|
try {
|
|
111
|
-
const result = await execa(command,
|
|
114
|
+
const result = await execa(command, lsArgs, {
|
|
115
|
+
cwd: rootDir,
|
|
116
|
+
reject: false,
|
|
117
|
+
});
|
|
112
118
|
const output = parseNpmLsOutput(result.stdout);
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
? []
|
|
116
|
-
: getFailingDependencies(expectedDependencies, output);
|
|
119
|
+
const failingDependencies = getFailingDependencies(expectedDependencies, output);
|
|
120
|
+
const ok = failingDependencies.length === 0;
|
|
117
121
|
return {
|
|
118
122
|
ok,
|
|
119
|
-
failingDependencies
|
|
120
|
-
? failingDependencies
|
|
121
|
-
: expectedDependencies,
|
|
123
|
+
failingDependencies,
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
126
|
catch (error) {
|