ENG-9801: sync reflex.lock/package.json to .web/package.json#6658
ENG-9801: sync reflex.lock/package.json to .web/package.json#6658masenf wants to merge 7 commits into
reflex.lock/package.json to .web/package.json#6658Conversation
Every time the framework requests installation of packages, sync the `package.json` along with the lock files, so out of band changes are picked up. After init, sync any package.json or lock files to reflex.lock so subsequent installs keep the initialized hooks and overrides.
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR unifies
Confidence Score: 5/5Safe to merge — the change is well-scoped, idempotent, and fully tested. The sync logic is straightforward: No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "Add tests for package.json prune and ini..." | Re-trigger Greptile |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
masenf
left a comment
There was a problem hiding this comment.
ideally we would consolidate the package.json combining code in frontend_skeleton.py with that of templates.py... but i'm holding off on that change until 0.10.0 when we combine the compiler into reflex-base, otherwise we'll be introducing cross-package incompatibility for no real gain other than hygiene.
FarhanAliRaza
left a comment
There was a problem hiding this comment.
Maybe we want to add tests for these cases
(a) prune=False preserving .web/package.json when
the root copy is absent
(b) initialize_web_directory persisting package.json back to root.
Cover the two behaviors raised in PR review: - prune=False preserving .web/package.json when the root copy is absent - initialize_web_directory persisting the compiled package.json back to root Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every time the framework requests installation of packages, sync the
package.jsonalong with the lock files, so out of band changes are picked up.After init, sync any package.json or lock files to reflex.lock so subsequent installs keep the initialized hooks and overrides.
The reflex.lock/package.json is interesting because it's checked in, and it's the canonical copy of
package.jsonthat will replace what exists in.web... but it's also a deletable lock-ish file that will itself be recreated from the compiled app. After this change though, the reflex.lock/package.json is now an appropriate place to keep local changes like package version overrides.PR written without AI assistance 😅