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