PHP 8.2.30
Preview: index.js Size: 781 B
/proc/self/root/opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules/libnpmversion/lib/index.js

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,
  })
}

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
425 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
841 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
781 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
295 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
384 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
470 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download
3.22 KB lrw-r--r-- 2026-02-23 06:53:59
Edit Download
483 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).