bumpp 8.0.0 → 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.
@@ -5,7 +5,7 @@ import {
5
5
  isReleaseType,
6
6
  require_log_symbols,
7
7
  versionBump
8
- } from "../chunk-HM6FRF4P.mjs";
8
+ } from "../chunk-DW6HTJ47.mjs";
9
9
 
10
10
  // src/cli/index.ts
11
11
  init_esm_shims();
@@ -13,8 +13,8 @@ var import_log_symbols = __toESM(require_log_symbols());
13
13
 
14
14
  // package.json
15
15
  var name = "bumpp";
16
- var version = "8.0.0";
17
- var description = "Automatically (or with prompts) bump your version number, commit changes, tag, and push to Git";
16
+ var version = "8.1.0";
17
+ var description = "Bump version, commit changes, tag, and push to Git";
18
18
 
19
19
  // src/cli/exit-code.ts
20
20
  init_esm_shims();
package/dist/index.d.ts CHANGED
@@ -203,6 +203,105 @@ interface InterfaceOptions {
203
203
  [key: string]: unknown;
204
204
  }
205
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
+
206
305
  /**
207
306
  * Prompts the user for a version number and updates package.json and package-lock.json.
208
307
  *
@@ -225,5 +324,9 @@ declare function versionBump(release: string): Promise<VersionBumpResults>;
225
324
  * Optionally also commits, tags, and pushes to git.
226
325
  */
227
326
  declare function versionBump(options: VersionBumpOptions): Promise<VersionBumpResults>;
327
+ /**
328
+ * Bumps the version number in one or more files, prompting users if necessary.
329
+ */
330
+ declare function versionBumpInfo(arg?: VersionBumpOptions | string): Promise<Operation>;
228
331
 
229
- export { InterfaceOptions, NpmScript, ProgressEvent, VersionBumpOptions, VersionBumpProgress, VersionBumpResults, versionBump as default, versionBump };
332
+ export { InterfaceOptions, NpmScript, ProgressEvent, VersionBumpOptions, VersionBumpProgress, VersionBumpResults, versionBump as default, versionBump, versionBumpInfo };