Skip to content

Commit

Permalink
Rewrite playwright:version using yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
mk committed Oct 2, 2024
1 parent a681f9b commit 8ec204c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
:task (apply clojure "-X:test" *command-line-args*)}

playwright:version {:doc "Print used playwright version from ui_tests/package-lock.json"
:task (print (get-in (json/parse-string (->> "ui_tests/package-lock.json" slurp) true)
[:packages :node_modules/playwright-core :version]))}
:task (print (->> (babashka.process/shell {:out :string} "grep -E 'playwright-core \"(.*)\"' ui_tests/yarn.lock")
:out
str/trim
(re-find (re-pattern "playwright-core \"(.*)\""))
second))}

playwright:install {:task (shell {:dir "ui_tests"} "yarn playwright install --with-deps chromium")}

Expand Down

0 comments on commit 8ec204c

Please sign in to comment.