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

Upgrade the superagent node module to resolve security vulnerabilities & fix the __proto__ property deprecation #470

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function TestAgent(app, options) {
* Inherits from `Agent.prototype`.
*/

TestAgent.prototype.__proto__ = Agent.prototype;
Object.setPrototypeOf(TestAgent.prototype, Agent.prototype);

// override HTTP verb methods
methods.forEach(function(method) {
Expand Down
2 changes: 1 addition & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Test(app, method, path) {
* Inherits from `Request.prototype`.
*/

Test.prototype.__proto__ = Request.prototype;
Object.setPrototypeOf(Test.prototype, Request.prototype);

/**
* Returns a URL, extracted from a server.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"test": "eslint lib/**/*.js test/**/*.js && mocha --require should --reporter spec --check-leaks"
},
"dependencies": {
"superagent": "^3.0.0",
"methods": "~1.1.2"
"methods": "~1.1.2",
"superagent": "3.8.2"
},
"devDependencies": {
"body-parser": "~1.16.0",
Expand Down