Socket
Socket
Sign inDemoInstall

cacache

Package Overview
Dependencies
40
Maintainers
6
Versions
99
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 17.1.0 to 17.1.1

17

lib/content/write.js

@@ -18,2 +18,5 @@ 'use strict'

// Cache of move operations in process so we don't duplicate
const moveOperations = new Map()
async function write (cache, data, opts = {}) {

@@ -163,6 +166,12 @@ const { algorithms, size, integrity } = opts

const destDir = path.dirname(destination)
await fs.mkdir(destDir, { recursive: true })
if (moveOperations.has(destination)) {
return moveOperations.get(destination)
}
moveOperations.set(
destination,
fs.mkdir(destDir, { recursive: true })
.then(() => moveFile(tmp.target, destination, { overwrite: false }))
)
try {
await moveFile(tmp.target, destination, { overwrite: false })
await moveOperations.get(destination)
tmp.moved = true

@@ -173,2 +182,4 @@ } catch (err) {

}
} finally {
moveOperations.delete(destination)
}

@@ -175,0 +186,0 @@ }

6

package.json
{
"name": "cacache",
"version": "17.1.0",
"version": "17.1.1",
"cache-version": {

@@ -63,3 +63,3 @@ "content": "2",

"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.14.1",
"@npmcli/template-oss": "4.15.1",
"tap": "^16.0.0"

@@ -73,3 +73,3 @@ },

"windowsCI": false,
"version": "4.14.1",
"version": "4.15.1",
"publish": "true"

@@ -76,0 +76,0 @@ },

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