Conversation
This will avoid conflicts with reflex apps that also host some javascript app in the same directory.
Greptile SummaryThis PR relocates the canonical Bun lockfile from the project root (
Confidence Score: 3/5Safe to merge for new projects, but existing deployments will silently discard their pinned bun.lock on first run after upgrading. The path relocation is clean and all new code is correct, but there is no migration for existing ./bun.lock files. Any project that already has a committed lockfile will lose it on the first reflex init post-upgrade: sync_root_bun_lock_to_web will find nothing at the new location, delete the mirrored .web/bun.lock, and allow bun install to regenerate from scratch — potentially floating all package versions to their latest compatible releases. reflex/utils/frontend_skeleton.py — the sync functions need a one-time migration check for the old ./bun.lock location before this lands for existing users. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[reflex init / reflex run] --> B[sync_root_bun_lock_to_web]
B --> C{reflex.lock/bun.lock exists?}
C -- Yes --> D[Copy reflex.lock/bun.lock to .web/bun.lock]
C -- No --> E{.web/bun.lock exists?}
E -- Yes --> F[Delete stale .web/bun.lock]
E -- No --> G[Skip]
F --> H[bun install regenerates lockfile]
G --> H
H --> I[sync_web_bun_lock_to_root]
I --> J[mkdir reflex.lock/]
J --> K[Copy .web/bun.lock to reflex.lock/bun.lock]
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
LOL hot reload is broken now, because reflex.lock is not excluded from the reload path 🤦 |
This will avoid conflicts with reflex apps that also host some javascript app in the same directory.
Followup for #6289