fix(webui): reinstall locked dependencies when rebuilding source upgrades
This commit is contained in:
1 parent
897c8b013f
commit
89d35863d9
2 files changed
+5
-2
No files matched your search
@@ -192,8 +192,10 @@ def build_webui_bundle(
|
||||
using_bun = Path(command_runner).stem.lower() == "bun"
|
||||
|
||||
_emit(output, f"Building bundled WebUI with `{command_runner}`...")
|
||||
# Reinstall the locked tree: Bun's incremental install can retain the old
|
||||
# hoisting layout after a source upgrade and omit new nested major versions.
|
||||
_run_frontend_command(
|
||||
[command_runner, "install", *(["--frozen-lockfile"] if using_bun else [])],
|
||||
[command_runner, "install", *(["--frozen-lockfile", "--force"] if using_bun else [])],
|
||||
cwd=resolved_source,
|
||||
subprocess_run=subprocess_run,
|
||||
)
|
||||
|
||||
@@ -128,7 +128,8 @@ def test_ensure_webui_bundle_auto_builds_stale_dist(tmp_path: Path, monkeypatch)
|
||||
)
|
||||
|
||||
assert status.stale is False
|
||||
assert commands == [("bun", "install", "--frozen-lockfile"), ("bun", "--bun", "run", "build")]
|
||||
assert commands == [("bun", "install", "--frozen-lockfile", "--force"),
|
||||
("bun", "--bun", "run", "build")]
|
||||
|
||||
|
||||
def test_pick_webui_build_runner_returns_resolved_executable(monkeypatch) -> None:
|
||||
|
||||
Reference in new issue
Block a user