-
-
Notifications
You must be signed in to change notification settings - Fork 286
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 audit #438
Conversation
@@ -41,10 +41,9 @@ | |||
"@fortawesome/free-brands-svg-icons": "^5.11.2", | |||
"@fortawesome/free-solid-svg-icons": "^5.11.2", | |||
"@fortawesome/react-fontawesome": "^0.1.7", | |||
"babel-plugin-transform-require-ignore": "^0.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to dev dependencies.
@@ -81,8 +80,7 @@ function postSubmission(url: string, data: Map<string, mixed>): Promise { | |||
*/ | |||
|
|||
const [, submissionEntity] = url.split('/'); | |||
return request.post(url).send(data) | |||
.promise() | |||
return request.post(url).send(Object.fromEntries(data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either superagent
or superagent-bluebird-promise
seems to have coerced Map
s to plain JS objects previously, but this isn't the case with the update, so we do it ourselves.
@@ -247,7 +247,7 @@ export function makeEntityCreateOrEditHandler( | |||
entityType: string, | |||
transformNewForm: Function, | |||
propertiesToPick: string | string[], | |||
isMergeHandler?: boolean = false | |||
isMergeHandler: boolean = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gives off an error in the linter when both ?
and a default value are provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Much appreciated cleanup.
Funnily enough I was also looking at replacing those superagent-bluebird-promise calls this week.
Problem
npm lists numerous audit issues.
Solution
Address audit issues. Additionally, update dependencies and remove unneeded.
Areas of Impact
General.