Comparing version 9.9.0 to 9.9.1
@@ -133,2 +133,199 @@ var __create = Object.create; | ||
// node_modules/.pnpm/shell-quote@1.8.2/node_modules/shell-quote/parse.js | ||
var require_parse = __commonJS({ | ||
"node_modules/.pnpm/shell-quote@1.8.2/node_modules/shell-quote/parse.js"(exports2, module2) { | ||
"use strict"; | ||
var CONTROL = "(?:" + [ | ||
"\\|\\|", | ||
"\\&\\&", | ||
";;", | ||
"\\|\\&", | ||
"\\<\\(", | ||
"\\<\\<\\<", | ||
">>", | ||
">\\&", | ||
"<\\&", | ||
"[&;()|<>]" | ||
].join("|") + ")"; | ||
var controlRE = new RegExp("^" + CONTROL + "$"); | ||
var META = "|&;()<> \\t"; | ||
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; | ||
var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'"; | ||
var hash = /^#$/; | ||
var SQ = "'"; | ||
var DQ = '"'; | ||
var DS = "$"; | ||
var TOKEN = ""; | ||
var mult = 4294967296; | ||
for (i = 0; i < 4; i++) { | ||
TOKEN += (mult * Math.random()).toString(16); | ||
} | ||
var i; | ||
var startsWithToken = new RegExp("^" + TOKEN); | ||
function matchAll(s, r) { | ||
var origIndex = r.lastIndex; | ||
var matches = []; | ||
var matchObj; | ||
while (matchObj = r.exec(s)) { | ||
matches.push(matchObj); | ||
if (r.lastIndex === matchObj.index) { | ||
r.lastIndex += 1; | ||
} | ||
} | ||
r.lastIndex = origIndex; | ||
return matches; | ||
} | ||
function getVar(env, pre, key) { | ||
var r = typeof env === "function" ? env(key) : env[key]; | ||
if (typeof r === "undefined" && key != "") { | ||
r = ""; | ||
} else if (typeof r === "undefined") { | ||
r = "$"; | ||
} | ||
if (typeof r === "object") { | ||
return pre + TOKEN + JSON.stringify(r) + TOKEN; | ||
} | ||
return pre + r; | ||
} | ||
function parseInternal(string, env, opts) { | ||
if (!opts) { | ||
opts = {}; | ||
} | ||
var BS = opts.escape || "\\"; | ||
var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+"; | ||
var chunker = new RegExp([ | ||
"(" + CONTROL + ")", | ||
// control chars | ||
"(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+" | ||
].join("|"), "g"); | ||
var matches = matchAll(string, chunker); | ||
if (matches.length === 0) { | ||
return []; | ||
} | ||
if (!env) { | ||
env = {}; | ||
} | ||
var commented = false; | ||
return matches.map(function(match) { | ||
var s = match[0]; | ||
if (!s || commented) { | ||
return void 0; | ||
} | ||
if (controlRE.test(s)) { | ||
return { op: s }; | ||
} | ||
var quote = false; | ||
var esc = false; | ||
var out = ""; | ||
var isGlob = false; | ||
var i2; | ||
function parseEnvVar() { | ||
i2 += 1; | ||
var varend; | ||
var varname; | ||
var char = s.charAt(i2); | ||
if (char === "{") { | ||
i2 += 1; | ||
if (s.charAt(i2) === "}") { | ||
throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1)); | ||
} | ||
varend = s.indexOf("}", i2); | ||
if (varend < 0) { | ||
throw new Error("Bad substitution: " + s.slice(i2)); | ||
} | ||
varname = s.slice(i2, varend); | ||
i2 = varend; | ||
} else if (/[*@#?$!_-]/.test(char)) { | ||
varname = char; | ||
i2 += 1; | ||
} else { | ||
var slicedFromI = s.slice(i2); | ||
varend = slicedFromI.match(/[^\w\d_]/); | ||
if (!varend) { | ||
varname = slicedFromI; | ||
i2 = s.length; | ||
} else { | ||
varname = slicedFromI.slice(0, varend.index); | ||
i2 += varend.index - 1; | ||
} | ||
} | ||
return getVar(env, "", varname); | ||
} | ||
for (i2 = 0; i2 < s.length; i2++) { | ||
var c5 = s.charAt(i2); | ||
isGlob = isGlob || !quote && (c5 === "*" || c5 === "?"); | ||
if (esc) { | ||
out += c5; | ||
esc = false; | ||
} else if (quote) { | ||
if (c5 === quote) { | ||
quote = false; | ||
} else if (quote == SQ) { | ||
out += c5; | ||
} else { | ||
if (c5 === BS) { | ||
i2 += 1; | ||
c5 = s.charAt(i2); | ||
if (c5 === DQ || c5 === BS || c5 === DS) { | ||
out += c5; | ||
} else { | ||
out += BS + c5; | ||
} | ||
} else if (c5 === DS) { | ||
out += parseEnvVar(); | ||
} else { | ||
out += c5; | ||
} | ||
} | ||
} else if (c5 === DQ || c5 === SQ) { | ||
quote = c5; | ||
} else if (controlRE.test(c5)) { | ||
return { op: s }; | ||
} else if (hash.test(c5)) { | ||
commented = true; | ||
var commentObj = { comment: string.slice(match.index + i2 + 1) }; | ||
if (out.length) { | ||
return [out, commentObj]; | ||
} | ||
return [commentObj]; | ||
} else if (c5 === BS) { | ||
esc = true; | ||
} else if (c5 === DS) { | ||
out += parseEnvVar(); | ||
} else { | ||
out += c5; | ||
} | ||
} | ||
if (isGlob) { | ||
return { op: "glob", pattern: out }; | ||
} | ||
return out; | ||
}).reduce(function(prev, arg) { | ||
return typeof arg === "undefined" ? prev : prev.concat(arg); | ||
}, []); | ||
} | ||
module2.exports = function parse2(s, env, opts) { | ||
var mapped = parseInternal(s, env, opts); | ||
if (typeof env !== "function") { | ||
return mapped; | ||
} | ||
return mapped.reduce(function(acc, s2) { | ||
if (typeof s2 === "object") { | ||
return acc.concat(s2); | ||
} | ||
var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g")); | ||
if (xs.length === 1) { | ||
return acc.concat(xs[0]); | ||
} | ||
return acc.concat(xs.filter(Boolean).map(function(x6) { | ||
if (startsWithToken.test(x6)) { | ||
return JSON.parse(x6.split(TOKEN)[1]); | ||
} | ||
return x6; | ||
})); | ||
}, []); | ||
}; | ||
} | ||
}); | ||
// src/cli/index.ts | ||
@@ -246,2 +443,3 @@ var cli_exports = {}; | ||
var import_prompts2 = __toESM(require("prompts")); | ||
var import_parse = __toESM(require_parse()); | ||
var import_tinyexec4 = require("tinyexec"); | ||
@@ -919,6 +1117,8 @@ | ||
} else { | ||
console.log(symbols_exports.info, "Executing script", operation.options.execute); | ||
await (0, import_tinyexec4.x)(operation.options.execute, [], { | ||
const [command, ...args] = (0, import_parse.default)(operation.options.execute); | ||
console.log(symbols_exports.info, "Executing script", command, ...args); | ||
await (0, import_tinyexec4.x)(command, args, { | ||
nodeOptions: { | ||
stdio: "inherit" | ||
stdio: "inherit", | ||
cwd: operation.options.cwd | ||
} | ||
@@ -960,3 +1160,3 @@ }); | ||
// package.json | ||
var version = "9.9.0"; | ||
var version = "9.9.1"; | ||
@@ -963,0 +1163,0 @@ // src/config.ts |
@@ -133,2 +133,199 @@ var __create = Object.create; | ||
// node_modules/.pnpm/shell-quote@1.8.2/node_modules/shell-quote/parse.js | ||
var require_parse = __commonJS({ | ||
"node_modules/.pnpm/shell-quote@1.8.2/node_modules/shell-quote/parse.js"(exports2, module2) { | ||
"use strict"; | ||
var CONTROL = "(?:" + [ | ||
"\\|\\|", | ||
"\\&\\&", | ||
";;", | ||
"\\|\\&", | ||
"\\<\\(", | ||
"\\<\\<\\<", | ||
">>", | ||
">\\&", | ||
"<\\&", | ||
"[&;()|<>]" | ||
].join("|") + ")"; | ||
var controlRE = new RegExp("^" + CONTROL + "$"); | ||
var META = "|&;()<> \\t"; | ||
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; | ||
var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'"; | ||
var hash = /^#$/; | ||
var SQ = "'"; | ||
var DQ = '"'; | ||
var DS = "$"; | ||
var TOKEN = ""; | ||
var mult = 4294967296; | ||
for (i = 0; i < 4; i++) { | ||
TOKEN += (mult * Math.random()).toString(16); | ||
} | ||
var i; | ||
var startsWithToken = new RegExp("^" + TOKEN); | ||
function matchAll(s, r) { | ||
var origIndex = r.lastIndex; | ||
var matches = []; | ||
var matchObj; | ||
while (matchObj = r.exec(s)) { | ||
matches.push(matchObj); | ||
if (r.lastIndex === matchObj.index) { | ||
r.lastIndex += 1; | ||
} | ||
} | ||
r.lastIndex = origIndex; | ||
return matches; | ||
} | ||
function getVar(env, pre, key) { | ||
var r = typeof env === "function" ? env(key) : env[key]; | ||
if (typeof r === "undefined" && key != "") { | ||
r = ""; | ||
} else if (typeof r === "undefined") { | ||
r = "$"; | ||
} | ||
if (typeof r === "object") { | ||
return pre + TOKEN + JSON.stringify(r) + TOKEN; | ||
} | ||
return pre + r; | ||
} | ||
function parseInternal(string, env, opts) { | ||
if (!opts) { | ||
opts = {}; | ||
} | ||
var BS = opts.escape || "\\"; | ||
var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+"; | ||
var chunker = new RegExp([ | ||
"(" + CONTROL + ")", | ||
// control chars | ||
"(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+" | ||
].join("|"), "g"); | ||
var matches = matchAll(string, chunker); | ||
if (matches.length === 0) { | ||
return []; | ||
} | ||
if (!env) { | ||
env = {}; | ||
} | ||
var commented = false; | ||
return matches.map(function(match) { | ||
var s = match[0]; | ||
if (!s || commented) { | ||
return void 0; | ||
} | ||
if (controlRE.test(s)) { | ||
return { op: s }; | ||
} | ||
var quote = false; | ||
var esc = false; | ||
var out = ""; | ||
var isGlob = false; | ||
var i2; | ||
function parseEnvVar() { | ||
i2 += 1; | ||
var varend; | ||
var varname; | ||
var char = s.charAt(i2); | ||
if (char === "{") { | ||
i2 += 1; | ||
if (s.charAt(i2) === "}") { | ||
throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1)); | ||
} | ||
varend = s.indexOf("}", i2); | ||
if (varend < 0) { | ||
throw new Error("Bad substitution: " + s.slice(i2)); | ||
} | ||
varname = s.slice(i2, varend); | ||
i2 = varend; | ||
} else if (/[*@#?$!_-]/.test(char)) { | ||
varname = char; | ||
i2 += 1; | ||
} else { | ||
var slicedFromI = s.slice(i2); | ||
varend = slicedFromI.match(/[^\w\d_]/); | ||
if (!varend) { | ||
varname = slicedFromI; | ||
i2 = s.length; | ||
} else { | ||
varname = slicedFromI.slice(0, varend.index); | ||
i2 += varend.index - 1; | ||
} | ||
} | ||
return getVar(env, "", varname); | ||
} | ||
for (i2 = 0; i2 < s.length; i2++) { | ||
var c4 = s.charAt(i2); | ||
isGlob = isGlob || !quote && (c4 === "*" || c4 === "?"); | ||
if (esc) { | ||
out += c4; | ||
esc = false; | ||
} else if (quote) { | ||
if (c4 === quote) { | ||
quote = false; | ||
} else if (quote == SQ) { | ||
out += c4; | ||
} else { | ||
if (c4 === BS) { | ||
i2 += 1; | ||
c4 = s.charAt(i2); | ||
if (c4 === DQ || c4 === BS || c4 === DS) { | ||
out += c4; | ||
} else { | ||
out += BS + c4; | ||
} | ||
} else if (c4 === DS) { | ||
out += parseEnvVar(); | ||
} else { | ||
out += c4; | ||
} | ||
} | ||
} else if (c4 === DQ || c4 === SQ) { | ||
quote = c4; | ||
} else if (controlRE.test(c4)) { | ||
return { op: s }; | ||
} else if (hash.test(c4)) { | ||
commented = true; | ||
var commentObj = { comment: string.slice(match.index + i2 + 1) }; | ||
if (out.length) { | ||
return [out, commentObj]; | ||
} | ||
return [commentObj]; | ||
} else if (c4 === BS) { | ||
esc = true; | ||
} else if (c4 === DS) { | ||
out += parseEnvVar(); | ||
} else { | ||
out += c4; | ||
} | ||
} | ||
if (isGlob) { | ||
return { op: "glob", pattern: out }; | ||
} | ||
return out; | ||
}).reduce(function(prev, arg) { | ||
return typeof arg === "undefined" ? prev : prev.concat(arg); | ||
}, []); | ||
} | ||
module2.exports = function parse2(s, env, opts) { | ||
var mapped = parseInternal(s, env, opts); | ||
if (typeof env !== "function") { | ||
return mapped; | ||
} | ||
return mapped.reduce(function(acc, s2) { | ||
if (typeof s2 === "object") { | ||
return acc.concat(s2); | ||
} | ||
var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g")); | ||
if (xs.length === 1) { | ||
return acc.concat(xs[0]); | ||
} | ||
return acc.concat(xs.filter(Boolean).map(function(x5) { | ||
if (startsWithToken.test(x5)) { | ||
return JSON.parse(x5.split(TOKEN)[1]); | ||
} | ||
return x5; | ||
})); | ||
}, []); | ||
}; | ||
} | ||
}); | ||
// src/index.ts | ||
@@ -250,2 +447,3 @@ var src_exports = {}; | ||
var import_prompts2 = __toESM(require("prompts")); | ||
var import_parse = __toESM(require_parse()); | ||
var import_tinyexec4 = require("tinyexec"); | ||
@@ -942,6 +1140,8 @@ | ||
} else { | ||
console.log(symbols_exports.info, "Executing script", operation.options.execute); | ||
await (0, import_tinyexec4.x)(operation.options.execute, [], { | ||
const [command, ...args] = (0, import_parse.default)(operation.options.execute); | ||
console.log(symbols_exports.info, "Executing script", command, ...args); | ||
await (0, import_tinyexec4.x)(command, args, { | ||
nodeOptions: { | ||
stdio: "inherit" | ||
stdio: "inherit", | ||
cwd: operation.options.cwd | ||
} | ||
@@ -948,0 +1148,0 @@ }); |
{ | ||
"name": "bumpp", | ||
"version": "9.9.0", | ||
"version": "9.9.1", | ||
"packageManager": "pnpm@9.15.0", | ||
@@ -85,2 +85,3 @@ "description": "Bump version, commit changes, tag, and push to Git", | ||
"rimraf": "^6.0.1", | ||
"shell-quote": "^1.8.2", | ||
"tsup": "^8.3.5", | ||
@@ -87,0 +88,0 @@ "typescript": "^5.7.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167350
4299
15