-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: readonly struct properties and hide internals #2106
Conversation
Exposes a bunch of useful synthesis utilities like: `toCloudFormation(stack)`. This is also used to implement expect(stack)...
What is the new/correct way to modify Props after creating the object? I use this currently to set fields conditionally after creating the object with my shared config: |
@hoegertn not sure what this line points at :-) |
Sorry, I changed it already. Here is the link to the revision: https://github.com/taimos/cdk-constructs/blob/e2279f2bcc004374dcbba5c14be61dd78ab30158/lib/alexa/skill.ts#L56 I changed it in master, but I am not really happy with the code. |
@eladb since the attributes are readonly now, could you share a recommended way to modify/dynamically create Props objects? |
See #2372 |
Thanks! |
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
This change upgrades the repo to jsii 0.8.0 which requires that all struct types (data interfaces like our "Props" interfaces) will be marked
readonly
in order to ensure they can be passed by-value.The new jsii version also hides all members marked as
@internal
which means that those APIs will not be available from outside the framework.Fixes awslabs/cdk-ops#321
BREAKING CHANGE:
stack._toCloudFormation
method is now unavailable and is replaced by@aws-cdk/assert.SynthUtils.toCloudFormation(stack)
.Pull Request Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.