Socket
Socket
Sign inDemoInstall

@fastify/send

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/send - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0-pre.fv5.1

.gitattributes

4

examples/simple.js
'use strict'
const http = require('http')
const http = require('node:http')
const send = require('..')
const path = require('path')
const path = require('node:path')

@@ -7,0 +7,0 @@ const indexPath = path.join(__dirname, 'index.html')

@@ -22,4 +22,5 @@ 'use strict'

}
/* c8 ignore next */
}
module.exports.collapseLeadingSlashes = collapseLeadingSlashes

@@ -419,4 +419,4 @@ /*!

// POSIX throws ENAMETOOLONG and ENOTDIR, Windows only ENOENT
/* istanbul ignore next */
switch (error.code) {
/* c8 ignore start */
case 'ENAMETOOLONG':

@@ -427,2 +427,3 @@ case 'ENOTDIR':

break
/* c8 ignore stop */
default:

@@ -575,6 +576,7 @@ this.error(500, error)

switch (this._dotfiles) {
/* istanbul ignore next: unreachable, because NODE_DEBUG can not be set after process is running */
/* c8 ignore start */ /* unreachable, because NODE_DEBUG can not be set after process is running */
case 0: // 'allow'
debug('allow dotfile "%s"', path)
break
/* c8 ignore stop */
case 2: // 'deny'

@@ -581,0 +583,0 @@ debug('deny dotfile "%s"', path)

{
"name": "@fastify/send",
"description": "Better streaming static file server with Range and conditional-GET support",
"version": "2.1.0",
"version": "3.0.0-pre.fv5.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -12,2 +12,3 @@ "contributors": [

"main": "index.js",
"type": "commonjs",
"types": "types/index.d.ts",

@@ -28,15 +29,15 @@ "license": "MIT",

"http-errors": "2.0.0",
"mime": "^3.0.0",
"@lukeed/ms": "^2.0.1"
"mime": "^3",
"@lukeed/ms": "^2.0.2"
},
"devDependencies": {
"@fastify/pre-commit": "^2.0.2",
"@types/node": "^18.11.18",
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^20.12.2",
"after": "0.8.2",
"benchmark": "^2.1.4",
"snazzy": "^9.0.0",
"standard": "^17.0.0",
"supertest": "6.3.3",
"tap": "^16.3.3",
"tsd": "^0.28.0"
"standard": "^17.1.0",
"supertest": "6.3.4",
"tap": "^18.7.2",
"tsd": "^0.31.0"
},

@@ -43,0 +44,0 @@ "scripts": {

@@ -23,2 +23,11 @@ # @fastify/send

### TypeScript
`@types/mime@3` must be used if wanting to use TypeScript;
`@types/mime@4` removed the `mime` types.
```bash
$ npm install -D @types/mime@3
```
## API

@@ -177,3 +186,3 @@

```js
var http = require('http')
var http = require('node:http')
var send = require('send')

@@ -196,3 +205,3 @@

```js
var http = require('http')
var http = require('node:http')
var parseUrl = require('parseurl')

@@ -212,3 +221,3 @@ var send = require('@fastify/send')

```js
var http = require('http')
var http = require('node:http')
var parseUrl = require('parseurl')

@@ -239,4 +248,4 @@ var send = require('@fastify/send')

```js
var http = require('http')
var fs = require('fs')
var http = require('node:http')
var fs = require('node:fs')
var parseUrl = require('parseurl')

@@ -278,3 +287,3 @@ var send = require('@fastify/send')

```js
var http = require('http')
var http = require('node:http')
var parseUrl = require('parseurl')

@@ -281,0 +290,0 @@ var send = require('@fastify/send')

'use strict'
const { test } = require('tap')
const path = require('path')
const path = require('node:path')
const request = require('supertest')

@@ -22,7 +22,7 @@ const send = require('..')

t.before(function () {
t.before(() => {
this.default_type = send.mime.default_type
})
t.afterEach(function () {
t.afterEach(() => {
send.mime.default_type = this.default_type

@@ -29,0 +29,0 @@ })

@@ -5,7 +5,7 @@ 'use strict'

const after = require('after')
const http = require('http')
const path = require('path')
const http = require('node:http')
const path = require('node:path')
const request = require('supertest')
const SendStream = require('../lib/SendStream')
const os = require('os')
const os = require('node:os')
const { shouldNotHaveBody, createServer, shouldNotHaveHeader } = require('./utils')

@@ -12,0 +12,0 @@

'use strict'
const { test } = require('tap')
const fs = require('fs')
const http = require('http')
const path = require('path')
const fs = require('node:fs')
const http = require('node:http')
const path = require('node:path')
const request = require('supertest')

@@ -8,0 +8,0 @@ const SendStream = require('..').SendStream

'use strict'
const http = require('http')
const http = require('node:http')
const send = require('..')

@@ -5,0 +5,0 @@

Sorry, the diff of this file is not supported yet

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