fix(js): properly throw error when processing lockfile during postins… (#18968)
This commit is contained in:
parent
8f1429da97
commit
a5a522e92c
@ -38,7 +38,7 @@ export const createNodes: CreateNodes = [
|
||||
combineGlobPatterns(LOCKFILES),
|
||||
(lockFile, context) => {
|
||||
const pluginConfig = jsPluginConfig(context.nxJsonConfiguration);
|
||||
if (!pluginConfig.analyzePackageJson) {
|
||||
if (!pluginConfig.analyzeLockfile) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ export const createDependencies: CreateDependencies = (
|
||||
let lockfileDependencies: ProjectGraphDependencyWithFile[] = [];
|
||||
// lockfile may not exist yet
|
||||
if (
|
||||
pluginConfig.analyzePackageJson &&
|
||||
pluginConfig.analyzeLockfile &&
|
||||
lockFileExists(packageManager) &&
|
||||
parsedLockFile
|
||||
) {
|
||||
|
||||
@ -76,7 +76,7 @@ export function getLockFileNodes(
|
||||
bodyLines: errorBodyLines(e),
|
||||
});
|
||||
}
|
||||
return;
|
||||
throw e;
|
||||
}
|
||||
throw new Error(`Unknown package manager: ${packageManager}`);
|
||||
}
|
||||
@ -107,7 +107,7 @@ export function getLockFileDependencies(
|
||||
bodyLines: errorBodyLines(e),
|
||||
});
|
||||
}
|
||||
return;
|
||||
throw e;
|
||||
}
|
||||
throw new Error(`Unknown package manager: ${packageManager}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user