Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yargs

Package Overview
Dependencies
Maintainers
2
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs - npm Package Compare versions

Comparing version 15.3.0-beta.0 to 15.3.0-beta.1

12

lib/usage.js

@@ -276,3 +276,11 @@ 'use strict'

if (groupName === self.getPositionalGroupName()) return sw
else return (/^[^0-9]$/.test(sw) ? '-' : '--') + sw
else {
return (
// matches yargs-parser logic in which single-digits
// aliases declared with a boolean type are now valid
/^[0-9]$/.test(sw)
? ~options.boolean.indexOf(key) ? '-' : '--'
: sw.length > 1 ? '--' : '-'
) + sw
}
})

@@ -504,2 +512,4 @@ .join(', ')

const maxWidth = 80
// CI is not a TTY
/* c8 ignore next 2 */
if (typeof process === 'object' && process.stdout && process.stdout.columns) {

@@ -506,0 +516,0 @@ return Math.min(maxWidth, process.stdout.columns)

7

package.json
{
"name": "yargs",
"version": "15.3.0-beta.0",
"version": "15.3.0-beta.1",
"description": "yargs the modern, pirate-themed, successor to optimist.",

@@ -32,3 +32,3 @@ "main": "./index.js",

"y18n": "^4.0.0",
"yargs-parser": "^18.0.0"
"yargs-parser": "^18.1.0"
},

@@ -39,3 +39,2 @@ "devDependencies": {

"chalk": "^3.0.0",
"coveralls": "^3.0.3",
"cpr": "^3.0.1",

@@ -55,3 +54,3 @@ "cross-spawn": "^7.0.0",

"test": "c8 --reporter=html --reporter=text mocha --require ./test/before.js --timeout=12000 --check-leaks",
"coverage": "c8 report --reporter=text-lcov | coveralls"
"coverage": "c8 report --check-coverage check-coverage --lines=100 --branches=96 --statements=100"
},

@@ -58,0 +57,0 @@ "repository": {

@@ -12,3 +12,2 @@ <p align="center">

[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![NPM version][npm-image]][npm-url]

@@ -131,4 +130,2 @@ [![js-standard-style][standard-image]][standard-url]

[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg
[coveralls-url]: https://coveralls.io/github/yargs/yargs
[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg
[npm-url]: https://www.npmjs.com/package/yargs

@@ -135,0 +132,0 @@ [npm-image]: https://img.shields.io/npm/v/yargs.svg

@@ -238,5 +238,14 @@ 'use strict'

self.requiresArg = function (keys) {
argsert('<array|string>', [keys], arguments.length)
populateParserHintObject(self.nargs, false, 'narg', keys, NaN)
self.requiresArg = function (keys, value) {
argsert('<array|string|object> [number]', [keys], arguments.length)
// If someone configures nargs at the same time as requiresArg,
// nargs should take precedent,
// see: https://github.com/yargs/yargs/pull/1572
// TODO: make this work with aliases, using a check similar to
// checkAllAliases() in yargs-parser.
if (typeof keys === 'string' && options.narg[keys]) {
return self
} else {
populateParserHintObject(self.requiresArg, false, 'narg', keys, NaN)
}
return self

@@ -243,0 +252,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc