Socket
Socket
Sign inDemoInstall

yargs-parser

Package Overview
Dependencies
0
Maintainers
3
Versions
83
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.0.1 to 21.1.0

build/index.d.cts

6

build/lib/index.js

@@ -9,2 +9,3 @@ /**

*/
var _a, _b, _c;
import { format } from 'util';

@@ -20,4 +21,5 @@ import { normalize, resolve } from 'path';

: 12;
if (process && process.version) {
const major = Number(process.version.match(/v([^.]+)/)[1]);
const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
if (nodeVersion) {
const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
if (major < minNodeVersion) {

@@ -24,0 +26,0 @@ throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);

@@ -181,7 +181,7 @@ /**

// any unknown option (except for end-of-options, "--")
if (arg !== '--' && isUnknownOptionAsArg(arg)) {
if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
pushPositional(arg);
// ---, ---=, ----, etc,
}
else if (truncatedArg.match(/---+(=|$)/)) {
else if (truncatedArg.match(/^---+(=|$)/)) {
// options without key name are invalid.

@@ -188,0 +188,0 @@ pushPositional(arg);

@@ -5,2 +5,16 @@ # Changelog

## [21.1.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.1...yargs-parser-v21.1.0) (2022-08-03)
### Features
* allow the browser build to be imported ([#443](https://github.com/yargs/yargs-parser/issues/443)) ([a89259f](https://github.com/yargs/yargs-parser/commit/a89259ff41d6f5312b3ce8a30bef343a993f395a))
### Bug Fixes
* **halt-at-non-option:** prevent known args from being parsed when "unknown-options-as-args" is enabled ([#438](https://github.com/yargs/yargs-parser/issues/438)) ([c474bc1](https://github.com/yargs/yargs-parser/commit/c474bc10c3aa0ae864b95e5722730114ef15f573))
* node version check now uses process.versions.node ([#450](https://github.com/yargs/yargs-parser/issues/450)) ([d07bcdb](https://github.com/yargs/yargs-parser/commit/d07bcdbe43075f7201fbe8a08e491217247fe1f1))
* parse options ending with 3+ hyphens ([#434](https://github.com/yargs/yargs-parser/issues/434)) ([4f1060b](https://github.com/yargs/yargs-parser/commit/4f1060b50759fadbac3315c5117b0c3d65b0a7d8))
### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27)

@@ -7,0 +21,0 @@

{
"name": "yargs-parser",
"version": "21.0.1",
"version": "21.1.0",
"description": "the mighty option parser used by yargs",

@@ -13,2 +13,5 @@ "main": "build/index.cjs",

"./build/index.cjs"
],
"./browser": [
"./browser.js"
]

@@ -64,9 +67,9 @@ },

"gts": "^3.0.0",
"mocha": "^9.0.0",
"puppeteer": "^13.4.0",
"mocha": "^10.0.0",
"puppeteer": "^16.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.22.1",
"rollup-plugin-cleanup": "^3.1.1",
"rollup-plugin-ts": "^2.0.5",
"serve": "^13.0.0",
"rollup-plugin-ts": "^3.0.0",
"serve": "^14.0.0",
"standardx": "^7.0.0",

@@ -73,0 +76,0 @@ "start-server-and-test": "^1.11.2",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc