Socket
Socket
Sign inDemoInstall

fastify

Package Overview
Dependencies
63
Maintainers
3
Versions
282
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.23.0 to 4.23.1

2

docs/Reference/Request.md

@@ -34,3 +34,3 @@ <h1 align="center">Fastify</h1>

method defined for the router that is handling the request
- `routerPath` - Deprecated, use `request.routeOptions.config.url` instead. The
- `routerPath` - Deprecated, use `request.routeOptions.url` instead. The
path pattern defined for the router that is handling the request

@@ -37,0 +37,0 @@ - `is404` - true if request is being handled by 404 handler, false if it is not

'use strict'
const VERSION = '4.23.0'
const VERSION = '4.23.1'

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

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

warning.create('FastifyDeprecation', 'FSTDEP017', 'You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.config.url" instead. Property "req.routerPath" will be removed in `fastify@5`.')
warning.create('FastifyDeprecation', 'FSTDEP017', 'You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in `fastify@5`.')
warning.create('FastifyDeprecation', 'FSTDEP018', 'You are accessing the deprecated "request.routerMethod" property. Use "request.routeOptions.config.method" instead. Property "req.routerMethod" will be removed in `fastify@5`.')
warning.create('FastifyDeprecation', 'FSTDEP018', 'You are accessing the deprecated "request.routerMethod" property. Use "request.routeOptions.method" instead. Property "req.routerMethod" will be removed in `fastify@5`.')

@@ -39,0 +39,0 @@ warning.create('FastifyWarning', 'FSTWRN001', 'The %s schema for %s: %s is missing. This may indicate the schema is not well specified.', { unlimited: true })

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

@@ -5,0 +5,0 @@ "main": "fastify.js",

@@ -6,2 +6,3 @@ import pino from 'pino'

FastifyContext,
FastifyContextConfig,
FastifyLogFn,

@@ -22,3 +23,3 @@ FastifySchema,

import { FastifyRequest, RequestRouteOptions } from '../../types/request'
import { RouteGenericInterface } from '../../types/route'
import { FastifyRouteConfig, RouteGenericInterface } from '../../types/route'
import { RequestHeadersDefault, RequestParamsDefault, RequestQuerystringDefault } from '../../types/utils'

@@ -82,2 +83,4 @@

expectType<FastifyContext<ContextConfigDefault>['config']>(request.routeConfig)
expectType<FastifyContext<ContextConfigDefault>['config']>(request.routeOptions.config)
expectType<ContextConfigDefault & FastifyRouteConfig & FastifyContextConfig>(request.routeOptions.config)
expectType<FastifySchema>(request.routeSchema)

@@ -84,0 +87,0 @@

import { ErrorObject } from '@fastify/ajv-compiler'
import { FastifyContext } from './context'
import { FastifyContext, FastifyContextConfig } from './context'
import { FastifyInstance } from './instance'
import { FastifyBaseLogger } from './logger'
import { RouteGenericInterface } from './route'
import { RouteGenericInterface, FastifyRouteConfig } from './route'
import { FastifySchema } from './schema'

@@ -23,3 +23,3 @@ import { FastifyRequestType, FastifyTypeProvider, FastifyTypeProviderDefault, ResolveFastifyRequestType } from './type-provider'

export interface RequestRouteOptions {
export interface RequestRouteOptions<ContextConfig = ContextConfigDefault> {
method: string,

@@ -32,3 +32,4 @@ url: string,

exposeHeadRoute: boolean,
prefixTrailingSlash: string
prefixTrailingSlash: string,
config: FastifyContextConfig & FastifyRouteConfig & ContextConfig
}

@@ -83,3 +84,3 @@

readonly routerMethod: string;
readonly routeOptions: Readonly<RequestRouteOptions>
readonly routeOptions: Readonly<RequestRouteOptions<ContextConfig>>
readonly is404: boolean;

@@ -86,0 +87,0 @@ readonly socket: RawRequest['socket'];

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