@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
21 lines • 1.52 kB
text/typescript
import { PluginSpec } from "semantic-release";
//#region src/insertPlugins.d.ts
/**
* @param plugins {@link SemanticReleaseOptions.plugins}
* @param afterPluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must follow.
* @param insertPluginIDs The `string` IDs of plugins to insert into a copy of the {@link plugins} array.
* @param beforePluginsIDs The `string` IDs of plugins that the {@link insertPluginIDs} must precede.
* @returns
* A modified copy of {@link plugins} with the given plugins inserted
* before {@link beforePluginsIDs} and after {@link afterPluginsIDs}.
*
* Inserted plugins will be a `[string, {}]` tuple.
* @throws {ReferenceError} This should never occur. One or more of the
* {@link afterPluginsIDs} had been found in {@link plugins}, but a `.find` call
* to get the highest index of the found plugins had returned `undefined`
* @throws {AggregateError} One or more error occurred when inserting plugins: `insertPlugin was instructed to insert one or more plugins after [${afterPluginsIDs.map(v => '"' + v + '"').join(', ')}] and before [${beforePluginsIDs.map(v => `"${v}"`).join(', ')}], but ${JSON.stringify(pluginIDs[indexOfLastAfter])} comes after ${JSON.stringify(pluginIDs[index])}!`
*/
declare function insertPlugin(plugins: Exclude<PluginSpec, string>[], afterPluginsIDs: string[], insertPluginIDs: string[], beforePluginsIDs: string[]): Exclude<PluginSpec, string>[];
//#endregion
export { insertPlugin };
//# sourceMappingURL=insertPlugins.d.mts.map