Update Deno Dependencies

Run this script to update your dependency urls to their latest published versions.

deno-udd

Prior to updating each url, udd optionally runs the passed --test(s) to ensure that updating is non-breaking.

ci-status

Installation

Use deno install command:

deno install -A -f udd https://deno.land/x/udd@0.1.0/main.ts

You may need to include the deno bin directory in your PATH.

Usage

For example, to update url imports inside deps.ts run:

udd deps.ts

To ensure that deno test is successful when updating each dependency:

udd deps.ts --test="deno test"

Example

// deps.ts (before)
export { decode } from "https://deno.land/std@v0.34.0/strings/decode.ts";

Running udd looks up the std versions to see that there is a more recent std release.

// deps.ts (after)
export { decode } from "https://deno.land/std@v0.35.0/strings/decode.ts";

Semantic version notation

If you append a fragment #${token}${version} to your urls you can manage their update behavior:

Token Name udd updates to the latest version such that
^ Compatible major version is the same (if major=0 then same minor version)
~ Approximately major and minor version are the same
< Less than less than the provided version
= Equal it's exactly this version

The version argument is optional for ^, ~ and = (the version passed is the version in the url).

Examples

// deps.ts (before)
export { Application } from "https://deno.land/x/oak@v2.4.0/mod.ts#^";
export { decode } from "https://deno.land/std@v0.34.0/strings/decode.ts#=";
export { Application } from "https://deno.land/x/abc@v0.1.10/mod.ts#<0.2.0";
export { encode } from "https://deno.land/std@v0.34.0/strings/encode.ts#~";

Running udd:

// deps.ts (after)
export { Application } from "https://deno.land/x/oak@v2.10.0/mod.ts#^";
export { decode } from "https://deno.land/std@v0.34.0/strings/decode.ts#=";
export { Application } from "https://deno.land/x/abc@v0.1.11/mod.ts#<0.2.0";
export { encode } from "https://deno.land/std@v0.35.0/strings/encode.ts#~";

Supported domains

udd supports the following registry domains:

Create an issue to request additional registries.


Logo by Drake Sauer.