Socket
Socket
Sign inDemoInstall

@fastify/static

Package Overview
Dependencies
Maintainers
17
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/static - npm Package Compare versions

Comparing version 5.0.2 to 6.0.0

12

index.js

@@ -124,2 +124,3 @@ 'use strict'

wrap.setHeader = reply.header.bind(reply)
wrap.removeHeader = () => {}
wrap.finished = false

@@ -278,3 +279,3 @@

},
errorHandler: fastify.errorHandler ? errorHandler : undefined
errorHandler
}

@@ -343,3 +344,3 @@

.replace(/^\//, '')
const route = encodeURI(prefix + file).replace(/\/\//g, '/')
const route = (prefix + file).replace(/\/\//g, '/')
if (routes.has(route)) {

@@ -455,2 +456,4 @@ continue

function findIndexFile (pathname, root, indexFiles = ['index.html']) {
// TODO remove istanbul ignore
/* istanbul ignore else */
if (Array.isArray(indexFiles)) {

@@ -467,2 +470,3 @@ return indexFiles.find(filename => {

}
/* istanbul ignore next */
return false

@@ -515,4 +519,4 @@ }

module.exports = fp(fastifyStatic, {
fastify: '3.x',
name: 'fastify-static'
fastify: '4.x',
name: '@fastify/static'
})
{
"name": "@fastify/static",
"version": "5.0.2",
"version": "6.0.0",
"description": "Plugin for serving static files as fast as possible.",

@@ -10,7 +10,7 @@ "main": "index.js",

"lint:fix": "standard --fix",
"unit": "tap --no-check-coverage test/*.test.js",
"unit": "tap test/*.test.js",
"typescript": "tsd",
"test": "npm run lint && npm run unit && npm run typescript",
"example": "node example/server.js",
"coverage": "tap --cov --coverage-report=html --no-check-coverage test",
"coverage": "tap --cov --coverage-report=html test",
"coveralls": "tap test/*test.js test/*/*.test.js --cov"

@@ -39,6 +39,6 @@ },

"readable-stream": "^3.4.0",
"send": "^0.17.1"
"send": "^0.18.0"
},
"devDependencies": {
"@fastify/compress": "^5.0.0",
"@fastify/compress": "^6.0.0",
"@types/node": "^17.0.0",

@@ -50,3 +50,3 @@ "@typescript-eslint/eslint-plugin": "^2.29.0",

"eslint-plugin-typescript": "^0.14.0",
"fastify": "^3.7.0",
"fastify": "^4.0.0-rc.2",
"handlebars": "^4.7.6",

@@ -53,0 +53,0 @@ "pre-commit": "^1.2.2",

@@ -22,3 +22,3 @@ 'use strict'

t.teardown(fastify.close.bind(fastify))
fastify.listen(0, err => {
fastify.listen({ port: 0 }, err => {
t.error(err)

@@ -106,3 +106,3 @@ fastify.server.unref()

fastify.register(fastifyStatic, case_.options)
fastify.listen(0, err => {
fastify.listen({ port: 0 }, err => {
t.equal(err.message, case_.error.message)

@@ -109,0 +109,0 @@ fastify.server.unref()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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