@@ -6,7 +6,7 @@ import * as path from 'node:path';
66import ignore , { type Ignore } from 'ignore' ;
77
88import type { IReadonlyLookupByPath , LookupByPath , IPrefixMatch } from '@rushstack/lookup-by-path' ;
9- import { Path , FileSystem , Async , AlreadyReportedError , Sort } from '@rushstack/node-core-library' ;
9+ import { Path , FileSystem , Async , AlreadyReportedError , Sort , JsonFile } from '@rushstack/node-core-library' ;
1010import {
1111 getRepoChanges ,
1212 getRepoRoot ,
@@ -545,16 +545,16 @@ export class ProjectChangeAnalyzer {
545545 blobSpec : `${ mergeCommit } :${ pnpmConfigRelativePath } ` ,
546546 repositoryRoot : repoRoot
547547 } ) ;
548- const oldPnpmConfig : IPnpmOptionsJson = JSON . parse ( oldPnpmConfigText ) ;
548+ const oldPnpmConfig : IPnpmOptionsJson = JsonFile . parseString ( oldPnpmConfigText ) ;
549549 oldCatalogs = oldPnpmConfig . globalCatalogs ?? { } ;
550550 } catch {
551551 // Old file didn't exist or was unparseable — treat all packages in all current catalogs as changed
552552 if ( rushConfiguration . subspacesFeatureEnabled ) {
553- terminal . writeLine (
553+ terminal . writeWarningLine (
554554 `"${ subspace . subspaceName } " subspace pnpm-config.json was created or unparseable. Assuming all projects are affected.`
555555 ) ;
556556 } else {
557- terminal . writeLine (
557+ terminal . writeWarningLine (
558558 `pnpm-config.json was created or unparseable. Assuming all projects are affected.`
559559 ) ;
560560 }
@@ -608,8 +608,7 @@ export class ProjectChangeAnalyzer {
608608 // Check each project in the subspace to see if it depends on a changed catalog package
609609 const subspaceProjects : RushConfigurationProject [ ] = subspace . getProjects ( ) ;
610610 subspaceProjects . forEach ( ( project ) => {
611- const { dependencies, devDependencies, optionalDependencies, peerDependencies } =
612- project . packageJson ;
611+ const { dependencies, devDependencies, optionalDependencies, peerDependencies } = project . packageJson ;
613612 const allDependencies : Set < [ string , string ] > = new Set (
614613 [ dependencies , devDependencies , optionalDependencies , peerDependencies ] . flatMap ( ( deps ) =>
615614 Object . entries ( deps ?? { } )
0 commit comments