bumpp 7.1.1 → 8.1.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/LICENSE +1 -0
- package/README.md +7 -276
- package/bin/bumpp.js +3 -3
- package/dist/chunk-DW6HTJ47.mjs +2281 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.js +2311 -64
- package/dist/cli/index.mjs +36 -52
- package/dist/index.d.ts +328 -4
- package/dist/index.js +2292 -6
- package/dist/index.mjs +15 -6
- package/package.json +39 -42
- package/dist/chunk-OYIBSTEN.mjs +0 -713
- package/dist/chunk-XF5JTHA6.js +0 -713
package/dist/cli/index.mjs
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProgressEvent,
|
|
3
|
-
|
|
3
|
+
__toESM,
|
|
4
|
+
init_esm_shims,
|
|
4
5
|
isReleaseType,
|
|
5
6
|
require_log_symbols,
|
|
6
7
|
versionBump
|
|
7
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-DW6HTJ47.mjs";
|
|
8
9
|
|
|
9
10
|
// src/cli/index.ts
|
|
10
|
-
|
|
11
|
+
init_esm_shims();
|
|
12
|
+
var import_log_symbols = __toESM(require_log_symbols());
|
|
11
13
|
|
|
12
14
|
// package.json
|
|
13
15
|
var name = "bumpp";
|
|
14
|
-
var version = "
|
|
15
|
-
var description = "
|
|
16
|
+
var version = "8.1.0";
|
|
17
|
+
var description = "Bump version, commit changes, tag, and push to Git";
|
|
16
18
|
|
|
17
19
|
// src/cli/exit-code.ts
|
|
18
|
-
|
|
19
|
-
(
|
|
20
|
+
init_esm_shims();
|
|
21
|
+
var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
20
22
|
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
|
21
23
|
ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
|
|
22
24
|
ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
|
|
23
|
-
|
|
25
|
+
return ExitCode2;
|
|
26
|
+
})(ExitCode || {});
|
|
24
27
|
|
|
25
28
|
// src/cli/help.ts
|
|
29
|
+
init_esm_shims();
|
|
26
30
|
var usageText = `
|
|
27
31
|
Usage: bumpp [release] [options] [files...]
|
|
28
32
|
|
|
@@ -99,25 +103,15 @@ ${name} v${version} - ${description}
|
|
|
99
103
|
${usageText}`;
|
|
100
104
|
|
|
101
105
|
// src/cli/parse-args.ts
|
|
102
|
-
|
|
106
|
+
init_esm_shims();
|
|
103
107
|
import { valid as isValidVersion } from "semver";
|
|
108
|
+
import cac from "cac";
|
|
104
109
|
function parseArgs(argv) {
|
|
105
110
|
try {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{ name: "push", alias: "p", type: Boolean },
|
|
111
|
-
{ name: "all", alias: "a", type: Boolean },
|
|
112
|
-
{ name: "no-verify", type: Boolean },
|
|
113
|
-
{ name: "quiet", alias: "q", type: Boolean },
|
|
114
|
-
{ name: "version", alias: "v", type: Boolean },
|
|
115
|
-
{ name: "help", alias: "h", type: Boolean },
|
|
116
|
-
{ name: "ignore-scripts", type: Boolean },
|
|
117
|
-
{ name: "execute", alias: "x", type: String },
|
|
118
|
-
{ name: "files", type: String, multiple: true, defaultOption: true }
|
|
119
|
-
], { argv });
|
|
120
|
-
let parsedArgs = {
|
|
111
|
+
const cli = cac("bumpp");
|
|
112
|
+
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", "Include all files").option("-c, --commit [msg]", "Commit message", { default: true }).option("-t, --tag [tag]", "Tag name", { default: true }).option("-p, --push", "Push to remote", { default: true }).option("-y, --yes", "Skip confirmation").option("--no-verify", "Skip git verification").option("--ignore-scripts", "Ignore scripts", { default: false }).option("-q, --quiet", "Quiet mode").option("-v, --version <version>", "Tagert version").option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
113
|
+
const args = cli.parse(argv).options;
|
|
114
|
+
const parsedArgs = {
|
|
121
115
|
help: args.help,
|
|
122
116
|
version: args.version,
|
|
123
117
|
quiet: args.quiet,
|
|
@@ -127,23 +121,15 @@ function parseArgs(argv) {
|
|
|
127
121
|
tag: args.tag,
|
|
128
122
|
push: args.push,
|
|
129
123
|
all: args.all,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
confirm: !args.yes,
|
|
125
|
+
noVerify: !args.verify,
|
|
126
|
+
files: args["--"],
|
|
127
|
+
ignoreScripts: args.ignoreScripts,
|
|
133
128
|
execute: args.execute
|
|
134
129
|
}
|
|
135
130
|
};
|
|
136
|
-
if (args.preid === null) {
|
|
137
|
-
throw new Error('The --preid option requires a value, such as "alpha", "beta", etc.');
|
|
138
|
-
}
|
|
139
|
-
if (args.commit === null) {
|
|
140
|
-
parsedArgs.options.commit = true;
|
|
141
|
-
}
|
|
142
|
-
if (args.tag === null) {
|
|
143
|
-
parsedArgs.options.tag = true;
|
|
144
|
-
}
|
|
145
131
|
if (parsedArgs.options.files && parsedArgs.options.files.length > 0) {
|
|
146
|
-
|
|
132
|
+
const firstArg = parsedArgs.options.files[0];
|
|
147
133
|
if (firstArg === "prompt" || isReleaseType(firstArg) || isValidVersion(firstArg)) {
|
|
148
134
|
parsedArgs.options.release = firstArg;
|
|
149
135
|
parsedArgs.options.files.shift();
|
|
@@ -157,7 +143,7 @@ function parseArgs(argv) {
|
|
|
157
143
|
function errorHandler(error) {
|
|
158
144
|
console.error(error.message);
|
|
159
145
|
console.error(usageText);
|
|
160
|
-
return process.exit(
|
|
146
|
+
return process.exit(9 /* InvalidArgument */);
|
|
161
147
|
}
|
|
162
148
|
|
|
163
149
|
// src/cli/index.ts
|
|
@@ -165,17 +151,16 @@ async function main(args) {
|
|
|
165
151
|
try {
|
|
166
152
|
process.on("uncaughtException", errorHandler2);
|
|
167
153
|
process.on("unhandledRejection", errorHandler2);
|
|
168
|
-
|
|
154
|
+
const { help, version: version2, quiet, options } = parseArgs(args);
|
|
169
155
|
if (help) {
|
|
170
156
|
console.log(helpText);
|
|
171
|
-
process.exit(
|
|
157
|
+
process.exit(0 /* Success */);
|
|
172
158
|
} else if (version2) {
|
|
173
159
|
console.log(version);
|
|
174
|
-
process.exit(
|
|
160
|
+
process.exit(0 /* Success */);
|
|
175
161
|
} else {
|
|
176
|
-
if (!quiet)
|
|
162
|
+
if (!quiet)
|
|
177
163
|
options.progress = progress;
|
|
178
|
-
}
|
|
179
164
|
await versionBump(options);
|
|
180
165
|
}
|
|
181
166
|
} catch (error) {
|
|
@@ -184,33 +169,32 @@ async function main(args) {
|
|
|
184
169
|
}
|
|
185
170
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
186
171
|
switch (event) {
|
|
187
|
-
case
|
|
172
|
+
case "file updated" /* FileUpdated */:
|
|
188
173
|
console.log(import_log_symbols.success, `Updated ${updatedFiles.pop()} to ${newVersion}`);
|
|
189
174
|
break;
|
|
190
|
-
case
|
|
175
|
+
case "file skipped" /* FileSkipped */:
|
|
191
176
|
console.log(import_log_symbols.info, `${skippedFiles.pop()} did not need to be updated`);
|
|
192
177
|
break;
|
|
193
|
-
case
|
|
178
|
+
case "git commit" /* GitCommit */:
|
|
194
179
|
console.log(import_log_symbols.success, "Git commit");
|
|
195
180
|
break;
|
|
196
|
-
case
|
|
181
|
+
case "git tag" /* GitTag */:
|
|
197
182
|
console.log(import_log_symbols.success, "Git tag");
|
|
198
183
|
break;
|
|
199
|
-
case
|
|
184
|
+
case "git push" /* GitPush */:
|
|
200
185
|
console.log(import_log_symbols.success, "Git push");
|
|
201
186
|
break;
|
|
202
|
-
case
|
|
187
|
+
case "npm script" /* NpmScript */:
|
|
203
188
|
console.log(import_log_symbols.success, `Npm run ${script}`);
|
|
204
189
|
break;
|
|
205
190
|
}
|
|
206
191
|
}
|
|
207
192
|
function errorHandler2(error) {
|
|
208
193
|
let message = error.message || String(error);
|
|
209
|
-
if (process.env.DEBUG || process.env.NODE_ENV === "development")
|
|
194
|
+
if (process.env.DEBUG || process.env.NODE_ENV === "development")
|
|
210
195
|
message = error.stack || message;
|
|
211
|
-
}
|
|
212
196
|
console.error(message);
|
|
213
|
-
process.exit(
|
|
197
|
+
process.exit(1 /* FatalError */);
|
|
214
198
|
}
|
|
215
199
|
export {
|
|
216
200
|
main
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,332 @@
|
|
|
1
|
+
import { ReleaseType } from 'semver';
|
|
2
|
+
export { ReleaseType } from 'semver';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Information about the work that was performed by the `versionBump()` function.
|
|
6
|
+
*/
|
|
7
|
+
interface VersionBumpResults {
|
|
8
|
+
/**
|
|
9
|
+
* The release type that was used, or `undefined` if an explicit version number was used.
|
|
10
|
+
*/
|
|
11
|
+
release?: ReleaseType;
|
|
12
|
+
/**
|
|
13
|
+
* The previous version number in package.json.
|
|
14
|
+
*/
|
|
15
|
+
oldVersion: string;
|
|
16
|
+
/**
|
|
17
|
+
* The new version number.
|
|
18
|
+
*/
|
|
19
|
+
newVersion: string;
|
|
20
|
+
/**
|
|
21
|
+
* The commit message that was used for the git commit, or `false` if no git commit was created.
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This will never be an empty string. It will always contain at least the new version number.
|
|
24
|
+
*/
|
|
25
|
+
commit: string | false;
|
|
26
|
+
/**
|
|
27
|
+
* The tag name that was used for the git tag, or `false` if no git tag was created.
|
|
28
|
+
*
|
|
29
|
+
* NOTE: This will never be an empty string. It will always contain at least the new version number.
|
|
30
|
+
*/
|
|
31
|
+
tag: string | false;
|
|
32
|
+
/**
|
|
33
|
+
* The files that were actually modified.
|
|
34
|
+
*/
|
|
35
|
+
updatedFiles: string[];
|
|
36
|
+
/**
|
|
37
|
+
* The files that were not updated because they did not contain the old version number.
|
|
38
|
+
*/
|
|
39
|
+
skippedFiles: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Progress events that indicate the progress of the `versionBump()` function.
|
|
44
|
+
*/
|
|
45
|
+
declare const enum ProgressEvent {
|
|
46
|
+
FileUpdated = "file updated",
|
|
47
|
+
FileSkipped = "file skipped",
|
|
48
|
+
GitCommit = "git commit",
|
|
49
|
+
GitTag = "git tag",
|
|
50
|
+
GitPush = "git push",
|
|
51
|
+
NpmScript = "npm script"
|
|
52
|
+
}
|
|
1
53
|
/**
|
|
2
|
-
* The
|
|
54
|
+
* The NPM version scripts
|
|
3
55
|
*
|
|
4
|
-
* @
|
|
56
|
+
* @see https://docs.npmjs.com/cli/version.html
|
|
57
|
+
*/
|
|
58
|
+
declare const enum NpmScript {
|
|
59
|
+
PreVersion = "preversion",
|
|
60
|
+
Version = "version",
|
|
61
|
+
PostVersion = "postversion"
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Information about the progress of the `versionBump()` function.
|
|
65
|
+
*/
|
|
66
|
+
interface VersionBumpProgress extends VersionBumpResults {
|
|
67
|
+
event: ProgressEvent;
|
|
68
|
+
script?: NpmScript;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Options for the `versionBump()` function.
|
|
73
|
+
*/
|
|
74
|
+
interface VersionBumpOptions {
|
|
75
|
+
/**
|
|
76
|
+
* The release version or type. Can be one of the following:
|
|
77
|
+
*
|
|
78
|
+
* - The new version number (e.g. "1.23.456")
|
|
79
|
+
* - A release type (e.g. "major", "minor", "patch", "prerelease", etc.)
|
|
80
|
+
* - "prompt" to prompt the user for the version number
|
|
81
|
+
*
|
|
82
|
+
* Defaults to "prompt".
|
|
83
|
+
*/
|
|
84
|
+
release?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The prerelease type (e.g. "alpha", "beta", "next").
|
|
87
|
+
*
|
|
88
|
+
* Defaults to "beta".
|
|
89
|
+
*/
|
|
90
|
+
preid?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Indicates whether to create a git commit. Can be set to a custom commit message string
|
|
93
|
+
* or `true` to use "release v". Any `%s` placeholders in the message string will be replaced
|
|
94
|
+
* with the new version number. If the message string does _not_ contain any `%s` placeholders,
|
|
95
|
+
* then the new version number will be appended to the message.
|
|
96
|
+
*
|
|
97
|
+
* Defaults to `false`.
|
|
98
|
+
*/
|
|
99
|
+
commit?: boolean | string;
|
|
100
|
+
/**
|
|
101
|
+
* Indicates whether to tag the git commit. Can be set to a custom tag string
|
|
102
|
+
* or `true` to use "v". Any `%s` placeholders in the tag string will be replaced
|
|
103
|
+
* with the new version number. If the tag string does _not_ contain any `%s` placeholders,
|
|
104
|
+
* then the new version number will be appended to the tag.
|
|
105
|
+
*
|
|
106
|
+
* Defaults to `false`.
|
|
107
|
+
*/
|
|
108
|
+
tag?: boolean | string;
|
|
109
|
+
/**
|
|
110
|
+
* Indicates whether to push the git commit and tag.
|
|
111
|
+
*
|
|
112
|
+
* Defaults to `false`.
|
|
113
|
+
*/
|
|
114
|
+
push?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Indicates whether the git commit should include ALL files (`git commit --all`)
|
|
117
|
+
* rather than just the files that were modified by `versionBump()`.
|
|
118
|
+
*
|
|
119
|
+
* Defaults to `false`.
|
|
120
|
+
*/
|
|
121
|
+
all?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Prompt for confirmation
|
|
124
|
+
*
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
confirm?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Indicates whether to bypass git commit hooks (`git commit --no-verify`).
|
|
130
|
+
*
|
|
131
|
+
* Defaults to `false`.
|
|
132
|
+
*/
|
|
133
|
+
noVerify?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* The files to be updated. For certain known files ("package.json", "bower.json", etc.)
|
|
136
|
+
* `versionBump()` will explicitly update the file's version number. For other files
|
|
137
|
+
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
|
|
138
|
+
* of the old version number with the new version number.
|
|
139
|
+
*
|
|
140
|
+
* Defaults to ["package.json", "package-lock.json"]
|
|
141
|
+
*/
|
|
142
|
+
files?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* The working directory, which is used as the basis for locating all files.
|
|
145
|
+
*
|
|
146
|
+
* Defaults to `process.cwd()`
|
|
147
|
+
*/
|
|
148
|
+
cwd?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Options for the command-line interface. Can be one of the following:
|
|
151
|
+
*
|
|
152
|
+
* - `true` - To default to `process.stdin` and `process.stdout`.
|
|
153
|
+
* - `false` - To disable all CLI output. Cannot be used when `release` is "prompt".
|
|
154
|
+
* - An object that will be passed to `readline.createInterface()`.
|
|
155
|
+
*
|
|
156
|
+
* Defaults to `true`.
|
|
157
|
+
*/
|
|
158
|
+
interface?: boolean | InterfaceOptions;
|
|
159
|
+
/**
|
|
160
|
+
* Indicates whether to ignore version scripts.
|
|
161
|
+
*
|
|
162
|
+
* Defaults to `false`.
|
|
163
|
+
*/
|
|
164
|
+
ignoreScripts?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* A callback that is provides information about the progress of the `versionBump()` function.
|
|
167
|
+
*/
|
|
168
|
+
progress?(progress: VersionBumpProgress): void;
|
|
169
|
+
/**
|
|
170
|
+
* Excute additional command after bumping and before commiting
|
|
171
|
+
*/
|
|
172
|
+
execute?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Options for the command-line interface.
|
|
176
|
+
*/
|
|
177
|
+
interface InterfaceOptions {
|
|
178
|
+
/**
|
|
179
|
+
* The stream that will be used to read user input. Can be one of the following:
|
|
180
|
+
*
|
|
181
|
+
* - `true` - To default to `process.stdin`
|
|
182
|
+
* - `false` - To disable all CLI input
|
|
183
|
+
* - Any readable stream
|
|
184
|
+
*
|
|
185
|
+
* Defaults to `true`.
|
|
186
|
+
*/
|
|
187
|
+
input?: NodeJS.ReadableStream | NodeJS.ReadStream | boolean;
|
|
188
|
+
/**
|
|
189
|
+
* The stream that will be used to write output, such as prompts and progress.
|
|
190
|
+
* Can be one of the following:
|
|
191
|
+
*
|
|
192
|
+
* - `true` - To default to `process.stdout`
|
|
193
|
+
* - `false` - To disable all CLI output
|
|
194
|
+
* - Any writable stream
|
|
195
|
+
*
|
|
196
|
+
* Defaults to `true`.
|
|
197
|
+
*/
|
|
198
|
+
output?: NodeJS.WritableStream | NodeJS.WriteStream | boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Any other properties will be passed directly to `readline.createInterface()`.
|
|
201
|
+
* See the `ReadLineOptions` interface for possible options.
|
|
202
|
+
*/
|
|
203
|
+
[key: string]: unknown;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
interface Interface {
|
|
207
|
+
input?: NodeJS.ReadableStream | NodeJS.ReadStream | false;
|
|
208
|
+
output?: NodeJS.WritableStream | NodeJS.WriteStream | false;
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* A specific version release.
|
|
213
|
+
*/
|
|
214
|
+
interface VersionRelease {
|
|
215
|
+
type: 'version';
|
|
216
|
+
version: string;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Prompt the user for the release number.
|
|
220
|
+
*/
|
|
221
|
+
interface PromptRelease {
|
|
222
|
+
type: 'prompt';
|
|
223
|
+
preid: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* A bump release, relative to the current version number.
|
|
227
|
+
*/
|
|
228
|
+
interface BumpRelease {
|
|
229
|
+
type: ReleaseType;
|
|
230
|
+
preid: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* One of the possible Release types.
|
|
234
|
+
*/
|
|
235
|
+
declare type Release = VersionRelease | PromptRelease | BumpRelease;
|
|
236
|
+
/**
|
|
237
|
+
* Normalized and sanitized options
|
|
238
|
+
*/
|
|
239
|
+
interface NormalizedOptions {
|
|
240
|
+
release: Release;
|
|
241
|
+
commit?: {
|
|
242
|
+
message: string;
|
|
243
|
+
noVerify: boolean;
|
|
244
|
+
all: boolean;
|
|
245
|
+
};
|
|
246
|
+
tag?: {
|
|
247
|
+
name: string;
|
|
248
|
+
};
|
|
249
|
+
push: boolean;
|
|
250
|
+
files: string[];
|
|
251
|
+
cwd: string;
|
|
252
|
+
interface: Interface;
|
|
253
|
+
ignoreScripts: boolean;
|
|
254
|
+
execute?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
interface OperationState {
|
|
258
|
+
release: ReleaseType | undefined;
|
|
259
|
+
oldVersionSource: string;
|
|
260
|
+
oldVersion: string;
|
|
261
|
+
newVersion: string;
|
|
262
|
+
commitMessage: string;
|
|
263
|
+
tagName: string;
|
|
264
|
+
updatedFiles: string[];
|
|
265
|
+
skippedFiles: string[];
|
|
266
|
+
}
|
|
267
|
+
interface UpdateOperationState extends Partial<OperationState> {
|
|
268
|
+
event?: ProgressEvent;
|
|
269
|
+
script?: NpmScript;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* All of the inputs, outputs, and state of a single `versionBump()` call.
|
|
273
|
+
*/
|
|
274
|
+
declare class Operation {
|
|
275
|
+
/**
|
|
276
|
+
* The options for this operation.
|
|
277
|
+
*/
|
|
278
|
+
options: NormalizedOptions;
|
|
279
|
+
/**
|
|
280
|
+
* The current state of the operation.
|
|
281
|
+
*/
|
|
282
|
+
readonly state: Readonly<OperationState>;
|
|
283
|
+
/**
|
|
284
|
+
* The results of the operation.
|
|
285
|
+
*/
|
|
286
|
+
get results(): VersionBumpResults;
|
|
287
|
+
/**
|
|
288
|
+
* The callback that's used to report the progress of the operation.
|
|
289
|
+
*/
|
|
290
|
+
private readonly _progress?;
|
|
291
|
+
/**
|
|
292
|
+
* Private constructor. Use the `Operation.start()` static method instead.
|
|
293
|
+
*/
|
|
294
|
+
private constructor();
|
|
295
|
+
/**
|
|
296
|
+
* Starts a new `versionBump()` operation.
|
|
297
|
+
*/
|
|
298
|
+
static start(input: VersionBumpOptions): Promise<Operation>;
|
|
299
|
+
/**
|
|
300
|
+
* Updates the operation state and results, and reports the updated progress to the user.
|
|
301
|
+
*/
|
|
302
|
+
update({ event, script, ...newState }: UpdateOperationState): this;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Prompts the user for a version number and updates package.json and package-lock.json.
|
|
307
|
+
*
|
|
308
|
+
* @returns - The new version number
|
|
309
|
+
*/
|
|
310
|
+
declare function versionBump(): Promise<VersionBumpResults>;
|
|
311
|
+
/**
|
|
312
|
+
* Bumps the version number in package.json, package-lock.json.
|
|
313
|
+
*
|
|
314
|
+
* @param release
|
|
315
|
+
* The release version or type. Can be one of the following:
|
|
316
|
+
*
|
|
317
|
+
* - The new version number (e.g. "1.23.456")
|
|
318
|
+
* - A release type (e.g. "major", "minor", "patch", "prerelease", etc.)
|
|
319
|
+
* - "prompt" to prompt the user for the version number
|
|
320
|
+
*/
|
|
321
|
+
declare function versionBump(release: string): Promise<VersionBumpResults>;
|
|
322
|
+
/**
|
|
323
|
+
* Bumps the version number in one or more files, prompting the user if necessary.
|
|
324
|
+
* Optionally also commits, tags, and pushes to git.
|
|
325
|
+
*/
|
|
326
|
+
declare function versionBump(options: VersionBumpOptions): Promise<VersionBumpResults>;
|
|
327
|
+
/**
|
|
328
|
+
* Bumps the version number in one or more files, prompting users if necessary.
|
|
5
329
|
*/
|
|
6
|
-
declare function
|
|
330
|
+
declare function versionBumpInfo(arg?: VersionBumpOptions | string): Promise<Operation>;
|
|
7
331
|
|
|
8
|
-
export {
|
|
332
|
+
export { InterfaceOptions, NpmScript, ProgressEvent, VersionBumpOptions, VersionBumpProgress, VersionBumpResults, versionBump as default, versionBump, versionBumpInfo };
|