New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cmd-deps

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmd-deps - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

.prettierrc

15

lib/parser.js

@@ -92,5 +92,8 @@ /**

if (flags.length && node.type === 'MemberExpression') {
return node.object.type === 'Identifier' && node.object.name === word
&& ((node.property.type === 'Identifier' && flags.indexOf(node.property.name) !== -1)
|| (node.property.type === 'Literal' && flags.indexOf(node.property.value) !== -1));
return (
node.object.type === 'Identifier' &&
node.object.name === word &&
((node.property.type === 'Identifier' && flags.indexOf(node.property.name) !== -1) ||
(node.property.type === 'Literal' && flags.indexOf(node.property.value) !== -1))
);
} else {

@@ -122,3 +125,3 @@ return node.type === 'Identifier' && node.name === word;

if (!utils.string(options.word)) options.word = 'require';
if (!(new RegExp('\\b' + options.word + '\\b')).test(src)) return deps;
if (!new RegExp('\\b' + options.word + '\\b').test(src)) return deps;
if (!Array.isArray(options.flags)) options.flags = [];

@@ -150,3 +153,3 @@ if (replace && !utils.fn(replace)) replace = utils.noop;

// Walk code
walk(src, options.parse, (node) => {
walk(src, options.parse, node => {
if (isRequire(node, options.word, options.flags)) {

@@ -164,3 +167,3 @@ let args = node.arguments;

} else if (args.type === 'ArrayExpression') {
args.elements.forEach((args) => {
args.elements.forEach(args => {
if (args.type === 'Literal') {

@@ -167,0 +170,0 @@ handle(args, flag);

11

package.json
{
"name": "cmd-deps",
"version": "2.2.0",
"version": "2.2.1",
"description": "Transform cmd and get cmd dependences",

@@ -23,10 +23,3 @@ "author": {

"main": "index",
"keywords": [
"cmd",
"require",
"common",
"commonjs",
"transform",
"dependencies"
],
"keywords": ["cmd", "require", "common", "commonjs", "transform", "dependencies"],
"dependencies": {

@@ -33,0 +26,0 @@ "acorn": "^5.2.1"

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