Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"dependencies": {
"address": "0.0.3",
"body-parser": "1.0.0",
"connect": "2.12.0",
"body-parser": "1.20.4",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The upgrade of body-parser to version 1.20.4 is a major version bump. The current usage of body-parser in your project is deprecated and should be updated.

In servers/web.js at line 38, the application uses app.use(bodyParser());. This omnibus function has been deprecated since body-parser@1.5.0.

Based on the routes defined in routes/web.js, it seems that body-parser is not actually used, as all POST requests are handled by connect-multiparty. If body-parser is indeed unused, the best course of action would be to remove it completely from servers/web.js (both the require statement and the app.use() call).

If you intend to use it for other purposes, you should replace app.use(bodyParser()); with specific middleware for the body types you need to parse. For example:

// in servers/web.js
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

Since this dependency upgrade introduces a breaking change, it's important to address this to avoid deprecation warnings and ensure the application is clean and maintainable.

"connect": "3.0.0",
"connect-multiparty": "1.0.1",
"debug": "0.7.4",
"eventproxy": "0.2.6",
Expand Down
Loading