Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'tap-parser': require('tap-parser/package.json').version,
nyc: require('nyc/package.json').version,
'tap-yaml': require('tap-yaml/package.json').version,
treport: require('treport/package.json').version,
tcompare: require('tcompare/package.json').version,
}))
}
if (options.version)
return console.log(require('../package.json').version)
if (options['parser-version'])
return console.log(require('tap-parser/package.json').version)
if (options['nyc-version'])
return console.log(require('nyc/package.json').version)
if (options['nyc-help'])
return nycHelp()
process.stdout.on('error', er => {
/* istanbul ignore else */
if (er.code === 'EPIPE')
process.exit()
else
throw er
})
// we test this directly, not from here.
/* istanbul ignore next */
if (options.watch)
return new Repl(options, process.stdin, process.stdout)
t.test('--nyc-version', function (t) {
var expect = require('nyc/package.json').version + '\n'
execFile(node, [run, '--nyc-version'], function (err, stdout, stderr) {
if (err) {
throw err
}
t.equal(stderr, '')
t.equal(stdout, expect)
t.end()
})
})
run(['--nyc-version'], null, (er, o, e) => {
t.equal(er, null)
t.equal(o.trim(), require('nyc/package.json').version)
t.end()
})
})
run(['--nyc-version'], null, (er, o, e) => {
t.equal(er, null)
t.equal(o.trim(), require('nyc/package.json').version)
t.end()
})
})
if (options.reporter === null)
options.reporter = options.color ? 'base' : 'tap'
if (options['dump-config']) {
console.log(yaml.stringify(Object.keys(options).filter(k =>
k !== 'dump-config' && k !== '_' && !/^[A-Z_]+$/.test(k)
).sort().reduce((set, k) =>
(set[k] = options[k], set), {})))
return
}
if (options.versions) {
return console.log(yaml.stringify({
tap: require('../package.json').version,
'tap-parser': require('tap-parser/package.json').version,
nyc: require('nyc/package.json').version,
'tap-yaml': require('tap-yaml/package.json').version,
treport: require('treport/package.json').version,
tcompare: require('tcompare/package.json').version,
}))
}
if (options.version)
return console.log(require('../package.json').version)
if (options['parser-version'])
return console.log(require('tap-parser/package.json').version)
if (options['nyc-version'])
return console.log(require('nyc/package.json').version)
if (options['nyc-help'])