bumpp 10.4.1 → 11.0.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/dist/index.mjs CHANGED
@@ -1,22 +1,5 @@
1
- import { v as versionBump } from './shared/bumpp.Dvy0WV0b.mjs';
2
- export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.Dvy0WV0b.mjs';
3
- import 'node:process';
4
- import 'ansis';
5
- import 'args-tokenizer';
6
- import 'readline';
7
- import 'events';
8
- import 'node:child_process';
9
- import 'tinyexec';
10
- import 'semver';
11
- import 'node:fs';
12
- import 'node:path';
13
- import 'jsonc-parser';
14
- import 'node:fs/promises';
15
- import 'tinyglobby';
16
- import 'yaml';
17
- import 'c12';
18
- import 'escalade/sync';
19
-
20
-
21
-
22
- export { versionBump as default, versionBump };
1
+ import { a as versionBumpInfo, i as versionBump, n as defineConfig, o as NpmScript, r as loadBumpConfig, s as ProgressEvent, t as bumpConfigDefaults } from "./config-C4d1xESV.mjs";
2
+ //#region src/index.ts
3
+ var src_default = versionBump;
4
+ //#endregion
5
+ export { NpmScript, ProgressEvent, bumpConfigDefaults, src_default as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bumpp",
3
3
  "type": "module",
4
- "version": "10.4.1",
4
+ "version": "11.0.1",
5
5
  "description": "Bump version, commit changes, tag, and push to Git",
6
6
  "authors": [
7
7
  {
@@ -32,13 +32,10 @@
32
32
  "prompt"
33
33
  ],
34
34
  "exports": {
35
- ".": {
36
- "types": "./dist/index.d.ts",
37
- "default": "./dist/index.mjs"
38
- }
35
+ ".": "./dist/index.mjs",
36
+ "./cli": "./dist/cli.mjs",
37
+ "./package.json": "./package.json"
39
38
  },
40
- "main": "dist/index.mjs",
41
- "module": "dist/index.mjs",
42
39
  "types": "dist/index.d.mts",
43
40
  "bin": {
44
41
  "bumpp": "bin/bumpp.mjs"
@@ -48,44 +45,48 @@
48
45
  "dist"
49
46
  ],
50
47
  "engines": {
51
- "node": ">=18"
48
+ "node": ">=20.19.0"
52
49
  },
53
50
  "dependencies": {
54
- "ansis": "^4.2.0",
55
51
  "args-tokenizer": "^0.3.0",
56
- "c12": "^3.3.3",
57
- "cac": "^6.7.14",
58
- "escalade": "^3.2.0",
52
+ "cac": "^7.0.0",
59
53
  "jsonc-parser": "^3.3.1",
60
54
  "package-manager-detector": "^1.6.0",
61
- "semver": "^7.7.3",
62
- "tinyexec": "^1.0.2",
55
+ "semver": "^7.7.4",
56
+ "tinyexec": "^1.0.4",
63
57
  "tinyglobby": "^0.2.15",
58
+ "unconfig": "^7.5.0",
64
59
  "yaml": "^2.8.2"
65
60
  },
61
+ "inlinedDependencies": {
62
+ "kleur": "3.0.3",
63
+ "prompts": "2.4.2",
64
+ "sisteransi": "1.0.5",
65
+ "tiny-conventional-commits-parser": "0.1.0"
66
+ },
66
67
  "devDependencies": {
67
- "@antfu/eslint-config": "^7.2.0",
68
- "@types/node": "^25.2.0",
68
+ "@antfu/eslint-config": "^7.7.2",
69
+ "@types/node": "^25.5.0",
69
70
  "@types/prompts": "^2.4.9",
70
71
  "@types/semver": "^7.7.1",
71
- "baseline-browser-mapping": "^2.9.19",
72
- "eslint": "^9.39.2",
72
+ "@typescript/native-preview": "7.0.0-dev.20260314.1",
73
+ "baseline-browser-mapping": "^2.10.8",
74
+ "eslint": "^10.0.3",
75
+ "premove": "^4.0.0",
73
76
  "prompts": "^2.4.2",
74
- "rimraf": "^6.1.2",
75
77
  "tiny-conventional-commits-parser": "^0.1.0",
78
+ "tsdown": "^0.21.2",
76
79
  "tsx": "^4.21.0",
77
80
  "typescript": "^5.9.3",
78
- "unbuild": "^3.6.1",
79
- "vitest": "^4.0.18"
81
+ "vitest": "^4.1.0"
80
82
  },
81
83
  "scripts": {
82
84
  "lint": "eslint .",
83
- "build": "unbuild",
84
- "stub": "unbuild --stub",
85
+ "build": "tsdown",
85
86
  "start": "tsx src/cli/run.ts",
86
87
  "test": "vitest",
87
88
  "bumpp": "tsx src/cli/run.ts",
88
89
  "release": "pnpm run bumpp",
89
- "typecheck": "tsc --noEmit"
90
+ "typecheck": "tsgo --noEmit"
90
91
  }
91
92
  }
package/dist/cli.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * The main entry point of the CLI
3
- */
4
- declare function main(): Promise<void>;
5
- declare function checkGitStatus(): Promise<void>;
6
-
7
- export { checkGitStatus, main };
package/dist/index.d.ts DELETED
@@ -1,386 +0,0 @@
1
- import _semver, { ReleaseType as ReleaseType$1 } from 'semver';
2
-
3
- type ReleaseType = ReleaseType$1 | 'next' | 'conventional';
4
-
5
- interface Interface {
6
- input?: NodeJS.ReadableStream | NodeJS.ReadStream | false;
7
- output?: NodeJS.WritableStream | NodeJS.WriteStream | false;
8
- [key: string]: unknown;
9
- }
10
- /**
11
- * A specific version release.
12
- */
13
- interface VersionRelease {
14
- type: 'version';
15
- version: string;
16
- }
17
- /**
18
- * Prompt the user for the release number.
19
- */
20
- interface PromptRelease {
21
- type: 'prompt';
22
- preid: string;
23
- }
24
- /**
25
- * A bump release, relative to the current version number.
26
- */
27
- interface BumpRelease {
28
- type: ReleaseType;
29
- preid: string;
30
- }
31
- /**
32
- * One of the possible Release types.
33
- */
34
- type Release = VersionRelease | PromptRelease | BumpRelease;
35
- /**
36
- * Normalized and sanitized options
37
- */
38
- interface NormalizedOptions {
39
- release: Release;
40
- commit?: {
41
- message: string;
42
- noVerify: boolean;
43
- all: boolean;
44
- };
45
- tag?: {
46
- name: string;
47
- };
48
- sign?: boolean;
49
- push: boolean;
50
- files: string[];
51
- cwd: string;
52
- install: boolean;
53
- interface: Interface;
54
- ignoreScripts: boolean;
55
- execute?: string | ((config: Operation) => void | PromiseLike<void>);
56
- printCommits?: boolean;
57
- customVersion?: VersionBumpOptions['customVersion'];
58
- currentVersion?: string;
59
- }
60
-
61
- /**
62
- * Information about the work that was performed by the `versionBump()` function.
63
- */
64
- interface VersionBumpResults {
65
- /**
66
- * The release type that was used, or `undefined` if an explicit version number was used.
67
- */
68
- release?: ReleaseType;
69
- /**
70
- * The previous version number in package.json.
71
- */
72
- currentVersion: string;
73
- /**
74
- * The new version number.
75
- */
76
- newVersion: string;
77
- /**
78
- * The commit message that was used for the git commit, or `false` if no git commit was created.
79
- *
80
- * NOTE: This will never be an empty string. It will always contain at least the new version number.
81
- */
82
- commit: string | false;
83
- /**
84
- * The tag name that was used for the git tag, or `false` if no git tag was created.
85
- *
86
- * NOTE: This will never be an empty string. It will always contain at least the new version number.
87
- */
88
- tag: string | false;
89
- /**
90
- * The files that were actually modified.
91
- */
92
- updatedFiles: string[];
93
- /**
94
- * The files that were not updated because they did not contain the old version number.
95
- */
96
- skippedFiles: string[];
97
- }
98
-
99
- /**
100
- * Progress events that indicate the progress of the `versionBump()` function.
101
- */
102
- declare const enum ProgressEvent {
103
- FileUpdated = "file updated",
104
- FileSkipped = "file skipped",
105
- GitCommit = "git commit",
106
- GitTag = "git tag",
107
- GitPush = "git push",
108
- NpmScript = "npm script"
109
- }
110
- /**
111
- * The NPM version scripts
112
- *
113
- * @see https://docs.npmjs.com/cli/version.html
114
- */
115
- declare const enum NpmScript {
116
- PreVersion = "preversion",
117
- Version = "version",
118
- PostVersion = "postversion"
119
- }
120
- /**
121
- * Information about the progress of the `versionBump()` function.
122
- */
123
- interface VersionBumpProgress extends VersionBumpResults {
124
- event: ProgressEvent;
125
- script?: NpmScript;
126
- }
127
-
128
- interface OperationState {
129
- release: ReleaseType | undefined;
130
- currentVersionSource: string;
131
- currentVersion: string;
132
- newVersion: string;
133
- commitMessage: string;
134
- tagName: string;
135
- updatedFiles: string[];
136
- skippedFiles: string[];
137
- }
138
- interface UpdateOperationState extends Partial<OperationState> {
139
- event?: ProgressEvent;
140
- script?: NpmScript;
141
- }
142
- /**
143
- * All of the inputs, outputs, and state of a single `versionBump()` call.
144
- */
145
- declare class Operation {
146
- /**
147
- * The options for this operation.
148
- */
149
- options: NormalizedOptions;
150
- /**
151
- * The current state of the operation.
152
- */
153
- readonly state: Readonly<OperationState>;
154
- /**
155
- * The results of the operation.
156
- */
157
- get results(): VersionBumpResults;
158
- /**
159
- * The callback that's used to report the progress of the operation.
160
- */
161
- private readonly _progress?;
162
- /**
163
- * Private constructor. Use the `Operation.start()` static method instead.
164
- */
165
- private constructor();
166
- /**
167
- * Starts a new `versionBump()` operation.
168
- */
169
- static start(input: VersionBumpOptions): Promise<Operation>;
170
- /**
171
- * Updates the operation state and results, and reports the updated progress to the user.
172
- */
173
- update({ event, script, ...newState }: UpdateOperationState): this;
174
- }
175
-
176
- /**
177
- * Options for the `versionBump()` function.
178
- */
179
- interface VersionBumpOptions {
180
- /**
181
- * The release version or type. Can be one of the following:
182
- *
183
- * - The new version number (e.g. "1.23.456")
184
- * - A release type (e.g. "major", "minor", "patch", "prerelease", etc.)
185
- * - "prompt" to prompt the user for the version number
186
- *
187
- * Defaults to "prompt".
188
- */
189
- release?: string;
190
- /**
191
- * The current version number to be bumpped.
192
- * If not provide, it will be read from the first file in the `files` array.
193
- */
194
- currentVersion?: string;
195
- /**
196
- * The prerelease type (e.g. "alpha", "beta", "next").
197
- *
198
- * Defaults to "beta".
199
- */
200
- preid?: string;
201
- /**
202
- * Indicates whether to create a git commit. Can be set to a custom commit message string
203
- * or `true` to use "release v". Any `%s` placeholders in the message string will be replaced
204
- * with the new version number. If the message string does _not_ contain any `%s` placeholders,
205
- * then the new version number will be appended to the message.
206
- *
207
- * Defaults to `true`.
208
- */
209
- commit?: boolean | string;
210
- /**
211
- * Indicates whether to tag the git commit. Can be set to a custom tag string
212
- * or `true` to use "v". Any `%s` placeholders in the tag string will be replaced
213
- * with the new version number. If the tag string does _not_ contain any `%s` placeholders,
214
- * then the new version number will be appended to the tag.
215
- *
216
- * Defaults to `true`.
217
- */
218
- tag?: boolean | string;
219
- /**
220
- * Sign the git commit and tag with a configured key (GPG/SSH).
221
- *
222
- * Defaults to `false`.
223
- */
224
- sign?: boolean;
225
- /**
226
- * Indicates whether to push the git commit and tag.
227
- *
228
- * Defaults to `true`.
229
- */
230
- push?: boolean;
231
- /**
232
- * Run `npm install` after bumping the version number.
233
- *
234
- * Defaults to `false`.
235
- */
236
- install?: boolean;
237
- /**
238
- * Indicates whether the git commit should include ALL files (`git commit --all`)
239
- * rather than just the files that were modified by `versionBump()`.
240
- *
241
- * Defaults to `false`.
242
- */
243
- all?: boolean;
244
- /**
245
- * Indicates whether the git working tree needs to be cleared before bumping.
246
- *
247
- * Defaults to `true`.
248
- */
249
- noGitCheck?: boolean;
250
- /**
251
- * Prompt for confirmation
252
- *
253
- * @default true
254
- */
255
- confirm?: boolean;
256
- /**
257
- * Indicates whether to bypass git commit hooks (`git commit --no-verify`).
258
- *
259
- * Defaults to `false`.
260
- */
261
- noVerify?: boolean;
262
- /**
263
- * The files to be updated. For certain known files ("package.json", "bower.json", etc.)
264
- * `versionBump()` will explicitly update the file's version number. For other files
265
- * (ReadMe files, config files, source code, etc.) it will simply do a global replacement
266
- * of the old version number with the new version number.
267
- *
268
- * Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"].
269
- */
270
- files?: string[];
271
- /**
272
- * The working directory, which is used as the basis for locating all files.
273
- *
274
- * Defaults to `process.cwd()`
275
- */
276
- cwd?: string;
277
- /**
278
- * Options for the command-line interface. Can be one of the following:
279
- *
280
- * - `true` - To default to `process.stdin` and `process.stdout`.
281
- * - `false` - To disable all CLI output. Cannot be used when `release` is "prompt".
282
- * - An object that will be passed to `readline.createInterface()`.
283
- *
284
- * Defaults to `true`.
285
- */
286
- interface?: boolean | InterfaceOptions;
287
- /**
288
- * Indicates whether to ignore version scripts.
289
- *
290
- * Defaults to `false`.
291
- */
292
- ignoreScripts?: boolean;
293
- /**
294
- * A callback that is provides information about the progress of the `versionBump()` function.
295
- */
296
- progress?: (progress: VersionBumpProgress) => void;
297
- /**
298
- * Execute additional command after bumping and before committing
299
- */
300
- execute?: string | ((config: Operation) => void | PromiseLike<void>);
301
- /**
302
- * Bump the files recursively for monorepo. Only works without `files` option.
303
- *
304
- * @default false
305
- */
306
- recursive?: boolean;
307
- /**
308
- * Print recent commits
309
- */
310
- printCommits?: boolean;
311
- /**
312
- * The path to the config file
313
- * If not provided, it will be inferred from the current working directory.
314
- * @default undefined
315
- */
316
- configFilePath?: string;
317
- /**
318
- * Custom function to provide the version number
319
- */
320
- customVersion?: (currentVersion: string, semver: typeof _semver) => Promise<string | void> | string | void;
321
- }
322
- /**
323
- * Options for the command-line interface.
324
- */
325
- interface InterfaceOptions {
326
- /**
327
- * The stream that will be used to read user input. Can be one of the following:
328
- *
329
- * - `true` - To default to `process.stdin`
330
- * - `false` - To disable all CLI input
331
- * - Any readable stream
332
- *
333
- * Defaults to `true`.
334
- */
335
- input?: NodeJS.ReadableStream | NodeJS.ReadStream | boolean;
336
- /**
337
- * The stream that will be used to write output, such as prompts and progress.
338
- * Can be one of the following:
339
- *
340
- * - `true` - To default to `process.stdout`
341
- * - `false` - To disable all CLI output
342
- * - Any writable stream
343
- *
344
- * Defaults to `true`.
345
- */
346
- output?: NodeJS.WritableStream | NodeJS.WriteStream | boolean;
347
- /**
348
- * Any other properties will be passed directly to `readline.createInterface()`.
349
- * See the `ReadLineOptions` interface for possible options.
350
- */
351
- [key: string]: unknown;
352
- }
353
-
354
- /**
355
- * Prompts the user for a version number and updates package.json and package-lock.json.
356
- *
357
- * @returns - The new version number
358
- */
359
- declare function versionBump(): Promise<VersionBumpResults>;
360
- /**
361
- * Bumps the version number in package.json, package-lock.json.
362
- *
363
- * @param release
364
- * The release version or type. Can be one of the following:
365
- *
366
- * - The new version number (e.g. "1.23.456")
367
- * - A release type (e.g. "major", "minor", "patch", "prerelease", etc.)
368
- * - "prompt" to prompt the user for the version number
369
- */
370
- declare function versionBump(release: string): Promise<VersionBumpResults>;
371
- /**
372
- * Bumps the version number in one or more files, prompting the user if necessary.
373
- * Optionally also commits, tags, and pushes to git.
374
- */
375
- declare function versionBump(options: VersionBumpOptions): Promise<VersionBumpResults>;
376
- /**
377
- * Bumps the version number in one or more files, prompting users if necessary.
378
- */
379
- declare function versionBumpInfo(arg?: VersionBumpOptions | string): Promise<Operation>;
380
-
381
- declare const bumpConfigDefaults: VersionBumpOptions;
382
- declare function loadBumpConfig(overrides?: Partial<VersionBumpOptions>, cwd?: string): Promise<VersionBumpOptions>;
383
- declare function defineConfig(config: Partial<VersionBumpOptions>): Partial<VersionBumpOptions>;
384
-
385
- export { NpmScript, ProgressEvent, bumpConfigDefaults, versionBump as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
386
- export type { InterfaceOptions, ReleaseType, VersionBumpOptions, VersionBumpProgress, VersionBumpResults };