From 40739931053802842ca8a25111628647358f0a89 Mon Sep 17 00:00:00 2001 From: Rafal Wilinski Date: Tue, 3 Mar 2020 14:00:25 +0100 Subject: [PATCH] 0.1.9 - Remove request library, bump dependencies --- examples/tester.js | 16 ++++++++-------- package.json | 15 +++++++-------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/examples/tester.js b/examples/tester.js index 2fef89f..b07e90c 100644 --- a/examples/tester.js +++ b/examples/tester.js @@ -1,15 +1,15 @@ -const request = require('request'); +const axios = require("axios"); const port = 3000; - -const requestUrl = `http://localhost:${port}/return-status/`; const interval = 50; +const requestUrl = `http://0.0.0.0:${port}/return-status/`; -const makeDummyCall = () => setTimeout(() => { - const code = 200 + Math.random() * 399; - request.get(`${requestUrl}${code}`); +const makeDummyCall = () => + setTimeout(() => { + const code = 200 + Math.random() * 399; + axios.get(`${requestUrl}${code}`).catch(() => {}); - makeDummyCall(); -}, interval); + makeDummyCall(); + }, interval); makeDummyCall(); diff --git a/package.json b/package.json index 4d761f1..a840132 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-status-monitor", - "version": "1.2.8", + "version": "1.2.9", "description": "Realtime Monitoring for Express-based Node applications", "main": "index.js", "keywords": [ @@ -57,12 +57,11 @@ }, "license": "MIT", "dependencies": { - "axios": "0.19.0", + "axios": "0.19.2", "debug": "4.1.1", - "handlebars": "4.5.3", + "handlebars": "4.7.3", "on-headers": "1.0.2", - "pidusage": "2.0.17", - "request": "2.88.0", + "pidusage": "2.0.18", "socket.io": "2.3.0" }, "scripts": { @@ -75,9 +74,9 @@ "devDependencies": { "chai": "4.2.0", "eslint": "5.16.0", - "mocha": "6.2.2", - "sinon": "7.3.2", - "snyk": "1.271.0" + "mocha": "7.1.0", + "sinon": "9.0.0", + "snyk": "1.297.3" }, "snyk": true } \ No newline at end of file