@release-please-oss/release-please 0.0.0 → 17.11.3
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/LICENSE +202 -0
- package/README.md +280 -0
- package/build/src/bin/release-please.d.ts +22 -0
- package/build/src/bin/release-please.js +727 -0
- package/build/src/bootstrapper.d.ts +18 -0
- package/build/src/bootstrapper.js +64 -0
- package/build/src/changelog-notes/default.d.ts +15 -0
- package/build/src/changelog-notes/default.js +96 -0
- package/build/src/changelog-notes/github.d.ts +8 -0
- package/build/src/changelog-notes/github.js +29 -0
- package/build/src/changelog-notes.d.ts +22 -0
- package/build/src/changelog-notes.js +40 -0
- package/build/src/commit.d.ts +33 -0
- package/build/src/commit.js +422 -0
- package/build/src/errors/index.d.ts +36 -0
- package/build/src/errors/index.js +77 -0
- package/build/src/factories/changelog-notes-factory.d.ts +16 -0
- package/build/src/factories/changelog-notes-factory.js +44 -0
- package/build/src/factories/plugin-factory.d.ts +23 -0
- package/build/src/factories/plugin-factory.js +94 -0
- package/build/src/factories/versioning-strategy-factory.d.ts +16 -0
- package/build/src/factories/versioning-strategy-factory.js +52 -0
- package/build/src/factory.d.ts +18 -0
- package/build/src/factory.js +161 -0
- package/build/src/github-api.d.ts +260 -0
- package/build/src/github-api.js +714 -0
- package/build/src/github.d.ts +306 -0
- package/build/src/github.js +769 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +41 -0
- package/build/src/local-github.d.ts +270 -0
- package/build/src/local-github.js +756 -0
- package/build/src/manifest.d.ts +370 -0
- package/build/src/manifest.js +1142 -0
- package/build/src/plugin.d.ts +37 -0
- package/build/src/plugin.js +57 -0
- package/build/src/plugins/cargo-workspace.d.ts +58 -0
- package/build/src/plugins/cargo-workspace.js +339 -0
- package/build/src/plugins/group-priority.d.ts +29 -0
- package/build/src/plugins/group-priority.js +82 -0
- package/build/src/plugins/linked-versions.d.ts +36 -0
- package/build/src/plugins/linked-versions.js +137 -0
- package/build/src/plugins/maven-workspace.d.ts +81 -0
- package/build/src/plugins/maven-workspace.js +431 -0
- package/build/src/plugins/merge.d.ts +27 -0
- package/build/src/plugins/merge.js +99 -0
- package/build/src/plugins/node-workspace.d.ts +50 -0
- package/build/src/plugins/node-workspace.js +352 -0
- package/build/src/plugins/sentence-case.d.ts +19 -0
- package/build/src/plugins/sentence-case.js +80 -0
- package/build/src/plugins/workspace.d.ts +173 -0
- package/build/src/plugins/workspace.js +308 -0
- package/build/src/pull-request.d.ts +11 -0
- package/build/src/pull-request.js +16 -0
- package/build/src/release-pull-request.d.ts +14 -0
- package/build/src/release-pull-request.js +16 -0
- package/build/src/release.d.ts +7 -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/scm.d.ts +80 -0
- package/build/src/scm.js +16 -0
- package/build/src/strategies/base.d.ts +162 -0
- package/build/src/strategies/base.js +494 -0
- package/build/src/strategies/bazel.d.ts +7 -0
- package/build/src/strategies/bazel.js +49 -0
- package/build/src/strategies/dart.d.ts +8 -0
- package/build/src/strategies/dart.js +73 -0
- package/build/src/strategies/dotnet-yoshi.d.ts +13 -0
- package/build/src/strategies/dotnet-yoshi.js +109 -0
- package/build/src/strategies/elixir.d.ts +5 -0
- package/build/src/strategies/elixir.js +46 -0
- package/build/src/strategies/expo.d.ts +15 -0
- package/build/src/strategies/expo.js +51 -0
- package/build/src/strategies/go-librarian.d.ts +11 -0
- package/build/src/strategies/go-librarian.js +84 -0
- package/build/src/strategies/go-yoshi.d.ts +14 -0
- package/build/src/strategies/go-yoshi.js +168 -0
- package/build/src/strategies/go.d.ts +7 -0
- package/build/src/strategies/go.js +53 -0
- package/build/src/strategies/helm.d.ts +8 -0
- package/build/src/strategies/helm.js +73 -0
- package/build/src/strategies/java-yoshi-mono-repo.d.ts +22 -0
- package/build/src/strategies/java-yoshi-mono-repo.js +308 -0
- package/build/src/strategies/java-yoshi.d.ts +20 -0
- package/build/src/strategies/java-yoshi.js +210 -0
- package/build/src/strategies/java.d.ts +28 -0
- package/build/src/strategies/java.js +176 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/strategies/krm-blueprint.js +65 -0
- package/build/src/strategies/maven.d.ts +9 -0
- package/build/src/strategies/maven.js +56 -0
- package/build/src/strategies/node-librarian.d.ts +10 -0
- package/build/src/strategies/node-librarian.js +121 -0
- package/build/src/strategies/node.d.ts +10 -0
- package/build/src/strategies/node.js +111 -0
- package/build/src/strategies/ocaml.d.ts +5 -0
- package/build/src/strategies/ocaml.js +86 -0
- package/build/src/strategies/php-librarian.d.ts +6 -0
- package/build/src/strategies/php-librarian.js +35 -0
- package/build/src/strategies/php-yoshi.d.ts +13 -0
- package/build/src/strategies/php-yoshi.js +255 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/strategies/php.js +76 -0
- package/build/src/strategies/python-librarian.d.ts +6 -0
- package/build/src/strategies/python-librarian.js +35 -0
- package/build/src/strategies/python.d.ts +11 -0
- package/build/src/strategies/python.js +175 -0
- package/build/src/strategies/r.d.ts +8 -0
- package/build/src/strategies/r.js +67 -0
- package/build/src/strategies/ruby-librarian.d.ts +6 -0
- package/build/src/strategies/ruby-librarian.js +35 -0
- package/build/src/strategies/ruby-yoshi.d.ts +13 -0
- package/build/src/strategies/ruby-yoshi.js +97 -0
- package/build/src/strategies/ruby.d.ts +9 -0
- package/build/src/strategies/ruby.js +71 -0
- package/build/src/strategies/rust.d.ts +17 -0
- package/build/src/strategies/rust.js +149 -0
- package/build/src/strategies/sfdx.d.ts +9 -0
- package/build/src/strategies/sfdx.js +67 -0
- package/build/src/strategies/simple.d.ts +7 -0
- package/build/src/strategies/simple.js +51 -0
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/strategies/terraform-module.js +90 -0
- package/build/src/strategy.d.ts +68 -0
- package/build/src/strategy.js +16 -0
- package/build/src/update.d.ts +24 -0
- package/build/src/update.js +16 -0
- package/build/src/updaters/base-xml.d.ts +19 -0
- package/build/src/updaters/base-xml.js +43 -0
- package/build/src/updaters/bazel/module-bazel.d.ts +7 -0
- package/build/src/updaters/bazel/module-bazel.js +33 -0
- package/build/src/updaters/changelog-json.d.ts +29 -0
- package/build/src/updaters/changelog-json.js +100 -0
- package/build/src/updaters/changelog.d.ts +13 -0
- package/build/src/updaters/changelog.js +55 -0
- package/build/src/updaters/composite.d.ts +20 -0
- package/build/src/updaters/composite.js +65 -0
- package/build/src/updaters/dart/pubspec-yaml.d.ts +13 -0
- package/build/src/updaters/dart/pubspec-yaml.js +50 -0
- package/build/src/updaters/default.d.ts +21 -0
- package/build/src/updaters/default.js +36 -0
- package/build/src/updaters/dotnet/apis.d.ts +18 -0
- package/build/src/updaters/dotnet/apis.js +45 -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 +13 -0
- package/build/src/updaters/elixir/elixir-mix-exs.js +42 -0
- package/build/src/updaters/expo/app-json.d.ts +31 -0
- package/build/src/updaters/expo/app-json.js +67 -0
- package/build/src/updaters/generic-json.d.ts +14 -0
- package/build/src/updaters/generic-json.js +54 -0
- package/build/src/updaters/generic-toml.d.ts +21 -0
- package/build/src/updaters/generic-toml.js +66 -0
- package/build/src/updaters/generic-xml.d.ts +8 -0
- package/build/src/updaters/generic-xml.js +38 -0
- package/build/src/updaters/generic-yaml.d.ts +23 -0
- package/build/src/updaters/generic-yaml.js +85 -0
- package/build/src/updaters/generic.d.ts +54 -0
- package/build/src/updaters/generic.js +187 -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/helm/chart-yaml.d.ts +13 -0
- package/build/src/updaters/helm/chart-yaml.js +41 -0
- package/build/src/updaters/java/java-released.d.ts +28 -0
- package/build/src/updaters/java/java-released.js +59 -0
- package/build/src/updaters/java/java-update.d.ts +21 -0
- package/build/src/updaters/java/java-update.js +80 -0
- package/build/src/updaters/java/pom-xml.d.ts +29 -0
- package/build/src/updaters/java/pom-xml.js +135 -0
- package/build/src/updaters/java/versions-manifest.d.ts +19 -0
- package/build/src/updaters/java/versions-manifest.js +71 -0
- package/build/src/updaters/krm/krm-blueprint-version.d.ts +13 -0
- package/build/src/updaters/krm/krm-blueprint-version.js +46 -0
- package/build/src/updaters/librarian-yaml.d.ts +45 -0
- package/build/src/updaters/librarian-yaml.js +149 -0
- package/build/src/updaters/node/package-json.d.ts +46 -0
- package/build/src/updaters/node/package-json.js +106 -0
- package/build/src/updaters/node/package-lock-json.d.ts +14 -0
- package/build/src/updaters/node/package-lock-json.js +83 -0
- package/build/src/updaters/node/samples-package-json.d.ts +24 -0
- package/build/src/updaters/node/samples-package-json.js +49 -0
- package/build/src/updaters/ocaml/dune-project.d.ts +13 -0
- package/build/src/updaters/ocaml/dune-project.js +37 -0
- package/build/src/updaters/ocaml/esy-json.d.ts +13 -0
- package/build/src/updaters/ocaml/esy-json.js +37 -0
- package/build/src/updaters/ocaml/opam.d.ts +13 -0
- package/build/src/updaters/ocaml/opam.js +37 -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/root-composer-update-packages.d.ts +13 -0
- package/build/src/updaters/php/root-composer-update-packages.js +60 -0
- package/build/src/updaters/python/pyproject-toml.d.ts +29 -0
- package/build/src/updaters/python/pyproject-toml.js +53 -0
- package/build/src/updaters/python/python-file-with-version.d.ts +12 -0
- package/build/src/updaters/python/python-file-with-version.js +32 -0
- package/build/src/updaters/python/setup-cfg.d.ts +12 -0
- package/build/src/updaters/python/setup-cfg.js +32 -0
- package/build/src/updaters/python/setup-py.d.ts +12 -0
- package/build/src/updaters/python/setup-py.js +32 -0
- package/build/src/updaters/r/description.d.ts +12 -0
- package/build/src/updaters/r/description.js +32 -0
- package/build/src/updaters/r/news.d.ts +12 -0
- package/build/src/updaters/r/news.js +49 -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 +80 -0
- package/build/src/updaters/release-please-manifest.d.ts +4 -0
- package/build/src/updaters/release-please-manifest.js +34 -0
- package/build/src/updaters/ruby/common.d.ts +17 -0
- package/build/src/updaters/ruby/common.js +46 -0
- package/build/src/updaters/ruby/gemfile-lock.d.ts +24 -0
- package/build/src/updaters/ruby/gemfile-lock.js +53 -0
- package/build/src/updaters/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/ruby/version-rb.js +34 -0
- package/build/src/updaters/rust/cargo-lock.d.ts +16 -0
- package/build/src/updaters/rust/cargo-lock.js +64 -0
- package/build/src/updaters/rust/cargo-toml.d.ts +13 -0
- package/build/src/updaters/rust/cargo-toml.js +89 -0
- package/build/src/updaters/rust/common.d.ts +54 -0
- package/build/src/updaters/rust/common.js +35 -0
- package/build/src/updaters/sfdx/sfdx-project-json.d.ts +21 -0
- package/build/src/updaters/sfdx/sfdx-project-json.js +41 -0
- package/build/src/updaters/terraform/metadata-version.d.ts +13 -0
- package/build/src/updaters/terraform/metadata-version.js +37 -0
- package/build/src/updaters/terraform/module-version.d.ts +13 -0
- package/build/src/updaters/terraform/module-version.js +37 -0
- package/build/src/updaters/terraform/readme.d.ts +12 -0
- package/build/src/updaters/terraform/readme.js +32 -0
- package/build/src/util/branch-name.d.ts +20 -0
- package/build/src/util/branch-name.js +225 -0
- package/build/src/util/code-suggester/default-options-handler.d.ts +10 -0
- package/build/src/util/code-suggester/default-options-handler.js +45 -0
- package/build/src/util/code-suggester/errors.d.ts +4 -0
- package/build/src/util/code-suggester/errors.js +24 -0
- package/build/src/util/code-suggester/github/branch.d.ts +45 -0
- package/build/src/util/code-suggester/github/branch.js +118 -0
- package/build/src/util/code-suggester/github/commit-and-push.d.ts +51 -0
- package/build/src/util/code-suggester/github/commit-and-push.js +141 -0
- package/build/src/util/code-suggester/github/create-commit.d.ts +20 -0
- package/build/src/util/code-suggester/github/create-commit.js +60 -0
- package/build/src/util/code-suggester/github/fork.d.ts +15 -0
- package/build/src/util/code-suggester/github/fork.js +48 -0
- package/build/src/util/code-suggester/github/labels.d.ts +14 -0
- package/build/src/util/code-suggester/github/labels.js +42 -0
- package/build/src/util/code-suggester/github/open-pull-request.d.ts +16 -0
- package/build/src/util/code-suggester/github/open-pull-request.js +56 -0
- package/build/src/util/code-suggester/index.d.ts +28 -0
- package/build/src/util/code-suggester/index.js +110 -0
- package/build/src/util/code-suggester/logger.d.ts +4 -0
- package/build/src/util/code-suggester/logger.js +37 -0
- package/build/src/util/code-suggester/types.d.ts +109 -0
- package/build/src/util/code-suggester/types.js +30 -0
- package/build/src/util/coerce-option.d.ts +1 -0
- package/build/src/util/coerce-option.js +40 -0
- package/build/src/util/commit-exclude.d.ts +10 -0
- package/build/src/util/commit-exclude.js +49 -0
- package/build/src/util/commit-split.d.ts +26 -0
- package/build/src/util/commit-split.js +100 -0
- package/build/src/util/commit-utils.d.ts +1 -0
- package/build/src/util/commit-utils.js +34 -0
- package/build/src/util/filter-commits.d.ts +12 -0
- package/build/src/util/filter-commits.js +59 -0
- package/build/src/util/indent-commit.d.ts +2 -0
- package/build/src/util/indent-commit.js +39 -0
- package/build/src/util/json-stringify.d.ts +1 -0
- package/build/src/util/json-stringify.js +22 -0
- package/build/src/util/logger.d.ts +24 -0
- package/build/src/util/logger.js +54 -0
- package/build/src/util/pull-request-body.d.ts +25 -0
- package/build/src/util/pull-request-body.js +147 -0
- package/build/src/util/pull-request-overflow-handler.d.ts +54 -0
- package/build/src/util/pull-request-overflow-handler.js +78 -0
- package/build/src/util/pull-request-title.d.ts +22 -0
- package/build/src/util/pull-request-title.js +146 -0
- package/build/src/util/signoff-commit-message.d.ts +1 -0
- package/build/src/util/signoff-commit-message.js +35 -0
- package/build/src/util/tag-name.d.ts +10 -0
- package/build/src/util/tag-name.js +42 -0
- package/build/src/util/toml-edit.d.ts +16 -0
- package/build/src/util/toml-edit.js +126 -0
- package/build/src/version.d.ts +35 -0
- package/build/src/version.js +74 -0
- package/build/src/versioning-strategies/always-bump-major.d.ts +10 -0
- package/build/src/versioning-strategies/always-bump-major.js +28 -0
- package/build/src/versioning-strategies/always-bump-minor.d.ts +10 -0
- package/build/src/versioning-strategies/always-bump-minor.js +28 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +11 -0
- package/build/src/versioning-strategies/always-bump-patch.js +29 -0
- package/build/src/versioning-strategies/default.d.ts +48 -0
- package/build/src/versioning-strategies/default.js +102 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +15 -0
- package/build/src/versioning-strategies/dependency-manifest.js +103 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +13 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +54 -0
- package/build/src/versioning-strategies/java-snapshot.d.ts +13 -0
- package/build/src/versioning-strategies/java-snapshot.js +70 -0
- package/build/src/versioning-strategies/prerelease.d.ts +20 -0
- package/build/src/versioning-strategies/prerelease.js +163 -0
- package/build/src/versioning-strategies/service-pack.d.ts +12 -0
- package/build/src/versioning-strategies/service-pack.js +47 -0
- package/build/src/versioning-strategy.d.ts +90 -0
- package/build/src/versioning-strategy.js +82 -0
- package/package.json +113 -4
- package/schemas/config.json +513 -0
- package/schemas/manifest.json +9 -0
- package/templates/commit.hbs +2 -0
- package/templates/header.hbs +9 -0
- package/templates/template.hbs +19 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { ChangelogSection } from './changelog-notes';
|
|
2
|
+
import { Scm, ScmRelease } from './scm';
|
|
3
|
+
import { Version } from './version';
|
|
4
|
+
import { PullRequest } from './pull-request';
|
|
5
|
+
import { Logger } from './util/logger';
|
|
6
|
+
import { ReleasePullRequest } from './release-pull-request';
|
|
7
|
+
import { ReleaseType, VersioningStrategyType, ChangelogNotesType } from './factory';
|
|
8
|
+
import { Release } from './release';
|
|
9
|
+
import { ManifestPlugin } from './plugin';
|
|
10
|
+
type ExtraGenericFile = {
|
|
11
|
+
type: 'generic';
|
|
12
|
+
path: string;
|
|
13
|
+
glob?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type ExtraJsonFile = {
|
|
16
|
+
type: 'json';
|
|
17
|
+
path: string;
|
|
18
|
+
jsonpath: string;
|
|
19
|
+
glob?: boolean;
|
|
20
|
+
};
|
|
21
|
+
type ExtraYamlFile = {
|
|
22
|
+
type: 'yaml';
|
|
23
|
+
path: string;
|
|
24
|
+
jsonpath: string;
|
|
25
|
+
glob?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type ExtraXmlFile = {
|
|
28
|
+
type: 'xml';
|
|
29
|
+
path: string;
|
|
30
|
+
xpath: string;
|
|
31
|
+
glob?: boolean;
|
|
32
|
+
};
|
|
33
|
+
type ExtraPomFile = {
|
|
34
|
+
type: 'pom';
|
|
35
|
+
path: string;
|
|
36
|
+
glob?: boolean;
|
|
37
|
+
};
|
|
38
|
+
type ExtraTomlFile = {
|
|
39
|
+
type: 'toml';
|
|
40
|
+
path: string;
|
|
41
|
+
jsonpath: string;
|
|
42
|
+
glob?: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type ExtraFile = string | ExtraGenericFile | ExtraJsonFile | ExtraYamlFile | ExtraXmlFile | ExtraPomFile | ExtraTomlFile;
|
|
45
|
+
/**
|
|
46
|
+
* These are configurations provided to each strategy per-path.
|
|
47
|
+
*/
|
|
48
|
+
export interface ReleaserConfig {
|
|
49
|
+
releaseType: ReleaseType;
|
|
50
|
+
versioning?: VersioningStrategyType;
|
|
51
|
+
bumpMinorPreMajor?: boolean;
|
|
52
|
+
bumpPatchForMinorPreMajor?: boolean;
|
|
53
|
+
prereleaseType?: string;
|
|
54
|
+
releaseAs?: string;
|
|
55
|
+
skipGithubRelease?: boolean;
|
|
56
|
+
skipChangelog?: boolean;
|
|
57
|
+
draft?: boolean;
|
|
58
|
+
forceTag?: boolean;
|
|
59
|
+
prerelease?: boolean;
|
|
60
|
+
draftPullRequest?: boolean;
|
|
61
|
+
component?: string;
|
|
62
|
+
packageName?: string;
|
|
63
|
+
includeComponentInTag?: boolean;
|
|
64
|
+
includeVInTag?: boolean;
|
|
65
|
+
includeVInReleaseName?: boolean;
|
|
66
|
+
pullRequestTitlePattern?: string;
|
|
67
|
+
pullRequestHeader?: string;
|
|
68
|
+
pullRequestFooter?: string;
|
|
69
|
+
componentNoSpace?: boolean;
|
|
70
|
+
tagSeparator?: string;
|
|
71
|
+
separatePullRequests?: boolean;
|
|
72
|
+
labels?: string[];
|
|
73
|
+
releaseLabels?: string[];
|
|
74
|
+
extraLabels?: string[];
|
|
75
|
+
initialVersion?: string;
|
|
76
|
+
dateFormat?: string;
|
|
77
|
+
changelogSections?: ChangelogSection[];
|
|
78
|
+
changelogPath?: string;
|
|
79
|
+
changelogType?: ChangelogNotesType;
|
|
80
|
+
changelogHost?: string;
|
|
81
|
+
includeCommitAuthors?: boolean;
|
|
82
|
+
versionFile?: string;
|
|
83
|
+
extraFiles?: ExtraFile[];
|
|
84
|
+
snapshotLabels?: string[];
|
|
85
|
+
skipSnapshot?: boolean;
|
|
86
|
+
excludePaths?: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface CandidateReleasePullRequest {
|
|
89
|
+
path: string;
|
|
90
|
+
pullRequest: ReleasePullRequest;
|
|
91
|
+
config: ReleaserConfig;
|
|
92
|
+
}
|
|
93
|
+
export interface CandidateRelease extends Release {
|
|
94
|
+
pullRequest: PullRequest;
|
|
95
|
+
path: string;
|
|
96
|
+
draft?: boolean;
|
|
97
|
+
forceTag?: boolean;
|
|
98
|
+
prerelease?: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface ReleaserConfigJson {
|
|
101
|
+
'release-type'?: ReleaseType;
|
|
102
|
+
versioning?: VersioningStrategyType;
|
|
103
|
+
'bump-minor-pre-major'?: boolean;
|
|
104
|
+
'bump-patch-for-minor-pre-major'?: boolean;
|
|
105
|
+
'prerelease-type'?: string;
|
|
106
|
+
'changelog-sections'?: ChangelogSection[];
|
|
107
|
+
'release-as'?: string;
|
|
108
|
+
'skip-github-release'?: boolean;
|
|
109
|
+
'skip-changelog'?: boolean;
|
|
110
|
+
draft?: boolean;
|
|
111
|
+
'force-tag-creation'?: boolean;
|
|
112
|
+
prerelease?: boolean;
|
|
113
|
+
'draft-pull-request'?: boolean;
|
|
114
|
+
label?: string;
|
|
115
|
+
'release-label'?: string;
|
|
116
|
+
'extra-label'?: string;
|
|
117
|
+
'include-component-in-tag'?: boolean;
|
|
118
|
+
'include-v-in-tag'?: boolean;
|
|
119
|
+
'include-v-in-release-name'?: boolean;
|
|
120
|
+
'changelog-type'?: ChangelogNotesType;
|
|
121
|
+
'changelog-host'?: string;
|
|
122
|
+
'include-commit-authors'?: boolean;
|
|
123
|
+
'pull-request-title-pattern'?: string;
|
|
124
|
+
'pull-request-header'?: string;
|
|
125
|
+
'pull-request-footer'?: string;
|
|
126
|
+
'component-no-space'?: boolean;
|
|
127
|
+
'separate-pull-requests'?: boolean;
|
|
128
|
+
'tag-separator'?: string;
|
|
129
|
+
'extra-files'?: ExtraFile[];
|
|
130
|
+
'version-file'?: string;
|
|
131
|
+
'snapshot-label'?: string;
|
|
132
|
+
'skip-snapshot'?: boolean;
|
|
133
|
+
'initial-version'?: string;
|
|
134
|
+
'exclude-paths'?: string[];
|
|
135
|
+
'date-format'?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ManifestOptions {
|
|
138
|
+
bootstrapSha?: string;
|
|
139
|
+
lastReleaseSha?: string;
|
|
140
|
+
alwaysLinkLocal?: boolean;
|
|
141
|
+
separatePullRequests?: boolean;
|
|
142
|
+
plugins?: PluginType[];
|
|
143
|
+
fork?: boolean;
|
|
144
|
+
signoff?: string;
|
|
145
|
+
manifestPath?: string;
|
|
146
|
+
labels?: string[];
|
|
147
|
+
releaseLabels?: string[];
|
|
148
|
+
snapshotLabels?: string[];
|
|
149
|
+
skipLabeling?: boolean;
|
|
150
|
+
sequentialCalls?: boolean;
|
|
151
|
+
draft?: boolean;
|
|
152
|
+
prerelease?: boolean;
|
|
153
|
+
draftPullRequest?: boolean;
|
|
154
|
+
alwaysUpdate?: boolean;
|
|
155
|
+
groupPullRequestTitlePattern?: string;
|
|
156
|
+
releaseSearchDepth?: number;
|
|
157
|
+
commitSearchDepth?: number;
|
|
158
|
+
commitBatchSize?: number;
|
|
159
|
+
logger?: Logger;
|
|
160
|
+
dateFormat?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface ReleaserPackageConfig extends ReleaserConfigJson {
|
|
163
|
+
'package-name'?: string;
|
|
164
|
+
component?: string;
|
|
165
|
+
'changelog-path'?: string;
|
|
166
|
+
}
|
|
167
|
+
export type DirectPluginType = string;
|
|
168
|
+
export interface ConfigurablePluginType {
|
|
169
|
+
type: string;
|
|
170
|
+
}
|
|
171
|
+
export interface LinkedVersionPluginConfig extends ConfigurablePluginType {
|
|
172
|
+
type: 'linked-versions';
|
|
173
|
+
groupName: string;
|
|
174
|
+
components: string[];
|
|
175
|
+
merge?: boolean;
|
|
176
|
+
}
|
|
177
|
+
export interface SentenceCasePluginConfig extends ConfigurablePluginType {
|
|
178
|
+
specialWords?: string[];
|
|
179
|
+
}
|
|
180
|
+
export interface WorkspacePluginConfig extends ConfigurablePluginType {
|
|
181
|
+
merge?: boolean;
|
|
182
|
+
considerAllArtifacts?: boolean;
|
|
183
|
+
}
|
|
184
|
+
export interface NodeWorkspacePluginConfig extends WorkspacePluginConfig {
|
|
185
|
+
updatePeerDependencies?: boolean;
|
|
186
|
+
}
|
|
187
|
+
export interface GroupPriorityPluginConfig extends ConfigurablePluginType {
|
|
188
|
+
groups: string[];
|
|
189
|
+
}
|
|
190
|
+
export type PluginType = DirectPluginType | ConfigurablePluginType | GroupPriorityPluginConfig | LinkedVersionPluginConfig | SentenceCasePluginConfig | WorkspacePluginConfig | NodeWorkspacePluginConfig;
|
|
191
|
+
/**
|
|
192
|
+
* This is the schema of the manifest config json
|
|
193
|
+
*/
|
|
194
|
+
export interface ManifestConfig extends ReleaserConfigJson {
|
|
195
|
+
packages: Record<string, ReleaserPackageConfig>;
|
|
196
|
+
'bootstrap-sha'?: string;
|
|
197
|
+
'last-release-sha'?: string;
|
|
198
|
+
'always-link-local'?: boolean;
|
|
199
|
+
plugins?: PluginType[];
|
|
200
|
+
signoff?: string;
|
|
201
|
+
'group-pull-request-title-pattern'?: string;
|
|
202
|
+
'release-search-depth'?: number;
|
|
203
|
+
'commit-search-depth'?: number;
|
|
204
|
+
'commit-batch-size'?: number;
|
|
205
|
+
'sequential-calls'?: boolean;
|
|
206
|
+
'always-update'?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export type ReleasedVersions = Record<string, Version>;
|
|
209
|
+
export type RepositoryConfig = Record<string, ReleaserConfig>;
|
|
210
|
+
export declare const DEFAULT_RELEASE_PLEASE_CONFIG = "release-please-config.json";
|
|
211
|
+
export declare const DEFAULT_RELEASE_PLEASE_MANIFEST = ".release-please-manifest.json";
|
|
212
|
+
export declare const ROOT_PROJECT_PATH = ".";
|
|
213
|
+
export declare const DEFAULT_COMPONENT_NAME = "";
|
|
214
|
+
export declare const DEFAULT_LABELS: string[];
|
|
215
|
+
export declare const DEFAULT_RELEASE_LABELS: string[];
|
|
216
|
+
export declare const DEFAULT_SNAPSHOT_LABELS: string[];
|
|
217
|
+
export declare const SNOOZE_LABEL = "autorelease: snooze";
|
|
218
|
+
export declare const MANIFEST_PULL_REQUEST_TITLE_PATTERN = "chore: release ${branch}";
|
|
219
|
+
export interface CreatedRelease extends ScmRelease {
|
|
220
|
+
id: number;
|
|
221
|
+
path: string;
|
|
222
|
+
version: string;
|
|
223
|
+
major: number;
|
|
224
|
+
minor: number;
|
|
225
|
+
patch: number;
|
|
226
|
+
prNumber: number;
|
|
227
|
+
}
|
|
228
|
+
export declare class Manifest {
|
|
229
|
+
private repository;
|
|
230
|
+
private github;
|
|
231
|
+
readonly repositoryConfig: RepositoryConfig;
|
|
232
|
+
readonly releasedVersions: ReleasedVersions;
|
|
233
|
+
private targetBranch;
|
|
234
|
+
private separatePullRequests;
|
|
235
|
+
private alwaysUpdate;
|
|
236
|
+
readonly fork: boolean;
|
|
237
|
+
private signoffUser?;
|
|
238
|
+
private labels;
|
|
239
|
+
private skipLabeling?;
|
|
240
|
+
private sequentialCalls?;
|
|
241
|
+
private releaseLabels;
|
|
242
|
+
private snapshotLabels;
|
|
243
|
+
readonly plugins: ManifestPlugin[];
|
|
244
|
+
private _strategiesByPath?;
|
|
245
|
+
private _pathsByComponent?;
|
|
246
|
+
private manifestPath;
|
|
247
|
+
private bootstrapSha?;
|
|
248
|
+
private lastReleaseSha?;
|
|
249
|
+
private draft?;
|
|
250
|
+
private prerelease?;
|
|
251
|
+
private draftPullRequest?;
|
|
252
|
+
private groupPullRequestTitlePattern?;
|
|
253
|
+
readonly releaseSearchDepth: number;
|
|
254
|
+
readonly commitSearchDepth: number;
|
|
255
|
+
readonly commitBatchSize: number;
|
|
256
|
+
readonly logger: Logger;
|
|
257
|
+
private pullRequestOverflowHandler;
|
|
258
|
+
/**
|
|
259
|
+
* Create a Manifest from explicit config in code. This assumes that the
|
|
260
|
+
* repository has a single component at the root path.
|
|
261
|
+
*
|
|
262
|
+
* @param {GitHub} github GitHub client
|
|
263
|
+
* @param {string} targetBranch The releaseable base branch
|
|
264
|
+
* @param {RepositoryConfig} repositoryConfig Parsed configuration of path => release configuration
|
|
265
|
+
* @param {ReleasedVersions} releasedVersions Parsed versions of path => latest release version
|
|
266
|
+
* @param {ManifestOptions} manifestOptions Optional. Manifest options
|
|
267
|
+
* @param {string} manifestOptions.bootstrapSha If provided, use this SHA
|
|
268
|
+
* as the point to consider commits after
|
|
269
|
+
* @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
|
|
270
|
+
* plugin
|
|
271
|
+
* @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
|
|
272
|
+
* plugin
|
|
273
|
+
* @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
|
|
274
|
+
* requests instead of a single manifest release pull request
|
|
275
|
+
* @param {boolean} manifestOptions.alwaysUpdate If true, always updates pull requests instead of
|
|
276
|
+
* only when the release notes change
|
|
277
|
+
* @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
|
|
278
|
+
* @param {boolean} manifestOptions.fork If true, create pull requests from a fork. Defaults
|
|
279
|
+
* to `false`
|
|
280
|
+
* @param {string} manifestOptions.signoff Add a Signed-off-by annotation to the commit
|
|
281
|
+
* @param {string} manifestOptions.manifestPath Path to the versions manifest
|
|
282
|
+
* @param {string[]} manifestOptions.labels Labels that denote a pending, untagged release
|
|
283
|
+
* pull request. Defaults to `[autorelease: pending]`
|
|
284
|
+
* @param {string[]} manifestOptions.releaseLabels Labels to apply to a tagged release
|
|
285
|
+
* pull request. Defaults to `[autorelease: tagged]`
|
|
286
|
+
*/
|
|
287
|
+
constructor(github: Scm, targetBranch: string, repositoryConfig: RepositoryConfig, releasedVersions: ReleasedVersions, manifestOptions?: ManifestOptions);
|
|
288
|
+
/**
|
|
289
|
+
* Create a Manifest from config files in the repository.
|
|
290
|
+
*
|
|
291
|
+
* @param {GitHub} github GitHub client
|
|
292
|
+
* @param {string} targetBranch The releaseable base branch
|
|
293
|
+
* @param {string} configFile Optional. The path to the manifest config file
|
|
294
|
+
* @param {string} manifestFile Optional. The path to the manifest versions file
|
|
295
|
+
* @param {string} path The single path to check. Optional
|
|
296
|
+
* @returns {Manifest}
|
|
297
|
+
*/
|
|
298
|
+
static fromManifest(github: Scm, targetBranch: string, configFile?: string, manifestFile?: string, manifestOptionOverrides?: ManifestOptions, path?: string, releaseAs?: string): Promise<Manifest>;
|
|
299
|
+
/**
|
|
300
|
+
* Create a Manifest from explicit config in code. This assumes that the
|
|
301
|
+
* repository has a single component at the root path.
|
|
302
|
+
*
|
|
303
|
+
* @param {GitHub} github GitHub client
|
|
304
|
+
* @param {string} targetBranch The releaseable base branch
|
|
305
|
+
* @param {ReleaserConfig} config Release strategy options
|
|
306
|
+
* @param {ManifestOptions} manifestOptions Optional. Manifest options
|
|
307
|
+
* @param {string} manifestOptions.bootstrapSha If provided, use this SHA
|
|
308
|
+
* as the point to consider commits after
|
|
309
|
+
* @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
|
|
310
|
+
* plugin
|
|
311
|
+
* @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
|
|
312
|
+
* plugin
|
|
313
|
+
* @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
|
|
314
|
+
* requests instead of a single manifest release pull request
|
|
315
|
+
* @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
|
|
316
|
+
* @param {boolean} manifestOptions.fork If true, create pull requests from a fork. Defaults
|
|
317
|
+
* to `false`
|
|
318
|
+
* @param {string} manifestOptions.signoff Add a Signed-off-by annotation to the commit
|
|
319
|
+
* @param {string} manifestOptions.manifestPath Path to the versions manifest
|
|
320
|
+
* @param {string[]} manifestOptions.labels Labels that denote a pending, untagged release
|
|
321
|
+
* pull request. Defaults to `[autorelease: pending]`
|
|
322
|
+
* @param {string[]} manifestOptions.releaseLabels Labels to apply to a tagged release
|
|
323
|
+
* pull request. Defaults to `[autorelease: tagged]`
|
|
324
|
+
* @returns {Manifest}
|
|
325
|
+
*/
|
|
326
|
+
static fromConfig(github: Scm, targetBranch: string, config: ReleaserConfig, manifestOptions?: ManifestOptions, path?: string): Promise<Manifest>;
|
|
327
|
+
/**
|
|
328
|
+
* Build all candidate pull requests for this repository.
|
|
329
|
+
*
|
|
330
|
+
* Iterates through each path and builds a candidate pull request for component.
|
|
331
|
+
* Applies any configured plugins.
|
|
332
|
+
*
|
|
333
|
+
* @returns {ReleasePullRequest[]} The candidate pull requests to open or update.
|
|
334
|
+
*/
|
|
335
|
+
buildPullRequests(): Promise<ReleasePullRequest[]>;
|
|
336
|
+
private backfillReleasesFromTags;
|
|
337
|
+
private getAllTags;
|
|
338
|
+
/**
|
|
339
|
+
* Opens/updates all candidate release pull requests for this repository.
|
|
340
|
+
*
|
|
341
|
+
* @returns {PullRequest[]} Pull request numbers of release pull requests
|
|
342
|
+
*/
|
|
343
|
+
createPullRequests(): Promise<(PullRequest | undefined)[]>;
|
|
344
|
+
private findOpenReleasePullRequests;
|
|
345
|
+
private findSnoozedReleasePullRequests;
|
|
346
|
+
private createOrUpdatePullRequest;
|
|
347
|
+
private maybeUpdateExistingPullRequest;
|
|
348
|
+
private maybeUpdateSnoozedPullRequest;
|
|
349
|
+
private updateExistingPullRequest;
|
|
350
|
+
private findMergedReleasePullRequests;
|
|
351
|
+
/**
|
|
352
|
+
* Find merged, untagged releases and build candidate releases to tag.
|
|
353
|
+
*
|
|
354
|
+
* @returns {CandidateRelease[]} List of release candidates
|
|
355
|
+
*/
|
|
356
|
+
buildReleases(): Promise<CandidateRelease[]>;
|
|
357
|
+
/**
|
|
358
|
+
* Find merged, untagged releases. For each release, create a GitHub release,
|
|
359
|
+
* comment on the pull request used to generated it and update the pull request
|
|
360
|
+
* labels.
|
|
361
|
+
*
|
|
362
|
+
* @returns {GitHubRelease[]} List of created GitHub releases
|
|
363
|
+
*/
|
|
364
|
+
createReleases(): Promise<(CreatedRelease | undefined)[]>;
|
|
365
|
+
private createReleasesForPullRequest;
|
|
366
|
+
private createRelease;
|
|
367
|
+
private getStrategiesByPath;
|
|
368
|
+
private getPathsByComponent;
|
|
369
|
+
}
|
|
370
|
+
export {};
|