Socket
Socket
Sign inDemoInstall

depcheck-detector-execa

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depcheck-detector-execa - npm Package Compare versions

Comparing version 3.0.29 to 4.0.0

22

dist/index.js

@@ -1,17 +0,7 @@

import compact from "@dword-design/functions/dist/compact.js";
import filter from "@dword-design/functions/dist/filter.js";
import flatMap from "@dword-design/functions/dist/flat-map.js";
import flatten from "@dword-design/functions/dist/flatten.js";
import groupBy from "@dword-design/functions/dist/group-by.js";
import join from "@dword-design/functions/dist/join.js";
import keys from "@dword-design/functions/dist/keys.js";
import map from "@dword-design/functions/dist/map.js";
import mapValues from "@dword-design/functions/dist/map-values.js";
import split from "@dword-design/functions/dist/split.js";
import uniq from "@dword-design/functions/dist/uniq.js";
import { compact, filter, flatMap, flatten, groupBy, join, keys, map, mapValues, split, uniq } from '@dword-design/functions';
import fs from 'fs-extra';
import moduleRoot from 'module-root';
const getSegments = node => {
var _node$callee, _node$callee$object, _node$callee2, _node$callee2$propert, _node$callee3, _node$arguments$0$val, _ref, _ref2, _ref3, _node$arguments$0$qua, _node$callee4;
if (((_node$callee = node.callee) === null || _node$callee === void 0 ? void 0 : (_node$callee$object = _node$callee.object) === null || _node$callee$object === void 0 ? void 0 : _node$callee$object.name) === 'execa' && ['command', 'commandSync'].includes((_node$callee2 = node.callee) === null || _node$callee2 === void 0 ? void 0 : (_node$callee2$propert = _node$callee2.property) === null || _node$callee2$propert === void 0 ? void 0 : _node$callee2$propert.name) || ['execaCommand', 'execaCommandSync'].includes((_node$callee3 = node.callee) === null || _node$callee3 === void 0 ? void 0 : _node$callee3.name)) {
var _node$arguments$0$val, _ref, _ref2, _ref3, _node$arguments$0$qua;
if (node.callee?.object?.name === 'execa' && ['command', 'commandSync'].includes(node.callee?.property?.name) || ['execaCommand', 'execaCommandSync'].includes(node.callee?.name)) {
switch (node.arguments[0].type) {

@@ -26,5 +16,5 @@ case 'StringLiteral':

}
if (['execa', 'execaSync'].includes((_node$callee4 = node.callee) === null || _node$callee4 === void 0 ? void 0 : _node$callee4.name)) {
var _node$arguments$, _ref4, _node$arguments$1$ele;
return [...(node.arguments[0].type === 'StringLiteral' ? [node.arguments[0].value] : []), ...(((_node$arguments$ = node.arguments[1]) === null || _node$arguments$ === void 0 ? void 0 : _node$arguments$.type) === 'ArrayExpression' ? (_ref4 = (_node$arguments$1$ele = node.arguments[1].elements, filter({
if (['execa', 'execaSync'].includes(node.callee?.name)) {
var _ref4, _node$arguments$1$ele;
return [...(node.arguments[0].type === 'StringLiteral' ? [node.arguments[0].value] : []), ...(node.arguments[1]?.type === 'ArrayExpression' ? (_ref4 = (_node$arguments$1$ele = node.arguments[1].elements, filter({
type: 'StringLiteral'

@@ -31,0 +21,0 @@ })(_node$arguments$1$ele)), map('value')(_ref4)) : [])];

@@ -9,3 +9,3 @@ # License

[MIT License](https://opensource.org/licenses/MIT)
[MIT License](https://opensource.org/license/mit/)

@@ -12,0 +12,0 @@ ## MIT License

{
"name": "depcheck-detector-execa",
"version": "3.0.29",
"version": "4.0.0",
"description": "Detector for depcheck that finds dependencies in execa calls.",

@@ -26,8 +26,8 @@ "repository": "dword-design/depcheck-detector-execa",

"dependencies": {
"@dword-design/functions": "^4.0.0",
"@dword-design/functions": "^6.0.0",
"fs-extra": "^11.1.0",
"module-root": "npm:@dword-design/module-root"
"module-root": "npm:@dword-design/module-root@^0"
},
"devDependencies": {
"@dword-design/base": "^9.0.3",
"@dword-design/base": "^11.1.1",
"@dword-design/tester": "^2.0.4",

@@ -39,3 +39,3 @@ "@dword-design/tester-plugin-tmp-dir": "^2.0.3",

"engines": {
"node": ">=14"
"node": ">=18"
},

@@ -42,0 +42,0 @@ "publishConfig": {

@@ -138,3 +138,3 @@ <!-- TITLE/ -->

[MIT License](https://opensource.org/licenses/MIT) © [Sebastian Landwehr](https://sebastianlandwehr.com)
[MIT License](https://opensource.org/license/mit/) © [Sebastian Landwehr](https://sebastianlandwehr.com)
<!-- /LICENSE -->
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