Skip to main content
Module

x/deno_slack_hooks/check_update.ts

Helper library implementing the contract between the Slack CLI and Slack application SDKs
Latest
import * as denoSlackHooks from "https://deno.land/x/deno_slack_hooks@1.3.0/check_update.ts";

Functions

createFileErrorMsg creates and returns an error message that contains lightly formatted information about the dependency files that were found but otherwise inaccessible/unreadable.

createUpdateResp creates and returns an CheckUpdateResponse object that contains information about a collection of release dependencies in the shape of an object that the CLI expects to consume

createVersionMap creates an object that contains each dependency, featuring information about the current and latest versions, as well as if breaking changes are present and if any errors occurred during version retrieval.

extractDependencies accepts the contents of a JSON file and a top-level, file-specific key within that file that corresponds to recognized project dependencies. If found, returns an array of key, value pairs that make use of the dependencies.

extractVersion takes in a URL formatted string, searches for a version, and, if version is found, returns that version.

fetchLatestModuleVersion retrieves the published metadata.json that contains all releases and returns the latest published version

gatherDependencyFiles rounds up all SDK-supported dependency files, as well as those dependency files referenced in deno.json or deno.jsonc, and returns an array of arrays made up of filename and dependency key pairs.

getDenoImportMapFiles cycles through supported deno.* files and, if an importMap key is found, returns an array of arrays made up of filename and dependency key pairs.

hasBreakingChange determines whether or not there is a major version difference of greater or equal to 1 between the current and latest version.

readProjectDependencies cycles through supported project dependency files and maps them to the versionMap that contains each dependency's update information.