You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

fs-extra

Package Overview
Dependencies
Maintainers
3
Versions
101
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.3
to
11.3.4
+30
-5
lib/ensure/symlink.js

@@ -23,7 +23,18 @@ 'use strict'

if (stats && stats.isSymbolicLink()) {
const [srcStat, dstStat] = await Promise.all([
fs.stat(srcpath),
fs.stat(dstpath)
])
// When srcpath is relative, resolve it relative to dstpath's directory
// (standard symlink behavior) or fall back to cwd if that doesn't exist
let srcStat
if (path.isAbsolute(srcpath)) {
srcStat = await fs.stat(srcpath)
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
try {
srcStat = await fs.stat(relativeToDst)
} catch {
srcStat = await fs.stat(srcpath)
}
}
const dstStat = await fs.stat(dstpath)
if (areIdentical(srcStat, dstStat)) return

@@ -50,3 +61,17 @@ }

if (stats && stats.isSymbolicLink()) {
const srcStat = fs.statSync(srcpath)
// When srcpath is relative, resolve it relative to dstpath's directory
// (standard symlink behavior) or fall back to cwd if that doesn't exist
let srcStat
if (path.isAbsolute(srcpath)) {
srcStat = fs.statSync(srcpath)
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
try {
srcStat = fs.statSync(relativeToDst)
} catch {
srcStat = fs.statSync(srcpath)
}
}
const dstStat = fs.statSync(dstpath)

@@ -53,0 +78,0 @@ if (areIdentical(srcStat, dstStat)) return

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

@@ -11,3 +11,3 @@ "engines": {

"type": "git",
"url": "https://github.com/jprichardson/node-fs-extra"
"url": "git+https://github.com/jprichardson/node-fs-extra.git"
},

@@ -14,0 +14,0 @@ "keywords": [