-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(monorepo): fix issues with monorepo-ts peer deps
- Loading branch information
Showing
2 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,6 +171,9 @@ export class MonorepoTsProject | |
}, | ||
include: ["**/*.ts", ".projenrc.ts"], | ||
}, | ||
peerDeps: [...(options.peerDeps || []), "nx@^16"], | ||
devDeps: [...(options.devDeps || []), "nx@^16", "@aws/pdk@^0"], | ||
deps: [...(options.deps || []), "aws-cdk-lib", "constructs", "cdk-nag"], | ||
}); | ||
|
||
this.nxConfigurator = new NxConfigurator(this, { | ||
|
@@ -201,6 +204,12 @@ export class MonorepoTsProject | |
); | ||
break; | ||
} | ||
case NodePackageManager.NPM: { | ||
// Allow older versions of peer deps to resolv compatibility issues | ||
this.tasks.tryFind("install")?.reset("npm install --legacy-peer-deps"); | ||
this.tasks.tryFind("install:ci")?.reset("npm ci --legacy-peer-deps"); | ||
break; | ||
} | ||
} | ||
|
||
this.workspaceConfig = options.workspaceConfig; | ||
|
@@ -272,10 +281,6 @@ export class MonorepoTsProject | |
}); | ||
} | ||
|
||
// Add dependency on nx 16 | ||
this.addPeerDeps("nx@^16"); | ||
this.addDevDeps("nx@^16", "@aws/pdk@^0"); | ||
this.addDeps("aws-cdk-lib", "constructs", "cdk-nag"); // Needed as this can be bundled in @aws/pdk | ||
this.package.addPackageResolutions( | ||
"@types/[email protected]", | ||
"wrap-ansi@^7.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters