From af8acb3f436cecf98d41c6102c7fb5b79a611de4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 12 Mar 2019 14:11:13 -0700 Subject: [PATCH] fix: address deprecation warning on startup The `body-parser` deprecation warning on startup is due to `express.urlencode()` requiring an `extended` property in the options argument in Express 4.x. Fixes: https://github.com/hubotio/hubot/issues/1476 --- src/robot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robot.js b/src/robot.js index 74046d4ca..298d8bcaf 100644 --- a/src/robot.js +++ b/src/robot.js @@ -444,7 +444,7 @@ class Robot { app.use(express.query()) app.use(express.json()) - app.use(express.urlencoded({ limit, parameterLimit: paramLimit })) + app.use(express.urlencoded({ limit, parameterLimit: paramLimit, extended: false })) // replacement for deprecated express.multipart/connect.multipart // limit to 100mb, as per the old behavior app.use(multipart({ maxFilesSize: 100 * 1024 * 1024 }))