From 178b84549c08f6cf27927e5a686fc333e0859582 Mon Sep 17 00:00:00 2001 From: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:41:04 -0800 Subject: [PATCH] chore: update cdk-from-cfn version (#28619) > REPLACE THIS TEXT BLOCK > > Describe the reason for this change, what the solution is, and any > important design decisions you made. > > Remember to follow the [CONTRIBUTING GUIDE] and [DESIGN GUIDELINES] for any > code you submit. > > [CONTRIBUTING GUIDE]: https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md > [DESIGN GUIDELINES]: https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md Closes #. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES | 2 +- packages/aws-cdk/package.json | 4 ++-- packages/aws-cdk/test/commands/migrate.test.ts | 2 +- .../aws-cdk/test/commands/test-resources/stacks/s3.go | 8 ++++++-- yarn.lock | 8 ++++---- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index c430595bb0514..f30587af1bb0e 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -668,7 +668,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ---------------- -** cdk-from-cfn@0.91.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.91.0 | MIT OR Apache-2.0 +** cdk-from-cfn@0.113.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.113.0 | MIT OR Apache-2.0 ---------------- diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index aacecd7a729e7..49948f4fbe79c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -105,7 +105,7 @@ "aws-sdk": "^2.1517.0", "camelcase": "^6.3.0", "cdk-assets": "0.0.0", - "cdk-from-cfn": "^0.91.0", + "cdk-from-cfn": "^0.113.0", "chalk": "^4", "chokidar": "^3.5.3", "decamelize": "^5.0.1", @@ -155,4 +155,4 @@ "publishConfig": { "tag": "latest" } -} +} \ No newline at end of file diff --git a/packages/aws-cdk/test/commands/migrate.test.ts b/packages/aws-cdk/test/commands/migrate.test.ts index e3cc14a8475da..c26870bc85b7b 100644 --- a/packages/aws-cdk/test/commands/migrate.test.ts +++ b/packages/aws-cdk/test/commands/migrate.test.ts @@ -215,7 +215,7 @@ describe('Migrate Function Tests', () => { expect(fs.pathExists(path.join(workDir, 's3.go'))).toBeTruthy(); const app = fs.readFileSync(path.join(workDir, 'GoodGo', 'good_go.go'), 'utf8').split('\n'); - expect(app.map(line => line.match(/func NewGoodGoStack\(scope constructs.Construct, id string, props GoodGoStackProps\) \*GoodGoStack \{/)).filter(line => line).length).toEqual(1); + expect(app.map(line => line.match(/func NewGoodGoStack\(scope constructs.Construct, id string, props \*GoodGoStackProps\) \*GoodGoStack \{/)).filter(line => line).length).toEqual(1); expect(app.map(line => line.match(/ NewGoodGoStack\(app, "GoodGo", &GoodGoStackProps\{/))); }); diff --git a/packages/aws-cdk/test/commands/test-resources/stacks/s3.go b/packages/aws-cdk/test/commands/test-resources/stacks/s3.go index ea2a77e048635..e4bdb893aa5ea 100644 --- a/packages/aws-cdk/test/commands/test-resources/stacks/s3.go +++ b/packages/aws-cdk/test/commands/test-resources/stacks/s3.go @@ -20,8 +20,12 @@ type GoodGoStack struct { S3BucketSecureUrl interface{} // TODO: fix to appropriate type } -func NewGoodGoStack(scope constructs.Construct, id string, props GoodGoStackProps) *GoodGoStack { - stack := cdk.NewStack(scope, &id, &props.StackProps) +func NewGoodGoStack(scope constructs.Construct, id string, props *GoodGoStackProps) *GoodGoStack { + var sprops cdk.StackProps + if props != nil { + sprops = props.StackProps + } + stack := cdk.NewStack(scope, &id, &sprops) s3Bucket := s3.NewCfnBucket( stack, diff --git a/yarn.lock b/yarn.lock index d9e8f04956dec..f39469e4c3559 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6246,10 +6246,10 @@ case@1.6.3, case@^1.6.3: resolved "https://registry.npmjs.org/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -cdk-from-cfn@^0.91.0: - version "0.91.0" - resolved "https://registry.npmjs.org/cdk-from-cfn/-/cdk-from-cfn-0.91.0.tgz#d1858e323b749d130cc073b098367bd354f21afa" - integrity sha512-ZkeA2Iws4LCg7QqeF+iVjZ5U0MaNni+O0RSEocGxKMvbn4SG/Z1Ib/lWBQZX32ZvuqpgUCUOL3askIuZ7e3+5g== +cdk-from-cfn@^0.113.0: + version "0.113.0" + resolved "https://registry.npmjs.org/cdk-from-cfn/-/cdk-from-cfn-0.113.0.tgz#b68832b84ce939d525b9660f928a2aef028cc867" + integrity sha512-cBsPHyg6tNvy4JRHwQpkUh5U6Te5fUAxZX2RhIlaOVT/Ci40PjPYFDhStC1BFl+L3O9uZTmy/OY8CkjlZsWvlw== cdk-generate-synthetic-examples@^0.1.299: version "0.1.299"