fix(release): sync VERSION and package.json via release-please-config#507
Conversation
Four version sources were drifting apart: VERSION (1.3.0), package.json (1.0.0), .release-please-manifest.json (1.6.0), and the latest CHANGELOG entry (1.6.0). Without a release-please-config.json the action only tracked state in the manifest and never wrote back to VERSION or package.json on release. This adds release-please-config.json with release-type "simple" (which owns VERSION) plus an extra-files entry for package.json so future releases keep both in sync. The workflow now references config-file instead of inline release-type/package-name. VERSION and package.json are bumped to 1.6.0 to match the current manifest and changelog. Closes santifer#336 Co-Authored-By: Droid <droid@factory.ai>
|
Welcome to career-ops, @chorrell! Thanks for your first PR. A few things to know:
We'll review your PR soon. Join our Discord if you have questions. |
📝 WalkthroughWalkthroughThis pull request aligns inconsistent version metadata across the repository by updating VERSION and package.json to version 1.6.0, and introducing a release-please-config.json configuration file that establishes a unified release process using Release Please's configuration-driven approach. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Also resolves #523 |
|
Hi, release-please-config.json only declares package.json in extra-files, so VERSION will not be guaranteed to stay in sync based on repo configuration alone. This can break or degrade update notifications because update-system.mjs uses the raw GitHub VERSION file as a primary update signal. Severity: remediation recommended | Category: reliability How to fix: Add VERSION to extra-files Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
|
Welcome to career-ops, @chorrell. Excellent fix — the structural approach ( A partir del próximo release PR, VERSION + package.json se sincronizan automáticamente. Drift público resuelto. Merged 🚀 Una nota técnica: @nhardgrove también opened #547 con un approach paralelo (extra-files inline + parseVersionFile defensive helper). Tu approach estructural es superior. Voy a invitar a nhardgrove a rebasear #547 manteniendo solo el parseVersionFile helper, que es buena defensive code que tu PR no incluye. Both contributions land. |
…marker
The local VERSION file and the upstream raw fetch are both passed
through .trim() and a strict semver regex before this change. If the
project ever adopts the release-please convention of appending an
x-release-please-version marker comment to plain-text version files
(e.g. "1.6.0 # x-release-please-version"), the existing parsers break:
.trim() returns the whole string, the SEMVER_RE no longer matches, and
.split('.').map(Number) yields NaN.
This change extracts a parseVersionFile() helper that strips trailing
whitespace and ignores anything after the first whitespace token, then
routes both the local read (localVersion) and the upstream fetch
(check) through it. Behavior for marker-less files is unchanged --
"1.6.0\n" still parses to "1.6.0". Behavior for marker-bearing files
becomes correct rather than silently broken.
Standalone defensive code; complements the structural release-please
fix in santifer#507. No workflow or VERSION file changes here -- those landed
already via santifer#507.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Problem
Issue #336 reported that four version sources in the repository were drifting apart:
VERSIONfile:1.3.0package.json:1.0.0.release-please-manifest.json:1.6.0CHANGELOG.mdlatest entry:1.6.0This inconsistency makes it unclear which version of career-ops is actually installed or released.
Additionally, for users on version ≤ 1.5.0 the
update-system.mjsusers won't get notified of newer releases.Solution
This PR adds
release-please-config.json(required by the Release Please workflow) and configures it to:VERSIONfile during releases (viarelease-type: simple)package.jsonin sync automatically viaextra-fileswith a JSON path entryThe PR also bumps both
VERSIONandpackage.jsonto1.6.0to match the current manifest and changelog.Changes
.github/workflows/release.yml: Updated to useconfig-file: release-please-config.jsoninstead of inlinerelease-typeandpackage-nameparametersVERSION: Bumped1.3.0→1.6.0package.json: Bumped"version": "1.0.0"→"version": "1.6.0"release-please-config.json(new): Defines release behavior withextra-filesto keeppackage.jsonsynced on future releasesResult
After this PR merges and the next release is cut:
Closes #336
Summary by CodeRabbit
Release Notes