Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 81a2512

Browse files
chore: build dist (#665)
Build dist PR
1 parent c8f107f commit 81a2512

1 file changed

Lines changed: 111 additions & 8 deletions

File tree

dist/index.js

Lines changed: 111 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84452,12 +84452,15 @@ class DefaultChangelogNotes {
8445284452
preset.writerOpts.mainTemplate =
8445384453
this.mainTemplate || preset.writerOpts.mainTemplate;
8445484454
const changelogCommits = commits.map(commit => {
84455+
const notes = commit.notes
84456+
.filter(note => note.title === 'BREAKING CHANGE')
84457+
.map(note => replaceIssueLink(note, context.host, context.owner, context.repository));
8445584458
return {
8445684459
body: '',
8445784460
subject: htmlEscape(commit.bareMessage),
8445884461
type: commit.type,
8445984462
scope: commit.scope,
84460-
notes: commit.notes.filter(note => note.title === 'BREAKING CHANGE'),
84463+
notes,
8446184464
references: commit.references,
8446284465
mentions: [],
8446384466
merge: null,
@@ -84476,6 +84479,10 @@ class DefaultChangelogNotes {
8447684479
}
8447784480
}
8447884481
exports.DefaultChangelogNotes = DefaultChangelogNotes;
84482+
function replaceIssueLink(note, host, owner, repo) {
84483+
note.text = note.text.replace(/\(#(\d+)\)/, `([#$1](${host}/${owner}/${repo}/issues/$1))`);
84484+
return note;
84485+
}
8447984486
function htmlEscape(message) {
8448084487
return message.replace('<', '&lt;').replace('>', '&gt;');
8448184488
}
@@ -85112,11 +85119,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
8511285119
exports.getVersioningStrategyTypes = exports.unregisterVersioningStrategy = exports.registerVersioningStrategy = exports.buildVersioningStrategy = void 0;
8511385120
const default_1 = __nccwpck_require__(94073);
8511485121
const always_bump_patch_1 = __nccwpck_require__(82926);
85122+
const always_bump_minor_1 = __nccwpck_require__(9657);
85123+
const always_bump_major_1 = __nccwpck_require__(51346);
8511585124
const service_pack_1 = __nccwpck_require__(56772);
8511685125
const errors_1 = __nccwpck_require__(93637);
8511785126
const versioningTypes = {
8511885127
default: options => new default_1.DefaultVersioningStrategy(options),
8511985128
'always-bump-patch': options => new always_bump_patch_1.AlwaysBumpPatch(options),
85129+
'always-bump-minor': options => new always_bump_minor_1.AlwaysBumpMinor(options),
85130+
'always-bump-major': options => new always_bump_major_1.AlwaysBumpMajor(options),
8512085131
'service-pack': options => new service_pack_1.ServicePackVersioningStrategy(options),
8512185132
};
8512285133
function buildVersioningStrategy(options) {
@@ -88875,7 +88886,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
8887588886
return existingCandidate;
8887688887
}
8887788888
newCandidate(pkg, updatedVersions) {
88878-
var _a;
88889+
var _a, _b;
8887988890
const graphPackage = (_a = this.packageGraph) === null || _a === void 0 ? void 0 : _a.get(pkg.name);
8888088891
if (!graphPackage) {
8888188892
throw new Error(`Could not find graph package for ${pkg.name}`);
@@ -88890,8 +88901,12 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
8889088901
for (const [depName, resolved] of graphPackage.localDependencies) {
8889188902
const depVersion = updatedVersions.get(depName);
8889288903
if (depVersion && resolved.type !== 'directory') {
88893-
updatedPackage.updateLocalDependency(resolved, depVersion.toString(), '^');
88894-
this.logger.info(`${pkg.name}.${depName} updated to ^${depVersion.toString()}`);
88904+
const currentVersion = (_b = this.combineDeps(pkg)) === null || _b === void 0 ? void 0 : _b[depName];
88905+
const prefix = currentVersion
88906+
? this.detectRangePrefix(currentVersion)
88907+
: '';
88908+
updatedPackage.updateLocalDependency(resolved, depVersion.toString(), prefix);
88909+
this.logger.info(`${pkg.name}.${depName} updated to ${prefix}${depVersion.toString()}`);
8889588910
}
8889688911
}
8889788912
const dependencyNotes = getChangelogDepsNotes(pkg, updatedPackage);
@@ -89858,6 +89873,7 @@ const yaml = __nccwpck_require__(21917);
8985889873
// pubspec
8985989874
const pubspec_yaml_1 = __nccwpck_require__(62861);
8986089875
const base_1 = __nccwpck_require__(95081);
89876+
const errors_1 = __nccwpck_require__(93637);
8986189877
class Dart extends base_1.BaseStrategy {
8986289878
async buildUpdates(options) {
8986389879
const updates = [];
@@ -89892,7 +89908,15 @@ class Dart extends base_1.BaseStrategy {
8989289908
}
8989389909
async getPubspecYmlContents() {
8989489910
if (!this.pubspecYmlContents) {
89895-
this.pubspecYmlContents = await this.github.getFileContentsOnBranch(this.addPath('pubspec.yaml'), this.targetBranch);
89911+
try {
89912+
this.pubspecYmlContents = await this.github.getFileContentsOnBranch(this.addPath('pubspec.yaml'), this.targetBranch);
89913+
}
89914+
catch (e) {
89915+
if (e instanceof errors_1.FileNotFoundError) {
89916+
throw new errors_1.MissingRequiredFileError(this.addPath('pubspec.yaml'), Dart.name, `${this.repository.owner}/${this.repository.repo}`);
89917+
}
89918+
throw e;
89919+
}
8989689920
}
8989789921
return this.pubspecYmlContents;
8989889922
}
@@ -90367,6 +90391,7 @@ const yaml = __nccwpck_require__(21917);
9036790391
// helm
9036890392
const chart_yaml_1 = __nccwpck_require__(88368);
9036990393
const base_1 = __nccwpck_require__(95081);
90394+
const errors_1 = __nccwpck_require__(93637);
9037090395
class Helm extends base_1.BaseStrategy {
9037190396
async buildUpdates(options) {
9037290397
const updates = [];
@@ -90401,7 +90426,15 @@ class Helm extends base_1.BaseStrategy {
9040190426
}
9040290427
async getChartYmlContents() {
9040390428
if (!this.chartYmlContents) {
90404-
this.chartYmlContents = await this.github.getFileContents(this.addPath('Chart.yaml'));
90429+
try {
90430+
this.chartYmlContents = await this.github.getFileContents(this.addPath('Chart.yaml'));
90431+
}
90432+
catch (e) {
90433+
if (e instanceof errors_1.FileNotFoundError) {
90434+
throw new errors_1.MissingRequiredFileError(this.addPath('Chart.yaml'), Helm.name, `${this.repository.owner}/${this.repository.repo}`);
90435+
}
90436+
throw e;
90437+
}
9040590438
}
9040690439
return this.chartYmlContents;
9040790440
}
@@ -94378,7 +94411,6 @@ function getAllResourceNames() {
9437894411
];
9437994412
}
9438094413
class BranchName {
94381-
constructor(_branchName) { }
9438294414
static parse(branchName, logger = logger_1.logger) {
9438394415
try {
9438494416
const branchNameClass = getAllResourceNames().find(clazz => {
@@ -94406,6 +94438,7 @@ class BranchName {
9440694438
static ofComponentTargetBranch(component, targetBranch) {
9440794439
return new ComponentBranchName(`${RELEASE_PLEASE}--branches--${targetBranch}--components--${component}`);
9440894440
}
94441+
constructor(_branchName) { }
9440994442
static matches(_branchName) {
9441094443
return false;
9441194444
}
@@ -95459,6 +95492,76 @@ exports.Version = Version;
9545995492

9546095493
/***/ }),
9546195494

95495+
/***/ 51346:
95496+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
95497+
95498+
"use strict";
95499+
95500+
// Copyright 2022 Google LLC
95501+
//
95502+
// Licensed under the Apache License, Version 2.0 (the "License");
95503+
// you may not use this file except in compliance with the License.
95504+
// You may obtain a copy of the License at
95505+
//
95506+
// http://www.apache.org/licenses/LICENSE-2.0
95507+
//
95508+
// Unless required by applicable law or agreed to in writing, software
95509+
// distributed under the License is distributed on an "AS IS" BASIS,
95510+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
95511+
// See the License for the specific language governing permissions and
95512+
// limitations under the License.
95513+
Object.defineProperty(exports, "__esModule", ({ value: true }));
95514+
exports.AlwaysBumpMajor = void 0;
95515+
const default_1 = __nccwpck_require__(94073);
95516+
const versioning_strategy_1 = __nccwpck_require__(41941);
95517+
/**
95518+
* This VersioningStrategy always bumps the major version.
95519+
*/
95520+
class AlwaysBumpMajor extends default_1.DefaultVersioningStrategy {
95521+
determineReleaseType(_version, _commits) {
95522+
return new versioning_strategy_1.MajorVersionUpdate();
95523+
}
95524+
}
95525+
exports.AlwaysBumpMajor = AlwaysBumpMajor;
95526+
//# sourceMappingURL=always-bump-major.js.map
95527+
95528+
/***/ }),
95529+
95530+
/***/ 9657:
95531+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
95532+
95533+
"use strict";
95534+
95535+
// Copyright 2022 Google LLC
95536+
//
95537+
// Licensed under the Apache License, Version 2.0 (the "License");
95538+
// you may not use this file except in compliance with the License.
95539+
// You may obtain a copy of the License at
95540+
//
95541+
// http://www.apache.org/licenses/LICENSE-2.0
95542+
//
95543+
// Unless required by applicable law or agreed to in writing, software
95544+
// distributed under the License is distributed on an "AS IS" BASIS,
95545+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
95546+
// See the License for the specific language governing permissions and
95547+
// limitations under the License.
95548+
Object.defineProperty(exports, "__esModule", ({ value: true }));
95549+
exports.AlwaysBumpMinor = void 0;
95550+
const default_1 = __nccwpck_require__(94073);
95551+
const versioning_strategy_1 = __nccwpck_require__(41941);
95552+
/**
95553+
* This VersioningStrategy always bumps the minor version.
95554+
*/
95555+
class AlwaysBumpMinor extends default_1.DefaultVersioningStrategy {
95556+
determineReleaseType(_version, _commits) {
95557+
return new versioning_strategy_1.MinorVersionUpdate();
95558+
}
95559+
}
95560+
exports.AlwaysBumpMinor = AlwaysBumpMinor;
95561+
//# sourceMappingURL=always-bump-minor.js.map
95562+
95563+
/***/ }),
95564+
9546295565
/***/ 82926:
9546395566
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9546495567

@@ -120650,7 +120753,7 @@ module.exports = {};
120650120753
/***/ ((module) => {
120651120754

120652120755
"use strict";
120653-
module.exports = {"i8":"14.16.0"};
120756+
module.exports = {"i8":"14.17.2"};
120654120757

120655120758
/***/ }),
120656120759

0 commit comments

Comments
 (0)