Skip to content

chore: Use generic updater for example/pubspec.yaml in release-please config#288

Merged
tanderson-ld merged 1 commit into
mainfrom
ta/release-please-generic-updater
Jun 4, 2026
Merged

chore: Use generic updater for example/pubspec.yaml in release-please config#288
tanderson-ld merged 1 commit into
mainfrom
ta/release-please-generic-updater

Conversation

@tanderson-ld
Copy link
Copy Markdown
Contributor

@tanderson-ld tanderson-ld commented Jun 4, 2026

Summary

Background

Under release-please-action v3, a bare-string extra-files entry like "example/pubspec.yaml" resolved to the generic line-based updater. That updater honors # x-release-please-version markers 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 to example/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 .yaml now 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-version marker itself), the dep pin no longer bumps because its marker got stripped, and the example app's version: 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

  • Merge this PR to main
  • Confirm release-please regenerates PR chore(main): release 4.17.0 #287 and that packages/flutter_client_sdk/example/pubspec.yaml shows only the dep-line bump (4.16.04.17.0), with all comments and the # x-release-please-version marker preserved

Note

Low Risk
Single release-automation config change with no runtime or application code impact.

Overview
Release-please config for packages/flutter_client_sdk now declares example/pubspec.yaml as an explicit generic extra-file instead of a bare path string.

After the release-please-action v5 upgrade, bare .yaml entries use the YAML parse/reserialize updater, which broke releases by stripping # x-release-please-version markers 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.

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.
@tanderson-ld tanderson-ld requested a review from a team as a code owner June 4, 2026 13:17
@tanderson-ld tanderson-ld merged commit 67c4f8c into main Jun 4, 2026
9 checks passed
@tanderson-ld tanderson-ld deleted the ta/release-please-generic-updater branch June 4, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants