You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@npmcli/arborist

Package Overview
Dependencies
Maintainers
5
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.5.3 to 7.5.4

15

lib/calc-dep-flags.js

@@ -34,2 +34,6 @@ const { depth } = require('treeverse')

if (node.isLink) {
// node.target can be null, we check to ensure it's not null before proceeding
if (node.target == null) {
return node
}
node.target.dev = node.dev

@@ -101,3 +105,3 @@ node.target.optional = node.optional

node.extraneous = node[flag] = false
if (node.isLink) {
if (node.isLink && node.target) {
node.target.extraneous = node.target[flag] = false

@@ -108,5 +112,8 @@ }

const children = []
for (const edge of node.target.edgesOut.values()) {
if (edge.to && edge.to[flag] &&
(flag !== 'peer' && edge.type === 'peer' || edge.type === 'prod')
const targetNode = node.isLink && node.target ? node.target : node
for (const edge of targetNode.edgesOut.values()) {
if (
edge.to &&
edge.to[flag] &&
((flag !== 'peer' && edge.type === 'peer') || edge.type === 'prod')
) {

@@ -113,0 +120,0 @@ children.push(edge.to)

@@ -53,2 +53,3 @@ // a module that manages a shrinkwrap file (npm-shrinkwrap.json or

const parseJSON = require('parse-conflict-json')
const nameFromFolder = require('@npmcli/name-from-folder')

@@ -237,3 +238,4 @@ const stringify = require('json-stringify-nice')

const pname = node.packageName
if (pname && (node === node.root || pname !== node.name)) {
// when Target package name and Target node share the same name, we include the name, target node should have name as per realpath.
if (pname && (node === node.root || pname !== node.name || nameFromFolder(node.realpath) !== pname)) {
meta.name = pname

@@ -240,0 +242,0 @@ }

{
"name": "@npmcli/arborist",
"version": "7.5.3",
"version": "7.5.4",
"description": "Manage node_modules trees",

@@ -5,0 +5,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc