@@ -23,24 +23,23 @@ export const processProjectGraph: ProjectGraphProcessor = async (
23
23
context
24
24
) => {
25
25
const builder = new ProjectGraphBuilder ( graph ) ;
26
+ const pluginConfig = jsPluginConfig ( readNxJson ( ) ) ;
26
27
27
- // during the create-nx-workspace lock file might not exists yet
28
- if ( lockFileExists ( ) ) {
29
- const lockHash = lockFileHash ( ) ?? 'n/a' ;
30
- if ( lockFileNeedsReprocessing ( lockHash ) ) {
31
- removeNpmNodes ( graph , builder ) ;
32
- parseLockFile ( builder ) ;
28
+ if ( pluginConfig . analyzePackageJson ) {
29
+ // during the create-nx-workspace lock file might not exists yet
30
+ if ( lockFileExists ( ) ) {
31
+ const lockHash = lockFileHash ( ) ?? 'n/a' ;
32
+ if ( lockFileNeedsReprocessing ( lockHash ) ) {
33
+ removeNpmNodes ( graph , builder ) ;
34
+ parseLockFile ( builder ) ;
35
+ }
36
+ writeLastProcessedLockfileHash ( lockHash ) ;
33
37
}
34
- writeLastProcessedLockfileHash ( lockHash ) ;
35
- }
36
38
37
- buildNpmPackageNodes ( builder ) ;
39
+ buildNpmPackageNodes ( builder ) ;
40
+ }
38
41
39
- await buildExplicitDependencies (
40
- jsPluginConfig ( readNxJson ( ) ) ,
41
- context ,
42
- builder
43
- ) ;
42
+ await buildExplicitDependencies ( pluginConfig , context , builder ) ;
44
43
45
44
return builder . getUpdatedProjectGraph ( ) ;
46
45
} ;
0 commit comments