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

meow

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meow - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

7

index.d.ts

@@ -202,2 +202,9 @@ import {PackageJson} from 'type-fest';

readonly hardRejection?: boolean;
/**
Whether to allow unknown flags or not.
@default true
*/
readonly allowUnknownFlags?: boolean;
}

@@ -204,0 +211,0 @@

@@ -57,2 +57,9 @@ 'use strict';

const reportUnknownFlags = unknownFlags => {
console.error([
`Unknown flag${unknownFlags.length > 1 ? 's' : ''}`,
...unknownFlags
].join('\n'));
};
const buildParserFlags = ({flags, booleanDefault}) => {

@@ -114,2 +121,3 @@ const parserFlags = {};

hardRejection: true,
allowUnknownFlags: true,
...options

@@ -144,2 +152,7 @@ };

if (!options.allowUnknownFlags) {
// Collect unknown options in `argv._` to be checked later.
parserOptions.configuration['unknown-options-as-args'] = true;
}
const {pkg} = options;

@@ -183,2 +196,10 @@ const argv = parseArguments(options.argv, parserOptions);

if (!options.allowUnknownFlags) {
const unknownFlags = input.filter(item => typeof item === 'string' && item.startsWith('-'));
if (unknownFlags.length > 0) {
reportUnknownFlags(unknownFlags);
process.exit(2);
}
}
const flags = camelCaseKeys(argv, {exclude: ['--', /^\w$/]});

@@ -185,0 +206,0 @@ const unnormalizedFlags = {...flags};

2

package.json
{
"name": "meow",
"version": "8.0.0",
"version": "8.1.0",
"description": "CLI app helper",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

# meow [![Build Status](https://travis-ci.org/sindresorhus/meow.svg?branch=master)](https://travis-ci.org/sindresorhus/meow)
# meow

@@ -317,2 +317,9 @@ > CLI app helper

#### allowUnknownFlags
Type `boolean`\
Default: `true`
Whether to allow unknown flags or not.
## Promises

@@ -319,0 +326,0 @@

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