@auto-it/core
Advanced tools
Comparing version 10.19.0 to 10.20.0
@@ -1,6 +0,3 @@ | ||
import { AuthorInformation, RepoInformation, GithubInformation, LogOptions, ReleaseCalculationOptions } from "./types"; | ||
export interface ICreateLabelsOptions { | ||
/** Do not actually do anything */ | ||
dryRun?: boolean; | ||
} | ||
import { AuthorInformation, RepoInformation, GithubInformation, LogOptions, ReleaseCalculationOptions, AutoRc } from "./types"; | ||
export declare type ICreateLabelsOptions = DryRunOption; | ||
export interface ILabelOptions { | ||
@@ -12,3 +9,3 @@ /** PR to get the labels for */ | ||
} | ||
export interface IPRCheckOptions { | ||
export interface IPRCheckOptions extends DryRunOption { | ||
/** PR to check the label for */ | ||
@@ -20,6 +17,4 @@ pr?: number; | ||
context?: string; | ||
/** Do not actually do anything */ | ||
dryRun?: boolean; | ||
} | ||
export interface IPRStatusOptions { | ||
export interface IPRStatusOptions extends DryRunOption { | ||
/** The commit to attach a check to */ | ||
@@ -37,4 +32,2 @@ sha?: string; | ||
context: string; | ||
/** Do not actually do anything */ | ||
dryRun?: boolean; | ||
} | ||
@@ -49,6 +42,3 @@ export declare type IVersionOptions = ReleaseCalculationOptions & { | ||
} | ||
interface NoVersionPrefix { | ||
/** Whether to prefix the version with a "v" */ | ||
noVersionPrefix?: boolean; | ||
} | ||
declare type NoVersionPrefix = Pick<AutoRc, "noVersionPrefix">; | ||
export interface DryRunOption { | ||
@@ -58,6 +48,2 @@ /** Do not actually do anything */ | ||
} | ||
interface ChangelogMessage { | ||
/** The commit message to commit the changelog changes with */ | ||
message?: string; | ||
} | ||
interface ChangelogTitle { | ||
@@ -67,11 +53,4 @@ /** Override the title use in the addition to the CHANGELOG.md. */ | ||
} | ||
interface Prerelease { | ||
/** Create a prerelease */ | ||
prerelease?: boolean; | ||
} | ||
interface BaseBranch { | ||
/** The branch to treat as the base */ | ||
baseBranch?: string; | ||
} | ||
export declare type IChangelogOptions = BaseBranch & ChangelogTitle & ChangelogMessage & QuietOption & DryRunOption & NoVersionPrefix & Partial<AuthorInformation> & { | ||
declare type BaseBranch = Pick<GithubInformation, "baseBranch">; | ||
export declare type IChangelogOptions = BaseBranch & ChangelogTitle & NonNullable<AutoRc["changelog"]> & QuietOption & DryRunOption & NoVersionPrefix & Partial<AuthorInformation> & { | ||
/** Commit to start calculating the changelog from */ | ||
@@ -84,3 +63,3 @@ from?: string; | ||
}; | ||
export declare type IReleaseOptions = BaseBranch & Prerelease & DryRunOption & NoVersionPrefix & Partial<AuthorInformation> & Partial<RepoInformation> & { | ||
export declare type IReleaseOptions = BaseBranch & NonNullable<AutoRc["release"]> & DryRunOption & NoVersionPrefix & Partial<AuthorInformation> & Partial<RepoInformation> & { | ||
/** Commit to start calculating the release from */ | ||
@@ -93,3 +72,3 @@ from?: string; | ||
}; | ||
export declare type ICommentOptions = DryRunOption & { | ||
export declare type ICommentOptions = DryRunOption & NonNullable<AutoRc["comment"]> & { | ||
/** The message to use when commenting */ | ||
@@ -101,28 +80,7 @@ message?: string; | ||
context?: string; | ||
/** Delete the previous comment */ | ||
delete?: boolean; | ||
/** Instead of deleting/adding a new comment. Just edit the old one */ | ||
edit?: boolean; | ||
}; | ||
export declare type IPRBodyOptions = Omit<ICommentOptions, "edit" | "delete">; | ||
export declare type ILatestOptions = BaseBranch & DryRunOption & Partial<AuthorInformation> & Prerelease & NoVersionPrefix & ChangelogTitle & ChangelogMessage & QuietOption & ReleaseCalculationOptions & { | ||
/** Skip creating the changelog */ | ||
noChangelog?: boolean; | ||
}; | ||
export declare type IShipItOptions = ILatestOptions & { | ||
/** | ||
* Make auto publish prerelease versions when merging to baseBranch. | ||
* Only PRs merged with "release" label will generate a "latest" release. | ||
* Only use this flag if you do not want to maintain a prerelease branch, | ||
* and instead only want to use baseBranch. | ||
*/ | ||
onlyGraduateWithReleaseLabel?: boolean; | ||
}; | ||
interface ForceOption { | ||
/** Always deploy even if marked as skip release */ | ||
force?: boolean; | ||
} | ||
export declare type ICanaryOptions = QuietOption & ForceOption & { | ||
/** Do not actually do anything */ | ||
dryRun?: boolean; | ||
export declare type ILatestOptions = BaseBranch & DryRunOption & Partial<AuthorInformation> & NonNullable<AutoRc["latest"]> & NoVersionPrefix & ChangelogTitle & QuietOption & ReleaseCalculationOptions; | ||
export declare type IShipItOptions = ILatestOptions & NonNullable<AutoRc["shipit"]>; | ||
export declare type ICanaryOptions = QuietOption & NonNullable<AutoRc["canary"]> & DryRunOption & { | ||
/** THe PR to attach the canary to */ | ||
@@ -132,11 +90,4 @@ pr?: number; | ||
build?: number; | ||
/** The message used when attaching the canary version to a PR */ | ||
message?: string | "false"; | ||
}; | ||
export declare type INextOptions = QuietOption & ForceOption & { | ||
/** Do not actually do anything */ | ||
dryRun?: boolean; | ||
/** The message used when attaching the prerelease version to a PR */ | ||
message?: string; | ||
}; | ||
export declare type INextOptions = QuietOption & NonNullable<AutoRc["next"]> & DryRunOption; | ||
export interface IInfoOptions { | ||
@@ -146,8 +97,5 @@ /** List some of the available plugins */ | ||
} | ||
export declare type GlobalOptions = { | ||
/** Plugins to initialize "auto" with */ | ||
plugins?: string[]; | ||
} & Partial<GithubInformation & RepoInformation> & LogOptions; | ||
export declare type GlobalOptions = Pick<AutoRc, "plugins"> & Partial<GithubInformation & RepoInformation> & LogOptions; | ||
export declare type ApiOptions = GlobalOptions & (ILatestOptions | IInfoOptions | ICreateLabelsOptions | ILabelOptions | IPRCheckOptions | IPRStatusOptions | ICommentOptions | IChangelogOptions | IPRBodyOptions | IReleaseOptions | IVersionOptions | ICanaryOptions | IShipItOptions); | ||
export {}; | ||
//# sourceMappingURL=auto-args.d.ts.map |
@@ -426,2 +426,3 @@ import { RestEndpointMethodTypes } from "@octokit/rest"; | ||
export { default as inFolder } from "./utils/in-folder"; | ||
export { AutoRc } from "./types"; | ||
//# sourceMappingURL=auto.d.ts.map |
@@ -9,2 +9,3 @@ "use strict"; | ||
const path = tslib_1.__importStar(require("path")); | ||
const cosmiconfig_typescript_loader_1 = tslib_1.__importDefault(require("@endemolshinegroup/cosmiconfig-typescript-loader")); | ||
const release_1 = require("./release"); | ||
@@ -51,3 +52,22 @@ const try_require_1 = tslib_1.__importDefault(require("./utils/try-require")); | ||
async loadConfig() { | ||
const explorer = cosmiconfig_1.cosmiconfig("auto"); | ||
const name = "auto"; | ||
const explorer = cosmiconfig_1.cosmiconfig(name, { | ||
searchPlaces: [ | ||
"package.json", | ||
`.${name}rc`, | ||
`.${name}rc.json`, | ||
`.${name}rc.yaml`, | ||
`.${name}rc.yml`, | ||
`.${name}rc.ts`, | ||
`.${name}rc.js`, | ||
`.${name}rc.cjs`, | ||
`${name}.config.js`, | ||
`${name}.config.cjs`, | ||
`${name}.config.ts`, | ||
`${name}.config.js`, | ||
], | ||
loaders: { | ||
".ts": cosmiconfig_typescript_loader_1.default, | ||
}, | ||
}); | ||
const result = await explorer.search(); | ||
@@ -58,2 +78,5 @@ let rawConfig = {}; | ||
} | ||
if (typeof rawConfig === "function") { | ||
rawConfig = await rawConfig(); | ||
} | ||
if (rawConfig.extends) { | ||
@@ -60,0 +83,0 @@ rawConfig = deepmerge_1.default(rawConfig, await this.loadExtendConfig(rawConfig.extends)); |
import * as t from "io-ts"; | ||
import { ILabelDefinition } from "./semver"; | ||
declare const author: t.PartialC<{ | ||
@@ -67,3 +68,5 @@ /** The name and email of the author to make commits with */ | ||
comment: t.PartialC<{ | ||
/** Delete the previous comment */ | ||
delete: t.BooleanC; | ||
/** Instead of deleting/adding a new comment. Just edit the old one */ | ||
edit: t.BooleanC; | ||
@@ -73,2 +76,3 @@ }>; | ||
changelog: t.PartialC<{ | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -78,2 +82,3 @@ }>; | ||
release: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
@@ -83,5 +88,14 @@ }>; | ||
shipit: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
/** | ||
* Make auto publish prerelease versions when merging to baseBranch. | ||
* Only PRs merged with "release" label will generate a "latest" release. | ||
* Only use this flag if you do not want to maintain a prerelease branch, | ||
* and instead only want to use baseBranch. | ||
*/ | ||
onlyGraduateWithReleaseLabel: t.BooleanC; | ||
@@ -91,4 +105,7 @@ }>; | ||
latest: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -98,3 +115,5 @@ }>; | ||
canary: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the canary version to a PR */ | ||
message: t.UnionC<[t.LiteralC<false>, t.StringC]>; | ||
@@ -104,3 +123,5 @@ }>; | ||
next: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the prerelease version to a PR */ | ||
message: t.StringC; | ||
@@ -139,3 +160,5 @@ }>; | ||
comment: t.PartialC<{ | ||
/** Delete the previous comment */ | ||
delete: t.BooleanC; | ||
/** Instead of deleting/adding a new comment. Just edit the old one */ | ||
edit: t.BooleanC; | ||
@@ -145,2 +168,3 @@ }>; | ||
changelog: t.PartialC<{ | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -150,2 +174,3 @@ }>; | ||
release: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
@@ -155,5 +180,14 @@ }>; | ||
shipit: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
/** | ||
* Make auto publish prerelease versions when merging to baseBranch. | ||
* Only PRs merged with "release" label will generate a "latest" release. | ||
* Only use this flag if you do not want to maintain a prerelease branch, | ||
* and instead only want to use baseBranch. | ||
*/ | ||
onlyGraduateWithReleaseLabel: t.BooleanC; | ||
@@ -163,4 +197,7 @@ }>; | ||
latest: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -170,3 +207,5 @@ }>; | ||
canary: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the canary version to a PR */ | ||
message: t.UnionC<[t.LiteralC<false>, t.StringC]>; | ||
@@ -176,3 +215,5 @@ }>; | ||
next: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the prerelease version to a PR */ | ||
message: t.StringC; | ||
@@ -206,3 +247,6 @@ }>; | ||
}>]>]>; | ||
export declare type AutoRc = t.TypeOf<typeof autoRc>; | ||
export declare type AutoRc = t.TypeOf<typeof autoRc> & { | ||
/** Labels that power auto */ | ||
labels?: ILabelDefinition[]; | ||
}; | ||
export declare const loadedAutoRc: t.IntersectionC<[t.IntersectionC<[t.PartialC<{ | ||
@@ -237,3 +281,5 @@ /** Another auto configuration to extend */ | ||
comment: t.PartialC<{ | ||
/** Delete the previous comment */ | ||
delete: t.BooleanC; | ||
/** Instead of deleting/adding a new comment. Just edit the old one */ | ||
edit: t.BooleanC; | ||
@@ -243,2 +289,3 @@ }>; | ||
changelog: t.PartialC<{ | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -248,2 +295,3 @@ }>; | ||
release: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
@@ -253,5 +301,14 @@ }>; | ||
shipit: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
/** | ||
* Make auto publish prerelease versions when merging to baseBranch. | ||
* Only PRs merged with "release" label will generate a "latest" release. | ||
* Only use this flag if you do not want to maintain a prerelease branch, | ||
* and instead only want to use baseBranch. | ||
*/ | ||
onlyGraduateWithReleaseLabel: t.BooleanC; | ||
@@ -261,4 +318,7 @@ }>; | ||
latest: t.PartialC<{ | ||
/** Create a prerelease */ | ||
prerelease: t.BooleanC; | ||
/** Skip creating the changelog */ | ||
noChangelog: t.BooleanC; | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.StringC; | ||
@@ -268,3 +328,5 @@ }>; | ||
canary: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the canary version to a PR */ | ||
message: t.UnionC<[t.LiteralC<false>, t.StringC]>; | ||
@@ -274,3 +336,5 @@ }>; | ||
next: t.PartialC<{ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.BooleanC; | ||
/** The message used when attaching the prerelease version to a PR */ | ||
message: t.StringC; | ||
@@ -277,0 +341,0 @@ }>; |
@@ -57,3 +57,5 @@ "use strict"; | ||
comment: t.partial({ | ||
/** Delete the previous comment */ | ||
delete: t.boolean, | ||
/** Instead of deleting/adding a new comment. Just edit the old one */ | ||
edit: t.boolean, | ||
@@ -63,2 +65,3 @@ }), | ||
changelog: t.partial({ | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.string, | ||
@@ -68,2 +71,3 @@ }), | ||
release: t.partial({ | ||
/** Create a prerelease */ | ||
prerelease: t.boolean, | ||
@@ -73,5 +77,14 @@ }), | ||
shipit: t.partial({ | ||
/** Create a prerelease */ | ||
prerelease: t.boolean, | ||
/** Skip creating the changelog */ | ||
noChangelog: t.boolean, | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.string, | ||
/** | ||
* Make auto publish prerelease versions when merging to baseBranch. | ||
* Only PRs merged with "release" label will generate a "latest" release. | ||
* Only use this flag if you do not want to maintain a prerelease branch, | ||
* and instead only want to use baseBranch. | ||
*/ | ||
onlyGraduateWithReleaseLabel: t.boolean, | ||
@@ -81,4 +94,7 @@ }), | ||
latest: t.partial({ | ||
/** Create a prerelease */ | ||
prerelease: t.boolean, | ||
/** Skip creating the changelog */ | ||
noChangelog: t.boolean, | ||
/** The commit message to commit the changelog changes with */ | ||
message: t.string, | ||
@@ -88,3 +104,5 @@ }), | ||
canary: t.partial({ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.boolean, | ||
/** The message used when attaching the canary version to a PR */ | ||
message: t.union([t.literal(false), t.string]), | ||
@@ -94,3 +112,5 @@ }), | ||
next: t.partial({ | ||
/** Always deploy even if marked as skip release */ | ||
force: t.boolean, | ||
/** The message used when attaching the prerelease version to a PR */ | ||
message: t.string, | ||
@@ -97,0 +117,0 @@ }), |
{ | ||
"name": "@auto-it/core", | ||
"version": "10.19.0", | ||
"version": "10.20.0", | ||
"description": "Node API for using auto.", | ||
@@ -40,3 +40,4 @@ "main": "dist/auto.js", | ||
"dependencies": { | ||
"@auto-it/bot-list": "10.19.0", | ||
"@auto-it/bot-list": "10.20.0", | ||
"@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2", | ||
"@octokit/plugin-enterprise-compatibility": "^1.2.2", | ||
@@ -93,3 +94,3 @@ "@octokit/plugin-retry": "^3.0.1", | ||
}, | ||
"gitHead": "86e294fd534972a425cdc88d9d4aeeaec498575a" | ||
"gitHead": "25f2f0280ed16f14d62198dc0d6e4b5d5f6d1412" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1214594
16233
38
+ Added@endemolshinegroup/cosmiconfig-typescript-loader@^3.0.2
+ Added@auto-it/bot-list@10.20.0(transitive)
+ Added@endemolshinegroup/cosmiconfig-typescript-loader@3.0.2(transitive)
+ Addedlodash.get@4.4.2(transitive)
- Removed@auto-it/bot-list@10.19.0(transitive)
Updated@auto-it/bot-list@10.20.0