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

broccoli-kitchen-sink-helpers

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-kitchen-sink-helpers - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

4

CHANGELOG.md
# master
# 0.3.0
* In keysForTree, require top-level directory (or file) to exist
# 0.2.9

@@ -4,0 +8,0 @@

43

index.js

@@ -32,19 +32,7 @@ var fs = require('fs')

try {
stats = fs.statSync(fullPath)
} catch (err) {
if (!keysForTreeWarningPrinted) {
console.warn('Warning: failed to stat ' + fullPath)
keysForTreeWarningPrinted = true
}
// fullPath has probably ceased to exist. Leave `stats` undefined and
// proceed hashing.
}
stats = fs.statSync(fullPath)
var childKeys = []
if (stats) {
statKeys = ['stats', stats.mode]
} else {
statKeys = ['stat failed']
}
if (stats && stats.isDirectory()) {
statKeys = ['stats', stats.mode]
if (stats.isDirectory()) {
var fileIdentity = stats.dev + '\x00' + stats.ino

@@ -62,12 +50,25 @@ var entries

for (var i = 0; i < entries.length; i++) {
var keys = keysForTree(
path.join(fullPath, entries[i]),
path.join(relativePath, entries[i])
)
var keys
try {
keys = keysForTree(
path.join(fullPath, entries[i]),
path.join(relativePath, entries[i])
)
} catch (err) {
if (!keysForTreeWarningPrinted) {
console.warn('Warning: failed to stat ' + path.join(fullPath, entries[i]))
keysForTreeWarningPrinted = true
}
// The child has probably ceased to exist since we called
// `readdirSync`, or it is a broken symlink.
keys = ['missing']
}
childKeys = childKeys.concat(keys)
}
}
} else if (stats && stats.isFile()) {
} else if (stats.isFile()) {
statKeys.push(stats.mtime.getTime())
statKeys.push(stats.size)
} else {
throw new Error(fullPath + ': Unexpected file type')
}

@@ -74,0 +75,0 @@

{
"name": "broccoli-kitchen-sink-helpers",
"description": "Collection of helpers that need to be extracted into separate packages",
"version": "0.2.9",
"version": "0.3.0",
"author": "Jo Liss <joliss42@gmail.com>",

@@ -6,0 +6,0 @@ "main": "index.js",

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