deno-outdated
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)
Flags
-q, --quiet
: Ignore any output of the file-i, --ignore [files...]
: Ignore certain files for formatting
Ignore
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:
Internal layout
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:
Layer 1:
- 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).
update.ts
)
Layer 2: (This updates a URL to its latest known version, if any.
change.ts
)
Layer 3 (This is the API for the CLI app, and it allows you to scan files for outdated dependencies and update them.
cli.ts
)
Layer 4 (This wraps everything around with cliffy for a nice CLI app.