Skip to content

Comments

chore: migrate from AwsCdkConstructLibrary to CdklabsConstructLibrary#2678

Merged
aemada-aws merged 6 commits intokubectl-v20/mainfrom
migrate-cdklabs-construct-library-v20
Feb 20, 2026
Merged

chore: migrate from AwsCdkConstructLibrary to CdklabsConstructLibrary#2678
aemada-aws merged 6 commits intokubectl-v20/mainfrom
migrate-cdklabs-construct-library-v20

Conversation

@aemada-aws
Copy link
Contributor

Migrate to CdklabsConstructLibrary from cdklabs-projen-project-types for cdklabs defaults and trusted publishing.

Changes

  • Switch to CdklabsConstructLibrary for cdklabs defaults
  • Enables trusted publishing for npm, PyPI, and NuGet by default (removes NPM_TOKEN, TWINE_USERNAME/TWINE_PASSWORD, NUGET_API_KEY)

Additional options to preserve original behavior

  • private: false - CdklabsConstructLibrary defaults to private: true, but this is a public package
  • setNodeEngineVersion: false - Prevent adding engines.node to package.json
  • npmAccess: javascript.NpmAccess.PUBLIC - Prevent adding publishConfig to package.json
  • trustedPublishing: false for NuGet - Keep using NUGET_API_KEY

Similar to #2671

Migrate to CdklabsConstructLibrary from cdklabs-projen-project-types for cdklabs defaults and trusted publishing.

Changes:
- Switch to CdklabsConstructLibrary for cdklabs defaults
- Enables trusted publishing for npm, PyPI, and NuGet by default (removes NPM_TOKEN, TWINE_USERNAME/TWINE_PASSWORD, NUGET_API_KEY)

Additional options to preserve original behavior:
- private: false - CdklabsConstructLibrary defaults to private: true, but this is a public package
- setNodeEngineVersion: false - Prevent adding engines.node to package.json
- npmAccess: javascript.NpmAccess.PUBLIC - Prevent adding publishConfig to package.json
- trustedPublishing: false for NuGet - Keep using NUGET_API_KEY

Similar to #2671
@aemada-aws aemada-aws force-pushed the migrate-cdklabs-construct-library-v20 branch from aef65f7 to 0c253a9 Compare February 17, 2026 12:12
CdklabsConstructLibrary adds rosetta:extract to post-compile by default,
but this package removes aws-cdk-lib and constructs from peer deps
(they're not part of the public API). Without peer deps in the jsii
assembly, rosetta can't resolve types for README code examples.

The original AwsCdkConstructLibrary config did not run rosetta, so
remove the rosetta:extract step to match the previous behavior.
package.json Outdated
},
"types": "lib/index.d.ts",
"stability": "stable",
"stability": "experimental",

Choose a reason for hiding this comment

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

Shouldn't stability remain stable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

publishToNuget: {
dotNetNamespace: `Amazon.CDK.Asset.KubectlV${SPEC_VERSION}`,
packageId: `Amazon.CDK.Asset.KubectlV${SPEC_VERSION}`,
trustedPublishing: false,

Choose a reason for hiding this comment

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

Why are we disabling trustedPublishing for nuget ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amazon. prefix is reserved by awsdotnet

Update package stability from experimental to stable in projen configuration.
@aemada-aws aemada-aws enabled auto-merge (squash) February 20, 2026 13:28
@leonmk-aws leonmk-aws self-assigned this Feb 20, 2026
@aemada-aws aemada-aws merged commit 9cd96ea into kubectl-v20/main Feb 20, 2026
12 checks passed
@aemada-aws aemada-aws deleted the migrate-cdklabs-construct-library-v20 branch February 20, 2026 14:34
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