Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/molt/lib/dependency.ts>resolveLatestVersion

Update dependencies the Deno way
Latest
function resolveLatestVersion
import { resolveLatestVersion } from "https://deno.land/x/molt@0.17.2/lib/dependency.ts";

Resolve the latest version of the given dependency.

Examples

Example 1

await resolveLatestVersion(
  Dependency.parse(new URL("https://deno.land/std@0.200.0/fs/mod.ts"))
);
// -> { name: "deno.land/std", version: "0.207.0", path: "/fs/mod.ts" }

Parameters

dependency: Dependency
optional
options: { cache?: boolean; }

Returns

Promise<UpdatedDependency | undefined>

The latest version of the given dependency, or undefined if the latest version of dependency is unable to resolve.