@auto-it/core
Advanced tools
Comparing version 10.14.2 to 10.15.0
@@ -1036,2 +1036,23 @@ "use strict"; | ||
}); | ||
test("can --force release", async () => { | ||
const auto = new auto_1.Auto(Object.assign(Object.assign({}, defaults), { plugins: [] })); | ||
// @ts-ignore | ||
auto.checkClean = () => Promise.resolve(true); | ||
auto.logger = logger_1.dummyLog(); | ||
await auto.loadConfig(); | ||
auto.remote = "origin"; | ||
auto.git.publish = () => Promise.resolve({ data: {} }); | ||
auto.git.getLastTagNotInBaseBranch = () => Promise.reject(new Error("Test")); | ||
auto.git.getLatestTagInBranch = () => Promise.reject(new Error("Test")); | ||
auto.git.getLatestRelease = () => Promise.resolve("abcd"); | ||
auto.release.generateReleaseNotes = () => Promise.resolve("notes"); | ||
auto.release.getCommitsInRelease = () => Promise.resolve([ | ||
make_commit_from_msg_1.default("Test Commit", { labels: ["skip-release"] }), | ||
]); | ||
const next = jest.fn(); | ||
auto.hooks.next.tap("test", next); | ||
jest.spyOn(auto.release, "getCommits").mockImplementation(); | ||
await auto.next({ force: true }); | ||
expect(next).toHaveBeenCalled(); | ||
}); | ||
}); | ||
@@ -1038,0 +1059,0 @@ describe("shipit", () => { |
@@ -112,3 +112,7 @@ import { AuthorInformation, RepoInformation, GithubInformation, LogOptions, ReleaseCalculationOptions } from "./types"; | ||
}; | ||
export declare type ICanaryOptions = QuietOption & { | ||
interface ForceOption { | ||
/** Always deploy even if marked as skip release */ | ||
force?: boolean; | ||
} | ||
export declare type ICanaryOptions = QuietOption & ForceOption & { | ||
/** Do not actually do anything */ | ||
@@ -122,6 +126,4 @@ dryRun?: boolean; | ||
message?: string | "false"; | ||
/** Always deploy a canary, even if the PR is marked as skip release */ | ||
force?: boolean; | ||
}; | ||
export declare type INextOptions = QuietOption & { | ||
export declare type INextOptions = QuietOption & ForceOption & { | ||
/** Do not actually do anything */ | ||
@@ -128,0 +130,0 @@ dryRun?: boolean; |
@@ -284,2 +284,3 @@ import { RestEndpointMethodTypes } from "@octokit/rest"; | ||
next?: { | ||
force?: boolean | undefined; | ||
message?: string | undefined; | ||
@@ -286,0 +287,0 @@ } | undefined; |
@@ -98,2 +98,3 @@ import * as t from "io-ts"; | ||
next: t.PartialC<{ | ||
force: t.BooleanC; | ||
message: t.StringC; | ||
@@ -163,2 +164,3 @@ }>; | ||
next: t.PartialC<{ | ||
force: t.BooleanC; | ||
message: t.StringC; | ||
@@ -253,2 +255,3 @@ }>; | ||
next: t.PartialC<{ | ||
force: t.BooleanC; | ||
message: t.StringC; | ||
@@ -255,0 +258,0 @@ }>; |
@@ -88,2 +88,3 @@ "use strict"; | ||
next: t.partial({ | ||
force: t.boolean, | ||
message: t.string, | ||
@@ -90,0 +91,0 @@ }), |
{ | ||
"name": "@auto-it/core", | ||
"version": "10.14.2", | ||
"version": "10.15.0", | ||
"description": "Node API for using auto.", | ||
@@ -40,3 +40,3 @@ "main": "dist/auto.js", | ||
"dependencies": { | ||
"@auto-it/bot-list": "10.14.2", | ||
"@auto-it/bot-list": "10.15.0", | ||
"@octokit/plugin-enterprise-compatibility": "^1.2.2", | ||
@@ -92,3 +92,3 @@ "@octokit/plugin-retry": "^3.0.1", | ||
}, | ||
"gitHead": "887664cabcb02c276cdaaf77cfa087c24e7ec50e" | ||
"gitHead": "354318bc71a24348348b45fc88b0a89c22b71029" | ||
} |
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 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
1178259
15918
+ Added@auto-it/bot-list@10.15.0(transitive)
- Removed@auto-it/bot-list@10.14.2(transitive)
Updated@auto-it/bot-list@10.15.0