Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

under-pressure

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

under-pressure - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

yarn.lock

15

index.js

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

function onRequest (req, res, next) {
function onRequest (req, reply, next) {
if (checkMaxEventLoopDelay && eventLoopDelay > maxEventLoopDelay) {
sendError(res, next)
sendError(reply, next)
return

@@ -70,3 +70,3 @@ }

if (checkMaxHeapUsedBytes && heapUsed > maxHeapUsedBytes) {
sendError(res, next)
sendError(reply, next)
return

@@ -76,3 +76,3 @@ }

if (checkMaxRssBytes && rssBytes > maxRssBytes) {
sendError(res, next)
sendError(reply, next)
return

@@ -84,5 +84,4 @@ }

function sendError (res, next) {
res.statusCode = 503
res.setHeader('Retry-After', retryAfter)
function sendError (reply, next) {
reply.status(503).header('Retry-After', retryAfter)
next(serviceUnavailableError)

@@ -117,4 +116,4 @@ }

module.exports = fp(underPressure, {
fastify: '^1.1.0',
fastify: '>=2.0.0',
name: 'under-pressure'
})
{
"name": "under-pressure",
"version": "1.0.0",
"version": "2.0.0",
"description": "Measure process load with automatic handling of 'Service Unavailable' plugin for Fastify.",

@@ -32,3 +32,3 @@ "main": "index.js",

"devDependencies": {
"fastify": "^1.13.3",
"fastify": "2.0.0-rc.3",
"pre-commit": "^1.2.2",

@@ -35,0 +35,0 @@ "simple-get": "^3.0.3",

@@ -13,3 +13,3 @@ # under-pressure

Fastify ^1.1.0 .
Fastify ^2.0.0. Please refer to [this branch](https://github.com/fastify/under-pressure/tree/1.x) and related versions for Fastify ^1.1.0 compatibility.

@@ -16,0 +16,0 @@ <a name="install"></a>

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