Playwright: Difference between revisions

Pigs (talk | contribs)
m Add category development
Xav-ie (talk | contribs)
m devenv.nix: npm view (aka as show) command by default reaches out to npm. This is not what we want when checking local package version. This ammends the local check to use current package's @playwright/test version, and not npm's latest.
Line 39: Line 39:
=== devenv.nix ===
=== devenv.nix ===


<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
{ pkgs, lib, config, inputs, ... }:
{ pkgs, lib, config, inputs, ... }:


Line 70: Line 70:
   # https://devenv.sh/scripts/
   # https://devenv.sh/scripts/
   scripts.intro.exec = ''
   scripts.intro.exec = ''
     playwrightNpmVersion="$(npm show @playwright/test version)"
     playwrightNpmVersion="$(npm view ./. devDependencies'[@playwright/test]')"
     echo "❄️ Playwright nix version: ${pkgs-playwright.playwright.version}"
     echo "❄️ Playwright nix version: ${pkgs-playwright.playwright.version}"
     echo "📦 Playwright npm version: $playwrightNpmVersion"
     echo "📦 Playwright npm version: $playwrightNpmVersion"
Line 90: Line 90:
   # See full reference at https://devenv.sh/reference/options/
   # See full reference at https://devenv.sh/reference/options/
}
}
</syntaxHighlight>
</syntaxhighlight>


=== devenv.yaml ===
=== devenv.yaml ===