Skip to content

fix(release): sync VERSION and package.json via release-please-config#507

Merged
santifer merged 1 commit intosantifer:mainfrom
chorrell:fix/release-please-version-sync
Apr 30, 2026
Merged

fix(release): sync VERSION and package.json via release-please-config#507
santifer merged 1 commit intosantifer:mainfrom
chorrell:fix/release-please-version-sync

Conversation

@chorrell
Copy link
Copy Markdown
Contributor

@chorrell chorrell commented Apr 27, 2026

Problem

Issue #336 reported that four version sources in the repository were drifting apart:

  • VERSION file: 1.3.0
  • package.json: 1.0.0
  • .release-please-manifest.json: 1.6.0
  • CHANGELOG.md latest entry: 1.6.0

This 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.mjs users 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:

  1. Own and update the VERSION file during releases (via release-type: simple)
  2. Keep package.json in sync automatically via extra-files with a JSON path entry
  3. Simplify the GitHub Actions workflow to reference the config file instead of inline parameters

The PR also bumps both VERSION and package.json to 1.6.0 to match the current manifest and changelog.

Changes

  • .github/workflows/release.yml: Updated to use config-file: release-please-config.json instead of inline release-type and package-name parameters
  • VERSION: Bumped 1.3.01.6.0
  • package.json: Bumped "version": "1.0.0""version": "1.6.0"
  • release-please-config.json (new): Defines release behavior with extra-files to keep package.json synced on future releases

Result

After this PR merges and the next release is cut:

  • All four version sources will be automatically synchronized
  • Release Please will own and update all version metadata
  • Future releases will keep versions in sync without manual intervention

Closes #336

Summary by CodeRabbit

Release Notes

  • Chores
    • Bumped project version to 1.6.0
    • Updated release automation configuration to utilize external configuration file
    • Synchronized version across project files

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>
@github-actions
Copy link
Copy Markdown
Contributor

Welcome to career-ops, @chorrell! Thanks for your first PR.

A few things to know:

  • Tests will run automatically — check the status below
  • Make sure you've linked a related issue (required for features)
  • Read CONTRIBUTING.md if you haven't

We'll review your PR soon. Join our Discord if you have questions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Version Alignment
VERSION, package.json
Updated version identifiers from inconsistent values (1.3.0 and 1.0.0 respectively) to unified version 1.6.0 to resolve version metadata conflicts.
Release Automation
.github/workflows/release.yml, release-please-config.json
Transitioned Release Please workflow from inline configuration (release-type, package-name inputs) to external config file reference; introduced new release-please-config.json specifying root package with simple release type and version binding to package.json.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

🔴 core-architecture, 🔧 scripts

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: configuring Release Please to synchronize multiple version sources through a config file.
Linked Issues check ✅ Passed All primary objectives from issue #336 are addressed: VERSION and package.json are synced to 1.6.0, release-please-config.json ensures future synchronization, and update-system.mjs will now read the correct version.
Out of Scope Changes check ✅ Passed All changes directly address issue #336 with no out-of-scope modifications; workflow updates, version bumps, and config file are all required to solve the version inconsistency problem.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chorrell
Copy link
Copy Markdown
Contributor Author

Also resolves #523

@Qodo-Free-For-OSS
Copy link
Copy Markdown

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:

Issue description

release-please-config.json does not explicitly configure updates to VERSION, but update-system.mjs relies on VERSION (local and raw GitHub) as a core update signal. Ensure releases always bump VERSION via explicit config.

Issue Context

The workflow now uses config-file: release-please-config.json, so the repo’s declared config should fully describe all version sources you want automatically updated.

Fix Focus Areas

  • release-please-config.json[3-16]
    • Add an extra-files entry for VERSION (e.g., a raw/text file update) alongside the existing package.json jsonpath entry.
  • update-system.mjs[26-28]
  • update-system.mjs[104-107]
    • No code change required, but these lines show why VERSION must remain authoritative.

Found by Qodo code review

@santifer santifer merged commit 6a3dc22 into santifer:main Apr 30, 2026
8 checks passed
@santifer
Copy link
Copy Markdown
Owner

Welcome to career-ops, @chorrell. Excellent fix — the structural approach (release-please-config.json externo + release-type: simple con extra-files JSONPath para package.json) es exactamente la dirección correcta vs. inline workflow config. Closes #336 (overdue 14 días) y #523 community-reported.

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.

nhardgrove added a commit to nhardgrove/career-ops that referenced this pull request May 1, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version metadata is inconsistent across VERSION, package.json, release-please manifest, and changelog

3 participants