Fix package.json to reflect correct version#824
Merged
Conversation
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)
4 tasks
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>
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.
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