|
| 1 | +# Codegen Version Bump |
| 2 | + |
| 3 | +This instruction set is for staging a bump to the maven version of `smithy-typescript-codegen` and |
| 4 | +`smithy-aws-typescript-codegen`. |
| 5 | + |
| 6 | +This spans two repositories and two PRs. The smithy-typescript PR merges first, |
| 7 | +then its merge commit hash is filled into the aws-sdk-js-v3 PR. |
| 8 | + |
| 9 | +Let `$VERSION` be the new version (e.g. `0.49.1`), `$DATE` be the release date |
| 10 | +(e.g. `2026-04-30`), and `$PREV_COMMIT` be the current value of `SMITHY_TS_COMMIT` |
| 11 | +in `scripts/generate-clients/config.js`. |
| 12 | + |
| 13 | +The maven version of smithy-typescript-codegen and smithy-aws-typescript-codegen must be in lockstep. |
| 14 | + |
| 15 | +If the current version is 0.49.1, then the next version should be 0.50.0. In cases where the only commits for the |
| 16 | +changelog are fixes, the version bump may be in the patch range, e.g. 0.49.2. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Part 1: smithy-typescript |
| 21 | + |
| 22 | +### Files to update |
| 23 | + |
| 24 | +1. **`build.gradle.kts`** — set `version` in `allprojects`: |
| 25 | + |
| 26 | + ```kts |
| 27 | + version = "$VERSION" |
| 28 | + ``` |
| 29 | + |
| 30 | +2. **`README.md`** — update both `smithy-typescript-codegen:` version references. |
| 31 | + |
| 32 | +3. **`CHANGELOG.md`** — add entry at the top: |
| 33 | + |
| 34 | + ```md |
| 35 | + ## $VERSION ($DATE) |
| 36 | + |
| 37 | + ### Features |
| 38 | + |
| 39 | + - Description ([#PR](https://github.com/smithy-lang/smithy-typescript/pull/PR)) |
| 40 | + |
| 41 | + ### Bug Fixes |
| 42 | + |
| 43 | + - Description ([#PR](https://github.com/smithy-lang/smithy-typescript/pull/PR)) |
| 44 | + ``` |
| 45 | + |
| 46 | +The filter for relevant PRs to include is the commit log between the prior bump in version and |
| 47 | +the latest `main` branch of smithy-ts, but scoped to the following |
| 48 | +folder: https://github.com/smithy-lang/smithy-typescript/commits/main/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen |
| 49 | + |
| 50 | +The descriptions should be subjectless past-tense, like "Updated widgets to return sprockets.", |
| 51 | +and don't always match with the PR commit message. Only Java codegen commits are relevant. |
| 52 | + |
| 53 | +Follow the existing file structure and conventions in CHANGELOG.md in smithy-typescript. |
| 54 | + |
| 55 | +If `main` in smithy-typescript contains unpublished items in the `.changeset` folder, then |
| 56 | +it is not in a good state for staging. Halt this process and restart after the changeset queue has been cleared |
| 57 | +via NPM publishing. |
| 58 | + |
| 59 | +### Commit & PR |
| 60 | + |
| 61 | +Message: |
| 62 | + |
| 63 | +``` |
| 64 | +chore(codegen): smithy-typescript-codegen $VERSION |
| 65 | +``` |
| 66 | + |
| 67 | +Set this PR aside for review. The resulting merge commit hash (`$COMMIT`) will be used later, but proceed |
| 68 | +for now directly to opening the aws-sdk-js-v3 draft PR accompaniment. |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Part 2: aws-sdk-js-v3 |
| 73 | + |
| 74 | +Open this PR as a **draft** initially, using `"TBD"` for the |
| 75 | +commit hash. This ensures CI fails until the real hash is filled in (the config.js validation |
| 76 | +throws if the hash is not 40 characters). |
| 77 | + |
| 78 | +### Files to update |
| 79 | + |
| 80 | +1. **`codegen/build.gradle.kts`** — set `version` in `allprojects`: |
| 81 | + |
| 82 | + ```kts |
| 83 | + version = "$VERSION" |
| 84 | + ``` |
| 85 | + |
| 86 | +2. **`codegen/smithy-aws-typescript-codegen/build.gradle.kts`** — update dependency: |
| 87 | + |
| 88 | + ```kts |
| 89 | + api("software.amazon.smithy.typescript:smithy-typescript-codegen:$VERSION") |
| 90 | + ``` |
| 91 | + |
| 92 | +3. **`scripts/generate-clients/config.js`** — update commit hash and comparison link: |
| 93 | + |
| 94 | + ```js |
| 95 | + // https://github.com/smithy-lang/smithy-typescript/compare/$PREV_COMMIT...$COMMIT |
| 96 | + SMITHY_TS_COMMIT: "$COMMIT", |
| 97 | + ``` |
| 98 | + |
| 99 | + Use `"TBD"` until the smithy-typescript PR merges. |
| 100 | + |
| 101 | +4. **`codegen/CHANGELOG.md`** — add entry at the top: |
| 102 | + |
| 103 | + ```md |
| 104 | + ## $VERSION ($DATE) |
| 105 | + |
| 106 | + ### Chores |
| 107 | + |
| 108 | + - Upgraded to smithy-typescript $VERSION ([Release Notes](https://github.com/smithy-lang/smithy-typescript/blob/main/CHANGELOG.md#$ANCHOR)) |
| 109 | + ``` |
| 110 | + |
| 111 | + Where `$ANCHOR` is the version with dots removed, e.g. `0491-2026-04-30`. |
| 112 | + |
| 113 | +Use the same changelog format as the changelog in smithy-ts. But, always include a mention that the upstream |
| 114 | +is being updated to `$VERSION`. The commits worth mentioning will appear |
| 115 | +in https://github.com/aws/aws-sdk-js-v3/commits/main/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen. |
| 116 | + |
| 117 | +As with smithy-ts, commits made that are no interest to applications consuming the code generation library may be |
| 118 | +omitted from the changelogs, as the full revision history is readily available. |
| 119 | + |
| 120 | +### Commit & PR |
| 121 | + |
| 122 | +Message: |
| 123 | + |
| 124 | +``` |
| 125 | +chore(codegen): smithy-aws-typescript-codegen $VERSION |
| 126 | +``` |
| 127 | + |
| 128 | +Once the smithy-typescript PR merges: |
| 129 | + |
| 130 | +1. Replace the placeholder with the real `$COMMIT` hash. |
| 131 | +2. Update the comparison link. |
| 132 | +3. Using that commit, run through all of [CODEGEN_SYNC](./CODEGEN_SYNC.md), except the commit message and opening a PR, |
| 133 | + as those steps roll into the same tasks here. |
| 134 | +4. Mark the PR as ready for review. CI will run on the PR at that point. |
0 commit comments