-
Notifications
You must be signed in to change notification settings - Fork 76
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
3 changed files
with
13 additions
and
8 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: ["nx@^16", ...(options.peerDeps || [])], | ||
devDeps: ["nx@^16", "@aws/pdk@^0", ...(options.devDeps || [])], | ||
deps: ["aws-cdk-lib", "constructs", "cdk-nag", ...(options.deps || [])], | ||
}); | ||
|
||
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
4 changes: 2 additions & 2 deletions
4
packages/type-safe-api/test/project/__snapshots__/type-safe-api-project.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.