Repository navigation
Process persisted package json before web sync - #6792
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR fixes a bug where a stale or corrupted
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to the package.json sync path and the fallback for a missing root file preserves the existing no-op behaviour. The new helper re-renders the persisted package.json through the same compiler used by No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Update reflex/utils/frontend_skeleton.py" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
masenf
left a comment
There was a problem hiding this comment.
thanks for the contribution!
* Process persisted package json before web sync * Update reflex/utils/frontend_skeleton.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: Harsh Thakare <[email protected]> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
The fragment was named after #6792, the PR that introduced the regression, which would render a changelog link to the wrong PR. Reword the text to describe the user-visible symptom rather than the implementation change. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018WXodmwe6tFZ6DkweqArij
* Apply package.json overrides after the frozen install A Reflex upgrade that introduces a new entry in `constants.PackageJson.OVERRIDES` broke `reflex run` for any app with a persisted `reflex.lock/`. Restoring `reflex.lock/package.json` merged the framework overrides in on the way to `.web`, so the restored package.json no longer matched the `bun.lock` it was persisted alongside, and the initial `bun install --frozen-lockfile` aborted with `error: lockfile had changes, but lockfile is frozen`. Upgrading 0.9.7 (override `cookie`, direct dep `[email protected]`) to 0.9.8a2 (override `[email protected]`) reproduces it: the new override forces a different resolution for a package the lockfile already pinned. `overrides` participate in dependency resolution, so they now stay exactly as persisted while the package.json/lockfile pair is restored, and the framework-owned entries are merged into `.web/package.json` right after the frozen install instead. The dependency adds that follow resolve against them and refresh the lockfile; when there is nothing to add, a non-frozen install reconciles it so the persisted pair is ready for the next frozen install. `scripts` are unaffected and keep being repaired during the restore, since they play no part in resolution. Also add `OVERRIDES` to the frontend-install cache fingerprint, so an upgrade that changes only the overrides invalidates the cache and actually applies them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018WXodmwe6tFZ6DkweqArij * Point news fragment at #6844 and reword for release notes The fragment was named after #6792, the PR that introduced the regression, which would render a changelog link to the wrong PR. Reword the text to describe the user-visible symptom rather than the implementation change. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018WXodmwe6tFZ6DkweqArij --------- Co-authored-by: Claude <[email protected]>
Summary
Fixes #6765.
This updates the root lockfile sync path so
package.jsonis processed before being mirrored into.web/.Previously, a stale or corrupted
reflex.lock/package.jsoncould be copied directly into.web/package.json, whichcould drop Reflex-managed scripts like
devandexport.Changes
.web/package.jsonwhen no root persisted package.json exists.