Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jsenv/filesystem

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/filesystem - npm Package Compare versions

Comparing version 2.6.1 to 2.7.0

src/getRealFileSystemUrlSync.js

1

main.js

@@ -27,2 +27,3 @@ /* eslint-disable import/max-dependencies */

export { fileSystemPathToUrl } from "./src/fileSystemPathToUrl.js"
export { getRealFileSystemUrlSync } from "./src/getRealFileSystemUrlSync.js"
export { grantPermissionsOnFileSystemNode } from "./src/grantPermissionsOnFileSystemNode.js"

@@ -29,0 +30,0 @@ export { isFileSystemPath } from "./src/isFileSystemPath.js"

6

package.json
{
"name": "@jsenv/filesystem",
"version": "2.6.1",
"version": "2.7.0",
"description": "Collection of functions to interact with filesystem in Node.js",

@@ -47,3 +47,3 @@ "license": "MIT",

"@jsenv/assert": "2.4.1",
"@jsenv/core": "25.1.0",
"@jsenv/core": "25.2.1",
"@jsenv/eslint-config": "16.0.9",

@@ -55,3 +55,3 @@ "@jsenv/github-release-package": "1.2.3",

"@jsenv/performance-impact": "2.2.1",
"eslint": "8.6.0",
"eslint": "8.7.0",
"eslint-plugin-import": "2.25.4",

@@ -58,0 +58,0 @@ "prettier": "2.5.1"

@@ -1,3 +0,5 @@

import { statSync } from "fs"
import { statSync } from "node:fs"
import { urlToFileSystemPath } from "../urlToFileSystemPath.js"
import { statsToType } from "./statsToType.js"

@@ -4,0 +6,0 @@

@@ -34,6 +34,9 @@ import { promises } from "node:fs"

const toInfo = getToInfo(to, fromUrl)
// Node.js doc at https://nodejs.org/api/fs.html#fssymlinktarget-path-type-callback
// states the following:
// "If the type argument is not set, Node.js will autodetect
// target type and use 'file' or 'dir'"
// In practice, if code don't specify "type" on windows, you later get EPERM errors
// when doing operation on the symlink such as "fs.stat"
if (isWindows && typeof type === "undefined") {
// without this if you write a symbolic link without specifying the type on windows
// you later get EPERM when doing stat on the symlink
const toStats = await readFileSystemNodeStat(toInfo.url, {

@@ -44,3 +47,2 @@ nullIfNotFound: true,

}
const symbolicLinkPath = urlToFileSystemPath(fromUrl)

@@ -47,0 +49,0 @@ try {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc