From 89f17143c7735fca6eec9c324ed791ace7f066b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jul 2024 14:23:54 +0000 Subject: [PATCH] Bump package version --- .changeset/thick-owls-remain.md | 32 -------------------------------- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 34 insertions(+), 33 deletions(-) delete mode 100644 .changeset/thick-owls-remain.md diff --git a/.changeset/thick-owls-remain.md b/.changeset/thick-owls-remain.md deleted file mode 100644 index aa96979c95..0000000000 --- a/.changeset/thick-owls-remain.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -"@guardian/cdk": major ---- - -GuCDK EC2 patterns now require an explicit `UserData` or `GuUserDataProps` input, instead of a string. - -The UserData class comes with helpers that allow us to mutate the user data in our patterns which will be helpful with some of our upcoming work. -Unfortunately whenever a `string` is passed to our patterns we have to wrap it in a special `CustomUserData` class which disables most of these helpers. - -For applications that were already using `GuUserDataProps` no change is required, however applications that used strings will have to make a small change. - -```js -new GuEc2App({ - userData: `#!/usr/bin/bash echo "hello world"`, - ... -}) -``` - -becomes - -```js -const userData = UserData.forLinux(); -userData.addCommands(`echo "hello world"`); - -new GuEc2App({ - userData, - ... -}) -``` - -Note that you no longer need to specify a shebang, by default `UserData` adds one for you. If you need to customize this behaviour you can look at the props accepted by `forLinux`. -You may also want to look at some of the other methods that UserData has to understand if it may be able to help you in other ways, for example `addS3DownloadCommand` the method helps you write commands to download from S3. diff --git a/CHANGELOG.md b/CHANGELOG.md index 507b758291..806922c07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # @guardian/cdk +## 59.0.0 + +### Major Changes + +- e15d900: GuCDK EC2 patterns now require an explicit `UserData` or `GuUserDataProps` input, instead of a string. + + The UserData class comes with helpers that allow us to mutate the user data in our patterns which will be helpful with some of our upcoming work. + Unfortunately whenever a `string` is passed to our patterns we have to wrap it in a special `CustomUserData` class which disables most of these helpers. + + For applications that were already using `GuUserDataProps` no change is required, however applications that used strings will have to make a small change. + + ```js + new GuEc2App({ + userData: `#!/usr/bin/bash echo "hello world"`, + ... + }) + ``` + + becomes + + ```js + const userData = UserData.forLinux(); + userData.addCommands(`echo "hello world"`); + + new GuEc2App({ + userData, + ... + }) + ``` + + Note that you no longer need to specify a shebang, by default `UserData` adds one for you. If you need to customize this behaviour you can look at the props accepted by `forLinux`. + You may also want to look at some of the other methods that UserData has to understand if it may be able to help you in other ways, for example `addS3DownloadCommand` the method helps you write commands to download from S3. + ## 58.2.0 ### Minor Changes diff --git a/package.json b/package.json index b160d92e5c..3fda356947 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@guardian/cdk", "description": "Generic Guardian flavoured AWS CDK components", - "version": "58.2.0", + "version": "59.0.0", "main": "lib/index.js", "types": "lib/index.d.ts", "files": [