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

@clerc/plugin-strict-flags

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerc/plugin-strict-flags - npm Package Compare versions

Comparing version 0.25.1 to 0.26.0

24

dist/index.js

@@ -1,23 +0,1 @@

import { definePlugin } from '@clerc/core';
const semanticArray = (arr) => {
if (arr.length <= 1) {
return arr[0];
}
return `${arr.slice(0, -1).join(", ")} and ${arr[arr.length - 1]}`;
};
const strictFlagsPlugin = () => definePlugin({
setup: (cli) => {
return cli.inspector((ctx, next) => {
const keys = Object.keys(ctx.unknownFlags);
if (!ctx.resolved || keys.length === 0) {
next();
} else {
throw new Error(`Unexpected flag${keys.length > 1 ? "s" : ""}: ${semanticArray(keys)}`);
}
});
}
});
export { strictFlagsPlugin };
import{definePlugin as l}from"@clerc/core";const o=n=>n.length<=1?n[0]:`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`,r=()=>l({setup:n=>n.inspector((t,s)=>{const e=Object.keys(t.unknownFlags);if(!t.resolved||e.length===0)s();else throw new Error(`Unexpected flag${e.length>1?"s":""}: ${o(e)}`)})});export{r as strictFlagsPlugin};

7

package.json
{
"name": "@clerc/plugin-strict-flags",
"version": "0.25.1",
"version": "0.26.0",
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",

@@ -54,8 +54,9 @@ "description": "Clerc plugin strict flags",

"devDependencies": {
"@clerc/core": "0.25.1"
"@clerc/core": "0.26.0",
"@clerc/utils": "0.26.0"
},
"scripts": {
"build": "puild",
"build": "puild --minify",
"watch": "puild --watch"
}
}

Sorry, the diff of this file is not supported yet

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