Repository navigation
fix(notes)!: validate version-output changelogs before mapping them - #759
Open
goosewobbler wants to merge 6 commits into
Open
goosewobbler wants to merge 6 commits into
goosewobbler wants to merge 6 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Release Preview — v0.42.1 → v0.42.2
Merging this PR will create a new release PR with the following changes: Changelogmonorepo 0.42.1 → 0.42.2
Updated automatically by ReleaseKit |
Owner
Author
|
@greptile review |
Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
@greptile review |
Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
@greptile review |
versionOutputToChangelogInput reads only `changelogs`, so it now takes `Pick<VersionOutput, 'changelogs'>`. VersionOutput callers still type-check and the validated data needs no `as unknown as` cast. The schema module says why it's a separate entry point, and the notes error tests cover the new error's code and exit code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-version-output Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#761 exported VersionPackageChangelogSchema from @releasekit/publish so the standing-PR manifest schema could use it. This branch moves that schema to @releasekit/core/version-output-schema, so release imports it from there and publish no longer re-exports it. A publish re-export would leave publish's bundled types pointing at the core subpath, which isn't one of its dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notesused to cast version-output JSON and throw a rawTypeErrorwhen a changelog was missingentries. It now validates the changelog array with the same Zod entry schema publish uses.@releasekit/core/version-output-schemaso publish and notes cannot drift.VersionOutputSchemafrom there. Notes validateschangelogsonly (the fields it reads) and raisesInputValidationError(INPUT_VALIDATION_ERROR, exit code for bad input) with the field paths.@releasekit/releaseimportsVersionPackageChangelogSchemafrom there too, so@releasekit/publishno longer re-exports it (added in fix(release): read sync notes edits under the changelog key #761 for that one use).Fixes #620
Breaking:
releasekit notesrejects version output whose changelogs are missing required fields (entries,version,revisionRange,repoUrl,previousVersion) withINPUT_VALIDATION_ERRORand the input-error exit code, instead of failing with aTypeError. Output fromversion --jsonis unaffected.Made with Cursor


Confidence Score: 5/5
The PR appears safe to merge; the previous typed-caller issue is fixed.Summary
Adds shared checks for version-output JSON before notes maps changelogs.
Reviews (3) · Last reviewed commit: "fix(notes): keep versionOutputToChangelo..." · Reviewed by Greptile