astrolicious / astro-theme-provider

Author themes for Astro like a normal project and export your work as an integration for others to use
https://astro-theme-provider.netlify.app/
The Unlicense
28 stars 2 forks source link

Lock playwright browser versions #89

Open altsalt opened 5 months ago

altsalt commented 5 months ago

While the version of playwright is pinned, the downloaded browsers may differ. In part this is because some systems can't use the auto-installed versions, thus falling back to what is local.

altsalt commented 5 months ago

Not entirely related, but one can get Playwright working on NixOS by adding the following block to /package.json (where the version matches the one in nixpkgs):

    "pnpm": {
        "overrides": {
            "@playwright/test": "1.38.0",
            "playwright": "1.38.0"
        }
    }

with this shell.nix file:

{ pkgs ? import <nixpkgs> { } }:

pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    nodejs_20
    (corepack.override { nodejs = nodejs_20; })
    biome
    playwright-driver.browsers
  ];

  shellHook = ''
    export BIOME_BINARY="${pkgs.biome}/bin/biome"
    export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
  '';
}

References:

BryceRussell commented 4 months ago

How does this work, do I just add @playwright/browser-chromium to the package.json?

Also, do we have to pin @playwright/test as well?

altsalt commented 3 months ago

I'm not sure tbh, still new to playwright. Just updated the pnpm override to "1.40.0" for NixOS 24.05 which is the "playwright-driver" version, despite playwright 1.42.0 being in the repo.