Socket
Socket
Sign inDemoInstall

cacache

Package Overview
Dependencies
12
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

lib/util/move-file.js

4

lib/content/put-stream.js

@@ -8,3 +8,3 @@ var checkSizeStream = require('../util/check-size-stream')

var hasContent = require('./read').hasContent
var move = require('../util/move')
var moveFile = require('../util/move-file')
var once = require('once')

@@ -89,3 +89,3 @@ var path = require('path')

if (err) { return cb(err) }
move(tmpTarget, destination, function (err) {
moveFile(tmpTarget, destination, function (err) {
if (err) { return cb(err) }

@@ -92,0 +92,0 @@ fixOwner.chownr(destination, opts.uid, opts.gid, cb)

@@ -5,2 +5,3 @@ var through = require('mississippi').through

function checkSizeStream (size) {
if (size == null) { throw new Error('size is required') }
var found = 0

@@ -11,13 +12,13 @@ var stream = through(function (chunk, enc, next) {

}, function (cb) {
if (size === found) {
cb()
} else {
var err = new Error('stream data size mismatch')
err.expected = size
err.found = found
err.code = 'EBADSIZE'
return cb(err)
}
cb(size === found ? null : sizeError(size, found))
})
return stream
}
function sizeError (expected, found) {
var err = new Error('stream data size mismatch')
err.expected = expected
err.found = found
err.code = 'EBADSIZE'
return err
}
{
"name": "cacache",
"version": "3.0.0",
"version": "3.0.1",
"description": "General content-addressable cache system that maintains a filesystem registry of file data.",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc