release-please
Advanced tools
Comparing version 13.18.5 to 13.18.6
@@ -11,3 +11,4 @@ import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base'; | ||
private getApi; | ||
getDefaultComponent(): Promise<string | undefined>; | ||
protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>; | ||
} |
@@ -66,2 +66,7 @@ "use strict"; | ||
} | ||
async getDefaultComponent() { | ||
// default component is based on the path | ||
const pathParts = this.path.split('/'); | ||
return pathParts[pathParts.length - 1]; | ||
} | ||
async buildUpdates(options) { | ||
@@ -82,6 +87,7 @@ const updates = []; | ||
changelogEntry: options.changelogEntry, | ||
versionHeaderRegex: '\n## Version [0-9[]+', | ||
}), | ||
}); | ||
} | ||
if (!this.component) { | ||
if (!component) { | ||
logger_1.logger.warn('Dotnet strategy expects to use components, could not update all files'); | ||
@@ -93,3 +99,3 @@ return updates; | ||
createIfMissing: false, | ||
updater: new apis_1.Apis(this.component, version), | ||
updater: new apis_1.Apis(component, version), | ||
}); | ||
@@ -96,0 +102,0 @@ return updates; |
import { DefaultUpdater, UpdateOptions } from './default'; | ||
interface ChangelogOptions extends UpdateOptions { | ||
changelogEntry: string; | ||
versionHeaderRegex?: string; | ||
} | ||
export declare class Changelog extends DefaultUpdater { | ||
changelogEntry: string; | ||
readonly versionHeaderRegex: RegExp; | ||
constructor(options: ChangelogOptions); | ||
@@ -8,0 +10,0 @@ updateContent(content: string | undefined): string; |
@@ -18,6 +18,9 @@ "use strict"; | ||
const default_1 = require("./default"); | ||
const DEFAULT_VERSION_HEADER_REGEX = '\n###? v?[0-9[]'; | ||
class Changelog extends default_1.DefaultUpdater { | ||
constructor(options) { | ||
var _a; | ||
super(options); | ||
this.changelogEntry = options.changelogEntry; | ||
this.versionHeaderRegex = new RegExp((_a = options.versionHeaderRegex) !== null && _a !== void 0 ? _a : DEFAULT_VERSION_HEADER_REGEX, 's'); | ||
} | ||
@@ -27,3 +30,3 @@ updateContent(content) { | ||
// Handle both H2 (features/BREAKING CHANGES) and H3 (fixes). | ||
const lastEntryIndex = content.search(/\n###? v?[0-9[]/s); | ||
const lastEntryIndex = content.search(this.versionHeaderRegex); | ||
if (lastEntryIndex === -1) { | ||
@@ -30,0 +33,0 @@ return `${this.header()}\n${this.changelogEntry}\n`; |
{ | ||
"name": "release-please", | ||
"version": "13.18.5", | ||
"version": "13.18.6", | ||
"description": "generate release PRs based on the conventionalcommits.org spec", | ||
@@ -40,3 +40,3 @@ "main": "./build/src/index.js", | ||
"devDependencies": { | ||
"@octokit/types": "^6.1.0", | ||
"@octokit/types": "6.37.0", | ||
"@types/chai": "^4.1.7", | ||
@@ -43,0 +43,0 @@ "@types/diff": "^5.0.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
724311
13616