-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import type { Config, Options, Result } from 'semantic-release'; | ||
export declare const release: (overrideOptions?: Options, overrideConfig?: Config) => Promise<Result>; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* Helper function to help the message part of the type Error | ||
*/ | ||
export declare const getSetFailedErrorString: (messageOrError: unknown) => string; | ||
//# sourceMappingURL=error.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { PluginSpec } from 'semantic-release'; | ||
import type { ReleaseRule } from './inputProcessors.js'; | ||
export declare const generatePlugins: ({ commitAssets, disableChangeLog, isNodeModule, releaseAssets, releaseRules, }: { | ||
commitAssets: string[]; | ||
disableChangeLog?: boolean | undefined; | ||
isNodeModule: boolean; | ||
releaseAssets: string[]; | ||
releaseRules: ReleaseRule[]; | ||
}) => PluginSpec[]; | ||
//# sourceMappingURL=generatePlugins.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { Options } from 'execa'; | ||
/** | ||
* Initialize local `remote` git repository in a temporary temporaryDirectory. | ||
*/ | ||
export declare const initGitRemote: () => Promise<{ | ||
cwd: string; | ||
remoteRepositoryUrl: string; | ||
}>; | ||
/** | ||
* Create a shallow clone of a git repository. The shallow will contain a | ||
* limited number of commit and no tags. | ||
*/ | ||
export declare const gitShallowClone: (repositoryUrl: string, depth?: number) => Promise<string>; | ||
/** | ||
* Create commits on the git repository present in the `cwd` option. | ||
*/ | ||
export declare const gitCommits: (messages: string[], execaOptions: Options) => Promise<void>; | ||
/** | ||
* Create a tag on the head commit on the git repository present in the `cwd` | ||
* option. | ||
*/ | ||
export declare const gitTagVersion: (tagName: string, execaOptions: Options) => Promise<void>; | ||
/** | ||
* Creates a temporary git remote repository and a git clone repository. | ||
*/ | ||
export declare const gitRepo: () => Promise<{ | ||
cwd: string; | ||
repositoryUrl: string; | ||
}>; | ||
/** | ||
* Push to the remote repository from the git repository present in the `cwd` | ||
* option. | ||
*/ | ||
export declare const gitPush: (repositoryUrl: string, branch: string, execaOptions: Options) => Promise<void>; | ||
//# sourceMappingURL=git.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { BranchSpec } from 'semantic-release'; | ||
export interface AdditionalPluginsSpec { | ||
[plugin: string]: string; | ||
} | ||
export declare enum InputParameters { | ||
AdditionalPlugins = "additional-plugins", | ||
CommitAssets = "commit-assets", | ||
ConfigFile = "config-file", | ||
DisableChangelog = "disable-changelog", | ||
DryRun = "dry-run", | ||
NodeModule = "node-module", | ||
ReleaseAssets = "release-assets", | ||
ReleaseBranches = "release-branches", | ||
ReleaseRules = "release-rules", | ||
ReleaseRulesAppend = "release-rules-append" | ||
} | ||
export interface ReleaseRule { | ||
release: string | false; | ||
scope?: string; | ||
subject?: string; | ||
type?: string; | ||
} | ||
/** | ||
* These rules extend the default rules provided by commit-analyzer. | ||
* Added rules are types supported by commitizen but not supported in standard | ||
* commit-analyzer. Rules are based on Angular contribution guidelines: | ||
* https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular#type | ||
*/ | ||
export declare const DEFAULT_RELEASE_RULES: ReleaseRule[]; | ||
export declare const processInputAdditionalPlugins: () => AdditionalPluginsSpec | undefined; | ||
export declare const processInputNodeModule: () => boolean; | ||
export declare const processInputDisableChangelog: () => boolean; | ||
export declare const processInputDryRun: () => boolean; | ||
export declare const processInputReleaseBranches: () => BranchSpec[] | undefined; | ||
export declare const processInputConfigFile: () => string | undefined; | ||
export declare const processInputReleaseRules: () => ReleaseRule[]; | ||
export declare const processInputCommitAssets: () => string[]; | ||
export declare const processInputReleaseAssets: () => string[]; | ||
//# sourceMappingURL=inputProcessors.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { AdditionalPluginsSpec } from './inputProcessors.js'; | ||
export declare const installDependencies: (additionalPlugins?: AdditionalPluginsSpec) => Promise<void>; | ||
//# sourceMappingURL=installDependencies.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { Result } from 'semantic-release'; | ||
export declare const reportResults: (result: Result) => void; | ||
//# sourceMappingURL=outputParsers.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Options } from 'semantic-release'; | ||
/** | ||
* Returns a semantic release configuration object when given a filepath. | ||
* @param filePath File path of the .yaml or .js configuration file. | ||
* @param defaultOptions Default action options that are passed to the function | ||
* exported by the .js configuration module. | ||
*/ | ||
export declare const parseConfiguration: (filePath: string, defaultOptions: Options) => Promise<object>; | ||
//# sourceMappingURL=parseConfiguration.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { Commit } from 'conventional-commits-parser'; | ||
export declare const transform: (commit: Commit) => unknown; | ||
//# sourceMappingURL=transform.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
/* eslint-disable no-duplicate-imports */ | ||
/* eslint-disable no-await-in-loop */ | ||
import { $, Options } from "execa"; | ||
import fileUrl from "file-url"; | ||
import { temporaryDirectory } from "tempy"; | ||
import type { Options } from 'execa'; | ||
import { $ } from 'execa'; | ||
import fileUrl from 'file-url'; | ||
import { temporaryDirectory } from 'tempy'; | ||
|
||
/** | ||
* Initialize local `remote` git repository in a temporary temporaryDirectory. | ||
|
@@ -28,9 +30,9 @@ export const gitShallowClone = async ( | |
const cloneWorkingDirectory = temporaryDirectory(); | ||
|
||
const gitArguments = [ | ||
"--no-hardlinks", | ||
"--no-tags", | ||
"--depth", | ||
'--no-hardlinks', | ||
'--no-tags', | ||
'--depth', | ||
depth.toString(), | ||
repositoryUrl, | ||
cloneWorkingDirectory, | ||
|
@@ -48,7 +50,7 @@ export const gitCommits = async ( | |
execaOptions: Options, | ||
): Promise<void> => { | ||
for (const message of messages) { | ||
const gitArguments = ["-m", message, "--allow-empty", "--no-gpg-sign"]; | ||
const gitArguments = ['-m', message, '--allow-empty', '--no-gpg-sign']; | ||
|
||
await $(execaOptions)`git commit ${gitArguments}`; | ||
} | ||
|
@@ -62,7 +64,7 @@ export const gitTagVersion = async ( | |
tagName: string, | ||
execaOptions: Options, | ||
): Promise<void> => { | ||
const gitArguments = ["tag", tagName]; | ||
const gitArguments = ['tag', tagName]; | ||
await $(execaOptions)`git ${gitArguments}`; | ||
}; | ||
|
||
|
@@ -79,20 +81,20 @@ export const gitRepo = async (): Promise<{ | |
const cloneWorkingDirectory = await gitShallowClone(remoteRepositoryUrl); | ||
const execaOptions = { cwd: cloneWorkingDirectory }; | ||
|
||
const gitArgumentsEmail = ["config", "user.email", "[email protected]"]; | ||
const gitArgumentsEmail = ['config', 'user.email', '[email protected]']; | ||
await $(execaOptions)`git ${gitArgumentsEmail}`; | ||
|
||
const gitArgumentsName = ["config", "user.name", "[email protected]"]; | ||
const gitArgumentsName = ['config', 'user.name', '[email protected]']; | ||
await $(execaOptions)`git ${gitArgumentsName}`; | ||
|
||
const gitArgumentsGpgSign = ["config", "commit.gpgsign", "false"]; | ||
const gitArgumentsGpgSign = ['config', 'commit.gpgsign', 'false']; | ||
await $(execaOptions)`git ${gitArgumentsGpgSign}`; | ||
await $(execaOptions)`npm init -y`; | ||
await $(execaOptions)`git add --all`; | ||
await gitCommits(["feat: initial commit"], { cwd: cloneWorkingDirectory }); | ||
await gitTagVersion("v1.0.0", { cwd: cloneWorkingDirectory }); | ||
await gitCommits(['feat: initial commit'], { cwd: cloneWorkingDirectory }); | ||
await gitTagVersion('v1.0.0', { cwd: cloneWorkingDirectory }); | ||
|
||
const gitArgumentsPush = ["push", remoteRepositoryUrl]; | ||
const gitArgumentsPush = ['push', remoteRepositoryUrl]; | ||
await $(execaOptions)`git ${gitArgumentsPush}`; | ||
|
||
return { cwd: cloneWorkingDirectory, repositoryUrl: remoteRepositoryUrl }; | ||
|
@@ -107,6 +109,6 @@ export const gitPush = async ( | |
branch: string, | ||
execaOptions: Options, | ||
): Promise<void> => { | ||
const gitPushArguments = ["--tags", repositoryUrl, `HEAD:${branch}`]; | ||
const gitPushArguments = ['--tags', repositoryUrl, `HEAD:${branch}`]; | ||
await $(execaOptions)`git push ${gitPushArguments}`; | ||
}; |