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 audit #438

Merged
merged 6 commits into from
Jun 4, 2020
Merged

Fix audit #438

merged 6 commits into from
Jun 4, 2020

Conversation

leftmostcat
Copy link
Collaborator

Problem

npm lists numerous audit issues.

Solution

Address audit issues. Additionally, update dependencies and remove unneeded.

Areas of Impact

General.

@@ -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",
Copy link
Collaborator Author

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))
Copy link
Collaborator Author

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 Maps 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
Copy link
Collaborator Author

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.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 60.372% when pulling 23aceed on fix_audit into 62adc4a on master.

Copy link
Member

@MonkeyDo MonkeyDo left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants