bumpp 10.3.1 → 10.4.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/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.BWUvIEks.mjs';
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';
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.1";
27
+ const version = "10.4.0";
28
28
 
29
29
  async function parseArgs() {
30
30
  try {
@@ -40,9 +40,9 @@ async function parseArgs() {
40
40
  sign: args.sign,
41
41
  push: args.push,
42
42
  all: args.all,
43
- noGitCheck: args.noGitCheck,
44
- confirm: !args.yes,
45
- noVerify: !args.verify,
43
+ noGitCheck: args.gitCheck === void 0 ? void 0 : !args.gitCheck,
44
+ confirm: args.yes === void 0 ? void 0 : !args.yes,
45
+ noVerify: args.verify === void 0 ? void 0 : !args.verify,
46
46
  install: args.install,
47
47
  files: [...args["--"] || [], ...resultArgs],
48
48
  ignoreScripts: args.ignoreScripts,
@@ -69,21 +69,11 @@ async function parseArgs() {
69
69
  }
70
70
  function loadCliArgs(argv = process.argv) {
71
71
  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();
72
+ 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})`).help();
73
73
  const result = cli.parse(argv);
74
- const rawArgs = cli.rawArgs;
75
74
  const args = result.options;
76
- const COMMIT_REG = /(?:-c|--commit|--no-commit)(?:=.*|$)/;
77
- const TAG_REG = /(?:-t|--tag|--no-tag)(?:=.*|$)/;
78
- const hasCommitFlag = rawArgs.some((arg) => COMMIT_REG.test(arg));
79
- const hasTagFlag = rawArgs.some((arg) => TAG_REG.test(arg));
80
- const { tag, commit, ...rest } = args;
81
75
  return {
82
- args: {
83
- ...rest,
84
- commit: hasCommitFlag ? commit : void 0,
85
- tag: hasTagFlag ? tag : void 0
86
- },
76
+ args,
87
77
  resultArgs: result.args
88
78
  };
89
79
  }
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { v as versionBump } from './shared/bumpp.BWUvIEks.mjs';
2
- export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.BWUvIEks.mjs';
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';
3
3
  import 'node:process';
4
- import 'args-tokenizer';
5
4
  import 'ansis';
5
+ import 'args-tokenizer';
6
6
  import 'readline';
7
7
  import 'events';
8
8
  import 'node:child_process';
@@ -1,6 +1,6 @@
1
1
  import process$1 from 'node:process';
2
- import { tokenizeArgs } from 'args-tokenizer';
3
2
  import c from 'ansis';
3
+ import { tokenizeArgs } from 'args-tokenizer';
4
4
  import require$$0 from 'readline';
5
5
  import require$$2 from 'events';
6
6
  import { execSync } from 'node:child_process';
@@ -6306,11 +6306,11 @@ function execCommand(cmd, options) {
6306
6306
  }
6307
6307
  }
6308
6308
  function getLastGitTag() {
6309
- return execCommand("git describe --tags --abbrev=0")?.split("\n").at(0) || undefined;
6309
+ return execCommand("git describe --tags --abbrev=0")?.split("\n").at(0) || void 0;
6310
6310
  }
6311
6311
  const GIT_LOG_FORMAT = "%h|%s|%an|%ae|%ad|%b[GIT_LOG_COMMIT_END]";
6312
- function getGitLog(from, to = "HEAD") {
6313
- return execCommand(`git --no-pager log "${from ? `${from}...${to}` : to}" --pretty="${GIT_LOG_FORMAT}"`).split("[GIT_LOG_COMMIT_END]\n").filter(Boolean);
6312
+ function getGitLog(from, to = "HEAD", path) {
6313
+ return execCommand(`git --no-pager log "${from ? `${from}...${to}` : to}" --pretty="${GIT_LOG_FORMAT}" ${""}`).split("[GIT_LOG_COMMIT_END]\n").filter(Boolean);
6314
6314
  }
6315
6315
 
6316
6316
  const ConventionalCommitRegex = /(?<emoji>:.+:|(\uD83C[\uDF00-\uDFFF])|(\uD83D[\uDC00-\uDE4F\uDE80-\uDEFF])|[\u2600-\u2B55])?( *)(?<type>[a-z]+)(\((?<scope>.+)\))?(?<breaking>!)?: (?<description>.+)/i;
@@ -6370,10 +6370,10 @@ function parseCommit(rawCommit) {
6370
6370
  };
6371
6371
  }
6372
6372
 
6373
- function getCommits(from, to) {
6373
+ function getCommits(from, to, path) {
6374
6374
  return getGitLog(from, to).map(parseRawCommit).map(parseCommit);
6375
6375
  }
6376
- function getRecentCommits(from, to) {
6376
+ function getRecentCommits(from, to, path) {
6377
6377
  if (!from)
6378
6378
  from = getLastGitTag();
6379
6379
  if (!to)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bumpp",
3
3
  "type": "module",
4
- "version": "10.3.1",
4
+ "version": "10.4.0",
5
5
  "description": "Bump version, commit changes, tag, and push to Git",
6
6
  "authors": [
7
7
  {
@@ -53,29 +53,29 @@
53
53
  "dependencies": {
54
54
  "ansis": "^4.2.0",
55
55
  "args-tokenizer": "^0.3.0",
56
- "c12": "^3.3.0",
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.3.0",
61
- "semver": "^7.7.2",
62
- "tinyexec": "^1.0.1",
60
+ "package-manager-detector": "^1.6.0",
61
+ "semver": "^7.7.3",
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": "^5.4.1",
68
- "@types/node": "^24.6.2",
67
+ "@antfu/eslint-config": "^6.7.3",
68
+ "@types/node": "^25.0.7",
69
69
  "@types/prompts": "^2.4.9",
70
70
  "@types/semver": "^7.7.1",
71
- "eslint": "^9.37.0",
71
+ "eslint": "^9.39.2",
72
72
  "prompts": "^2.4.2",
73
- "rimraf": "^6.0.1",
74
- "tiny-conventional-commits-parser": "^0.0.1",
75
- "tsx": "^4.20.6",
73
+ "rimraf": "^6.1.2",
74
+ "tiny-conventional-commits-parser": "^0.1.0",
75
+ "tsx": "^4.21.0",
76
76
  "typescript": "^5.9.3",
77
77
  "unbuild": "^3.6.1",
78
- "vitest": "^3.2.4"
78
+ "vitest": "^4.0.17"
79
79
  },
80
80
  "scripts": {
81
81
  "lint": "eslint .",