🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

fs-extra

Package Overview
Dependencies
Maintainers
3
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-extra - npm Package Compare versions

Comparing version
11.3.6
to
11.4.0
+20
-4
lib/ensure/symlink.js

@@ -38,4 +38,12 @@ 'use strict'

const dstStat = await fs.stat(dstpath, { bigint: true })
if (areIdentical(srcStat, dstStat)) return
// Following the existing symlink fails with ENOENT if it's broken; in that
// case fall through so fs.symlink reports EEXIST, rather than leaking the
// stat ENOENT. Any other error is unexpected, so rethrow it.
let dstStat
try {
dstStat = await fs.stat(dstpath, { bigint: true })
} catch (err) {
if (err.code !== 'ENOENT') throw err
}
if (dstStat && areIdentical(srcStat, dstStat)) return
}

@@ -76,4 +84,12 @@

const dstStat = fs.statSync(dstpath, { bigint: true })
if (areIdentical(srcStat, dstStat)) return
// Following the existing symlink fails with ENOENT if it's broken; in that
// case fall through so fs.symlinkSync reports EEXIST, rather than leaking the
// stat ENOENT. Any other error is unexpected, so rethrow it.
let dstStat
try {
dstStat = fs.statSync(dstpath, { bigint: true })
} catch (err) {
if (err.code !== 'ENOENT') throw err
}
if (dstStat && areIdentical(srcStat, dstStat)) return
}

@@ -80,0 +96,0 @@

+1
-1
{
"name": "fs-extra",
"version": "11.3.6",
"version": "11.4.0",
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",

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