bumpp 9.9.0 → 9.9.2

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.
@@ -255,6 +255,53 @@ var NpmScript = /* @__PURE__ */ ((NpmScript2) => {
255
255
 
256
256
  // src/version-bump.ts
257
257
  import process5 from "node:process";
258
+
259
+ // node_modules/.pnpm/args-tokenizer@0.2.1/node_modules/args-tokenizer/dist/args-tokenizer.js
260
+ var spaceRegex = /\s/;
261
+ var tokenizeArgs = (argsString) => {
262
+ const tokens = [];
263
+ let currentToken = "";
264
+ let openningQuote;
265
+ let escaped = false;
266
+ for (let index = 0; index < argsString.length; index += 1) {
267
+ const char = argsString[index];
268
+ if (escaped) {
269
+ escaped = false;
270
+ if (openningQuote || char !== "\n") {
271
+ currentToken += char;
272
+ }
273
+ continue;
274
+ }
275
+ if (char === "\\") {
276
+ escaped = true;
277
+ continue;
278
+ }
279
+ if (openningQuote === void 0 && spaceRegex.test(char)) {
280
+ if (currentToken.length > 0) {
281
+ tokens.push(currentToken);
282
+ currentToken = "";
283
+ }
284
+ continue;
285
+ }
286
+ if (char === "'" || char === '"') {
287
+ if (openningQuote === void 0) {
288
+ openningQuote = char;
289
+ continue;
290
+ }
291
+ if (openningQuote === char) {
292
+ openningQuote = void 0;
293
+ continue;
294
+ }
295
+ }
296
+ currentToken += char;
297
+ }
298
+ if (currentToken.length > 0) {
299
+ tokens.push(currentToken);
300
+ }
301
+ return tokens;
302
+ };
303
+
304
+ // src/version-bump.ts
258
305
  var import_picocolors3 = __toESM(require_picocolors());
259
306
  import prompts2 from "prompts";
260
307
  import { x as x4 } from "tinyexec";
@@ -919,10 +966,12 @@ async function versionBump(arg = {}) {
919
966
  if (typeof operation.options.execute === "function") {
920
967
  await operation.options.execute(operation);
921
968
  } else {
922
- console.log(symbols_exports.info, "Executing script", operation.options.execute);
923
- await x4(operation.options.execute, [], {
969
+ const [command, ...args] = tokenizeArgs(operation.options.execute);
970
+ console.log(symbols_exports.info, "Executing script", command, ...args);
971
+ await x4(command, args, {
924
972
  nodeOptions: {
925
- stdio: "inherit"
973
+ stdio: "inherit",
974
+ cwd: operation.options.cwd
926
975
  }
927
976
  });
928
977
  console.log(symbols_exports.success, "Script finished");
package/dist/cli/index.js CHANGED
@@ -240,6 +240,53 @@ var import_tinyexec5 = require("tinyexec");
240
240
 
241
241
  // src/version-bump.ts
242
242
  var import_node_process4 = __toESM(require("process"));
243
+
244
+ // node_modules/.pnpm/args-tokenizer@0.2.1/node_modules/args-tokenizer/dist/args-tokenizer.js
245
+ var spaceRegex = /\s/;
246
+ var tokenizeArgs = (argsString) => {
247
+ const tokens = [];
248
+ let currentToken = "";
249
+ let openningQuote;
250
+ let escaped = false;
251
+ for (let index = 0; index < argsString.length; index += 1) {
252
+ const char = argsString[index];
253
+ if (escaped) {
254
+ escaped = false;
255
+ if (openningQuote || char !== "\n") {
256
+ currentToken += char;
257
+ }
258
+ continue;
259
+ }
260
+ if (char === "\\") {
261
+ escaped = true;
262
+ continue;
263
+ }
264
+ if (openningQuote === void 0 && spaceRegex.test(char)) {
265
+ if (currentToken.length > 0) {
266
+ tokens.push(currentToken);
267
+ currentToken = "";
268
+ }
269
+ continue;
270
+ }
271
+ if (char === "'" || char === '"') {
272
+ if (openningQuote === void 0) {
273
+ openningQuote = char;
274
+ continue;
275
+ }
276
+ if (openningQuote === char) {
277
+ openningQuote = void 0;
278
+ continue;
279
+ }
280
+ }
281
+ currentToken += char;
282
+ }
283
+ if (currentToken.length > 0) {
284
+ tokens.push(currentToken);
285
+ }
286
+ return tokens;
287
+ };
288
+
289
+ // src/version-bump.ts
243
290
  var import_picocolors3 = __toESM(require_picocolors());
244
291
  var import_prompts2 = __toESM(require("prompts"));
245
292
  var import_tinyexec4 = require("tinyexec");
@@ -914,10 +961,12 @@ async function versionBump(arg = {}) {
914
961
  if (typeof operation.options.execute === "function") {
915
962
  await operation.options.execute(operation);
916
963
  } else {
917
- console.log(symbols_exports.info, "Executing script", operation.options.execute);
918
- await (0, import_tinyexec4.x)(operation.options.execute, [], {
964
+ const [command, ...args] = tokenizeArgs(operation.options.execute);
965
+ console.log(symbols_exports.info, "Executing script", command, ...args);
966
+ await (0, import_tinyexec4.x)(command, args, {
919
967
  nodeOptions: {
920
- stdio: "inherit"
968
+ stdio: "inherit",
969
+ cwd: operation.options.cwd
921
970
  }
922
971
  });
923
972
  console.log(symbols_exports.success, "Script finished");
@@ -954,7 +1003,7 @@ var import_picocolors4 = __toESM(require_picocolors());
954
1003
  var import_semver3 = require("semver");
955
1004
 
956
1005
  // package.json
957
- var version = "9.9.0";
1006
+ var version = "9.9.2";
958
1007
 
959
1008
  // src/config.ts
960
1009
  var import_node_path2 = require("path");
@@ -10,7 +10,7 @@ import {
10
10
  require_picocolors,
11
11
  symbols_exports,
12
12
  versionBump
13
- } from "../chunk-SDGX7IFY.mjs";
13
+ } from "../chunk-MJWNLIUB.mjs";
14
14
 
15
15
  // src/cli/index.ts
16
16
  import process2 from "node:process";
@@ -23,7 +23,7 @@ import cac from "cac";
23
23
  import { valid as isValidVersion } from "semver";
24
24
 
25
25
  // package.json
26
- var version = "9.9.0";
26
+ var version = "9.9.2";
27
27
 
28
28
  // src/cli/parse-args.ts
29
29
  async function parseArgs() {
package/dist/index.js CHANGED
@@ -147,6 +147,51 @@ module.exports = __toCommonJS(src_exports);
147
147
  // src/version-bump.ts
148
148
  var import_node_process4 = __toESM(require("process"));
149
149
 
150
+ // node_modules/.pnpm/args-tokenizer@0.2.1/node_modules/args-tokenizer/dist/args-tokenizer.js
151
+ var spaceRegex = /\s/;
152
+ var tokenizeArgs = (argsString) => {
153
+ const tokens = [];
154
+ let currentToken = "";
155
+ let openningQuote;
156
+ let escaped = false;
157
+ for (let index = 0; index < argsString.length; index += 1) {
158
+ const char = argsString[index];
159
+ if (escaped) {
160
+ escaped = false;
161
+ if (openningQuote || char !== "\n") {
162
+ currentToken += char;
163
+ }
164
+ continue;
165
+ }
166
+ if (char === "\\") {
167
+ escaped = true;
168
+ continue;
169
+ }
170
+ if (openningQuote === void 0 && spaceRegex.test(char)) {
171
+ if (currentToken.length > 0) {
172
+ tokens.push(currentToken);
173
+ currentToken = "";
174
+ }
175
+ continue;
176
+ }
177
+ if (char === "'" || char === '"') {
178
+ if (openningQuote === void 0) {
179
+ openningQuote = char;
180
+ continue;
181
+ }
182
+ if (openningQuote === char) {
183
+ openningQuote = void 0;
184
+ continue;
185
+ }
186
+ }
187
+ currentToken += char;
188
+ }
189
+ if (currentToken.length > 0) {
190
+ tokens.push(currentToken);
191
+ }
192
+ return tokens;
193
+ };
194
+
150
195
  // node_modules/.pnpm/log-symbols@7.0.0/node_modules/log-symbols/symbols.js
151
196
  var symbols_exports = {};
152
197
  __export(symbols_exports, {
@@ -937,10 +982,12 @@ async function versionBump(arg = {}) {
937
982
  if (typeof operation.options.execute === "function") {
938
983
  await operation.options.execute(operation);
939
984
  } else {
940
- console.log(symbols_exports.info, "Executing script", operation.options.execute);
941
- await (0, import_tinyexec4.x)(operation.options.execute, [], {
985
+ const [command, ...args] = tokenizeArgs(operation.options.execute);
986
+ console.log(symbols_exports.info, "Executing script", command, ...args);
987
+ await (0, import_tinyexec4.x)(command, args, {
942
988
  nodeOptions: {
943
- stdio: "inherit"
989
+ stdio: "inherit",
990
+ cwd: operation.options.cwd
944
991
  }
945
992
  });
946
993
  console.log(symbols_exports.success, "Script finished");
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadBumpConfig,
8
8
  versionBump,
9
9
  versionBumpInfo
10
- } from "./chunk-SDGX7IFY.mjs";
10
+ } from "./chunk-MJWNLIUB.mjs";
11
11
 
12
12
  // src/index.ts
13
13
  var src_default = versionBump;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bumpp",
3
- "version": "9.9.0",
4
- "packageManager": "pnpm@9.15.0",
3
+ "version": "9.9.2",
4
+ "packageManager": "pnpm@9.15.1",
5
5
  "description": "Bump version, commit changes, tag, and push to Git",
6
6
  "author": {
7
7
  "name": "James Messinger",
@@ -71,12 +71,13 @@
71
71
  "tinyglobby": "^0.2.10"
72
72
  },
73
73
  "devDependencies": {
74
- "@antfu/eslint-config": "^3.11.2",
74
+ "@antfu/eslint-config": "^3.12.0",
75
75
  "@types/js-yaml": "^4.0.9",
76
- "@types/node": "^22.10.1",
76
+ "@types/node": "^22.10.2",
77
77
  "@types/prompts": "^2.4.9",
78
78
  "@types/semver": "^7.5.8",
79
- "eslint": "^9.16.0",
79
+ "args-tokenizer": "^0.2.1",
80
+ "eslint": "^9.17.0",
80
81
  "esno": "^4.8.0",
81
82
  "log-symbols": "^7.0.0",
82
83
  "npm-check": "^6.0.1",