fix(cli): correct the constructs range comment in the TypeScript template hook - #408
Merged
Merged
Conversation
…late hook The hook installs `constructs@10` and claimed to mirror the peer range the cdktn package declares, asking maintainers to keep both in sync. They are not the same range: `constructs@10` permits 10.0.0 onward, while cdktn's peer dependency is `^10.6.0`. Nothing was wrong at runtime - a fresh install resolves the newest 10.x, which satisfies the peer range - but the instruction was misleading. Describe the actual relationship instead.
jsteinich
approved these changes
Sep 9, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Non-blocking finding from the #396 review; the comment landed on
mainvia #395.Description
packages/@cdktn/cli-core/templates/typescript/.hooks.sscaff.jsinstallsconstructs@10and said it "mirrors theconstructspeer dependency range declared by the cdktn package — keep both in sync". The two are not equivalent:constructs@10permits 10.0.0 onward, while cdktn's peer dependency is^10.6.0. There is no runtime defect — a fresh install resolves the newest 10.x, which satisfies the peer range — but the maintenance instruction was misleading. The comment now states the actual relationship: the peer range is the binding constraint, and only the major in the template spec has to follow cdktn's.Comment-only change; no behaviour touched.
Testing
node --checkandprettier --checkon the file; nothing else in the repo references the old text.Checklist