Skip to content

Tags: aws/constructs

Tags

v10.6.0

Toggle v10.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add stackTraceOverride option to MetadataOptions (#2853)

Allow callers to provide a custom stack trace via the new
`stackTraceOverride` property on `MetadataOptions`. When a non-empty
array is supplied, it is used as-is and the `stackTrace` /
`traceFromFunction` options are ignored.

v10.5.1

Toggle v10.5.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: provide default implementation of `with()` on `Node` class (#2848)

The `with()` method for applying mixins was previously only implemented
directly on the `Construct` class. This made it difficult for custom
`IConstruct` implementations to support mixins without duplicating the
implementation logic.

This change moves the core implementation to the `Node` class, exposing
it as `node.with()`. The `Construct.with()` method now simply delegates
to this new implementation. Any custom `IConstruct` implementation can
now easily support mixins by delegating to `this.node.with()`, following
the same pattern.

This is particularly useful for libraries that extend the constructs
model with their own base classes, as they no longer need to copy the
mixin application logic.

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

v10.5.0

Toggle v10.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(mixin): add IMixin interface and Construct.with() method (#2843)

This PR implements the `constructs` package parts of [RFC-0814: CDK
Mixins](https://github.com/aws/aws-cdk-rfcs/blob/58051ea8cc408b8ccd0d2c66dc1790ebb67da08f/text/0814-cdk-mixins.md).

CDK Mixins are composable, reusable abstractions that can be applied to
any construct. This change adds the foundational support to the
`constructs` library, enabling the fluent `.with()` API described in the
RFC.

## Changes

The `IMixin` interface defines the contract for mixins with two methods:
- `supports(construct)` - determines if a mixin can be applied to a
given construct
- `applyTo(construct)` - applies the mixin functionality to the target

The `with()` method is added to `Construct` and `IConstruct`, allowing
mixins to be applied fluently. When called, it traverses the construct
tree and applies each mixin to all supported constructs.

```typescript
const bucket = new s3.CfnBucket(scope, "MyBucket")
  .with(new EncryptionAtRest())
  .with(new AutoDeleteObjects());
```

## Why

Mixins are a new way to build abstractions, that does not rely on the
construct level approach many implementors use. They allow users to
employ a mix and match approach for features that doesn't lock consumers
into specific implementations.

v10.4.5

Toggle v10.4.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: save memory by lazy initializing all fields (#2838)

Every construct has a `Node` object, and every `Node` object has a
number of fields that for a large swathe of constructs are just empty
collections.

Do not initialize these collections until we have a value to put into
them, to save memory. This saves about ~0.5kB per construct. This is not
a lot, but can add up over the course of a large construct tree.

v10.4.4

Toggle v10.4.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(python): only allow Typeguard 2.x (#2831)

Forcing a release of #2830 since
this got inadvertently merged as a `chore` and therefore not causing a
release.

v10.4.3

Toggle v10.4.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(deps): upgrade to jsii & typescript 5.9 (#2823)

v10.4.2

Toggle v10.4.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: cannot create root construct in python (#2500)

The previous attempt in #2499 caused the static helper to be added to every construct, which was unintentional and caused side-effects. Instead export a class that does the same.

Fixes #1063

v10.4.1

Toggle v10.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: revert "fix: cannot create root construct in python" (#2499)

Reverts #2496

Seeing failures in AWS CDK reading 

```
warn - METHOD aws-cdk-lib.aws_workspacesweb.CfnPortal.createRoot: has been removed [removed:aws-cdk-lib.aws_workspacesweb.CfnPortal.createRoot]
```

v10.4.0

Toggle v10.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: cannot create root construct in python (#2496)

Fixes #1063

v10.3.2

Toggle v10.3.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: Python constructs do not implement a compatible interface (#2495)

Reverting to and pinning an older version of jsii-pacmak that will generate python bindings with correct dependency constraints for typeguard. 

Needs to be reverted once aws/jsii#4658 is resolved.