diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-06-04 21:51:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 21:51:48 +0200 |
commit | 4b5458961e5d48f40d59cec3315e7966cf85815f (patch) | |
tree | 8b8050bea9327d6b89763889d7250ebe4d2ea8bc /pkgs | |
parent | 821f922fe522a04d57279623cb165d1daa379308 (diff) | |
parent | 82f8be70cdec4550f2032c85023f4d71d5739dfd (diff) |
Merge pull request #235914 from kalekseev/update/playwright
playwright: 1.32.1 -> 1.34.3
Diffstat (limited to 'pkgs')
7 files changed, 38 insertions, 29 deletions
diff --git a/pkgs/development/python-modules/playwright/default.nix b/pkgs/development/python-modules/playwright/default.nix index 35deda3f92b78..bdd7846c7623b 100644 --- a/pkgs/development/python-modules/playwright/default.nix +++ b/pkgs/development/python-modules/playwright/default.nix @@ -15,7 +15,8 @@ let in buildPythonPackage rec { pname = "playwright"; - version = "1.32.1"; + # run ./pkgs/development/python-modules/playwright/update.sh to update + version = "1.34.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -23,7 +24,7 @@ buildPythonPackage rec { owner = "microsoft"; repo = "playwright-python"; rev = "v${version}"; - hash = "sha256-rguobFaepTOL2duHRdFV5o2JSsBlYiA7rY3/RyHvoMc="; + hash = "sha256-GIxMVuSSJsRDsHDOPnJsDsTcghGYtIFpRS5u7HJd+zY="; }; patches = [ diff --git a/pkgs/development/python-modules/playwright/update.sh b/pkgs/development/python-modules/playwright/update.sh index 51dd8723c8515..464f9a3cba05c 100755 --- a/pkgs/development/python-modules/playwright/update.sh +++ b/pkgs/development/python-modules/playwright/update.sh @@ -1,8 +1,10 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl gnused nix-prefetch common-updater-scripts +#!nix-shell -i bash -p curl gnused nix-prefetch common-updater-scripts node2nix set -euo pipefail root="$(dirname "$(readlink -f "$0")")" +driver_file="$root/../../web/playwright/driver.nix" +playwright_test="$root/../../web/playwright-test" version=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s https://api.github.com/repos/microsoft/playwright-python/releases/latest | jq -r '.tag_name | sub("^v"; "")') @@ -13,11 +15,11 @@ setup_py_url="https://github.com/microsoft/playwright-python/raw/v${version}/set driver_version=$(curl -Ls "$setup_py_url" | grep '^driver_version =' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') fetch_driver_arch() { - nix-prefetch-url "https://playwright.azureedge.net/builds/driver/playwright-${version}-${1}.zip" + nix-prefetch-url "https://playwright.azureedge.net/builds/driver/playwright-${driver_version}-${1}.zip" } replace_sha() { - sed -i "s|$1 = \".\{44,52\}\"|$1 = \"$2\"|" "$root/default.nix" + sed -i "s|$1 = \".\{44,52\}\"|$1 = \"$2\"|" "$driver_file" } # Replace SHAs for the driver downloads @@ -27,5 +29,7 @@ replace_sha "aarch64-linux" "$(fetch_driver_arch "linux-arm64")" replace_sha "aarch64-darwin" "$(fetch_driver_arch "mac-arm64")" # Update the version stamps -sed -i "s/driverVersion = \"[^\$]*\"/driverVersion = \"$driver_version\"/" "$root/default.nix" +sed -i "s/version =\s*\"[^\$]*\"/version = \"$driver_version\"/" "$driver_file" +sed -i "s/\"@playwright\/test\": \"[^\$]*\"/\"@playwright\/test\": \"$driver_version\"/" "$playwright_test/node-packages.json" +(cd "$playwright_test"; node2nix -i node-packages.json) update-source-version playwright "$version" --rev="v$version" diff --git a/pkgs/development/web/playwright-test/default.nix b/pkgs/development/web/playwright-test/default.nix index 08f947ea46bc9..b795f708f1896 100644 --- a/pkgs/development/web/playwright-test/default.nix +++ b/pkgs/development/web/playwright-test/default.nix @@ -2,7 +2,7 @@ {pkgs ? import <nixpkgs> { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}: let nodeEnv = import ./node-env.nix { diff --git a/pkgs/development/web/playwright-test/node-env.nix b/pkgs/development/web/playwright-test/node-env.nix index 5dad9ec63d47c..bc1e36628ac8a 100644 --- a/pkgs/development/web/playwright-test/node-env.nix +++ b/pkgs/development/web/playwright-test/node-env.nix @@ -530,12 +530,15 @@ let then ln -s $out/lib/node_modules/.bin $out/bin - # Patch the shebang lines of all the executables + # Fixup all executables ls $out/bin/* | while read i do file="$(readlink -f "$i")" chmod u+rwx "$file" - patchShebangs "$file" + if isScript "$file" + then + sed -i 's/\r$//' "$file" # convert crlf to lf + fi done fi diff --git a/pkgs/development/web/playwright-test/node-packages.json b/pkgs/development/web/playwright-test/node-packages.json index e8b10e3381a4f..87012158d5e41 100644 --- a/pkgs/development/web/playwright-test/node-packages.json +++ b/pkgs/development/web/playwright-test/node-packages.json @@ -1,3 +1,3 @@ [ - {"@playwright/test": "1.31.1"} + {"@playwright/test": "1.34.3"} ] diff --git a/pkgs/development/web/playwright-test/node-packages.nix b/pkgs/development/web/playwright-test/node-packages.nix index 7dcb6be8080c3..329452c14beeb 100644 --- a/pkgs/development/web/playwright-test/node-packages.nix +++ b/pkgs/development/web/playwright-test/node-packages.nix @@ -4,13 +4,13 @@ let sources = { - "@types/node-18.15.11" = { + "@types/node-20.2.5" = { name = "_at_types_slash_node"; packageName = "@types/node"; - version = "18.15.11"; + version = "20.2.5"; src = fetchurl { - url = "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz"; - sha512 = "E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q=="; + url = "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz"; + sha512 = "JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ=="; }; }; "fsevents-2.3.2" = { @@ -22,30 +22,30 @@ let sha512 = "xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="; }; }; - "playwright-core-1.31.1" = { + "playwright-core-1.34.3" = { name = "playwright-core"; packageName = "playwright-core"; - version = "1.31.1"; + version = "1.34.3"; src = fetchurl { - url = "https://registry.npmjs.org/playwright-core/-/playwright-core-1.31.1.tgz"; - sha512 = "JTyX4kV3/LXsvpHkLzL2I36aCdml4zeE35x+G5aPc4bkLsiRiQshU5lWeVpHFAuC8xAcbI6FDcw/8z3q2xtJSQ=="; + url = "https://registry.npmjs.org/playwright-core/-/playwright-core-1.34.3.tgz"; + sha512 = "2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw=="; }; }; }; in { - "@playwright/test-1.31.1" = nodeEnv.buildNodePackage { + "@playwright/test-1.34.3" = nodeEnv.buildNodePackage { name = "_at_playwright_slash_test"; packageName = "@playwright/test"; - version = "1.31.1"; + version = "1.34.3"; src = fetchurl { - url = "https://registry.npmjs.org/@playwright/test/-/test-1.31.1.tgz"; - sha512 = "IsytVZ+0QLDh1Hj83XatGp/GsI1CDJWbyDaBGbainsh0p2zC7F4toUocqowmjS6sQff2NGT3D9WbDj/3K2CJiA=="; + url = "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz"; + sha512 = "zPLef6w9P6T/iT6XDYG3mvGOqOyb6eHaV9XtkunYs0+OzxBtrPAAaHotc0X+PJ00WPPnLfFBTl7mf45Mn8DBmw=="; }; dependencies = [ - sources."@types/node-18.15.11" + sources."@types/node-20.2.5" sources."fsevents-2.3.2" - sources."playwright-core-1.31.1" + sources."playwright-core-1.34.3" ]; buildInputs = globalBuildInputs; meta = { diff --git a/pkgs/development/web/playwright/driver.nix b/pkgs/development/web/playwright/driver.nix index 2ebb884aab184..3ee02fe402ec5 100644 --- a/pkgs/development/web/playwright/driver.nix +++ b/pkgs/development/web/playwright/driver.nix @@ -29,15 +29,16 @@ let in { pname = "playwright-driver"; - version = "1.31.1"; + # run ./pkgs/development/python-modules/playwright/update.sh to update + version = "1.34.3"; src = fetchurl { url = "https://playwright.azureedge.net/builds/driver/${filename}"; sha256 = { - x86_64-linux = "1wg49kfs8fflmx8g01bkckbjkghhwy7c44akckjf7dp4lbh1z8fd"; - aarch64-linux = "0f09a0cxqxihy8lmbjzii80jkpf3n5xlvhjpgdkwmrr3wh0nnixj"; - x86_64-darwin = "1zd0dz8jazymcpa1im5yzxb7rwl6wn4xz19lpz83bnpd1njq01b3"; - aarch64-darwin = "0hcn80zm9aki8hzsf1cljzcmi4iaw7fascs8ajj0qcwqkkm4jnw0"; + x86_64-linux = "1xh05v3yqa8gkwayhl4nffgjcnlakpyyi17hwzh0wqzrbwwn0cs8"; + aarch64-linux = "18jxbmhiqda5pzrv6b3n7xi14xg4zvlh6sn7hc3b3hckl77vl933"; + x86_64-darwin = "0fy5nxbvp1kxplavj832gxiznjqpvl0ww869hsfj0h1fibhly7cy"; + aarch64-darwin = "11msl4pnmr8cmlw32xq2qvfz3g3fy0azvq134a47c0fnpj2gd5zl"; }.${system} or throwSystem; }; |