Skip to content

Fix package.json to reflect correct version#824

Merged
tonidero merged 1 commit into
mainfrom
fix-package-json-reflect-latest-version
Mar 30, 2026
Merged

Fix package.json to reflect correct version#824
tonidero merged 1 commit into
mainfrom
fix-package-json-reflect-latest-version

Conversation

@tonidero

@tonidero tonidero commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Motivation / Description

We had mistakenly modified the version directly in 515bde9. This made the release automations later in #819 not modify the version, and instead we deployed 1.30.0 as 1.29.1 in the same exact code in the bundle. This modifies the version in the package.json again to match the latest, so future automations are fixed.

We have now made the same identical release manually, so 1.29.1 matches 1.30.0

Changes introduced

Linear ticket (if any)

Additional comments

@tonidero tonidero requested review from a team March 30, 2026 10:30

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@tonidero tonidero merged commit c57438a into main Mar 30, 2026
5 of 6 checks passed
@tonidero tonidero deleted the fix-package-json-reflect-latest-version branch March 30, 2026 11:09
nicfix pushed a commit that referenced this pull request Apr 10, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* WEB-3903: Stripe Checkout branding support (#828) via Nicola Sacco
(@nicfix)

## RevenueCatUI SDK
### ✨ New Features
* PW-1201 | Bump `purchases-ui-js` package to enable promo text
overrides for discounts (#832) via Rosie Watson (@RosieWatson)

### 🔄 Other Changes
* Refactor checkoutStart/postCheckoutStart to use params objects (#825)
via Volodymyr Kartavyi (@vkartaviy)
* Fix package.json to reflect correct version (#824) via Toni Rico
(@tonidero)
* Merge release PR after deploy (#812) via Antonio Pallares
(@ajpallares)
tonidero added a commit that referenced this pull request Apr 17, 2026
## Summary

Adds two complementary guardrails so contributors can't accidentally
modify the version manually, and so drift between the three version
sources (`.version`, `package.json`, `src/helpers/constants.ts`) is
caught in CI:

- **Danger rule** (local `Dangerfile`) — fails PRs that touch the
`version` line in `package.json`, `.version`, or
`src/helpers/constants.ts` when the head branch is **not** `release/*`.
Error message points contributors to `bundle exec fastlane bump`.
- **CI consistency check** — new step in the existing `test` job (`pnpm
run check-version-consistency`) runs
`scripts/check-version-consistency.mjs`, which reads the three files and
fails if they disagree. Runs regardless of branch, so it also catches
drift on release branches.

The Fastlane `bump` lane already updates all three files atomically via
the `files_with_version_number` map in `fastlane/Fastfile`, so no
changes are needed on the release side.

### Why

Contributors have occasionally edited `package.json`'s `version`
directly in feature PRs (historical examples around PRs #824 / #835),
thinking that's how releases are cut. That causes drift from `.version`,
which is Fastlane's source of truth.

## Test plan

- [ ] CI: `danger` job passes on this PR (no version lines touched).
- [ ] CI: `test` job's new "Check version consistency" step passes on
this PR.
- [ ] Manual sanity: push a scratch commit that bumps only
`package.json` version → both Danger and the CI step should fail with
the instructive messages. Revert before merging.
- [ ] On a `release/*` branch, the Danger rule should skip (allow the
bump) while the CI consistency step still passes as long as the three
files match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants