Pins your dependencies to the latest version & updates existing ones.
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 (or deno.jsonc) tasks:
"update": "deno run --allow-read=./ --allow-net --allow-write=./ https://deno.land/x/deno_outdated/cli.ts",
You can even add a github action: https://github.com/LeoDog896/deno-outdated/blob/main/.github/workflows/update.yml
Do note that if you're running an application, remove the run action that
removes deno.lock rm deno.lock
, as that is only for libraries
-q, --quiet
: Silence CLI output-d, --debug
: Add extra information to see scanning-i, --ignore [files...]
: Ignore certain files for formatting-c, --check
: Check files for outdated dependencies without updating them
You can ignore updating for a line with i-deno-outdated
, for example:
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts" // i-deno-outdated
const source = `
const x = 'https://deno.land/[email protected]/testing/asserts.ts'; ${"i-deno-outdated" && ""}
const x = 'https://deno.land/[email protected]/testing/asserts.ts' // i-deno-outdated ";
`;
Currently works with:
(Want to add more? Contribute to regex.ts
)
What's the difference between this and UDD?
This tool aims to be similar to deno native tools such as deno fmt
and
deno lint
, or aka shellable
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.