aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

‼️ (aws-cdk-lib): aws-cdk-lib@^2.36.0 requires jsii@^1.63.0

Open kaizencc opened this issue 3 years ago • 0 comments

‼️ TL;DR - [email protected] or newer is required when building construct libraries that depend on [email protected] or newer.

Describe the feature

CDK v2.36.0 introduces this PR that compresses the .jsii file for aws-cdk-lib. Prior to CDK v2.36.0, the jsii assembly of aws-cdk-lib would be found at .jsii. From CDK v2.36.0 onwards, the jsii assembly will be located at .jsii.gz, and the .jsii file will only hold information to redirect to .jsii.gz.

This means that everywhere we handle jsii assemblies must be updated to process compressed assemblies. This update was released in jsii v1.63.0, which is the earliest compatible version that supports this feature. Earlier versions of jsii will not be able to handle the compressed .jsii.gz assembly file, and you will get unexpected behavior if you use an unsupported jsii version with CDK v2.36.0.

This means that starting CDK v2.36.0, there is a dependency on jsii v1.63.0.

Use Case

This compression has the following impact on CDK package size in npm:

CDK v2.35.0: 194 MB CDK v2.36.0: 148 MB

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

CDK version used

2.36.0

Environment details (OS name and version, etc.)

MacOs

kaizencc avatar Aug 08 '22 22:08 kaizencc