Skip to main content
Module

x/dmm/deps.ts>BumperService

Lightweight Deno Module Manager
Go to Latest
class BumperService
import { BumperService } from "https://deno.land/x/dmm@v2.1.0/deps.ts";

Used to update version strings as part of the bumper CI process when new Deno, Deno Std, and Drash Land module version are released.

Constructors

new
BumperService(moduleName: string, args?: string[])

Construct an object of this class.

Properties

protected
args: string[]

A property to hold Deno.args.

protected
is_for_pre_release: boolean

A property to determine whether or not the .bump() method should bump for pre-release.

protected
latest_versions: { [key: string]: string; }

A list of latest versions. This object should contain (at the very least): - This module's latest version - Deno's latest version - Deno Std's latest version

protected
module_name: string

The name of the module using this class.

protected
parsed_args: ParsedArgs

A property to hold the Deno.args parsed into key-value pairs.

Methods

private
replaceVersionVariables(files: File[]): File[]

Replaces template variables with what values they should have

protected
writeFile(file: File, write?): string

Write the file in question to the filesystem.

bump(files: File[], write?): Promise<string[]>

Bump all occurances of Deno and Deno Std versions in the filesystem.

bumpForPreRelease(files: File[], write?): string[]

Bump all occurances of this module's version for pre-release purposes. This method should bump all files that has this module's version. For example, this should bump eggs.json, README.md, etc.

getLatestVersions(): Promise<{ [key: string]: string; }>

Get the latest versions for this module, deno, and deno std.

getModuleName(): string

Get the name of the module using this service.

getModulesLatestVersion(moduleName: string): Promise<string>

Get the latest version of the module using this class from Deno's CDN. Deno's CDN responses look like the following:

{
  "latest":"v1.1.5",
  "versions":[
     "v1.1.5",
     "v1.1.4",
     "v1.1.2",
     "v1.1.1",
     "v1.1.0",
     "v1.0.5",
     "v1.0.4",
     "v1.0.3",
     "v1.0.2",
     "v1.0.1",
     "v1.0.0"
  ]
}
getParsedArgs(): ParsedArgs

Parse Deno.args into key-value pairs.

isForPreRelease(): boolean

Is this bumper service being used for pre-release pruposes?