Patch Changes
- 1f57b57: Align browser install and doctor with the pinned playwright runtime. The CLI shipped an unused
@playwright/testdependency, and user projects can install their own copy at any version. Both packages declare aplaywrightbin, and either can win thenode_modules/.bin/playwrightshim. When the shim belongs to a different version than the pinnedplaywright,install browsersdownloads browser builds for the wrong playwright version. The flow runtime imports theplaywrightmodule, so it could not launch the installed builds. This change removes the@playwright/testdependency.install browsers,doctor, and runtime-dir validation now run theplaywrightpackage's owncli.jsthrough the CLI's runtime, so the installed builds always match the runtime.doctornow also fails with a clear message when the installed playwright version differs from the pinned runtime version. - 563dbd7: Make
initrepair an existing package.json so the scaffolded flow can load. The scaffolded flow and config are ES modules. Node reads their module format from the nearest package.jsontypefield. Before this change,initonly added thetest:e2escript to an existing package.json. It did not set"type": "module"and did not add the@qawolf/flowsdependency, so the example flow failed to load. Current npm writes"type": "commonjs"into everynpm init -ypackage.json, so an explicit value does not signal author intent.initnow offers three changes in one prompt: add thetest:e2escript, set"type": "module", and add the@qawolf/flowsdependency. It applies the missing ones and skips the rest. It prints a warning after it changes an explicittypevalue, because that changes how every.jsfile in the package loads. Runinitagain on a half-configured project to repair it; the old code stopped at the first existing script. - 163f6aa: Show flow failure detail in json output. Before this change, a failed
flows runprinted only{"type":"error","title":"N flow(s) failed"}in json mode. The CLI also selects json mode in CI and when stdout is piped. The failure message and stack only reached disk through the--junitreport. The final error event now includes abodyfield. Thebodyfield contains the message and the cause stack for each failed flow. Human and agent modes do not change. They already show the failure detail inline.