����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /home/real/node-v13.0.1/deps/npm/test/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/real/node-v13.0.1/deps/npm/test/tap/version-message-config.js
var common = require('../common-tap.js')
var fs = require('fs')
var path = require('path')

var test = require('tap').test

var npm = require('../../lib/npm.js')

var pkg = common.pkg
var npmrc = path.resolve(pkg, '.npmrc')
var packagePath = path.resolve(pkg, 'package.json')

var json = { name: 'blah', version: '0.1.2' }

var configContents = 'sign-git-commit=false\nsign-git-tag=false\nmessage=":bookmark: %s"\n'

test('npm version <semver> with message config', function (t) {
  setup()

  npm.load({ prefix: pkg, userconfig: npmrc }, function () {
    var git = require('../../lib/utils/git.js')

    common.makeGitRepo({ path: pkg }, function (er) {
      t.ifErr(er, 'git bootstrap ran without error')

      common.npm(
        [
          'version',
          'patch',
          '--loglevel', 'silent'
          // package config is picked up from env
        ],
        { cwd: pkg, env: { PATH: process.env.PATH } },
        function (err, code, stdout, stderr) {
          t.ifError(err, 'npm version ran without issue')
          t.notOk(code, 'exited with a non-error code')
          t.notOk(stderr, 'no error output')

          git.whichAndExec(
            ['log'],
            { cwd: pkg, env: process.env },
            function (er, log, stderr) {
              t.ok(log.match(/:bookmark: 0\.1\.3/g), 'config was picked up by version')
              t.end()
            }
          )
        }
      )
    })
  })
})

function setup () {
  process.chdir(pkg)

  fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8')
  fs.writeFileSync(npmrc, configContents, 'ascii')
}

ZeroDay Forums Mini