release-please 12.6.0 → 12.6.1
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/CHANGELOG.md +7 -0
- package/build/src/bootstrapper.d.ts +12 -0
- package/build/src/bootstrapper.js +60 -0
- package/build/src/changelog-notes/default.d.ts +15 -0
- package/build/src/changelog-notes/default.js +71 -0
- package/build/src/changelog-notes/github.d.ts +8 -0
- package/build/src/changelog-notes/github.js +26 -0
- package/build/src/changelog-notes.d.ts +19 -0
- package/build/src/changelog-notes.js +16 -0
- package/build/src/commit.d.ts +26 -0
- package/build/src/commit.js +316 -0
- package/build/src/github.js +1 -1
- package/build/src/plugin.d.ts +20 -0
- package/build/src/plugin.js +31 -0
- package/build/src/plugins/merge.d.ts +11 -0
- package/build/src/plugins/merge.js +83 -0
- package/build/src/plugins/workspace.d.ts +102 -0
- package/build/src/plugins/workspace.js +170 -0
- package/build/src/pull-request.d.ts +10 -0
- package/build/src/pull-request.js +16 -0
- package/build/src/release-notes.d.ts +29 -0
- package/build/src/release-notes.js +71 -0
- package/build/src/release-pull-request.d.ts +13 -0
- package/build/src/release-pull-request.js +16 -0
- package/build/src/release.d.ts +6 -0
- package/build/src/release.js +16 -0
- package/build/src/repository.d.ts +5 -0
- package/build/src/repository.js +16 -0
- package/build/src/strategies/dart.d.ts +8 -0
- package/build/src/strategies/dart.js +63 -0
- package/build/src/strategies/elixir.d.ts +5 -0
- package/build/src/strategies/elixir.js +45 -0
- package/build/src/strategies/go-yoshi.d.ts +13 -0
- package/build/src/strategies/go-yoshi.js +114 -0
- package/build/src/strategies/go.d.ts +5 -0
- package/build/src/strategies/go.js +36 -0
- package/build/src/strategies/helm.d.ts +8 -0
- package/build/src/strategies/helm.js +63 -0
- package/build/src/strategies/java-yoshi.d.ts +25 -0
- package/build/src/strategies/java-yoshi.js +259 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/strategies/krm-blueprint.js +64 -0
- package/build/src/strategies/node.d.ts +9 -0
- package/build/src/strategies/node.js +82 -0
- package/build/src/strategies/ocaml.d.ts +5 -0
- package/build/src/strategies/ocaml.js +75 -0
- package/build/src/strategies/php-yoshi.d.ts +10 -0
- package/build/src/strategies/php-yoshi.js +214 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/strategies/php.js +67 -0
- package/build/src/strategies/python.d.ts +8 -0
- package/build/src/strategies/python.js +117 -0
- package/build/src/strategies/ruby-yoshi.d.ts +17 -0
- package/build/src/strategies/ruby-yoshi.js +116 -0
- package/build/src/strategies/ruby.d.ts +13 -0
- package/build/src/strategies/ruby.js +61 -0
- package/build/src/strategies/rust.d.ts +20 -0
- package/build/src/strategies/rust.js +120 -0
- package/build/src/strategies/simple.d.ts +5 -0
- package/build/src/strategies/simple.js +45 -0
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/strategies/terraform-module.js +72 -0
- package/build/src/strategy.d.ts +103 -0
- package/build/src/strategy.js +249 -0
- package/build/src/update.d.ts +23 -0
- package/build/src/update.js +16 -0
- package/build/src/updaters/composite.d.ts +19 -0
- package/build/src/updaters/composite.js +42 -0
- package/build/src/updaters/dart/pubspec-yaml.d.ts +12 -0
- package/build/src/updaters/dart/pubspec-yaml.js +45 -0
- package/build/src/updaters/default.d.ts +21 -0
- package/build/src/updaters/default.js +36 -0
- package/build/src/updaters/dotnet/csproj.d.ts +12 -0
- package/build/src/updaters/dotnet/csproj.js +33 -0
- package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
- package/build/src/updaters/elixir/elixir-mix-exs.js +37 -0
- package/build/src/updaters/go/version-go.d.ts +4 -0
- package/build/src/updaters/go/version-go.js +24 -0
- package/build/src/updaters/java/java-update.d.ts +14 -0
- package/build/src/updaters/java/java-update.js +76 -0
- package/build/src/updaters/node/package-json.d.ts +12 -0
- package/build/src/updaters/node/package-json.js +37 -0
- package/build/src/updaters/node/package-lock-json.d.ts +8 -0
- package/build/src/updaters/node/package-lock-json.js +36 -0
- package/build/src/updaters/node/samples-package-json.d.ts +23 -0
- package/build/src/updaters/node/samples-package-json.js +49 -0
- package/build/src/updaters/php/php-client-version.d.ts +12 -0
- package/build/src/updaters/php/php-client-version.js +32 -0
- package/build/src/updaters/php/php-manifest.d.ts +13 -0
- package/build/src/updaters/php/php-manifest.js +55 -0
- package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
- package/build/src/updaters/php/root-composer-update-packages.js +47 -0
- package/build/src/updaters/raw-content.d.ts +19 -0
- package/build/src/updaters/raw-content.js +39 -0
- package/build/src/updaters/release-please-config.d.ts +8 -0
- package/build/src/updaters/release-please-config.js +41 -0
- package/build/src/updaters/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/ruby/version-rb.js +32 -0
- package/build/src/updaters/rust/cargo-toml.js +5 -1
- package/build/src/util/commit-split.d.ts +11 -0
- package/build/src/util/commit-split.js +94 -0
- package/build/src/util/pull-request-body.d.ts +20 -0
- package/build/src/util/pull-request-body.js +129 -0
- package/build/src/util/tag-name.d.ts +9 -0
- package/build/src/util/tag-name.js +41 -0
- package/build/src/util/toml-edit.d.ts +8 -0
- package/build/src/util/toml-edit.js +125 -0
- package/build/src/version.d.ts +11 -0
- package/build/src/version.js +45 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +7 -0
- package/build/src/versioning-strategies/always-bump-patch.js +25 -0
- package/build/src/versioning-strategies/default.d.ts +15 -0
- package/build/src/versioning-strategies/default.js +67 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +7 -0
- package/build/src/versioning-strategies/dependency-manifest.js +90 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +53 -0
- package/build/src/versioning-strategies/java-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-snapshot.js +67 -0
- package/build/src/versioning-strategies/service-pack.d.ts +7 -0
- package/build/src/versioning-strategies/service-pack.js +40 -0
- package/build/src/versioning-strategy.d.ts +28 -0
- package/build/src/versioning-strategy.js +55 -0
- package/package.json +2 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.JavaUpdate = void 0;
|
|
17
|
+
const default_1 = require("../default");
|
|
18
|
+
const logger_1 = require("../../util/logger");
|
|
19
|
+
const INLINE_UPDATE_REGEX = /{x-version-update:([\w\-_]+):(current|released)}/;
|
|
20
|
+
const BLOCK_START_REGEX = /{x-version-update-start:([\w\-_]+):(current|released)}/;
|
|
21
|
+
const BLOCK_END_REGEX = /{x-version-update-end}/;
|
|
22
|
+
const VERSION_REGEX = /\d+\.\d+\.\d+(-\w+(\.\d+)?)?(-SNAPSHOT)?/;
|
|
23
|
+
/**
|
|
24
|
+
* Updates a file annotated with region markers. These region markers are
|
|
25
|
+
* either denoted inline with `{x-version-update:<component-name>:current|released}`
|
|
26
|
+
* or with a `{x-version-update-start:<component-name>}` and `{x-version-update-end}`.
|
|
27
|
+
*/
|
|
28
|
+
class JavaUpdate extends default_1.DefaultUpdater {
|
|
29
|
+
/**
|
|
30
|
+
* Given initial file contents, return updated contents.
|
|
31
|
+
* @param {string} content The initial content
|
|
32
|
+
* @returns {string} The updated content
|
|
33
|
+
*/
|
|
34
|
+
updateContent(content) {
|
|
35
|
+
if (!this.versionsMap) {
|
|
36
|
+
logger_1.logger.warn('missing versions map');
|
|
37
|
+
return content;
|
|
38
|
+
}
|
|
39
|
+
const newLines = [];
|
|
40
|
+
let blockPackageName = null;
|
|
41
|
+
content.split(/\r?\n/).forEach(line => {
|
|
42
|
+
let match = line.match(INLINE_UPDATE_REGEX);
|
|
43
|
+
if (match) {
|
|
44
|
+
const newVersion = this.versionsMap.get(match[1]);
|
|
45
|
+
if (newVersion) {
|
|
46
|
+
newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
newLines.push(line);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else if (blockPackageName) {
|
|
53
|
+
const newVersion = this.versionsMap.get(blockPackageName);
|
|
54
|
+
if (newVersion) {
|
|
55
|
+
newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
newLines.push(line);
|
|
59
|
+
}
|
|
60
|
+
if (line.match(BLOCK_END_REGEX)) {
|
|
61
|
+
blockPackageName = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
match = line.match(BLOCK_START_REGEX);
|
|
66
|
+
if (match) {
|
|
67
|
+
blockPackageName = match[1];
|
|
68
|
+
}
|
|
69
|
+
newLines.push(line);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return newLines.join('\n');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.JavaUpdate = JavaUpdate;
|
|
76
|
+
//# sourceMappingURL=java-update.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* This updates a Node.js package.json file's main version.
|
|
4
|
+
*/
|
|
5
|
+
export declare class PackageJson extends DefaultUpdater {
|
|
6
|
+
/**
|
|
7
|
+
* Given initial file contents, return updated contents.
|
|
8
|
+
* @param {string} content The initial content
|
|
9
|
+
* @returns {string} The updated content
|
|
10
|
+
*/
|
|
11
|
+
updateContent(content: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PackageJson = void 0;
|
|
17
|
+
const json_stringify_1 = require("../../util/json-stringify");
|
|
18
|
+
const logger_1 = require("../../util/logger");
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* This updates a Node.js package.json file's main version.
|
|
22
|
+
*/
|
|
23
|
+
class PackageJson extends default_1.DefaultUpdater {
|
|
24
|
+
/**
|
|
25
|
+
* Given initial file contents, return updated contents.
|
|
26
|
+
* @param {string} content The initial content
|
|
27
|
+
* @returns {string} The updated content
|
|
28
|
+
*/
|
|
29
|
+
updateContent(content) {
|
|
30
|
+
const parsed = JSON.parse(content);
|
|
31
|
+
logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
|
|
32
|
+
parsed.version = this.version.toString();
|
|
33
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.PackageJson = PackageJson;
|
|
37
|
+
//# sourceMappingURL=package-json.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a Node.js package-lock.json file's version and '' package
|
|
4
|
+
* version (for a v2 lock file).
|
|
5
|
+
*/
|
|
6
|
+
export declare class PackageLockJson extends DefaultUpdater {
|
|
7
|
+
updateContent(content: string): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PackageLockJson = void 0;
|
|
17
|
+
const json_stringify_1 = require("../../util/json-stringify");
|
|
18
|
+
const logger_1 = require("../../util/logger");
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates a Node.js package-lock.json file's version and '' package
|
|
22
|
+
* version (for a v2 lock file).
|
|
23
|
+
*/
|
|
24
|
+
class PackageLockJson extends default_1.DefaultUpdater {
|
|
25
|
+
updateContent(content) {
|
|
26
|
+
const parsed = JSON.parse(content);
|
|
27
|
+
logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
|
|
28
|
+
parsed.version = this.version.toString();
|
|
29
|
+
if (parsed.lockfileVersion === 2) {
|
|
30
|
+
parsed.packages[''].version = this.version.toString();
|
|
31
|
+
}
|
|
32
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.PackageLockJson = PackageLockJson;
|
|
36
|
+
//# sourceMappingURL=package-lock-json.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DefaultUpdater, UpdateOptions } from '../default';
|
|
2
|
+
interface SamplesPackageJsonOptions extends UpdateOptions {
|
|
3
|
+
packageName: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Updates the a Node.js package.json file with the library in the
|
|
7
|
+
* dependencies section.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SamplesPackageJson extends DefaultUpdater {
|
|
10
|
+
packageName: string;
|
|
11
|
+
/**
|
|
12
|
+
* Instantiate a new SamplesPackageJson updater
|
|
13
|
+
* @param options
|
|
14
|
+
*/
|
|
15
|
+
constructor(options: SamplesPackageJsonOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Given initial file contents, return updated contents.
|
|
18
|
+
* @param {string} content The initial content
|
|
19
|
+
* @returns {string} The updated content
|
|
20
|
+
*/
|
|
21
|
+
updateContent(content: string): string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SamplesPackageJson = void 0;
|
|
17
|
+
const logger_1 = require("../../util/logger");
|
|
18
|
+
const json_stringify_1 = require("../../util/json-stringify");
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates the a Node.js package.json file with the library in the
|
|
22
|
+
* dependencies section.
|
|
23
|
+
*/
|
|
24
|
+
class SamplesPackageJson extends default_1.DefaultUpdater {
|
|
25
|
+
/**
|
|
26
|
+
* Instantiate a new SamplesPackageJson updater
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
constructor(options) {
|
|
30
|
+
super(options);
|
|
31
|
+
this.packageName = options.packageName;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Given initial file contents, return updated contents.
|
|
35
|
+
* @param {string} content The initial content
|
|
36
|
+
* @returns {string} The updated content
|
|
37
|
+
*/
|
|
38
|
+
updateContent(content) {
|
|
39
|
+
const parsed = JSON.parse(content);
|
|
40
|
+
if (!parsed.dependencies || !parsed.dependencies[this.packageName]) {
|
|
41
|
+
return content;
|
|
42
|
+
}
|
|
43
|
+
logger_1.logger.info(`updating ${this.packageName} dependency from ${parsed.dependencies[this.packageName]} to ^${this.version}`);
|
|
44
|
+
parsed.dependencies[this.packageName] = `^${this.version}`;
|
|
45
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.SamplesPackageJson = SamplesPackageJson;
|
|
49
|
+
//# sourceMappingURL=samples-package-json.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a php file that has a constant VERSION defined.
|
|
4
|
+
*/
|
|
5
|
+
export declare class PHPClientVersion extends DefaultUpdater {
|
|
6
|
+
/**
|
|
7
|
+
* Given initial file contents, return updated contents.
|
|
8
|
+
* @param {string} content The initial content
|
|
9
|
+
* @returns {string} The updated content
|
|
10
|
+
*/
|
|
11
|
+
updateContent(content: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PHPClientVersion = void 0;
|
|
17
|
+
const default_1 = require("../default");
|
|
18
|
+
/**
|
|
19
|
+
* Updates a php file that has a constant VERSION defined.
|
|
20
|
+
*/
|
|
21
|
+
class PHPClientVersion extends default_1.DefaultUpdater {
|
|
22
|
+
/**
|
|
23
|
+
* Given initial file contents, return updated contents.
|
|
24
|
+
* @param {string} content The initial content
|
|
25
|
+
* @returns {string} The updated content
|
|
26
|
+
*/
|
|
27
|
+
updateContent(content) {
|
|
28
|
+
return content.replace(/const VERSION = '[0-9]+\.[0-9]+\.[0-9]+'/, `const VERSION = '${this.version}'`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.PHPClientVersion = PHPClientVersion;
|
|
32
|
+
//# sourceMappingURL=php-client-version.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a manifest.json file.
|
|
4
|
+
* @see https://github.com/googleapis/google-cloud-php/blob/master/docs/manifest.json
|
|
5
|
+
*/
|
|
6
|
+
export declare class PHPManifest extends DefaultUpdater {
|
|
7
|
+
/**
|
|
8
|
+
* Given initial file contents, return updated contents.
|
|
9
|
+
* @param {string} content The initial content
|
|
10
|
+
* @returns {string} The updated content
|
|
11
|
+
*/
|
|
12
|
+
updateContent(content: string): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PHPManifest = void 0;
|
|
17
|
+
const logger_1 = require("../../util/logger");
|
|
18
|
+
const json_stringify_1 = require("../../util/json-stringify");
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates a manifest.json file.
|
|
22
|
+
* @see https://github.com/googleapis/google-cloud-php/blob/master/docs/manifest.json
|
|
23
|
+
*/
|
|
24
|
+
class PHPManifest extends default_1.DefaultUpdater {
|
|
25
|
+
/**
|
|
26
|
+
* Given initial file contents, return updated contents.
|
|
27
|
+
* @param {string} content The initial content
|
|
28
|
+
* @returns {string} The updated content
|
|
29
|
+
*/
|
|
30
|
+
updateContent(content) {
|
|
31
|
+
if (!this.versionsMap || this.versionsMap.size === 0) {
|
|
32
|
+
logger_1.logger.info('no updates necessary');
|
|
33
|
+
return content;
|
|
34
|
+
}
|
|
35
|
+
const parsed = JSON.parse(content);
|
|
36
|
+
parsed.modules.forEach((module) => {
|
|
37
|
+
if (!this.versionsMap)
|
|
38
|
+
return;
|
|
39
|
+
for (const [key, version] of this.versionsMap) {
|
|
40
|
+
if (module.name === key) {
|
|
41
|
+
logger_1.logger.info(`adding ${key}@${version} to manifest`);
|
|
42
|
+
module.versions.unshift(`v${version}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// the mono-repo's own API version should be added to the
|
|
46
|
+
// google/cloud key:
|
|
47
|
+
if (module.name === 'google/cloud') {
|
|
48
|
+
module.versions.unshift(`v${this.version}`);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PHPManifest = PHPManifest;
|
|
55
|
+
//# sourceMappingURL=php-manifest.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a root composer.json
|
|
4
|
+
*/
|
|
5
|
+
export declare class RootComposerUpdatePackages extends DefaultUpdater {
|
|
6
|
+
/**
|
|
7
|
+
* Given initial file contents, return updated contents.
|
|
8
|
+
* @param {string} content The initial content
|
|
9
|
+
* @returns {string} The updated content
|
|
10
|
+
*/
|
|
11
|
+
updateContent(content: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RootComposerUpdatePackages = void 0;
|
|
17
|
+
const logger_1 = require("../../util/logger");
|
|
18
|
+
const json_stringify_1 = require("../../util/json-stringify");
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates a root composer.json
|
|
22
|
+
*/
|
|
23
|
+
class RootComposerUpdatePackages extends default_1.DefaultUpdater {
|
|
24
|
+
/**
|
|
25
|
+
* Given initial file contents, return updated contents.
|
|
26
|
+
* @param {string} content The initial content
|
|
27
|
+
* @returns {string} The updated content
|
|
28
|
+
*/
|
|
29
|
+
updateContent(content) {
|
|
30
|
+
if (!this.versionsMap || this.versionsMap.size === 0) {
|
|
31
|
+
logger_1.logger.info('no updates necessary');
|
|
32
|
+
return content;
|
|
33
|
+
}
|
|
34
|
+
const parsed = JSON.parse(content);
|
|
35
|
+
if (this.versionsMap) {
|
|
36
|
+
// eslint-disable-next-line prefer-const
|
|
37
|
+
for (let [key, version] of this.versionsMap.entries()) {
|
|
38
|
+
version = version || '1.0.0';
|
|
39
|
+
logger_1.logger.info(`updating ${key} from ${parsed.replace[key]} to ${version}`);
|
|
40
|
+
parsed.replace[key] = version.toString();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.RootComposerUpdatePackages = RootComposerUpdatePackages;
|
|
47
|
+
//# sourceMappingURL=root-composer-update-packages.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Updater } from '../update';
|
|
2
|
+
/**
|
|
3
|
+
* This updater ignores previous content and writes the provided
|
|
4
|
+
* content verbatim.
|
|
5
|
+
*/
|
|
6
|
+
export declare class RawContent implements Updater {
|
|
7
|
+
rawContent: string;
|
|
8
|
+
/**
|
|
9
|
+
* Create a new RawContent instance
|
|
10
|
+
* @param {string} rawContent The raw content to set as the contents.
|
|
11
|
+
*/
|
|
12
|
+
constructor(rawContent: string);
|
|
13
|
+
/**
|
|
14
|
+
* Given initial file contents, return updated contents.
|
|
15
|
+
* @param {string} content The initial content
|
|
16
|
+
* @returns {string} The updated content
|
|
17
|
+
*/
|
|
18
|
+
updateContent(_content: string | undefined): string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RawContent = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* This updater ignores previous content and writes the provided
|
|
19
|
+
* content verbatim.
|
|
20
|
+
*/
|
|
21
|
+
class RawContent {
|
|
22
|
+
/**
|
|
23
|
+
* Create a new RawContent instance
|
|
24
|
+
* @param {string} rawContent The raw content to set as the contents.
|
|
25
|
+
*/
|
|
26
|
+
constructor(rawContent) {
|
|
27
|
+
this.rawContent = rawContent;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Given initial file contents, return updated contents.
|
|
31
|
+
* @param {string} content The initial content
|
|
32
|
+
* @returns {string} The updated content
|
|
33
|
+
*/
|
|
34
|
+
updateContent(_content) {
|
|
35
|
+
return this.rawContent;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.RawContent = RawContent;
|
|
39
|
+
//# sourceMappingURL=raw-content.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Updater } from '../update';
|
|
2
|
+
import { ReleaserConfig } from '../manifest';
|
|
3
|
+
export declare class ReleasePleaseConfig implements Updater {
|
|
4
|
+
path: string;
|
|
5
|
+
config: ReleaserConfig;
|
|
6
|
+
constructor(path: string, config: ReleaserConfig);
|
|
7
|
+
updateContent(content: string): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ReleasePleaseConfig = void 0;
|
|
17
|
+
const json_stringify_1 = require("../util/json-stringify");
|
|
18
|
+
class ReleasePleaseConfig {
|
|
19
|
+
constructor(path, config) {
|
|
20
|
+
this.path = path;
|
|
21
|
+
this.config = config;
|
|
22
|
+
}
|
|
23
|
+
updateContent(content) {
|
|
24
|
+
let parsed;
|
|
25
|
+
if (content) {
|
|
26
|
+
parsed = JSON.parse(content);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
parsed = { packages: {} };
|
|
30
|
+
}
|
|
31
|
+
parsed.packages[this.path] = this.config;
|
|
32
|
+
if (content) {
|
|
33
|
+
return json_stringify_1.jsonStringify(parsed, content);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return JSON.stringify(parsed, null, 2);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.ReleasePleaseConfig = ReleasePleaseConfig;
|
|
41
|
+
//# sourceMappingURL=release-please-config.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a versions.rb file which is expected to have a version string.
|
|
4
|
+
*/
|
|
5
|
+
export declare class VersionRB extends DefaultUpdater {
|
|
6
|
+
/**
|
|
7
|
+
* Given initial file contents, return updated contents.
|
|
8
|
+
* @param {string} content The initial content
|
|
9
|
+
* @returns {string} The updated content
|
|
10
|
+
*/
|
|
11
|
+
updateContent(content: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2019 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.VersionRB = void 0;
|
|
17
|
+
const default_1 = require("../default");
|
|
18
|
+
/**
|
|
19
|
+
* Updates a versions.rb file which is expected to have a version string.
|
|
20
|
+
*/
|
|
21
|
+
class VersionRB extends default_1.DefaultUpdater {
|
|
22
|
+
/**
|
|
23
|
+
* Given initial file contents, return updated contents.
|
|
24
|
+
* @param {string} content The initial content
|
|
25
|
+
* @returns {string} The updated content
|
|
26
|
+
*/
|
|
27
|
+
updateContent(content) {
|
|
28
|
+
return content.replace(/(["'])[0-9]+\.[0-9]+\.[0-9](-\w+)?["']/, `$1${this.version}$1`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.VersionRB = VersionRB;
|
|
32
|
+
//# sourceMappingURL=version-rb.js.map
|
|
@@ -57,7 +57,11 @@ class CargoToml {
|
|
|
57
57
|
}
|
|
58
58
|
const dep = deps[pkgName];
|
|
59
59
|
if (typeof dep === 'string' || typeof dep.path === 'undefined') {
|
|
60
|
-
logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path}`);
|
|
60
|
+
logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path} (no path set)`);
|
|
61
|
+
continue; // to next depKind
|
|
62
|
+
}
|
|
63
|
+
if (typeof dep.version === 'undefined') {
|
|
64
|
+
logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path} (no version set)`);
|
|
61
65
|
continue; // to next depKind
|
|
62
66
|
}
|
|
63
67
|
logger_1.logger.info(`updating ${this.path} ${depKind}.${pkgName} from ${dep.version} to ${pkgVersion}`);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Commit } from '../commit';
|
|
2
|
+
export interface CommitSplitOptions {
|
|
3
|
+
includeEmpty?: boolean;
|
|
4
|
+
packagePaths?: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare class CommitSplit {
|
|
7
|
+
includeEmpty: boolean;
|
|
8
|
+
packagePaths?: string[];
|
|
9
|
+
constructor(opts?: CommitSplitOptions);
|
|
10
|
+
split<T extends Commit>(commits: T[]): Record<string, T[]>;
|
|
11
|
+
}
|