UNPKG

@halospv3/hce.shared-config

Version:

Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als

138 lines 7.15 kB
import { DefaultOptions } from "./setupGitPluginSpec.default.mjs"; import { Options } from "@semantic-release/commit-analyzer"; import { Options as Options$1 } from "@semantic-release/exec"; import { Options as Options$2 } from "@semantic-release/git"; import { Options as Options$3 } from "@semantic-release/github"; import { PluginSpec } from "semantic-release"; //#region src/semanticReleaseConfig.d.ts interface SRReleaseNotesGeneratorOptions { /** * conventional-changelog preset. * @default 'angular' */ preset?: "angular" | "atom" | "codemirror" | "ember" | "eslint" | "express" | "jquery" | "jscs" | "jshint" | "conventionalcommits" | (string & Record<never, never>) | undefined; /** * Require-able npm package with a custom conventional-changelog preset.' * If {@link preset} is specified, then this is ignored. */ config?: string | undefined; /** * Additional `conventional-changelog-parser` options that will overwrite ones loaded by `preset` or `config`. * `null | undefined` has no effect. */ parserOpts?: object | null | undefined; /** * Additional `conventional-changelog-writer` options that will overwrite ones loaded by `preset` or `config`. * This is convenient to use a conventional-changelog preset with some * customizations without having to create a new module. * `null | undefined` has no effect. */ writerOpts?: object | null | undefined; /** * The host used to generate links to issues and commits. See * {@link https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#host conventional-changelog-writer#host}. * @default {string} The host from the repositoryurl option. */ host?: unknown; /** * Whether to include a link to compare changes since previous release in the * release note. * @default true */ linkCompare?: boolean; /** * Whether to include a link to issues and commits in the release note. See * {@link https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#linkreferences conventional-changelog-writer#linkreferences}. * @default true */ linkReferences?: unknown; /** * Keyword used to generate commit links (formatted as * <host>/<owner>/<repository>/<commit>/<commit_sha>). See * {@link https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#commit conventional-changelog-writer#commit}. * @default `commits` for Bitbucket repositories, `commit` otherwise */ commit?: unknown; /** * Keyword used to generate issue links (formatted as * <host>/<owner>/<repository>/<issue>/<issue_number>). See * {@link https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#issue conventional-changelog-writer#issue}. * @default `issue` for Bitbucket repositories, `issues` otherwise */ issue?: unknown; /** * Additional configuration passed to the * {@link https://github.com/conventional-changelog/conventional-changelog conventional-changelog} * preset. Used for example with * {@link https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits#specific-options conventional-changelog-conventionalcommits}. */ presetConfig?: unknown; } /** * A two-type PluginSpec to tie a plugin's name to its Options type. This is * intended for use by plugins to associate their Options type with their plugin * name. */ type PluginSpecTuple<P extends string = string, T = unknown> = [P, T]; type PluginSpecSRCommitAnalyzer<V extends Options = Options> = PluginSpecTuple<"@semantic-release/commit-analyzer", V>; type PluginSpecSRChangelog<V extends Record<"changelogFile" | "changelogTitle", string>> = PluginSpecTuple<"@semantic-release/changelog", V>; type PluginSpecExportData<V extends Record<string, unknown> = Record<string, unknown>> = PluginSpecTuple<"semantic-release-export-data", V>; type PluginSpecSRReleaseNotesGen<V extends SRReleaseNotesGeneratorOptions = SRReleaseNotesGeneratorOptions> = PluginSpecTuple<"@semantic-release/release-notes-generator", V>; type PluginSpecSRExec<V extends Options$1 = Options$1> = PluginSpecTuple<"@semantic-release/exec", V>; type PluginSpecSRGit<V extends Options$2 = Options$2> = PluginSpecTuple<"@semantic-release/git", V>; type PluginSpecSRGithub<V extends Options$3 = Options$3> = PluginSpecTuple<"@semantic-release/github", V>; /** * @satisfies { Readonly<PluginSpec[]> } */ declare const defaultPlugins: readonly ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/npm", "@semantic-release/github"]; /** * @see baseConfig */ declare const _baseConfig: { /** @see https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugin-options-configuration */ preset: "conventionalcommits"; branches: ["main", { name: "develop"; channel: "develop"; prerelease: true; }]; plugins: [PluginSpecSRCommitAnalyzer, PluginSpecExportData, PluginSpecSRReleaseNotesGen, PluginSpecSRChangelog<Record<"changelogFile" | "changelogTitle", string>>, PluginSpecSRGit<typeof DefaultOptions>, PluginSpecSRExec, PluginSpecSRGithub<{ addReleases: "bottom"; assets: [{ path: "./publish/*"; }]; }>] | Exclude<PluginSpec, string>[]; }; /** * The base configuration for various Semantic Release scenarios. * - Prefers preset "conventionalcommits" * (Conventional-Changelog-ConventionalCommits). * - Creates tags and release commits on "main" branch, pre-releases on * "develop" branch in "develop" channel. * - Creates GitHub Releases. * - Exports the following variables as GitHub Actions outputs: * - "new-release-published": "true" | "false" * - "new-release-version" : string * - "new-release-git-tag" : string * - includes default plugins (except `@semantic-release/npm`) and more * - `@semantic-release/commit-analyzer` * - semantic-release-export-data * - `@semantic-release/release-notes-generator` * - `@semantic-release/changelog` * - `@semantic-release/git` * - add modified CHANGELOG.md in release commit * - `@semantic-release/exec` * - does nothing by default. Included for convenience. * - `@semantic-release/github` * - uploads all files from `./publish/*`. This is non-recursive. * - adds a list of links to related release pages (e.g. the release's page on npmjs.com) * * (OPTIONAL) update static Version strings before Git plugin * - https://github.com/jpoehnelt/semantic-release-replace-plugin * - https://github.com/droidsolutions/semantic-release-update-file * @satisfies {Options} */ declare const baseConfig: typeof _baseConfig; //#endregion export { PluginSpecExportData, PluginSpecSRChangelog, PluginSpecSRCommitAnalyzer, PluginSpecSRExec, PluginSpecSRGit, PluginSpecSRGithub, PluginSpecSRReleaseNotesGen, PluginSpecTuple, SRReleaseNotesGeneratorOptions, baseConfig, defaultPlugins }; //# sourceMappingURL=semanticReleaseConfig.d.mts.map