deno install --allow-read=./ --allow-net --allow-write=./ -f -n=deno-outdated https://deno.land/x/deno-outdated/cli.ts
Or, add it to your deno.json's tasks:
"update": "deno run --allow-read=./ --allow-net --allow-write=./ https://deno.land/x/deno-outdated/cli.ts --ignore README.md",
Scans & updates your project for outdated deno dependencies. This will not update non-pinned dependencies (dependencies without any version specified)
-q, --quiet
: Ignore any output of the file-i, --ignore [files...]
: Ignore certain files for formatting
You can ignore updating for a line with i-deno-outdated
, for example:
import { assert } from "https://deno.land/std@0.146.0/testing/asserts.ts" // i-deno-outdated
const source = `
const x = 'https://deno.land/std@0.146.0/testing/asserts.ts'; ${"i-deno-outdated" && ""}
const x = 'https://deno.land/std@0.146.0/testing/asserts.ts' // i-deno-outdated ";
`;
Currently works with:
Updating works by finding URLs in a source file, removing their version specifier, and redirecting it to the latest one.
This is split into different stacking modules:
- Redirect (
redirect.ts
) finds any simple redirects in that URL. - Removal (
removal.ts
) removes the version part of a URL. This is dependent on the vendor (deno.land/x, esm.sh).
This updates a URL to its latest known version, if any.
This is the API for the CLI app, and it allows you to scan files for outdated dependencies and update them.
This wraps everything around with cliffy for a nice CLI app.