Skip to content

Commit

Permalink
Merge pull request #2380 from guardian/changeset-release/main
Browse files Browse the repository at this point in the history
🦋 Release package updates
  • Loading branch information
AshCorr authored Jul 22, 2024
2 parents 234bca7 + 89f1714 commit 3ec1c6e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 33 deletions.
32 changes: 0 additions & 32 deletions .changeset/thick-owls-remain.md

This file was deleted.

33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 3ec1c6e

Please sign in to comment.