Skip to content

Commit

Permalink
docs(core): aspects with same priority are not guaranteed to be execu…
Browse files Browse the repository at this point in the history
…ted in the same order
  • Loading branch information
kaizencc committed Feb 26, 2025
1 parent d9d3726 commit b1ea1bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/aws-cdk-lib/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,10 @@ values must be non-negative integers, where a higher number means the Aspect wil

By default, newly created nodes always inherit aspects. Priorities are mainly for ordering between mutating aspects on the construct tree.

CDK provides standard priority values for mutating and readonly aspects to help ensure consistency across different construct libraries:
CDK provides standard priority values for mutating and readonly aspects to help ensure consistency across different construct libraries.
Note that Aspects that have same priority value are not guaranteed to be executed
in a consistent order.


```ts
/**
Expand Down
5 changes: 4 additions & 1 deletion packages/aws-cdk-lib/core/lib/aspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export interface AspectOptions {
* The priority value to apply on an Aspect.
* Priority must be a non-negative integer.
*
* @default - AspectPriority.DEFAULT
* Aspects that have same priority value are not guaranteed to be
* executed in a consistent order.
*
* @default AspectPriority.DEFAULT
*/
readonly priority?: number;
}
Expand Down

0 comments on commit b1ea1bf

Please sign in to comment.