Skip to content

Latest commit

 

History

History
118 lines (81 loc) · 3.8 KB

File metadata and controls

118 lines (81 loc) · 3.8 KB

Paket Lock Diff Tool

What

This is a tool to analyze two paket.lock files. The report generates a few lists:

  • Additions made
  • Removals made
  • Version Upgrades
  • Version Downgrades

Why

When looking at git diffs between two lock files, it can be hard to get an overall picture of what changed, especially if you have many transitive dependencies.

How

  1. Give it a try here
  2. Copy and paste this lock file into Older LockFile field.
  3. Copy and paste this lock file into Newer LockFile field.
  4. Select Raw Text, click Compare, and review the results.

Architecture

The application renders its page and comparison results on the server with Giraffe, Giraffe.Htmx, and the Giraffe view engine. htmx posts the lock-file form and swaps the returned HTML fragment into the page.

A small Fable module remains for work that must happen in the browser: fetching user-provided URLs without introducing a server-side SSRF endpoint, resolving GitHub pull-request files, maintaining shareable URL state, switching output tabs, and copying reports to the clipboard.

Install prerequisites

To build and run the application you need:

The headless client tests additionally require:

Starting the application

To concurrently run the server and the client components in watch mode use the following command:

dotnet run

Then open http://localhost:5000 in your browser.

The build project in root directory contains a couple of different build targets. You can specify them after -- (target name is case-insensitive).

To run all server and client tests once:

dotnet run -- RunTestsHeadless

The original browser workflows are covered by Playwright tests written in F#. This target builds a production-style server, installs the matching Chromium revision, and runs the browser suite headlessly:

dotnet run -- RunBrowserTests

For an interactive browser run, use:

dotnet run -- RunBrowserTestsHeaded

To run the fast server/client tests and the browser suite together:

dotnet run -- RunAllTestsHeadless

Playwright traces, screenshots, browser errors, and server logs from failed scenarios are written beneath .artifacts/e2e/results. Linux environments must provide Playwright's Chromium system dependencies; the test executable also supports install --with-deps chromium for CI images that permit installing them.

To run server and client tests in watch mode (you can run this command in a second terminal):

dotnet run -- WatchRunTests

Finally, there are Bundle and Azure targets that you can use to package your app and deploy to Azure, respectively:

dotnet run -- Bundle
dotnet run -- Azure

URL and GitHub inputs

URL fetching stays in the browser, so the remote server must permit the request through CORS. GitHub pull-request comparisons use unauthenticated GitHub API requests and are therefore subject to GitHub's public rate limits.

Documentation for the main components is available here: