@npmcli/fs
Advanced tools
+5
-5
@@ -59,10 +59,10 @@ const { dirname, join, resolve, relative, isAbsolute } = require('path') | ||
| // type of symlink in windows | ||
| let targetStat = 'file' | ||
| let targetType = 'file' | ||
| try { | ||
| targetStat = await fs.stat(resolve(dirname(symSource), target)) | ||
| const targetStat = await fs.stat(resolve(dirname(symSource), target)) | ||
| if (targetStat.isDirectory()) { | ||
| targetStat = 'junction' | ||
| targetType = 'junction' | ||
| } | ||
| } catch { | ||
| // targetStat remains 'file' | ||
| // targetType remains 'file' | ||
| } | ||
@@ -72,3 +72,3 @@ await fs.symlink( | ||
| symDestination, | ||
| targetStat | ||
| targetType | ||
| ) | ||
@@ -75,0 +75,0 @@ })) |
+5
-5
| { | ||
| "name": "@npmcli/fs", | ||
| "version": "5.0.0", | ||
| "version": "6.0.0", | ||
| "description": "filesystem utilities for the npm cli", | ||
@@ -33,4 +33,4 @@ "main": "lib/index.js", | ||
| "devDependencies": { | ||
| "@npmcli/eslint-config": "^5.0.0", | ||
| "@npmcli/template-oss": "4.27.1", | ||
| "@npmcli/eslint-config": "^6.0.0", | ||
| "@npmcli/template-oss": "5.1.0", | ||
| "tap": "^16.0.1" | ||
@@ -42,7 +42,7 @@ }, | ||
| "engines": { | ||
| "node": "^20.17.0 || >=22.9.0" | ||
| "node": "^22.22.2 || ^24.15.0 || >=26.0.0" | ||
| }, | ||
| "templateOSS": { | ||
| "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
| "version": "4.27.1", | ||
| "version": "5.1.0", | ||
| "publish": true | ||
@@ -49,0 +49,0 @@ }, |
26606
0.06%