release-please 16.11.0 → 16.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/src/index.d.ts
CHANGED
package/build/src/index.js
CHANGED
|
@@ -36,6 +36,6 @@ Object.defineProperty(exports, "GitHub", { enumerable: true, get: function () {
|
|
|
36
36
|
exports.configSchema = require('../../schemas/config.json');
|
|
37
37
|
exports.manifestSchema = require('../../schemas/manifest.json');
|
|
38
38
|
// x-release-please-start-version
|
|
39
|
-
exports.VERSION = '16.
|
|
39
|
+
exports.VERSION = '16.12.0';
|
|
40
40
|
// x-release-please-end
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/build/src/manifest.js
CHANGED
|
@@ -687,7 +687,11 @@ class Manifest {
|
|
|
687
687
|
this.logger.info(`Creating ${releases.length} releases for pull #${pullRequest.number}`);
|
|
688
688
|
const duplicateReleases = [];
|
|
689
689
|
const githubReleases = [];
|
|
690
|
+
let error;
|
|
690
691
|
for (const release of releases) {
|
|
692
|
+
// stop releasing once we hit an error
|
|
693
|
+
if (error)
|
|
694
|
+
continue;
|
|
691
695
|
try {
|
|
692
696
|
githubReleases.push(await this.createRelease(release));
|
|
693
697
|
}
|
|
@@ -697,10 +701,21 @@ class Manifest {
|
|
|
697
701
|
duplicateReleases.push(err);
|
|
698
702
|
}
|
|
699
703
|
else {
|
|
700
|
-
|
|
704
|
+
error = err;
|
|
701
705
|
}
|
|
702
706
|
}
|
|
703
707
|
}
|
|
708
|
+
if (githubReleases.length > 0) {
|
|
709
|
+
// comment on pull request about the successful releases
|
|
710
|
+
const releaseList = githubReleases
|
|
711
|
+
.map(({ tagName, url }) => `- [${tagName}](${url})`)
|
|
712
|
+
.join('\n');
|
|
713
|
+
const comment = `:robot: Created releases:\n${releaseList}\n:sunflower:`;
|
|
714
|
+
await this.github.commentOnIssue(comment, pullRequest.number);
|
|
715
|
+
}
|
|
716
|
+
if (error) {
|
|
717
|
+
throw error;
|
|
718
|
+
}
|
|
704
719
|
if (duplicateReleases.length > 0) {
|
|
705
720
|
if (duplicateReleases.length + githubReleases.length ===
|
|
706
721
|
releases.length) {
|
|
@@ -726,9 +741,6 @@ class Manifest {
|
|
|
726
741
|
draft: release.draft,
|
|
727
742
|
prerelease: release.prerelease,
|
|
728
743
|
});
|
|
729
|
-
// comment on pull request
|
|
730
|
-
const comment = `:robot: Release is at ${githubRelease.url} :sunflower:`;
|
|
731
|
-
await this.github.commentOnIssue(comment, release.pullRequest.number);
|
|
732
744
|
return {
|
|
733
745
|
...githubRelease,
|
|
734
746
|
path: release.path,
|
|
@@ -35,6 +35,7 @@ export declare class PackageJson extends DefaultUpdater {
|
|
|
35
35
|
* @param {Version} newVersion The new version to update with
|
|
36
36
|
*/
|
|
37
37
|
export declare function newVersionWithRange(oldVersion: string, newVersion: Version): string;
|
|
38
|
+
export declare const NPM_PROTOCOL_REGEXP: RegExp;
|
|
38
39
|
/**
|
|
39
40
|
* Helper function to update dependency versions for all new versions specified
|
|
40
41
|
* in the updated versions map. Note that this mutates the existing input.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.updateDependencies = exports.newVersionWithRange = exports.PackageJson = void 0;
|
|
16
|
+
exports.updateDependencies = exports.NPM_PROTOCOL_REGEXP = exports.newVersionWithRange = exports.PackageJson = void 0;
|
|
17
17
|
const json_stringify_1 = require("../../util/json-stringify");
|
|
18
18
|
const logger_1 = require("../../util/logger");
|
|
19
19
|
const default_1 = require("../default");
|
|
@@ -82,6 +82,7 @@ function newVersionWithRange(oldVersion, newVersion) {
|
|
|
82
82
|
return newVersion.toString();
|
|
83
83
|
}
|
|
84
84
|
exports.newVersionWithRange = newVersionWithRange;
|
|
85
|
+
exports.NPM_PROTOCOL_REGEXP = /^[a-z]+:/;
|
|
85
86
|
/**
|
|
86
87
|
* Helper function to update dependency versions for all new versions specified
|
|
87
88
|
* in the updated versions map. Note that this mutates the existing input.
|
|
@@ -91,9 +92,12 @@ exports.newVersionWithRange = newVersionWithRange;
|
|
|
91
92
|
*/
|
|
92
93
|
function updateDependencies(dependencies, updatedVersions) {
|
|
93
94
|
for (const depName of Object.keys(dependencies)) {
|
|
95
|
+
const oldVersion = dependencies[depName];
|
|
96
|
+
if (exports.NPM_PROTOCOL_REGEXP.test(oldVersion)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
94
99
|
const newVersion = updatedVersions.get(depName);
|
|
95
100
|
if (newVersion) {
|
|
96
|
-
const oldVersion = dependencies[depName];
|
|
97
101
|
dependencies[depName] = newVersionWithRange(oldVersion, newVersion);
|
|
98
102
|
}
|
|
99
103
|
}
|
package/package.json
CHANGED