New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1 to 0.2.2

5

CHANGELOG.md
# master
# 0.2.2
* Make `hashTree` match after `copyRecursivelySync`, by disregarding the
name of the root directory and not including directory times
# 0.2.1

@@ -4,0 +9,0 @@

33

index.js

@@ -22,4 +22,11 @@ var fs = require('fs')

function keysForTree (fullPath, _stack, _followSymlink) {
function keysForTree (fullPath, options) {
options = options || {}
var _stack = options._stack
var _followSymlink = options._followSymlink
var relativePath = options.relativePath || '.'
var stats
var statKeys
try {

@@ -37,2 +44,7 @@ if (_followSymlink) {

var childKeys = []
if (stats) {
statKeys = ['stats', stats.mode]
} else {
statKeys = ['stat failed']
}
if (stats && stats.isDirectory()) {

@@ -55,3 +67,8 @@ var fileIdentity = stats.dev + '\x00' + stats.ino

for (var i = 0; i < entries.length; i++) {
childKeys = childKeys.concat(keysForTree(path.join(fullPath, entries[i]), _stack))
var keys = keysForTree(path.join(fullPath, entries[i]), {
_stack: _stack,
relativePath: path.join(relativePath, entries[i])
})
childKeys = childKeys.concat(keys)
}

@@ -68,7 +85,13 @@ }

}
childKeys = keysForTree(fullPath, _stack, true) // follow symlink
childKeys = keysForTree(fullPath, {_stack: _stack, relativePath: relativePath, _followSymlink: true}) // follow symlink
statKeys.push(stats.mtime.getTime())
statKeys.push(stats.size)
} else if (stats && stats.isFile()) {
statKeys.push(stats.mtime.getTime())
statKeys.push(stats.size)
}
// Perhaps we should not use basename to infer the file name
return ['path', path.basename(fullPath)]
.concat(stats ? ['stats', stats.mode, stats.size, stats.mtime.getTime()] : ['stat failed'])
return ['path', relativePath]
.concat(statKeys)
.concat(childKeys)

@@ -75,0 +98,0 @@ }

2

package.json
{
"name": "broccoli-kitchen-sink-helpers",
"description": "Collection of helpers that need to be extracted into separate packages",
"version": "0.2.1",
"version": "0.2.2",
"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