New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jsenv/server

Package Overview
Dependencies
Maintainers
2
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/server - npm Package Compare versions

Comparing version 12.5.3 to 12.5.4

7

package.json
{
"name": "@jsenv/server",
"version": "12.5.3",
"version": "12.5.4",
"description": "Write your Node.js server using pure functions",

@@ -19,3 +19,4 @@ "license": "MIT",

"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org"
},

@@ -71,2 +72,2 @@ "type": "module",

}
}
}

@@ -92,7 +92,13 @@ /*

if (sourceStat.isDirectory()) {
return serveDirectory(urlString, {
headers,
canReadDirectory,
rootDirectoryUrl,
})
if (canReadDirectory) {
return serveDirectory(urlString, {
headers,
canReadDirectory,
rootDirectoryUrl,
})
}
return {
status: 403,
statusText: "not allowed to read directory",
}
}

@@ -99,0 +105,0 @@ // not a file, give up

@@ -8,14 +8,4 @@ import { readdirSync } from "node:fs"

url,
{
headers = {},
canReadDirectory = false,
rootDirectoryUrl = `${pathToFileURL(process.cwd())}/`,
} = {},
{ headers = {}, rootDirectoryUrl = `${pathToFileURL(process.cwd())}/` } = {},
) => {
if (canReadDirectory === false) {
return {
status: 403,
statusText: "not allowed to read directory",
}
}
url = String(url)

@@ -22,0 +12,0 @@ url = url[url.length - 1] === "/" ? url : `${url}/`

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