chore: Use generic updater for example/pubspec.yaml in release-please config#288
Merged
Merged
Conversation
The release-please-action v3 -> v5 upgrade (#262) changed how bare-string `extra-files` entries are resolved: under v3 they fell through to the generic line-based updater, but v5's release-please core now infers the updater from file extension, so `.yaml` binds to the YAML updater. That updater parses and re-serializes the file, stripping all comments (including the `# x-release-please-version` marker on the dep line) and normalizing formatting -- which is exactly what #117 originally worked around. Spell out `{ "type": "generic", "path": "..." }` so the generic updater is selected regardless of the v5 default. Once this lands, release-please will regenerate the 4.17.0 release PR (#287) with a one-line change to example/pubspec.yaml instead of an 80-line rewrite.
kinyoklion
approved these changes
Jun 4, 2026
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
.yamlfiles inextra-files.{ "type": "generic", "path": "example/pubspec.yaml" }so the generic, marker-based updater is used explicitly — independent of whatever release-please core decides to default to.Background
Under release-please-action v3, a bare-string
extra-filesentry like"example/pubspec.yaml"resolved to the generic line-based updater. That updater honors# x-release-please-versionmarkers and does pure textual replacement, leaving comments and formatting alone. Every release from 4.1.0 through 4.16.0 produced a clean one-line bump toexample/pubspec.yaml.PR #262 upgraded release-please-action to v5, which ships a much newer release-please core. In that version, bare-string entries are dispatched by file extension — and
.yamlnow binds to the YAML updater, which parses + re-serializes the file. The result is what we see in PR #287: ~80 lines deleted (all comments, blank lines, and the# x-release-please-versionmarker itself), the dep pin no longer bumps because its marker got stripped, and the example app'sversion:got rewritten to the SDK version. This is the exact failure mode #117 originally fixed back in January 2024.Making the updater type explicit is the minimal fix; once this lands, release-please will regenerate PR #287 (the 4.17.0 release PR) and produce a clean diff to
example/pubspec.yaml.Test plan
packages/flutter_client_sdk/example/pubspec.yamlshows only the dep-line bump (4.16.0→4.17.0), with all comments and the# x-release-please-versionmarker preservedNote
Low Risk
Single release-automation config change with no runtime or application code impact.
Overview
Release-please config for
packages/flutter_client_sdknow declaresexample/pubspec.yamlas an explicit generic extra-file instead of a bare path string.After the release-please-action v5 upgrade, bare
.yamlentries use the YAML parse/reserialize updater, which broke releases by stripping# x-release-please-versionmarkers and comments and rewriting the example app version incorrectly. The generic updater keeps marker-based line replacement so only the pinned SDK dependency line (e.g.launchdarkly_flutter_client_sdk: 4.16.0) bumps on release, matching the behavior from before #262.Reviewed by Cursor Bugbot for commit a5f7c5b. Bugbot is set up for automated code reviews on this repo. Configure here.