Skip to content

fix(create-blocks-app): add CDK CLI to templates#236

Open
ikenyal wants to merge 1 commit into
aws-devtools-labs:mainfrom
ikenyal:fix/template-cdk-cli-dependency
Open

fix(create-blocks-app): add CDK CLI to templates#236
ikenyal wants to merge 1 commit into
aws-devtools-labs:mainfrom
ikenyal:fix/template-cdk-cli-dependency

Conversation

@ikenyal

@ikenyal ikenyal commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Problem

Generated templates invoke cdk through their deploy and sandbox scripts but declare only aws-cdk-lib. On a fresh project, npx cdk therefore fetches a CLI on first use, adding latency and allowing the CLI version to float independently of the repository-supported toolchain.

Issue #, if available: #228

Changes

  • Pin aws-cdk to 2.1122.0 in all seven standalone templates. This is the CLI version resolved by the repository lockfile and verified by the repository toolchain.
  • Keep the CLI version independent from the aws-cdk-lib number: CDK Toolkit and Construct Library use separate versioning, and the Toolkit is backward compatible with supported library releases.
  • Add a regression test that verifies each template pins the CLI version resolved in the repository lockfile.
  • Add a patch changeset for @aws-blocks/create-blocks-app.

Validation

  • npm run build --workspace @aws-blocks/create-blocks-app
  • npm test --workspace @aws-blocks/create-blocks-app (51 passing tests)
  • ./node_modules/.bin/cdk --version (2.1122.0)
  • npm run lint:deps
  • changeset status --since=origin/main

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (not applicable: the existing scripts are unchanged; their required CLI is now installed with the template)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ikenyal
ikenyal requested a review from a team as a code owner July 19, 2026 20:45
@changeset-bot

changeset-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 72b2e99

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-blocks/create-blocks-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ikenyal
ikenyal force-pushed the fix/template-cdk-cli-dependency branch from b21807b to 72b2e99 Compare July 19, 2026 20:52
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.

1 participant