-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): stop relying on === to find PhysicalName.GENERATE_IF_NEEDED (
#3506) When the `@aws-cdk/core` library is installed in multiple locations by `npm` (de-duplication does occasionally not operate on some parts of the tree for a multitude of obscure reasons), then each instance of the library gets it's own `string` instance. As these are unresolved tokens, `string` equality does not yield expected results. This introduces a new marker `IResolvable` to be used so we can effectively perform a runtime-check based on a distinctive `Symbol`, which would be identical for all the instances of the library.
- Loading branch information
1 parent
07825b6
commit c7e9dfb
Showing
4 changed files
with
133 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 92 additions & 61 deletions
153
packages/@aws-cdk/core/test/private/test.physical-name-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters