Socket
Socket
Sign inDemoInstall

fastify

Package Overview
Dependencies
65
Maintainers
4
Versions
280
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.26.0 to 4.26.1

test/types/import.js

2

docs/Guides/Ecosystem.md

@@ -389,2 +389,4 @@ <h1 align="center">Fastify</h1>

that protects endpoints by checking authenticated user roles and/or scopes.
- [`fastify-hana`](https://github.com/yoav0gal/fastify-hana) connects your
application to [`SAP-HANA`](https://help.sap.com/docs/SAP_HANA_CLIENT).
- [`fastify-hashids`](https://github.com/andersonjoseph/fastify-hashids) A Fastify

@@ -391,0 +393,0 @@ plugin to encode/decode IDs using [hashids](https://github.com/niieani/hashids.js).

@@ -32,5 +32,18 @@

### Warnings In Fastify
Warnings are enabled by default. They can be disabled by using any
of the following methods:
Fastify utilizes Node.js's [warning event](https://nodejs.org/api/process.html#event-warning)
API to notify users of deprecated features and known coding mistakes. Fastify's
warnings are recognizable by the `FSTWRN` and `FSTDEP` prefixes on warning
code. When encountering such a warning, it is highly recommended that the
cause of the warning be determined through use of the
[`--trace-warnings`](https://nodejs.org/api/cli.html#--trace-warnings) and
[`--trace-deprecation`](https://nodejs.org/api/cli.html#--trace-deprecation)
flags. These will produce stack traces pointing out where the issue occurs
in the application's code. Issues opened about warnings without including
this information may be closed due to lack of information.
In addition to tracing, warnings can also be disabled. It is not recommended to
disable warnings as a matter of course, but if necessary, they can be disabled
by using any of the following methods:
- setting the `NODE_NO_WARNINGS` environment variable to `1`

@@ -37,0 +50,0 @@ - passing the `--no-warnings` flag to the node process

2

fastify.js
'use strict'
const VERSION = '4.26.0'
const VERSION = '4.26.1'

@@ -5,0 +5,0 @@ const Avvio = require('avvio')

@@ -28,32 +28,31 @@ // This file is autogenerated by build/build-error-serializer.js, do not edit

let addComma = false
let json = '{'
let json = '{'
let addComma = false
if (obj["statusCode"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"statusCode\":"
json += serializer.asNumber(obj["statusCode"])
}
if (obj["code"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"code\":"
json += serializer.asString(obj["code"])
}
if (obj["error"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"error\":"
json += serializer.asString(obj["error"])
}
if (obj["message"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"message\":"
json += serializer.asString(obj["message"])
}
return json + '}'
if (obj["statusCode"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"statusCode\":"
json += serializer.asNumber(obj["statusCode"])
}
if (obj["code"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"code\":"
json += serializer.asString(obj["code"])
}
if (obj["error"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"error\":"
json += serializer.asString(obj["error"])
}
if (obj["message"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
json += "\"message\":"
json += serializer.asString(obj["message"])
}
return json + '}'
}

@@ -60,0 +59,0 @@

@@ -467,3 +467,4 @@ 'use strict'

AVV_ERR_PARENT_PLG_LOADED: codes.FST_ERR_PARENT_PLUGIN_BOOTED,
AVV_ERR_READY_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT
AVV_ERR_READY_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT,
AVV_ERR_PLUGIN_EXEC_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT
}

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

code: 'FSTDEP020',
message: 'You are using the deprecated "reply.getResponseTime()"" method. Use the "request.elapsedTime" property instead. Method "reply.getResponseTime()" will be removed in `fastify@5`.'
message: 'You are using the deprecated "reply.getResponseTime()" method. Use the "reply.elapsedTime" property instead. Method "reply.getResponseTime()" will be removed in `fastify@5`.'
})

@@ -85,0 +85,0 @@

{
"name": "fastify",
"version": "4.26.0",
"version": "4.26.1",
"description": "Fast and low overhead web framework, for Node.js",

@@ -207,3 +207,3 @@ "main": "fastify.js",

"abstract-logging": "^2.0.1",
"avvio": "^8.2.1",
"avvio": "^8.3.0",
"fast-content-type-parse": "^1.1.0",

@@ -210,0 +210,0 @@ "fast-json-stringify": "^5.8.0",

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

// TODO: look where the error pops up
t.equal(error.code, 'AVV_ERR_PLUGIN_NOT_VALID')
t.equal(error.code, 'AVV_ERR_ROOT_PLG_BOOTED')
done(error)

@@ -301,0 +301,0 @@ }

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

t.ok(err.cause)
t.equal(err.cause.code, 'AVV_ERR_READY_TIMEOUT')
t.equal(err.cause.code, 'AVV_ERR_PLUGIN_EXEC_TIMEOUT')
})

@@ -44,3 +44,3 @@ })

t.ok(err.cause)
t.equal(err.cause.code, 'AVV_ERR_READY_TIMEOUT')
t.equal(err.cause.code, 'AVV_ERR_PLUGIN_EXEC_TIMEOUT')
})

@@ -65,3 +65,3 @@ })

t.ok(err.cause)
t.equal(err.cause.code, 'AVV_ERR_READY_TIMEOUT')
t.equal(err.cause.code, 'AVV_ERR_PLUGIN_EXEC_TIMEOUT')
})

@@ -68,0 +68,0 @@

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

t.equal(typeof tree, 'string')
t.match(tree, 'bound root')
t.match(tree, /root \d+ ms\n└── bound _after \d+ ms/m)
})

@@ -226,0 +226,0 @@ })

@@ -1,2 +0,1 @@

import pino from 'pino'
import { expectAssignable, expectType } from 'tsd'

@@ -86,2 +85,3 @@ import fastify, {

expectType<RouteHandlerMethod>(request.routeOptions.handler)
expectType<string | undefined>(request.routeOptions.url)

@@ -88,0 +88,0 @@ expectType<RequestHeadersDefault & RawRequestDefaultExpression['headers']>(request.headers)

@@ -25,6 +25,7 @@ import { ErrorObject } from '@fastify/ajv-compiler'

method: string;
url: string;
bodyLimit:number;
attachValidation:boolean;
logLevel:string;
// `url` can be `undefined` for instance when `request.is404` is true
url: string | undefined;
bodyLimit: number;
attachValidation: boolean;
logLevel: string;
version: string | undefined;

@@ -31,0 +32,0 @@ exposeHeadRoute: boolean;

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc