1const readJson = require('./read-json.js') 2const version = require('./version.js') 3 4module.exports = async (newversion, opts = {}) => { 5 const { 6 path = process.cwd(), 7 allowSameVersion = false, 8 tagVersionPrefix = 'v', 9 commitHooks = true, 10 gitTagVersion = true, 11 signGitCommit = false, 12 signGitTag = false, 13 force = false, 14 ignoreScripts = false, 15 scriptShell = undefined, 16 preid = null, 17 message = 'v%s', 18 silent, 19 } = opts 20 21 const pkg = opts.pkg || await readJson(path + '/package.json') 22 23 return version(newversion, { 24 path, 25 cwd: path, 26 allowSameVersion, 27 tagVersionPrefix, 28 commitHooks, 29 gitTagVersion, 30 signGitCommit, 31 signGitTag, 32 force, 33 ignoreScripts, 34 scriptShell, 35 preid, 36 pkg, 37 message, 38 silent, 39 }) 40} 41