diff --git a/package-lock.json b/package-lock.json index 6aba4a4fb2..653b9c21b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9129,7 +9129,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -9139,15 +9138,13 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true, - "optional": true + "dev": true } } }, @@ -10328,16 +10325,17 @@ "follow-redirects": "1.7.0", "graphql": "14.4.2", "graphql-list-fields": "2.0.2", + "graphql-tools": "^4.0.5", "graphql-upload": "8.0.7", "intersect": "1.0.1", "jsonwebtoken": "8.5.1", - "lodash": "4.17.14", + "lodash": "4.17.15", "lru-cache": "5.1.1", "mime": "2.4.4", "mongodb": "3.2.7", "node-rsa": "1.0.5", "parse": "2.5.1", - "pg-promise": "8.7.4", + "pg-promise": "8.7.5", "redis": "2.8.0", "semver": "6.2.0", "subscriptions-transport-ws": "0.9.16", @@ -10346,7 +10344,7 @@ "uws": "10.148.1", "winston": "3.2.1", "winston-daily-rotate-file": "3.10.0", - "ws": "7.1.0" + "ws": "7.1.1" }, "dependencies": { "@babel/runtime": { diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index c2242f61f4..74e8a1dca4 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -65,7 +65,7 @@ let BrowserCell = ({ type, value, hidden, width, current, onSelect, onEditChange } else if (type === 'ACL') { let pieces = []; let json = value.toJSON(); - if (json.hasOwnProperty('*')) { + if (Object.prototype.hasOwnProperty.call(json, '*')) { if (json['*'].read && json['*'].write) { pieces.push('Public Read + Write'); } else if (json['*'].read) { diff --git a/src/components/ExplorerQueryComposer/ExplorerQueryComposer.react.js b/src/components/ExplorerQueryComposer/ExplorerQueryComposer.react.js index 05bbf73c4a..c852974bc8 100644 --- a/src/components/ExplorerQueryComposer/ExplorerQueryComposer.react.js +++ b/src/components/ExplorerQueryComposer/ExplorerQueryComposer.react.js @@ -370,7 +370,7 @@ export default class ExplorerQueryComposer extends React.Component { } renderFilter(filter, index=0) { - let type = Constraints[filter.op].hasOwnProperty('field') ? Constraints[filter.op].field : FIELD_TYPE[filter.col]; + let type = Object.prototype.hasOwnProperty.call(Constraints[filter.op], 'field') ? Constraints[filter.op].field : FIELD_TYPE[filter.col]; let constraintView = null; if (type === 'JSON') { diff --git a/src/components/Filter/Filter.react.js b/src/components/Filter/Filter.react.js index 7220b1a579..af8a8b7877 100644 --- a/src/components/Filter/Filter.react.js +++ b/src/components/Filter/Filter.react.js @@ -22,7 +22,7 @@ function changeField(schema, filters, index, newField) { function changeConstraint(schema, filters, index, newConstraint) { let field = filters.get(index).get('field'); let compareType = schema[field].type; - if (Filters.Constraints[newConstraint].hasOwnProperty('field')) { + if (Object.prototype.hasOwnProperty.call(Filters.Constraints[newConstraint], 'field')) { compareType = Filters.Constraints[newConstraint].field; } let newFilter = new Map({ @@ -59,7 +59,7 @@ let Filter = ({ schema, filters, renderRow, onChange, blacklist }) => { fields.sort(); let constraints = Filters.FieldConstraints[schema[field].type].filter((c) => blacklist.indexOf(c) < 0); let compareType = schema[field].type; - if (Filters.Constraints[constraint].hasOwnProperty('field')) { + if (Object.prototype.hasOwnProperty.call(Filters.Constraints[constraint], 'field')) { compareType = Filters.Constraints[constraint].field; } return renderRow({ diff --git a/src/components/PushAudienceDialog/PushAudienceDialog.react.js b/src/components/PushAudienceDialog/PushAudienceDialog.react.js index 4392f27a6c..58d8e179b2 100644 --- a/src/components/PushAudienceDialog/PushAudienceDialog.react.js +++ b/src/components/PushAudienceDialog/PushAudienceDialog.react.js @@ -32,7 +32,7 @@ const AUDIENCE_SIZE_FETCHING_ENABLED = true; let filterFormatter = (filters, schema) => { return filters.map((filter) => { let type = schema[filter.get('field')]; - if (Filters.Constraints[filter.get('constraint')].hasOwnProperty('field')) { + if (Object.prototype.hasOwnProperty.call(Filters.Constraints[filter.get('constraint')], 'field')) { type = Filters.Constraints[filter.get('constraint')].field; } // Format any stringified fields diff --git a/src/dashboard/Analytics/SlowQueries/SlowQueries.react.js b/src/dashboard/Analytics/SlowQueries/SlowQueries.react.js index 118207900b..c0ac36aee7 100644 --- a/src/dashboard/Analytics/SlowQueries/SlowQueries.react.js +++ b/src/dashboard/Analytics/SlowQueries/SlowQueries.react.js @@ -129,7 +129,7 @@ class SlowQueries extends TableView { let os = value['OS']; let version = value['App Display Version']; if (os === null || version === null) return; - if (appVersions.hasOwnProperty(os)) { + if (Object.prototype.hasOwnProperty.call(appVersions, os)) { appVersions[os].push(version); } else { appVersions[os] = [version]; diff --git a/src/dashboard/Push/PushIndex.react.js b/src/dashboard/Push/PushIndex.react.js index 0b0d4d2523..370421a458 100644 --- a/src/dashboard/Push/PushIndex.react.js +++ b/src/dashboard/Push/PushIndex.react.js @@ -98,7 +98,7 @@ let isChannelTargeted = (pushData) => { let additionalKeys = false; for (let key in queryJSON) { - if (queryJSON.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(queryJSON, key)) { if (key !== 'deviceType' && key !== 'channels') { additionalKeys = true; } diff --git a/src/lib/AJAX.js b/src/lib/AJAX.js index 076d678635..fc3c55436f 100644 --- a/src/lib/AJAX.js +++ b/src/lib/AJAX.js @@ -59,7 +59,7 @@ export function request(method, url, body, abortable = false, withCredentials = p.reject(this.responseText); return; } - if (json.hasOwnProperty('success') && json.success === false) { + if (Object.prototype.hasOwnProperty.call(json, 'success') && json.success === false) { p.reject(json); } else { p.resolve(json); diff --git a/src/lib/PushUtils.js b/src/lib/PushUtils.js index 95ed49a015..0608097761 100644 --- a/src/lib/PushUtils.js +++ b/src/lib/PushUtils.js @@ -159,7 +159,7 @@ let formatConstraintComponent = (key, operation, value, schema) => { let formatStructure = (key, constraints, schema) => { let rows = []; for(let prop in constraints){ - if(constraints.hasOwnProperty(prop)){ + if(Object.prototype.hasOwnProperty.call(constraints, prop)){ rows.push(formatConstraintComponent(key, prop, constraints[prop], schema)); } } @@ -287,9 +287,9 @@ export function largeInfoBuilder(query, schema, styles = {}) {