Logo fsxpired

fsxpired

Reports which #r "nuget: ..." references in your F# scripts have a newer version on nuget.org, and updates them when asked.

Install

Run it once without installing anything (needs the .NET 10 SDK, which ships dnx):

dnx fsxpired

Or keep it around as a global tool:

dotnet tool install -g fsxpired

Or as a local tool in a repository that has a dotnet-tools.json:

dotnet tool install fsxpired
dotnet fsxpired

Use

fsxpired                 # every .fsx under the current folder
fsxpired build.fsx       # one script, and everything it #loads
fsxpired scripts docs    # files and folders, mixed
fsxpired -u              # rewrite outdated exact pins in place
fsxpired -pre            # let stable pins move to prereleases
fsxpired --json          # one JSON document on stdout, for scripts and agents
fsxpired doctor build.fsx  # walk one script through every step and say what happened

A folder is searched recursively for .fsx files, skipping bin, obj, node_modules, .git and whatever .gitignore excludes. Each script's #load chain is followed, so a helper that holds the references is reported under its own name, once.

What the report says

One table per file, then a summary line:

build.fsx
╭────────────────┬─────────┬────────┬────────────┬────────────────────────────────────────────────────╮
│ Package        │ Current │ Latest │ Status     │ Note                                               │
├────────────────┼─────────┼────────┼────────────┼────────────────────────────────────────────────────┤
│ Fun.Build      │ 1.1.18  │ 1.1.20 │ outdated   │                                                    │
│ FSharp.Data    │ 6.3.0   │ 6.3.0  │ up to date │                                                    │
│ Humanizer.Core │         │ 3.0.10 │ floating   │ no version pinned, resolves to latest on every run │
╰────────────────┴─────────┴────────┴────────────┴────────────────────────────────────────────────────╯

1 outdated, 1 floating in 1 file

The Note column only appears when a row has something to say.

A range or wildcard such as 6.* or [1.0,2.0) is a deliberate choice: it is shown with what it resolves to today, reported as up to date, and left alone by -u.

Exit codes

Code

Meaning

0

Nothing outdated, or every outdated pin was rewritten

1

At least one reference is outdated

2

Unexpected error: unreadable file, missing #load target, nuget.org unreachable, or a directive fsxpired does not support

3

-u could not write a file

What stops a run

fsxpired stops with exit 2 rather than guess:

If you need either, open an issue.

Also

Type something to start searching.