Unverified Commit 69b27b94 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

playwright: 1.58.2 -> 1.59.1 (#514945)

parents c06c947e 7cc8a6b0
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -7,29 +7,38 @@
}:
buildNpmPackage rec {
  pname = "playwright-mcp";
  version = "0.0.56";
  version = "0.0.69";

  src = fetchFromGitHub {
    owner = "Microsoft";
    repo = "playwright-mcp";
    tag = "v${version}";
    hash = "sha256-kfn9vIxmx+dSYKzR5ayGX8RIWd5d8quTAyx4/dC6hIY=";
    hash = "sha256-zX9RsHVInRib69N4LkG3R4TB5qjlBirpu9BBftcr92I=";
  };

  npmDepsHash = "sha256-Qsln4llNpfXYXhSEfHnvdsFIF7adHKEyC1eGHtVY2Qk=";
  npmDepsHash = "sha256-hc5AkUTGoXxXlDW9vPpiO23QOgANJp1lX4xoaySHoK4=";

  # Codex MCP smoke test (after `codex mcp add playwright-nix --env DISPLAY=:0 -- $out/bin/mcp-server-playwright --headless --isolated`):
  npmWorkspace = "packages/playwright-mcp";

  # Codex MCP smoke test (after `codex mcp add playwright-nix --env DISPLAY=:0 -- $out/bin/playwright-mcp --headless --isolated`):
  # timeout 45s codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check "Use only playwright-nix MCP tools. Navigate to https://example.com and return only the page title."
  postInstall = ''
    rm -rf "$out/lib/node_modules/@playwright/mcp/node_modules/playwright"
    rm -rf "$out/lib/node_modules/@playwright/mcp/node_modules/playwright-core"
    ln -s ${playwright-test}/lib/node_modules/playwright "$out/lib/node_modules/@playwright/mcp/node_modules/playwright"
    ln -s ${playwright-test}/lib/node_modules/playwright-core "$out/lib/node_modules/@playwright/mcp/node_modules/playwright-core"
    pkg_dir="$out/lib/node_modules/playwright-mcp-internal"
    rm -rf "$pkg_dir/node_modules/playwright"
    rm -rf "$pkg_dir/node_modules/playwright-core"
    ln -s ${playwright-test}/lib/node_modules/playwright "$pkg_dir/node_modules/playwright"
    ln -s ${playwright-test}/lib/node_modules/playwright-core "$pkg_dir/node_modules/playwright-core"

    # Workspace symlinks point to a packages/ tree that npmInstallHook does not
    # ship; npm hoisted the workspace contents directly into playwright-mcp-internal.
    rm "$pkg_dir/node_modules/@playwright/mcp"
    rm "$pkg_dir/node_modules/@playwright/mcp-extension"
    rm "$pkg_dir/node_modules/playwright-cli"
    rm "$pkg_dir/node_modules/.bin/playwright-mcp"

    wrapProgram $out/bin/mcp-server-playwright \
    wrapProgram $out/bin/playwright-mcp \
      --set PLAYWRIGHT_BROWSERS_PATH ${playwright-driver.browsers} \
      --set-default PLAYWRIGHT_MCP_BROWSER chromium \
      --run 'if [ -z "$PLAYWRIGHT_MCP_USER_DATA_DIR" ]; then PLAYWRIGHT_MCP_USER_DATA_DIR="$(mktemp -d -t mcp-pw-XXXXXX)"; export PLAYWRIGHT_MCP_USER_DATA_DIR; trap "rm -rf \"$PLAYWRIGHT_MCP_USER_DATA_DIR\"" EXIT; fi'
      --set-default PLAYWRIGHT_MCP_BROWSER chromium
  '';

  dontNpmBuild = true;
@@ -44,7 +53,7 @@ buildNpmPackage rec {
    description = "Playwright MCP server";
    homepage = "https://github.com/Microsoft/playwright-mcp";
    license = lib.licenses.asl20;
    mainProgram = "mcp-server-playwright";
    mainProgram = "playwright-mcp";
    maintainers = [ lib.maintainers.kalekseev ];
  };
}
+2 −2
Original line number Diff line number Diff line
@@ -31,14 +31,14 @@ in
buildPythonPackage (finalAttrs: {
  pname = "playwright";
  # run ./pkgs/development/web/playwright/update.sh to update
  version = "1.58.0";
  version = "1.59.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "microsoft";
    repo = "playwright-python";
    tag = "v${finalAttrs.version}";
    hash = "sha256-gK19pjB8TDy/kK+fb4pjwlGZlUyY26p+CNxunvIMrrY=";
    hash = "sha256-CbvVSx/KDaX+CZEJRlDd4GUwWejzjTKNyL4+FhgT6qE=";
  };

  patches = [
+10 −8
Original line number Diff line number Diff line
@@ -2,29 +2,31 @@
  "comment": "This file is kept up to date via update.sh",
  "browsers": {
    "chromium": {
      "revision": "1208",
      "browserVersion": "145.0.7632.6",
      "revision": "1217",
      "browserVersion": "147.0.7727.15",
      "title": "Chrome for Testing"
    },
    "chromium-headless-shell": {
      "revision": "1208",
      "browserVersion": "145.0.7632.6",
      "revision": "1217",
      "browserVersion": "147.0.7727.15",
      "title": "Chrome Headless Shell"
    },
    "firefox": {
      "revision": "1509",
      "browserVersion": "146.0.1",
      "revision": "1511",
      "browserVersion": "148.0.2",
      "title": "Firefox"
    },
    "webkit": {
      "revision": "2248",
      "revision": "2272",
      "revisionOverrides": {
        "mac14": "2251",
        "mac14-arm64": "2251",
        "debian11-x64": "2105",
        "debian11-arm64": "2105",
        "ubuntu20.04-x64": "2092",
        "ubuntu20.04-arm64": "2092"
      },
      "browserVersion": "26.0",
      "browserVersion": "26.4",
      "title": "WebKit"
    },
    "ffmpeg": {
+4 −4
Original line number Diff line number Diff line
@@ -36,8 +36,8 @@ let
      inherit (download) url stripRoot;
      hash =
        {
          x86_64-linux = "sha256-/xskLzTc9tTZmu1lwkMpjV3QV7XjP92D/7zRcFuVWT8=";
          aarch64-linux = "sha256-jckH5+eGJ4BhH1NAa5LIgf3/salKLAHW9XUOo5gob4c=";
          x86_64-linux = "sha256-kQCw0nQHHuUIfn8rGVcN7Ip6ZOk5c3Or+GG5RvSica4=";
          aarch64-linux = "sha256-s2IIjSY5t9AtT05dUS0mp4fPlaixND9+Cg0+0S8Kkx8=";
        }
        .${system} or throwSystem;
    };
@@ -72,8 +72,8 @@ let
    inherit (download) url stripRoot;
    hash =
      {
        x86_64-darwin = "sha256-bgU7lZhp9XUFfGu58pFdZyhXho3Jiy4MjljR+yk0M1c=";
        aarch64-darwin = "sha256-45DjMIu0t7IEYdXOmIqpV/1/MKdEfx/8T7DWagh6Zhc=";
        x86_64-darwin = "sha256-kzbLpzzMpBurQHyGaz561A0K46GzgWPP2JSQKRV6C+Y=";
        aarch64-darwin = "sha256-67ekk37uq5ITq9ZvwPTZhhqEgQY17g/3KJ/vnqZz3h0=";
      }
      .${system} or throwSystem;
  };
+4 −4
Original line number Diff line number Diff line
@@ -63,8 +63,8 @@ let
      inherit (download) url stripRoot;
      hash =
        {
          x86_64-linux = "sha256-dJSO05xOzlSl/EwOWNQCeuSb+lhUU6NlGBnRu59irnM=";
          aarch64-linux = "sha256-9DFLCPuc9WZjYLzlRW+Df2pb+mViPK3/IOkkUozELsw=";
          x86_64-linux = "sha256-GtaJk9Qr1bTbDfpB+noGlLcIDEIS2uzDiV5rb2DZhVQ=";
          aarch64-linux = "sha256-jsesQ6juzMPQzmn0Ygb8hmpxCeLHJVBL89qto5yuh5s=";
        }
        .${system} or throwSystem;
    };
@@ -130,8 +130,8 @@ let
    inherit (download) url stripRoot;
    hash =
      {
        x86_64-darwin = "sha256-vQuBHM0jkk6S/Gco/bBqSPJqXi/CJt/+nkbGtFNpgwk=";
        aarch64-darwin = "sha256-qXdgHeBS5IFIa4hZVmjq0+31v/uDPXHyc4aH7Wn2E7E=";
        x86_64-darwin = "sha256-CxnLSe+sZYskO7H5f3cA+BlWCZsFOPpp1gVG5s37r80=";
        aarch64-darwin = "sha256-n3JLK+hJwzPihC2qSHrSCYPz3jonZNz7GMgXiPBLaS0=";
      }
      .${system} or throwSystem;
  };
Loading