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
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
Returns
Promise<UpdatedDependency | undefined>
The latest version of the given dependency, or undefined
if the
latest version of dependency is unable to resolve.