@auto-it/core
Advanced tools
Comparing version 7.0.5 to 7.0.6-canary.451.5945.0
@@ -36,3 +36,3 @@ import { ReposCreateReleaseResponse, Response } from '@octokit/rest'; | ||
onCreateLogParse: SyncHook<[LogParse]>; | ||
onCreateChangelog: SyncHook<[Changelog]>; | ||
onCreateChangelog: SyncHook<[Changelog, SEMVER | undefined]>; | ||
version: AsyncParallelHook<[SEMVER]>; | ||
@@ -56,2 +56,3 @@ afterVersion: AsyncParallelHook<[]>; | ||
semVerLabels?: Map<VersionLabel, string>; | ||
private versionBump?; | ||
constructor(options?: ApiOptions); | ||
@@ -58,0 +59,0 @@ /** |
@@ -135,4 +135,4 @@ "use strict"; | ||
this.hooks.onCreateRelease.tap('Link onCreateChangelog', function (release) { | ||
release.hooks.onCreateChangelog.tap('Link onCreateChangelog', function (changelog) { | ||
_this.hooks.onCreateChangelog.call(changelog); | ||
release.hooks.onCreateChangelog.tap('Link onCreateChangelog', function (changelog, version) { | ||
_this.hooks.onCreateChangelog.call(changelog, version); | ||
}); | ||
@@ -805,3 +805,3 @@ }); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var lastRelease; | ||
var lastRelease, bump; | ||
return __generator(this, function (_a) { | ||
@@ -816,3 +816,7 @@ switch (_a.label) { | ||
lastRelease = _a.sent(); | ||
return [2 /*return*/, this.release.getSemverBump(lastRelease)]; | ||
return [4 /*yield*/, this.release.getSemverBump(lastRelease)]; | ||
case 2: | ||
bump = _a.sent(); | ||
this.versionBump = bump; | ||
return [2 /*return*/, bump]; | ||
} | ||
@@ -843,3 +847,3 @@ }); | ||
lastRelease = _c; | ||
return [4 /*yield*/, this.release.generateReleaseNotes(lastRelease, to || undefined)]; | ||
return [4 /*yield*/, this.release.generateReleaseNotes(lastRelease, to || undefined, this.versionBump)]; | ||
case 4: | ||
@@ -885,3 +889,3 @@ releaseNotes = _d.sent(); | ||
commitsInRelease = _e.sent(); | ||
return [4 /*yield*/, this.release.generateReleaseNotes(lastRelease)]; | ||
return [4 /*yield*/, this.release.generateReleaseNotes(lastRelease, undefined, this.versionBump)]; | ||
case 3: | ||
@@ -912,3 +916,6 @@ releaseNotes = _e.sent(); | ||
: rawVersion; | ||
if (!dryRun && semver_1.eq(newVersion, lastRelease)) { | ||
if (!dryRun && | ||
semver_1.parse(newVersion) && | ||
semver_1.parse(lastRelease) && | ||
semver_1.eq(newVersion, lastRelease)) { | ||
this.logger.log.warn("Nothing released to Github. Version to be released is the same as the latest release on Github: " + newVersion); | ||
@@ -915,0 +922,0 @@ return [2 /*return*/]; |
@@ -37,3 +37,3 @@ import { AsyncSeriesBailHook, SyncHook } from 'tapable'; | ||
export interface IReleaseHooks { | ||
onCreateChangelog: SyncHook<[Changelog]>; | ||
onCreateChangelog: SyncHook<[Changelog, SEMVER | undefined]>; | ||
createChangelogTitle: AsyncSeriesBailHook<[], string | void>; | ||
@@ -59,3 +59,3 @@ onCreateLogParse: SyncHook<[LogParse]>; | ||
*/ | ||
generateReleaseNotes(from: string, to?: string): Promise<string>; | ||
generateReleaseNotes(from: string, to?: string, version?: SEMVER): Promise<string>; | ||
getCommitsInRelease(from: string, to?: string): Promise<IExtendedCommit[]>; | ||
@@ -62,0 +62,0 @@ /** |
@@ -226,3 +226,3 @@ "use strict"; | ||
*/ | ||
Release.prototype.generateReleaseNotes = function (from, to) { | ||
Release.prototype.generateReleaseNotes = function (from, to, version) { | ||
if (to === void 0) { to = 'HEAD'; } | ||
@@ -246,3 +246,3 @@ return __awaiter(this, void 0, void 0, function () { | ||
}); | ||
this.hooks.onCreateChangelog.call(changelog); | ||
this.hooks.onCreateChangelog.call(changelog, version); | ||
changelog.loadDefaultHooks(); | ||
@@ -249,0 +249,0 @@ return [2 /*return*/, changelog.generateReleaseNotes(commits)]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
onCreateRelease: new tapable_1.SyncHook(['options']), | ||
onCreateChangelog: new tapable_1.SyncHook(['changelog']), | ||
onCreateChangelog: new tapable_1.SyncHook(['changelog', 'version']), | ||
onCreateLogParse: new tapable_1.SyncHook(['logParse']), | ||
@@ -24,3 +24,3 @@ getAuthor: new tapable_1.AsyncSeriesBailHook([]), | ||
exports.makeReleaseHooks = function () { return ({ | ||
onCreateChangelog: new tapable_1.SyncHook(['changelog']), | ||
onCreateChangelog: new tapable_1.SyncHook(['changelog', 'version']), | ||
createChangelogTitle: new tapable_1.AsyncSeriesBailHook([]), | ||
@@ -27,0 +27,0 @@ onCreateLogParse: new tapable_1.SyncHook(['logParse']) |
{ | ||
"name": "@auto-it/core", | ||
"version": "7.0.5", | ||
"version": "7.0.6-canary.451.5945.0", | ||
"description": "Node API for using auto.", | ||
@@ -79,3 +79,3 @@ "main": "dist/auto.js", | ||
}, | ||
"gitHead": "72303e19e9baedc1f84749c72adfcd8427528317" | ||
"gitHead": "0aeab62179e308ef3631fecb1ab91d698ee89c4f" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
666165
9816
2