Skip to content

fix(cli): correct the constructs range comment in the TypeScript template hook - #408

Merged
jsteinich merged 1 commit into
mainfrom
fix/template-constructs-range-comment
Sep 10, 2026
Merged

fix(cli): correct the constructs range comment in the TypeScript template hook#408
jsteinich merged 1 commit into
mainfrom
fix/template-constructs-range-comment

Conversation

@so0k

@so0k so0k commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related issue

Non-blocking finding from the #396 review; the comment landed on main via #395.

Description

packages/@cdktn/cli-core/templates/typescript/.hooks.sscaff.js installs constructs@10 and said it "mirrors the constructs peer dependency range declared by the cdktn package — keep both in sync". The two are not equivalent: constructs@10 permits 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 --check and prettier --check on the file; nothing else in the repo references the old text.

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable — n/a
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective — n/a, comment-only
  • New and existing unit tests pass locally with my changes — n/a, comment-only

…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.
@so0k
so0k requested a review from a team as a code owner September 9, 2026 14:45
@jsteinich
jsteinich merged commit 9fc0e43 into main Sep 10, 2026
514 of 516 checks passed
@jsteinich
jsteinich deleted the fix/template-constructs-range-comment branch September 10, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants