Skip to main content
Module

x/molt/git/mod.ts

A Deno module to update dependencies with deno_graph
Go to Latest
import * as molt from "https://deno.land/x/molt@0.2.2/git/mod.ts";

A sub module of molt for git operations.

Example

To update all dependencies in a module and commit the changes to git:

import { DependencyUpdate } from "https://deno.land/x/molt@{VERSION}/mod.ts";
import { commitAll } from "https://deno.land/x/molt@{VERSION}/git/mod.ts";

const updates = await DependencyUpdate.collect("./mod.ts");

commitAll(updates, {
  groupBy: (dependency) => dependency.name,
  composeCommitMessage: ({ group, version }) =>
    `build(deps): bump ${group} to ${version!.to}`,
});