Skip to content

feat: add cdkVersion option to AlmaCdkConstructLibraryOptions#12

Merged
aripalo merged 3 commits into
mainfrom
feature/allow-cdk-version-override
May 12, 2026
Merged

feat: add cdkVersion option to AlmaCdkConstructLibraryOptions#12
aripalo merged 3 commits into
mainfrom
feature/allow-cdk-version-override

Conversation

@aripalo

@aripalo aripalo commented May 12, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces support for specifying the AWS CDK version via a new cdkVersion option in the AlmaCdkConstructLibraryOptions interface. If not provided, the version defaults to a new exported constant, CDK_DEFAULT_VERSION. The changes ensure the CDK version is validated, documented, and tested throughout the codebase.

CDK version configuration support:

  • Added an optional cdkVersion property to the AlmaCdkConstructLibraryOptions interface, allowing consumers to specify the AWS CDK version for generated libraries. If omitted, it defaults to the new CDK_DEFAULT_VERSION constant. [1] [2]
  • Introduced and exported CDK_DEFAULT_VERSION ('2.220.0') in almaCdkConstructLibraryOptions.ts and re-exported it from src/index.ts. [1] [2]
  • Updated the schema (almaCdkConstructLibraryOptionsSchema) to use CDK_DEFAULT_VERSION as the default for cdkVersion.
  • Updated the API documentation (API.md) to include and describe the new cdkVersion property. [1] [2]

Testing improvements:

  • Added and updated tests to verify that cdkVersion defaults correctly and can be overridden, using the exported CDK_DEFAULT_VERSION. [1] [2] [3]

Code cleanup:

  • Removed the hardcoded CDK_VERSION constant from AlmaCdkConstructLibrary.ts, ensuring the version is now sourced from the schema. [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for configuring the AWS CDK version used by AlmaCdkConstructLibrary via a new cdkVersion option, with a centralized default (CDK_DEFAULT_VERSION) that is exported for consumers and tests.

Changes:

  • Added cdkVersion?: string to AlmaCdkConstructLibraryOptions and introduced CDK_DEFAULT_VERSION (2.220.0) as the default.
  • Updated option parsing/schema and removed the previously hardcoded CDK version in AlmaCdkConstructLibrary.
  • Updated API docs and tests to cover the new default and override behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/schemas/almaCdkConstructLibraryOptions.test.ts Adds assertions for cdkVersion defaulting and override behavior.
src/schemas/almaCdkConstructLibraryOptions.ts Introduces cdkVersion option, exports CDK_DEFAULT_VERSION, and wires defaulting into the schema.
src/index.ts Re-exports CDK_DEFAULT_VERSION from the package entrypoint.
src/AlmaCdkConstructLibrary.ts Removes hardcoded CDK version so cdkVersion flows from validated options.
API.md Documents the new cdkVersion option in the generated API reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/schemas/almaCdkConstructLibraryOptions.ts Outdated
Comment thread src/schemas/almaCdkConstructLibraryOptions.ts
Comment thread test/schemas/almaCdkConstructLibraryOptions.test.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@aripalo aripalo merged commit b5ab43f into main May 12, 2026
11 checks passed
@aripalo aripalo deleted the feature/allow-cdk-version-override branch May 12, 2026 07:49
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