11cb0ef41Sopenharmony_ciconst readJson = require('./read-json.js') 21cb0ef41Sopenharmony_ciconst version = require('./version.js') 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_cimodule.exports = async (newversion, opts = {}) => { 51cb0ef41Sopenharmony_ci const { 61cb0ef41Sopenharmony_ci path = process.cwd(), 71cb0ef41Sopenharmony_ci allowSameVersion = false, 81cb0ef41Sopenharmony_ci tagVersionPrefix = 'v', 91cb0ef41Sopenharmony_ci commitHooks = true, 101cb0ef41Sopenharmony_ci gitTagVersion = true, 111cb0ef41Sopenharmony_ci signGitCommit = false, 121cb0ef41Sopenharmony_ci signGitTag = false, 131cb0ef41Sopenharmony_ci force = false, 141cb0ef41Sopenharmony_ci ignoreScripts = false, 151cb0ef41Sopenharmony_ci scriptShell = undefined, 161cb0ef41Sopenharmony_ci preid = null, 171cb0ef41Sopenharmony_ci message = 'v%s', 181cb0ef41Sopenharmony_ci silent, 191cb0ef41Sopenharmony_ci } = opts 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci const pkg = opts.pkg || await readJson(path + '/package.json') 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ci return version(newversion, { 241cb0ef41Sopenharmony_ci path, 251cb0ef41Sopenharmony_ci cwd: path, 261cb0ef41Sopenharmony_ci allowSameVersion, 271cb0ef41Sopenharmony_ci tagVersionPrefix, 281cb0ef41Sopenharmony_ci commitHooks, 291cb0ef41Sopenharmony_ci gitTagVersion, 301cb0ef41Sopenharmony_ci signGitCommit, 311cb0ef41Sopenharmony_ci signGitTag, 321cb0ef41Sopenharmony_ci force, 331cb0ef41Sopenharmony_ci ignoreScripts, 341cb0ef41Sopenharmony_ci scriptShell, 351cb0ef41Sopenharmony_ci preid, 361cb0ef41Sopenharmony_ci pkg, 371cb0ef41Sopenharmony_ci message, 381cb0ef41Sopenharmony_ci silent, 391cb0ef41Sopenharmony_ci }) 401cb0ef41Sopenharmony_ci} 41