New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fastify-request-context

Package Overview
Dependencies
Maintainers
8
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-request-context - npm Package Compare versions

Comparing version
1.0.2
to
2.0.0
+7
-2
index.d.ts

@@ -0,1 +1,3 @@

import Fastify, { FastifyPlugin, FastifyRequest } from 'fastify'
export type RequestContext = {

@@ -11,9 +13,12 @@ get: <T>(key: string) => T | undefined

declare module 'fastify' {
export interface FastifyRequest<HttpRequest, Query, Params, Headers, Body> {
interface FastifyRequest {
requestContext: RequestContext
}
export interface FastifyInstance<HttpServer, HttpRequest, HttpResponse> {
interface FastifyInstance {
requestContext: RequestContext
}
}
declare const fastifyRequestContext: FastifyPlugin<RequestContextOptions>
export default fastifyRequestContext

@@ -22,3 +22,3 @@ const fp = require('fastify-plugin')

const fastifyRequestContextPlugin = fp(plugin, {
fastify: '2.x',
fastify: '3.x',
name: 'fastify-request-context',

@@ -25,0 +25,0 @@ })

{
"name": "fastify-request-context",
"version": "1.0.2",
"version": "2.0.0",
"license": "MIT",

@@ -16,4 +16,4 @@ "maintainers": [

"test:coverage": "jest --config=jest.config.json --coverage",
"test:ci": "npm run lint && npm run test:coverage",
"test:ci:legacy": "npm run test:coverage",
"test:ci": "npm run lint && npm run test:typescript && npm run test:coverage",
"test:typescript": "tsd",
"lint": "eslint --format codeframe \"lib/**/*.js\" \"test/**/*.js\" index.js",

@@ -24,15 +24,17 @@ "prettier": "prettier --write \"{lib,test}/**/*.js\" index.js index.d.ts"

"asynchronous-local-storage": "^1.0.1",
"fastify-plugin": "^1.6.1"
"fastify-plugin": "^2.2.0"
},
"peerDependencies": {
"fastify": "^2.14.1"
"fastify": "^3.0.0"
},
"devDependencies": {
"fastify": "^2.14.1",
"eslint": "^7.1.0",
"@types/node": "^14.0.27",
"fastify": "^3.2.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"jest": "^24.9.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.2.2",
"prettier": "^2.0.5",
"typescript": "3.9.3"
"tsd": "^0.13.1",
"typescript": "3.9.7"
},

@@ -48,11 +50,14 @@ "jest": {

}
}
},
"collectCoverageFrom": [
"lib/**/*.js"
]
},
"engines": {
"node": ">=6"
"node": ">=10.16.0"
},
"homepage": "http://github.com/kibertoad/fastify-request-context",
"homepage": "http://github.com/fastify/fastify-request-context",
"repository": {
"type": "git",
"url": "git://github.com/kibertoad/fastify-request-context.git"
"url": "git://github.com/fastify/fastify-request-context.git"
},

@@ -59,0 +64,0 @@ "keywords": [

@@ -81,3 +81,3 @@ # fastify-request-context

[downloads-url]: https://npmjs.org/package/fastify-request-context
[circleci-image]: https://circleci.com/gh/kibertoad/fastify-request-context.svg?style=svg
[circleci-url]: https://circleci.com/gh/kibertoad/fastify-request-context
[circleci-image]: https://circleci.com/gh/fastify/fastify-request-context.svg?style=svg
[circleci-url]: https://circleci.com/gh/fastify/fastify-request-context