bumpp 10.3.2 → 10.4.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/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import process from 'node:process';
2
2
  import { x, NonZeroExitError } from 'tinyexec';
3
- import { l as loadBumpConfig, i as isReleaseType, b as bumpConfigDefaults, v as versionBump, P as ProgressEvent, s as symbols } from './shared/bumpp.0D8oR-Fd.mjs';
3
+ import { l as loadBumpConfig, i as isReleaseType, b as bumpConfigDefaults, v as versionBump, P as ProgressEvent, s as symbols } from './shared/bumpp.Dvy0WV0b.mjs';
4
4
  import c from 'ansis';
5
5
  import cac from 'cac';
6
6
  import { valid } from 'semver';
@@ -24,7 +24,7 @@ var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
24
24
  return ExitCode2;
25
25
  })(ExitCode || {});
26
26
 
27
- const version = "10.3.2";
27
+ const version = "10.4.1";
28
28
 
29
29
  async function parseArgs() {
30
30
  try {
@@ -40,7 +40,7 @@ async function parseArgs() {
40
40
  sign: args.sign,
41
41
  push: args.push,
42
42
  all: args.all,
43
- noGitCheck: args.noGitCheck,
43
+ noGitCheck: args.gitCheck === void 0 ? void 0 : !args.gitCheck,
44
44
  confirm: args.yes === void 0 ? void 0 : !args.yes,
45
45
  noVerify: args.verify === void 0 ? void 0 : !args.verify,
46
46
  install: args.install,
@@ -50,7 +50,8 @@ async function parseArgs() {
50
50
  execute: args.execute,
51
51
  printCommits: args.printCommits,
52
52
  recursive: args.recursive,
53
- release: args.release
53
+ release: args.release,
54
+ configFilePath: args.configFilePath
54
55
  })
55
56
  };
56
57
  if (parsedArgs.options.files && parsedArgs.options.files.length > 0) {
@@ -69,30 +70,11 @@ async function parseArgs() {
69
70
  }
70
71
  function loadCliArgs(argv = process.argv) {
71
72
  const cli = cac("bumpp");
72
- cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("-a, --all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--no-git-check", `Skip git check`, { default: bumpConfigDefaults.noGitCheck }).option("-c, --commit [msg]", "Commit message", { default: true }).option("--no-commit", "Skip commit", { default: false }).option("-t, --tag [tag]", "Tag name", { default: true }).option("--no-tag", "Skip tag", { default: false }).option("--sign", "Sign commit and tag").option("--install", `Run 'npm install' after bumping version (default: ${bumpConfigDefaults.install})`, { default: false }).option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--no-verify", "Skip git verification").option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").option("--release <release>", `Release type or version number (e.g. 'major', 'minor', 'patch', 'prerelease', etc. default: ${bumpConfigDefaults.release})`).help();
73
+ cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("-a, --all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--git-check", `Run git check (default: ${!bumpConfigDefaults.noGitCheck})`).option("-c, --commit [msg]", `Commit message (default: ${bumpConfigDefaults.commit})`).option("-t, --tag [tag]", `Tag name (default: ${bumpConfigDefaults.tag})`).option("--sign", "Sign commit and tag").option("--install", `Run 'npm install' after bumping version (default: ${bumpConfigDefaults.install})`).option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--verify", `Run git verification (default: ${!bumpConfigDefaults.noVerify})`).option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").option("--release <release>", `Release type or version number (e.g. 'major', 'minor', 'patch', 'prerelease', etc. default: ${bumpConfigDefaults.release})`).option("--configFilePath <configFilePath>", `Path to custom build.config file`).help();
73
74
  const result = cli.parse(argv);
74
- const rawArgs = cli.rawArgs;
75
75
  const args = result.options;
76
- const COMMIT_REG = /(?:-c|--commit|--no-commit)(?:=.*|$)/;
77
- const TAG_REG = /(?:-t|--tag|--no-tag)(?:=.*|$)/;
78
- const YES_REG = /(?:-y|--yes)(?:=.*|$)/;
79
- const NO_VERIFY_REG = /--no-verify(?:=.*|$)/;
80
- const INSTALL_ARG = /--install(?:=.*|$)/;
81
- const hasCommitFlag = rawArgs.some((arg) => COMMIT_REG.test(arg));
82
- const hasTagFlag = rawArgs.some((arg) => TAG_REG.test(arg));
83
- const hasYesFlag = rawArgs.some((arg) => YES_REG.test(arg));
84
- const hasNoVerifyFlag = rawArgs.some((arg) => NO_VERIFY_REG.test(arg));
85
- const hasInstallFlag = rawArgs.some((arg) => INSTALL_ARG.test(arg));
86
- const { tag, commit, yes, ...rest } = args;
87
76
  return {
88
- args: {
89
- ...rest,
90
- commit: hasCommitFlag ? commit : void 0,
91
- tag: hasTagFlag ? tag : void 0,
92
- yes: hasYesFlag ? yes : void 0,
93
- verify: hasNoVerifyFlag ? !args.verify : void 0,
94
- install: hasInstallFlag ? !args.install : void 0
95
- },
77
+ args,
96
78
  resultArgs: result.args
97
79
  };
98
80
  }
package/dist/index.d.mts CHANGED
@@ -308,6 +308,12 @@ interface VersionBumpOptions {
308
308
  * Print recent commits
309
309
  */
310
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;
311
317
  /**
312
318
  * Custom function to provide the version number
313
319
  */
package/dist/index.d.ts CHANGED
@@ -308,6 +308,12 @@ interface VersionBumpOptions {
308
308
  * Print recent commits
309
309
  */
310
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;
311
317
  /**
312
318
  * Custom function to provide the version number
313
319
  */
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { v as versionBump } from './shared/bumpp.0D8oR-Fd.mjs';
2
- export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.0D8oR-Fd.mjs';
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
3
  import 'node:process';
4
4
  import 'ansis';
5
5
  import 'args-tokenizer';
@@ -7089,7 +7089,8 @@ const bumpConfigDefaults = {
7089
7089
  ignoreScripts: false,
7090
7090
  all: false,
7091
7091
  noGitCheck: true,
7092
- files: []
7092
+ files: [],
7093
+ configFilePath: void 0
7093
7094
  };
7094
7095
  async function loadBumpConfig(overrides, cwd = process$1.cwd()) {
7095
7096
  const name = "bump";
@@ -7097,6 +7098,7 @@ async function loadBumpConfig(overrides, cwd = process$1.cwd()) {
7097
7098
  const { config } = await loadConfig({
7098
7099
  name,
7099
7100
  defaults: bumpConfigDefaults,
7101
+ configFile: overrides?.configFilePath || void 0,
7100
7102
  overrides: {
7101
7103
  ...overrides
7102
7104
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bumpp",
3
3
  "type": "module",
4
- "version": "10.3.2",
4
+ "version": "10.4.1",
5
5
  "description": "Bump version, commit changes, tag, and push to Git",
6
6
  "authors": [
7
7
  {
@@ -53,29 +53,30 @@
53
53
  "dependencies": {
54
54
  "ansis": "^4.2.0",
55
55
  "args-tokenizer": "^0.3.0",
56
- "c12": "^3.3.2",
56
+ "c12": "^3.3.3",
57
57
  "cac": "^6.7.14",
58
58
  "escalade": "^3.2.0",
59
59
  "jsonc-parser": "^3.3.1",
60
- "package-manager-detector": "^1.5.0",
60
+ "package-manager-detector": "^1.6.0",
61
61
  "semver": "^7.7.3",
62
62
  "tinyexec": "^1.0.2",
63
63
  "tinyglobby": "^0.2.15",
64
- "yaml": "^2.8.1"
64
+ "yaml": "^2.8.2"
65
65
  },
66
66
  "devDependencies": {
67
- "@antfu/eslint-config": "^6.2.0",
68
- "@types/node": "^24.10.1",
67
+ "@antfu/eslint-config": "^7.2.0",
68
+ "@types/node": "^25.2.0",
69
69
  "@types/prompts": "^2.4.9",
70
70
  "@types/semver": "^7.7.1",
71
- "eslint": "^9.39.1",
71
+ "baseline-browser-mapping": "^2.9.19",
72
+ "eslint": "^9.39.2",
72
73
  "prompts": "^2.4.2",
73
74
  "rimraf": "^6.1.2",
74
75
  "tiny-conventional-commits-parser": "^0.1.0",
75
- "tsx": "^4.20.6",
76
+ "tsx": "^4.21.0",
76
77
  "typescript": "^5.9.3",
77
78
  "unbuild": "^3.6.1",
78
- "vitest": "^4.0.14"
79
+ "vitest": "^4.0.18"
79
80
  },
80
81
  "scripts": {
81
82
  "lint": "eslint .",