Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address deprecation warning on startup #1497

Merged
merged 2 commits into from Apr 17, 2019

Conversation

Projects
None yet
6 participants
@Trott
Copy link
Contributor

commented Mar 12, 2019

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: #1476

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: #1476
@@ -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 }))

This comment has been minimized.

Copy link
@ctrom

ctrom Apr 1, 2019

It looks like the default value is true (https://expressjs.com/en/api.html#express.urlencoded). Why change the value to false?

This comment has been minimized.

Copy link
@Trott

Trott Apr 1, 2019

Author Contributor

Not sure why I chose false but I'm going to guess that I misunderstood the express docs which say (about extended): "Using the default is deprecated." I think they mean "not specifying a value and relying on the default value is deprecated" but I interpreted it as "The default is true and using that value is deprecated."

At least that's my story now.

I'll switch it to true.

@ctrom

ctrom approved these changes Apr 2, 2019

@hews

This comment has been minimized.

Copy link

commented Apr 15, 2019

This would be a great small change to merge in. Seems like @ctrom 's review isn't enough to merge, is there someone we can ping to expedite this?

@Trott

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

This would be a great small change to merge in. Seems like @ctrom 's review isn't enough to merge, is there someone we can ping to expedite this?

@mistydemeo and @technicalpickles are the only people who have merged commits this year, so maybe one or both of them can make this happen?

@dfang

This comment has been minimized.

Copy link

commented Apr 17, 2019

it seems this warning fails heroku deploy

2019-04-17T04:21:49.605511+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-17T04:21:51.739952+00:00 heroku[web.1]: Starting process with command `bin/hubot -a shell`
2019-04-17T04:21:56.676434+00:00 app[web.1]: audited 242 packages in 2.058s
2019-04-17T04:21:56.678870+00:00 app[web.1]: found 0 vulnerabilities
2019-04-17T04:21:56.678872+00:00 app[web.1]: 
2019-04-17T04:21:57.240952+00:00 app[web.1]: Wed, 17 Apr 2019 04:21:57 GMT body-parser deprecated undefined extended: provide extended option at node_modules/hubot/src/robot.js:447:21
2019-04-17T04:21:57.274518+00:00 app[web.1]: No history available
2019-04-17T04:21:57.398430+00:00 app[web.1]: �[1G�[0Jhwamei> �[9G
2019-04-17T04:21:57.422874+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-17T04:21:57.403448+00:00 heroku[web.1]: Process exited with status 0
2019-04-17T04:30:55.548507+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-17T04:30:57.556203+00:00 heroku[web.1]: Starting process with command `bin/hubot -a shell`
2019-04-17T04:31:02.478230+00:00 app[web.1]: audited 242 packages in 1.517s
2019-04-17T04:31:02.479147+00:00 app[web.1]: found 0 vulnerabilities
2019-04-17T04:31:02.479160+00:00 app[web.1]: 
2019-04-17T04:31:02.809341+00:00 app[web.1]: Wed, 17 Apr 2019 04:31:02 GMT body-parser deprecated undefined extended: provide extended option at node_modules/hubot/src/robot.js:447:21
2019-04-17T04:31:02.828750+00:00 app[web.1]: No history available
2019-04-17T04:31:02.904531+00:00 app[web.1]: �[1G�[0Jhwamei> �[9G
2019-04-17T04:31:02.940924+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-17T04:31:02.909197+00:00 heroku[web.1]: Process exited with status 0

could you merge this fix and release a new version on npm ?

@mistydemeo
Copy link
Contributor

left a comment

Thanks! Sorry for not addressing this sooner.

@mistydemeo mistydemeo merged commit 7795fe5 into hubotio:master Apr 17, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hubotbot

This comment has been minimized.

Copy link

commented Apr 17, 2019

🎉 This PR is included in version 3.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@hubotbot hubotbot added the released label Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.