UNPKG

renovate

Version:

Automated dependency updates. Flexible so you don't need to be.

138 lines (133 loc) 4.03 kB
import { isString } from "@sindresorhus/is"; //#region lib/util/exec/types.ts /** * A `tool` that Containerbase supports. * * TODO #41849 replace with upstream types */ const toolDefinitions = [ { name: "bazelisk" }, { name: "bun" }, { name: "bundler" }, { name: "cocoapods" }, { name: "composer" }, { name: "conan" }, { name: "copier" }, { name: "corepack" }, { name: "deno" }, { name: "devbox" }, { name: "dotnet" }, { name: "erlang" }, { name: "elixir" }, { name: "flux" }, { name: "gleam" }, { name: "golang" }, { name: "gradle" }, { name: "hashin" }, { name: "helm" }, { name: "helmfile" }, { name: "java" }, { name: "java-maven" }, { name: "jb" }, { name: "kustomize" }, { name: "maven" }, { name: "mise" }, { name: "nix" }, { name: "node" }, { name: "npm" }, { name: "pdm" }, { name: "php" }, { name: "pip-tools" }, { name: "pipenv" }, { name: "pnpm" }, { name: "pixi" }, { name: "poetry" }, { name: "python" }, { name: "ruby", description: "Also used in the `rubygems` Datasource" }, { name: "rust" }, { name: "uv" }, { name: "yarn" }, { name: "yarn-slim" }, { name: "dart" }, { name: "flutter" }, { name: "vendir" } ]; /** * A `tool` that Containerbase supports. */ const toolNames = toolDefinitions.map((t) => t.name); function isToolName(value) { return isString(value) && toolNames.includes(value); } /** * Additional constraints that can be specified for some Managers, but are **not** tools that Containerbase supports, with optional description. */ const additionalConstraintDefinitions = [ ( /** * @deprecated TODO remove in #42600 */ { name: "go", description: `Used in the \`gomod\` manager to specify the version of the Go toolchain to use. In precedence order: 1. config: \`constraints.go\` 1. \`go.mod\`: \`toolchain\` directive 1. \`go.mod\`: \`go\` directive NOTE that the \`constraints.golang\` is not used (https://github.com/renovatebot/renovate/issues/42601) ` }), { name: "gomodMod", description: `Used in the \`gomod\` manager to specify a tag for [\`github.com/marwan-at-work/mod\`](https://github.com/marwan-at-work/mod). Must be prefixed with \`v\`.` }, { name: "jenkins", description: "Used in the `jenkins-plugins` datasource to specify a minimum version of Jenkins that a plugin must support." }, { name: "pipTools", description: "Used in the `pip-compile` manager to specify a version of `pip-tools` to use. @deprecated TODO remove in #42599" }, { name: "platform", description: "Used in the `rubygems` datasource to specify the `platform` that the Gem dependency supports." }, { name: "rubygems", description: "Used in the `rubygems` datasource to specify the version of the `rubygems` tool that is needed to use this Gem." }, { name: "vscode", description: "Used in the `npm` manager to track the version of VSCode that the package is compatible with." }, { name: "dotnet-sdk", description: "Used in the `nuget` manager to track .NET SDK version required." }, { name: "perl", description: "Used in the `cpanfile` manager to track Perl version required." }, { name: "%goMod", description: "Used in the `gomod` manager to determine the [minimum version of Go required to use this module](https://go.dev/ref/mod#go-mod-file-go).\n\nNote that this is prefixed with a `%` to explicilty note that this is not a tool that Containerbase knows." } ]; /** * Additional constraints that can be specified for some Managers, but are **not** tools that Containerbase supports. */ const additionalConstraintNames = additionalConstraintDefinitions.map((c) => c.name); function isAdditionalConstraintName(value) { return isString(value) && additionalConstraintNames.includes(value); } function isConstraintName(value) { return isToolName(value) || isAdditionalConstraintName(value); } //#endregion export { additionalConstraintDefinitions, additionalConstraintNames, isAdditionalConstraintName, isConstraintName, isToolName, toolDefinitions, toolNames }; //# sourceMappingURL=types.js.map