-
-
Notifications
You must be signed in to change notification settings - Fork 4
Remove as assertions, or fix to mitigate the risk of silent failure
#158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
53cf673
f950f3e
8da9f21
033cd4e
44cc00d
d788964
a26b0bb
7b7eef8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,7 +217,7 @@ export async function updateChangelog({ | |
|
|
||
| if ( | ||
| isReleaseCandidate && | ||
| mostRecentTag === `${tagPrefixes[0]}${currentVersion || ''}` | ||
| mostRecentTag === `${tagPrefixes[0]}${currentVersion ?? ''}` | ||
| ) { | ||
| throw new Error( | ||
| `Current version already has tag, which is unexpected for a release candidate.`, | ||
|
|
@@ -250,19 +250,16 @@ export async function updateChangelog({ | |
| // Ensure release header exists, if necessary | ||
| if ( | ||
| isReleaseCandidate && | ||
| currentVersion && | ||
| !changelog | ||
| .getReleases() | ||
| .find((release) => release.version === currentVersion) | ||
| ) { | ||
| // Typecast: currentVersion will be defined here due to type guard at the | ||
| // top of this function. | ||
| changelog.addRelease({ version: currentVersion as Version }); | ||
| changelog.addRelease({ version: currentVersion }); | ||
|
||
| } | ||
|
|
||
| if (isReleaseCandidate && hasUnreleasedChanges) { | ||
| // Typecast: currentVersion will be defined here due to type guard at the | ||
| // top of this function. | ||
| changelog.migrateUnreleasedChangesToRelease(currentVersion as Version); | ||
| if (isReleaseCandidate && currentVersion && hasUnreleasedChanges) { | ||
| changelog.migrateUnreleasedChangesToRelease(currentVersion); | ||
| } | ||
|
|
||
| const newChangeEntries = newCommits.map(({ prNumber, description }) => { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.