Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/cdk-aspects-peer-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@aligent/cdk-aspects": patch
---

Move `aws-cdk-lib` and `constructs` from `dependencies` to `peerDependencies`, matching the convention used by every `@aligent/cdk-*` construct package.

As regular dependencies, a consumer whose own `aws-cdk-lib` resolved to a different version ended up with two copies in the tree. The aspects' `instanceof CfnResource` checks compared against the nested copy's class, so `visit()` returned early for every node — aspects silently became a no-op (no prefixes, no defaults, no checks) with a valid-but-untouched synth. Declaring them as peers guarantees a single shared instance with the consumer.
6 changes: 4 additions & 2 deletions packages/cdk-aspects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
"typescript": "^5.3.2"
},
"dependencies": {
"aws-cdk-lib": "^2.257.0",
"constructs": "^10.5.0",
"esbuild": "^0.28.0",
"source-map-support": "^0.5.21"
},
"peerDependencies": {
"aws-cdk-lib": "^2.113.0",
"constructs": "^10.5.0"
}
}
5 changes: 3 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ __metadata:
"@types/jest": "npm:^29.5.10"
"@types/node": "npm:^24.12.4"
aws-cdk: "npm:^2.1124.1"
aws-cdk-lib: "npm:^2.257.0"
constructs: "npm:^10.5.0"
esbuild: "npm:^0.28.0"
jest: "npm:^29.7.0"
source-map-support: "npm:^0.5.21"
ts-jest: "npm:^29.4.9"
ts-node: "npm:^10.9.1"
typescript: "npm:^5.3.2"
peerDependencies:
aws-cdk-lib: ^2.113.0
constructs: ^10.5.0
languageName: unknown
linkType: soft

Expand Down