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

@npmcli/arborist

Package Overview
Dependencies
Maintainers
6
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/arborist - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

21

lib/shrinkwrap.js

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

// check to make sure that there are no packages newer than the hidden lockfile
const assertNoNewer = async (path, data, lockTime, dir = path) => {
const assertNoNewer = async (path, data, lockTime, dir = path, seen = null) => {
const base = basename(dir)

@@ -144,5 +144,5 @@ const isNM = dir !== path && base === 'node_modules'

const rel = relpath(path, dir)
if (dir !== path) {
const dirTime = (await stat(dir)).mtime
const rel = relpath(path, dir)
if (dirTime > lockTime)

@@ -152,3 +152,5 @@ throw 'out of date, updated: ' + rel

throw 'missing from lockfile: ' + rel
}
seen.add(rel)
} else
seen = new Set([rel])

@@ -163,4 +165,13 @@ const parent = isParent ? dir : resolve(dir, 'node_modules')

ents.filter(ent => ent.isDirectory() && !/^\./.test(ent.name))
.map(ent => assertNoNewer(path, data, lockTime, resolve(parent, ent.name)))
))
.map(ent => assertNoNewer(path, data, lockTime, resolve(parent, ent.name), seen))
)).then(() => {
if (dir !== path)
return
// assert that all the entries in the lockfile were seen
for (const loc of new Set(Object.keys(data.packages))) {
if (!seen.has(loc))
throw 'missing from node_modules: ' + loc
}
})
}

@@ -167,0 +178,0 @@

{
"name": "@npmcli/arborist",
"version": "0.0.4",
"version": "0.0.5",
"description": "Manage node_modules trees",

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

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