diff --git a/packages/strapi-hook-bookshelf/lib/utils/graphql.js b/packages/strapi-hook-bookshelf/lib/utils/graphql.js
index 30def64e5b..f4131a0184 100644
--- a/packages/strapi-hook-bookshelf/lib/utils/graphql.js
+++ b/packages/strapi-hook-bookshelf/lib/utils/graphql.js
@@ -8,7 +8,7 @@
const _ = require('lodash');
// Strapi helper for GraphQL.
-const helpers = require('strapi/lib/configuration/hooks/graphql/helpers/'); // eslint-disable-line import/no-unresolved
+const helpers = require('strapi/lib/configuration/hooks/graphql/helpers/');
const utils = require('./');
/**
diff --git a/packages/strapi-hook-ejs/lib/index.js b/packages/strapi-hook-ejs/lib/index.js
index 43df227ace..61f3cd5b9a 100644
--- a/packages/strapi-hook-ejs/lib/index.js
+++ b/packages/strapi-hook-ejs/lib/index.js
@@ -9,7 +9,7 @@ const path = require('path');
// Externals
const co = require('co');
-const render = require('koa-ejs'); // eslint-disable-line import/no-unresolved
+const render = require('koa-ejs');
/**
* EJS hook
diff --git a/packages/strapi-hook-redis/lib/index.js b/packages/strapi-hook-redis/lib/index.js
index c224615397..4452966b00 100644
--- a/packages/strapi-hook-redis/lib/index.js
+++ b/packages/strapi-hook-redis/lib/index.js
@@ -7,7 +7,6 @@
// Core
const util = require('util');
/* eslint-disable prefer-template */
-/* eslint-disable import/no-unresolved */
// Public node modules.
const _ = require('lodash');
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js b/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js
index fe4d18c691..a87ea4d270 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js
@@ -189,7 +189,6 @@ class SelectMany extends React.PureComponent {
);
const value = get(this.props.record, this.props.relation.alias) || [];
- /* eslint-disable jsx-a11y/label-has-for */
return (
4 &&
@@ -243,7 +242,6 @@ class SelectMany extends React.PureComponent {
/>
);
- /* eslint-disable jsx-a11y/label-has-for */
}
}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js b/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js
index 11fe465272..b9a6ad2ce0 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js
@@ -177,7 +177,6 @@ class SelectOne extends React.Component {
);
- /* eslint-disable jsx-a11y/label-has-for */
return (
);
- /* eslint-disable jsx-a11y/label-has-for */
}
}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js
index 026e3744b2..a7c9e92e51 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js
@@ -54,7 +54,7 @@ class TableHeader extends React.Component {
}
return (
-
{
if (header.sortable) {
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/video.js b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/video.js
index 3cdbdaa9bb..f3891ebd4c 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/video.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/video.js
@@ -7,7 +7,6 @@
import React from 'react';
import PropTypes from 'prop-types';
-/* eslint-disable jsx-a11y/media-has-caption */
const Video = props => {
const { height, src, width } = props.contentState.getEntity(props.entityKey).getData();
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygBottomControls/index.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygBottomControls/index.js
index bad94258d0..601d39a6bf 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygBottomControls/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygBottomControls/index.js
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import styles from './styles.scss';
-/* eslint-disable jsx-a11y/label-has-for */
+
const WysiwygBottomControls = ({ isPreviewMode, onChange, onClick }) => {
const browse = (
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygDropUpload/index.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygDropUpload/index.js
index e7abcec3c9..ad90e4016f 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygDropUpload/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygDropUpload/index.js
@@ -7,7 +7,6 @@
import React from 'react';
import styles from './styles.scss';
-/* eslint-disable jsx-a11y/label-has-for */
const WysiwygDropUpload = (props) => {
return (
- ); // eslint-disable-line jsx-a11y/no-static-element-interactions
+ );
// format the locale to
const defaultLanguageArray = formatLanguageLocale(this.props.name);
const flag = getFlag(defaultLanguageArray);
diff --git a/packages/strapi-plugin-settings-manager/admin/src/containers/HomePage/index.js b/packages/strapi-plugin-settings-manager/admin/src/containers/HomePage/index.js
index 5e0616889c..748061733d 100644
--- a/packages/strapi-plugin-settings-manager/admin/src/containers/HomePage/index.js
+++ b/packages/strapi-plugin-settings-manager/admin/src/containers/HomePage/index.js
@@ -153,7 +153,6 @@ export class HomePage extends React.Component {
}
/* eslint-disable react/sort-comp */
- /* eslint-disable jsx-a11y/no-static-element-interactions */
addConnection = e => {
e.preventDefault();
const newData = {};
diff --git a/packages/strapi-plugin-upload/admin/src/components/PluginInputFile/index.js b/packages/strapi-plugin-upload/admin/src/components/PluginInputFile/index.js
index 125e31fa10..f19c1a25bf 100644
--- a/packages/strapi-plugin-upload/admin/src/components/PluginInputFile/index.js
+++ b/packages/strapi-plugin-upload/admin/src/components/PluginInputFile/index.js
@@ -12,7 +12,6 @@ import cn from 'classnames';
import styles from './styles.scss';
/* eslint-disable react/no-string-refs */
-/* eslint-disable jsx-a11y/label-has-for */
/* eslint-disable react/jsx-tag-spacing */
class PluginInputFile extends React.PureComponent {
state = { isDraging: false };
diff --git a/packages/strapi-provider-email-amazon-ses/lib/index.js b/packages/strapi-provider-email-amazon-ses/lib/index.js
index 2796297611..e0b22674eb 100644
--- a/packages/strapi-provider-email-amazon-ses/lib/index.js
+++ b/packages/strapi-provider-email-amazon-ses/lib/index.js
@@ -4,7 +4,6 @@
* Module dependencies
*/
-/* eslint-disable import/no-unresolved */
/* eslint-disable prefer-template */
// Public node modules.
const _ = require('lodash');
diff --git a/packages/strapi-provider-email-mailgun/lib/index.js b/packages/strapi-provider-email-mailgun/lib/index.js
index 12bba52c43..35e1b0001e 100644
--- a/packages/strapi-provider-email-mailgun/lib/index.js
+++ b/packages/strapi-provider-email-mailgun/lib/index.js
@@ -4,7 +4,6 @@
* Module dependencies
*/
-/* eslint-disable import/no-unresolved */
/* eslint-disable prefer-template */
// Public node modules.
const _ = require('lodash');
diff --git a/packages/strapi-provider-email-sendgrid/lib/index.js b/packages/strapi-provider-email-sendgrid/lib/index.js
index c6c4321c84..81f3ca05af 100644
--- a/packages/strapi-provider-email-sendgrid/lib/index.js
+++ b/packages/strapi-provider-email-sendgrid/lib/index.js
@@ -4,7 +4,6 @@
* Module dependencies
*/
-/* eslint-disable import/no-unresolved */
/* eslint-disable prefer-template */
// Public node modules.
const _ = require('lodash');
diff --git a/packages/strapi-provider-upload-aws-s3/lib/index.js b/packages/strapi-provider-upload-aws-s3/lib/index.js
index f5f5bb1943..538c74bc1e 100644
--- a/packages/strapi-provider-upload-aws-s3/lib/index.js
+++ b/packages/strapi-provider-upload-aws-s3/lib/index.js
@@ -4,7 +4,6 @@
* Module dependencies
*/
-/* eslint-disable import/no-unresolved */
/* eslint-disable no-unused-vars */
// Public node modules.
const _ = require('lodash');
diff --git a/packages/strapi-provider-upload-cloudinary/lib/index.js b/packages/strapi-provider-upload-cloudinary/lib/index.js
index 6822150436..8ec051a4cb 100644
--- a/packages/strapi-provider-upload-cloudinary/lib/index.js
+++ b/packages/strapi-provider-upload-cloudinary/lib/index.js
@@ -5,7 +5,6 @@
*/
// Public node modules.
-/* eslint-disable import/no-unresolved */
/* eslint-disable prefer-template */
const cloudinary = require('cloudinary').v2;
const intoStream = require('into-stream');
diff --git a/packages/strapi-provider-upload-rackspace/lib/index.js b/packages/strapi-provider-upload-rackspace/lib/index.js
index e955c90357..d6ef69a83f 100644
--- a/packages/strapi-provider-upload-rackspace/lib/index.js
+++ b/packages/strapi-provider-upload-rackspace/lib/index.js
@@ -4,7 +4,6 @@
* Module dependencies
*/
-/* eslint-disable import/no-unresolved */
// Public node modules.
const pkgcloud = require('pkgcloud');
const streamifier = require('streamifier');
diff --git a/packages/strapi/lib/utils/index.js b/packages/strapi/lib/utils/index.js
index c8a78778c3..e5f029c254 100644
--- a/packages/strapi/lib/utils/index.js
+++ b/packages/strapi/lib/utils/index.js
@@ -1,12 +1,11 @@
'use strict';
-/* eslint-disable import/order */
/* eslint-disable no-unused-vars */
/* eslint-disable prefer-template */
// Dependencies.
const fs = require('fs');
const path = require('path');
-const { map } = require('async'); // eslint-disable-line import/order
+const { map } = require('async');
const {
setWith,
merge,
diff --git a/test/config/front/enzyme-setup.js b/test/config/front/enzyme-setup.js
index 30faeab7d6..d80e9e7c14 100644
--- a/test/config/front/enzyme-setup.js
+++ b/test/config/front/enzyme-setup.js
@@ -1,4 +1,3 @@
-/* eslint-disable import/no-extraneous-dependencies */
const configure = require('enzyme').configure;
const Adapter = require('enzyme-adapter-react-16');
From 30a8cf638d1adf7ce916586ae886330651b7cd98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Fri, 19 Jul 2019 11:28:55 +0200
Subject: [PATCH 03/21] Disable no-async-promise-executor rule in one line
---
packages/strapi-plugin-graphql/services/Loaders.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/strapi-plugin-graphql/services/Loaders.js b/packages/strapi-plugin-graphql/services/Loaders.js
index c3281b6906..9db4e5ace9 100644
--- a/packages/strapi-plugin-graphql/services/Loaders.js
+++ b/packages/strapi-plugin-graphql/services/Loaders.js
@@ -59,6 +59,7 @@ module.exports = {
this.loaders[name] = new DataLoader(
keys => {
+ // eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => {
try {
// Extract queries from keys and merge similar queries.
From a26474ca9e5c5b0a79be3315a0507902f4dd3860 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Fri, 19 Jul 2019 11:30:18 +0200
Subject: [PATCH 04/21] Disable no-useless-catch rule in one line
---
packages/strapi/lib/middlewares/session/index.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/strapi/lib/middlewares/session/index.js b/packages/strapi/lib/middlewares/session/index.js
index 69e9d5c442..49e16a6071 100644
--- a/packages/strapi/lib/middlewares/session/index.js
+++ b/packages/strapi/lib/middlewares/session/index.js
@@ -159,6 +159,7 @@ module.exports = strapi => {
},
requireStore(store) {
+ // eslint-disable-next-line no-useless-catch
try {
return require(path.resolve(
strapi.config.appPath,
From d4f02d53c2a79bee33ed294b1336e3ee66b7d7f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Fri, 19 Jul 2019 11:58:20 +0200
Subject: [PATCH 05/21] Disable require-atomic-updates rule
---
.eslintrc.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/.eslintrc.js b/.eslintrc.js
index 5212d550ab..ec299b88d8 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -41,6 +41,7 @@ module.exports = {
rules: {
'generator-star-spacing': 0,
'no-console': 0,
+ 'require-atomic-updates': 0,
},
settings: {
react: {
From 37e69f2fe117056b29ce7ff3fb77a88c77f27e82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Sun, 21 Jul 2019 22:33:18 +0200
Subject: [PATCH 06/21] Disable no-prototype-builtins rule
---
.eslintrc.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/.eslintrc.js b/.eslintrc.js
index ec299b88d8..e031e322ef 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -41,6 +41,7 @@ module.exports = {
rules: {
'generator-star-spacing': 0,
'no-console': 0,
+ 'no-prototype-builtins': 0,
'require-atomic-updates': 0,
},
settings: {
From 61c41d821cce5fa1f1abd7d8e114051a61937c03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Sun, 21 Jul 2019 22:37:29 +0200
Subject: [PATCH 07/21] Fix no-prototype-builtins rule
---
.eslintrc.js | 1 -
packages/strapi-hook-bookshelf/lib/index.js | 10 +--
.../strapi-hook-bookshelf/lib/utils/index.js | 2 +-
packages/strapi-middleware-views/lib/index.js | 2 +-
.../FilterOptions/InputWithAutoFocus.js | 2 +-
.../admin/src/containers/ListPage/index.js | 4 +-
.../admin/src/containers/SettingPage/index.js | 4 +-
.../config/policies/routing.js | 4 +-
.../services/ContentManager.js | 10 ++-
.../containers/AttributesPickerModal/index.js | 2 +-
.../services/Documentation.js | 12 ++--
packages/strapi-utils/lib/finder.js | 2 +-
packages/strapi-utils/lib/models.js | 64 +++++++++----------
packages/strapi/lib/core/bootstrap.js | 4 +-
.../strapi/lib/middlewares/router/index.js | 2 +-
.../strapi/lib/middlewares/session/index.js | 4 +-
16 files changed, 67 insertions(+), 62 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index e031e322ef..ec299b88d8 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -41,7 +41,6 @@ module.exports = {
rules: {
'generator-star-spacing': 0,
'no-console': 0,
- 'no-prototype-builtins': 0,
'require-atomic-updates': 0,
},
settings: {
diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js
index 71927b2e92..04ba71dbd9 100644
--- a/packages/strapi-hook-bookshelf/lib/index.js
+++ b/packages/strapi-hook-bookshelf/lib/index.js
@@ -480,7 +480,7 @@ module.exports = function(strapi) {
_.keyBy(
_.filter(definition.attributes, (value, key) => {
if (
- value.hasOwnProperty('columnName') &&
+ Object.prototype.hasOwnProperty.call(value, 'columnName') &&
!_.isEmpty(value.columnName) &&
value.columnName !== key
) {
@@ -576,9 +576,9 @@ module.exports = function(strapi) {
.attributes,
details => {
if (
- details.hasOwnProperty('model') &&
+ Object.prototype.hasOwnProperty.call(details, 'model') &&
details.model === model &&
- details.hasOwnProperty('via') &&
+ Object.prototype.hasOwnProperty.call(details, 'via') &&
details.via === name
) {
return details;
@@ -589,9 +589,9 @@ module.exports = function(strapi) {
strapi.models[details.model].attributes,
details => {
if (
- details.hasOwnProperty('model') &&
+ Object.prototype.hasOwnProperty.call(details, 'model') &&
details.model === model &&
- details.hasOwnProperty('via') &&
+ Object.prototype.hasOwnProperty.call(details, 'via') &&
details.via === name
) {
return details;
diff --git a/packages/strapi-hook-bookshelf/lib/utils/index.js b/packages/strapi-hook-bookshelf/lib/utils/index.js
index 4492a343c0..bc1743e208 100644
--- a/packages/strapi-hook-bookshelf/lib/utils/index.js
+++ b/packages/strapi-hook-bookshelf/lib/utils/index.js
@@ -21,7 +21,7 @@ module.exports = {
// This is not a Bookshelf collection, only the name.
if (_.isString(collectionIdentity) && !_.isUndefined(models)) {
const PK = _.findKey(_.get(models, collectionIdentity + '.attributes'), o => {
- return o.hasOwnProperty('primary');
+ return Object.prototype.hasOwnProperty.call(o, 'primary');
});
if (!_.isEmpty(PK)) {
diff --git a/packages/strapi-middleware-views/lib/index.js b/packages/strapi-middleware-views/lib/index.js
index d4100019b9..8c0c942057 100644
--- a/packages/strapi-middleware-views/lib/index.js
+++ b/packages/strapi-middleware-views/lib/index.js
@@ -27,7 +27,7 @@ module.exports = strapi => {
if (_.isPlainObject(views) && !_.isEmpty(views)) {
const opts = _.clone(views);
- if (opts.hasOwnProperty('default')) {
+ if (Object.prototype.hasOwnProperty.call(opts, 'default')) {
opts.extension = opts.default;
delete opts.default;
}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js b/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
index cb0712ddfa..e58335d552 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
@@ -36,7 +36,7 @@ class InputWithAutoFocus extends React.Component {
if (this.props.filterToFocus === this.props.index) {
return new Promise(resolve => {
setTimeout(() => {
- if (this.inputEl.hasOwnProperty('openCalendar')) {
+ if (Object.prototype.hasOwnProperty.call(this.inputEl, 'openCalendar')) {
this.inputEl.openCalendar();
} else {
this.inputEl.focus();
diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
index 7061b4885e..bd4787b626 100644
--- a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
@@ -141,8 +141,8 @@ export class ListPage extends React.Component {
return Object.keys(attributes).filter(attr => {
return (
- !attributes[attr].hasOwnProperty('collection') &&
- !attributes[attr].hasOwnProperty('model')
+ !Object.prototype.hasOwnProperty.call(attributes[attr], 'collection') &&
+ !Object.prototype.hasOwnProperty.call(attributes[attr], 'model')
);
});
};
diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
index 741440f24b..e7a84f1321 100644
--- a/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
@@ -191,8 +191,8 @@ class SettingPage extends React.PureComponent {
.filter(attr => {
return (
findIndex(this.getListDisplay(), ['name', attr]) === -1 &&
- !attributes[attr].hasOwnProperty('collection') &&
- !attributes[attr].hasOwnProperty('model')
+ !Object.prototype.hasOwnProperty.call(attributes[attr], 'collection') &&
+ !Object.prototype.hasOwnProperty.call(attributes[attr], 'model')
);
})
.map(attr => {
diff --git a/packages/strapi-plugin-content-manager/config/policies/routing.js b/packages/strapi-plugin-content-manager/config/policies/routing.js
index 0b03c6cb5b..bbc65985a7 100644
--- a/packages/strapi-plugin-content-manager/config/policies/routing.js
+++ b/packages/strapi-plugin-content-manager/config/policies/routing.js
@@ -30,8 +30,8 @@ module.exports = async (ctx, next) => {
if (controller && action) {
// Redirect to specific controller.
if (
- ctx.request.body.hasOwnProperty('fields') &&
- ctx.request.body.hasOwnProperty('files')
+ Object.prototype.hasOwnProperty.call(ctx.request.body, 'fields') &&
+ Object.prototype.hasOwnProperty.call(ctx.request.body, 'files')
) {
let { files, fields } = ctx.request.body;
diff --git a/packages/strapi-plugin-content-manager/services/ContentManager.js b/packages/strapi-plugin-content-manager/services/ContentManager.js
index dca3f8c877..da67ba6dfc 100644
--- a/packages/strapi-plugin-content-manager/services/ContentManager.js
+++ b/packages/strapi-plugin-content-manager/services/ContentManager.js
@@ -72,7 +72,10 @@ module.exports = {
add: async (params, values, source) => {
// Multipart/form-data.
- if (values.hasOwnProperty('fields') && values.hasOwnProperty('files')) {
+ if (
+ Object.prototype.hasOwnProperty.call(values, 'fields') &&
+ Object.prototype.hasOwnProperty.call(values, 'files')
+ ) {
// Silent recursive parser.
const parser = value => {
try {
@@ -134,7 +137,10 @@ module.exports = {
edit: async (params, values, source) => {
// Multipart/form-data.
- if (values.hasOwnProperty('fields') && values.hasOwnProperty('files')) {
+ if (
+ Object.prototype.hasOwnProperty.call(values, 'fields') &&
+ Object.prototype.hasOwnProperty.call(values, 'files')
+ ) {
// Silent recursive parser.
const parser = value => {
try {
diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
index ffe53e3786..4144c9746b 100644
--- a/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
+++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
@@ -49,7 +49,7 @@ class AttributesPickerModal extends React.Component {
const appPlugins = plugins;
return attributes.filter(attr => {
- if (appPlugins.hasOwnProperty('upload')) {
+ if (Object.prototype.hasOwnProperty.call(appPlugins, 'upload')) {
return true;
}
diff --git a/packages/strapi-plugin-documentation/services/Documentation.js b/packages/strapi-plugin-documentation/services/Documentation.js
index 84246daf8f..247b8e8861 100755
--- a/packages/strapi-plugin-documentation/services/Documentation.js
+++ b/packages/strapi-plugin-documentation/services/Documentation.js
@@ -381,8 +381,8 @@ module.exports = {
(acc, curr) => {
const attribute = attributes[curr];
const isField =
- !attribute.hasOwnProperty('model') &&
- !attribute.hasOwnProperty('collection');
+ !Object.prototype.hasOwnProperty.call(attribute, 'model') &&
+ !Object.prototype.hasOwnProperty.call(attribute, 'collection');
if (attribute.required) {
acc.required.push(curr);
@@ -1525,8 +1525,8 @@ module.exports = {
.map(attr => {
const attribute = modelAttributes[attr];
const isField =
- !attribute.hasOwnProperty('model') &&
- !attribute.hasOwnProperty('collection');
+ !Object.prototype.hasOwnProperty.call(attribute, 'model') &&
+ !Object.prototype.hasOwnProperty.call(attribute, 'collection');
if (!isField) {
const name = attribute.model || attribute.collection;
@@ -1730,7 +1730,7 @@ module.exports = {
mergeComponents: (initObj, srcObj) => {
const cleanedObj = Object.keys(_.get(initObj, 'schemas', {})).reduce(
(acc, current) => {
- const targetObj = _.get(srcObj, ['schemas'], {}).hasOwnProperty(current)
+ const targetObj = Object.prototype.hasOwnProperty.call(_.get(srcObj, ['schemas'], {}), current)
? srcObj
: initObj;
@@ -1750,7 +1750,7 @@ module.exports = {
mergePaths: function(initObj, srcObj) {
return Object.keys(initObj.paths).reduce((acc, current) => {
- if (_.get(srcObj, ['paths'], {}).hasOwnProperty(current)) {
+ if (Object.prototype.hasOwnProperty.call(_.get(srcObj, ['paths'], {}), current)) {
const verbs = Object.keys(initObj.paths[current]).reduce(
(acc1, curr) => {
const verb = this.mergeVerbObject(
diff --git a/packages/strapi-utils/lib/finder.js b/packages/strapi-utils/lib/finder.js
index fdb21001fc..ea41914248 100644
--- a/packages/strapi-utils/lib/finder.js
+++ b/packages/strapi-utils/lib/finder.js
@@ -15,7 +15,7 @@ module.exports = (api, controller) => {
throw new Error('Should be an object');
}
- if (_.isObject(controller) && controller.hasOwnProperty('identity')) {
+ if (_.isObject(controller) && Object.prototype.hasOwnProperty.call(controller, 'identity')) {
controller = controller.identity.toLowerCase();
} else if (_.isString(controller)) {
controller = controller.toLowerCase();
diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js
index 03e8f37fad..0046d66b83 100644
--- a/packages/strapi-utils/lib/models.js
+++ b/packages/strapi-utils/lib/models.js
@@ -108,8 +108,8 @@ module.exports = {
}
if (
- (association.hasOwnProperty('collection') && association.collection === '*') ||
- (association.hasOwnProperty('model') && association.model === '*')
+ (Object.prototype.hasOwnProperty.call(association, 'collection') && association.collection === '*') ||
+ (Object.prototype.hasOwnProperty.call(association, 'model') && association.model === '*')
) {
if (association.model) {
types.current = 'morphToD';
@@ -130,13 +130,13 @@ module.exports = {
// We have to find if they are a model linked to this key
_.forIn(allModels, model => {
_.forIn(model.attributes, attribute => {
- if (attribute.hasOwnProperty('via') && attribute.via === key && attribute.model === currentModelName) {
- if (attribute.hasOwnProperty('collection')) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key && attribute.model === currentModelName) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (attribute.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
types.other = 'model';
// Break loop
@@ -145,7 +145,7 @@ module.exports = {
}
});
});
- } else if (association.hasOwnProperty('via') && association.hasOwnProperty('collection')) {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'via') && Object.prototype.hasOwnProperty.call(association, 'collection')) {
const relatedAttribute = models[association.collection].attributes[association.via];
if (!relatedAttribute) {
@@ -159,23 +159,23 @@ module.exports = {
types.current = 'collection';
if (
- relatedAttribute.hasOwnProperty('collection') &&
+ Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') &&
relatedAttribute.collection !== '*' &&
- relatedAttribute.hasOwnProperty('via')
+ Object.prototype.hasOwnProperty.call(relatedAttribute, 'via')
) {
types.other = 'collection';
} else if (
- relatedAttribute.hasOwnProperty('collection') &&
+ Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') &&
relatedAttribute.collection !== '*' &&
- !relatedAttribute.hasOwnProperty('via')
+ !Object.prototype.hasOwnProperty.call(relatedAttribute, 'via')
) {
types.other = 'collectionD';
- } else if (relatedAttribute.hasOwnProperty('model') && relatedAttribute.model !== '*') {
+ } else if (Object.prototype.hasOwnProperty.call(relatedAttribute, 'model') && relatedAttribute.model !== '*') {
types.other = 'model';
- } else if (relatedAttribute.hasOwnProperty('collection') || relatedAttribute.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') || Object.prototype.hasOwnProperty.call(relatedAttribute, 'model')) {
types.other = 'morphTo';
}
- } else if (association.hasOwnProperty('via') && association.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'via') && Object.prototype.hasOwnProperty.call(association, 'model')) {
types.current = 'modelD';
// We have to find if they are a model linked to this key
@@ -183,30 +183,30 @@ module.exports = {
const attribute = model.attributes[association.via];
if (
- attribute.hasOwnProperty('via') &&
+ Object.prototype.hasOwnProperty.call(attribute, 'via') &&
attribute.via === key &&
- attribute.hasOwnProperty('collection') &&
+ Object.prototype.hasOwnProperty.call(attribute, 'collection') &&
attribute.collection !== '*'
) {
types.other = 'collection';
- } else if (attribute.hasOwnProperty('model') && attribute.model !== '*') {
+ } else if (Object.prototype.hasOwnProperty.call(attribute, 'model') && attribute.model !== '*') {
types.other = 'model';
- } else if (attribute.hasOwnProperty('collection') || attribute.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(attribute, 'collection') || Object.prototype.hasOwnProperty.call(attribute, 'model')) {
types.other = 'morphTo';
}
- } else if (association.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'model')) {
types.current = 'model';
// We have to find if they are a model linked to this key
_.forIn(models, model => {
_.forIn(model.attributes, attribute => {
- if (attribute.hasOwnProperty('via') && attribute.via === key) {
- if (attribute.hasOwnProperty('collection')) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (attribute.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
types.other = 'modelD';
// Break loop
@@ -215,19 +215,19 @@ module.exports = {
}
});
});
- } else if (association.hasOwnProperty('collection')) {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'collection')) {
types.current = 'collectionD';
// We have to find if they are a model linked to this key
_.forIn(models, model => {
_.forIn(model.attributes, attribute => {
- if (attribute.hasOwnProperty('via') && attribute.via === key) {
- if (attribute.hasOwnProperty('collection')) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key) {
+ if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (attribute.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
types.other = 'modelD';
// Break loop
@@ -268,14 +268,14 @@ module.exports = {
nature: 'oneMorphToOne',
verbose: 'belongsToMorph',
};
- } else if (types.current === 'morphTo' && (types.other === 'model' || association.hasOwnProperty('model'))) {
+ } else if (types.current === 'morphTo' && (types.other === 'model' || Object.prototype.hasOwnProperty.call(association, 'model'))) {
return {
nature: 'manyMorphToOne',
verbose: 'belongsToManyMorph',
};
} else if (
types.current === 'morphTo' &&
- (types.other === 'collection' || association.hasOwnProperty('collection'))
+ (types.other === 'collection' || Object.prototype.hasOwnProperty.call(association, 'collection'))
) {
return {
nature: 'manyMorphToMany',
@@ -383,7 +383,7 @@ module.exports = {
}
// Exclude non-relational attribute
- if (!association.hasOwnProperty('collection') && !association.hasOwnProperty('model')) {
+ if (!Object.prototype.hasOwnProperty.call(association, 'collection') && !Object.prototype.hasOwnProperty.call(association, 'model')) {
return undefined;
}
@@ -399,7 +399,7 @@ module.exports = {
}
// Build associations object
- if (association.hasOwnProperty('collection') && association.collection !== '*') {
+ if (Object.prototype.hasOwnProperty.call(association, 'collection') && association.collection !== '*') {
const ast = {
alias: key,
type: 'collection',
@@ -417,7 +417,7 @@ module.exports = {
}
definition.associations.push(ast);
- } else if (association.hasOwnProperty('model') && association.model !== '*') {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'model') && association.model !== '*') {
definition.associations.push({
alias: key,
type: 'model',
@@ -429,7 +429,7 @@ module.exports = {
plugin: association.plugin || undefined,
filter: details.filter,
});
- } else if (association.hasOwnProperty('collection') || association.hasOwnProperty('model')) {
+ } else if (Object.prototype.hasOwnProperty.call(association, 'collection') || Object.prototype.hasOwnProperty.call(association, 'model')) {
const pluginsModels = Object.keys(strapi.plugins).reduce((acc, current) => {
Object.keys(strapi.plugins[current].models).forEach(entity => {
Object.keys(strapi.plugins[current].models[entity].attributes).forEach(attribute => {
@@ -505,7 +505,7 @@ module.exports = {
}, {}),
);
- if (!models.hasOwnProperty(model)) {
+ if (!Object.prototype.hasOwnProperty.call(models, model)) {
return this.log.error(`The model ${model} can't be found.`);
}
diff --git a/packages/strapi/lib/core/bootstrap.js b/packages/strapi/lib/core/bootstrap.js
index bac5b8c8c6..e02eae863b 100644
--- a/packages/strapi/lib/core/bootstrap.js
+++ b/packages/strapi/lib/core/bootstrap.js
@@ -258,7 +258,7 @@ module.exports = function(strapi) {
);
acc[current] = !_.isObject(currentSettings) ? {} : currentSettings;
- if (!acc[current].hasOwnProperty('enabled')) {
+ if (!Object.prototype.hasOwnProperty.call(acc[current], 'enabled')) {
strapi.log.warn(
`(middleware:${current}) wasn't loaded due to missing key \`enabled\` in the configuration`
);
@@ -284,7 +284,7 @@ module.exports = function(strapi) {
acc[current] = !_.isObject(currentSettings) ? {} : currentSettings;
- if (!acc[current].hasOwnProperty('enabled')) {
+ if (!Object.prototype.hasOwnProperty.call(acc[current], 'enabled')) {
strapi.log.warn(
`(hook:${current}) wasn't loaded due to missing key \`enabled\` in the configuration`
);
diff --git a/packages/strapi/lib/middlewares/router/index.js b/packages/strapi/lib/middlewares/router/index.js
index 876cf300cf..f4be104e2b 100644
--- a/packages/strapi/lib/middlewares/router/index.js
+++ b/packages/strapi/lib/middlewares/router/index.js
@@ -56,7 +56,7 @@ module.exports = strapi => {
// Exclude routes with prefix.
const excludedRoutes = _.omitBy(
plugin.config.routes,
- o => !o.config.hasOwnProperty('prefix')
+ o => !Object.prototype.hasOwnProperty.call(o.config, 'prefix')
);
_.forEach(
diff --git a/packages/strapi/lib/middlewares/session/index.js b/packages/strapi/lib/middlewares/session/index.js
index 49e16a6071..ef01cba1ee 100644
--- a/packages/strapi/lib/middlewares/session/index.js
+++ b/packages/strapi/lib/middlewares/session/index.js
@@ -24,7 +24,7 @@ module.exports = strapi => {
strapi.config.hooks.session.secretKeys;
if (
- strapi.config.middleware.settings.session.hasOwnProperty('client') &&
+ Object.prototype.hasOwnProperty.call(strapi.config.middleware.settings.session, 'client') &&
_.isString(strapi.config.middleware.settings.session.client) &&
strapi.config.middleware.settings.session.client !== 'cookie'
) {
@@ -52,7 +52,7 @@ module.exports = strapi => {
});
}
} else if (
- strapi.config.middleware.settings.session.hasOwnProperty('client') &&
+ Object.prototype.hasOwnProperty.call(strapi.config.middleware.settings.session, 'client') &&
_.isString(strapi.config.middleware.settings.session.client) &&
strapi.config.middleware.settings.session.client === 'cookie'
) {
From f6d33c8b44d05a67d772689d701b45d2a79004de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Mon, 22 Jul 2019 11:08:24 +0200
Subject: [PATCH 08/21] Update eslint & lint-staged dependencies
---
package.json | 4 ++--
yarn.lock | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package.json b/package.json
index 8ad3926356..6695dacabe 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
- "eslint": "^6.0.0",
+ "eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-react": "^7.14.0",
"eslint-plugin-redux-saga": "^1.0.0",
@@ -17,7 +17,7 @@
"jest": "^24.5.0",
"jest-cli": "^24.5.0",
"lerna": "^3.13.1",
- "lint-staged": "^9.1.0",
+ "lint-staged": "^9.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"request": "^2.87.0",
diff --git a/yarn.lock b/yarn.lock
index b54e189be5..b4b84f9f85 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6662,7 +6662,7 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@^6.0.0:
+eslint@^6.1.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.2.1.tgz#66c2e4fe8b6356b9f01e828adc3ad04030122df1"
integrity sha512-ES7BzEzr0Q6m5TK9i+/iTpKjclXitOdDK4vT07OqbkBT2/VcN/gO9EL1C4HlK3TAOXYv2ItcmbVR9jO1MR0fJg==
@@ -10948,7 +10948,7 @@ lines-and-columns@^1.1.6:
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
-lint-staged@^9.1.0:
+lint-staged@^9.2.0:
version "9.2.3"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.2.3.tgz#a4ef2b7033f83e8dbc718556610e20e0098356c0"
integrity sha512-ovDmF0c0VJDTP0VmwLetJQ+lVGyNqOkTniwO9S0MOJxGxIExpSRTL56/ZmvXZ1tHNA53GBbXQbfS8RnNGRXFjg==
From 38f6c0244694ba0f7b146c1f05a7174abf4607cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Mon, 12 Aug 2019 11:12:20 +0200
Subject: [PATCH 09/21] Update ESLint dependencies
---
.../strapi-generate-new/lib/resources/json/package.json.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/strapi-generate-new/lib/resources/json/package.json.js b/packages/strapi-generate-new/lib/resources/json/package.json.js
index 09a8149a81..e7b148a6c0 100644
--- a/packages/strapi-generate-new/lib/resources/json/package.json.js
+++ b/packages/strapi-generate-new/lib/resources/json/package.json.js
@@ -29,8 +29,8 @@ module.exports = opts => {
},
devDependencies: {
'babel-eslint': '^10.0.0',
- eslint: '^6.0.0',
- 'eslint-config-airbnb': '^17.1.0',
+ eslint: '^6.1.0',
+ 'eslint-config-airbnb': '^18.0.0',
'eslint-plugin-import': '^2.18.0',
'eslint-plugin-react': '^7.14.0',
},
From 4b5a02088cb2b1b0d9e4c246316d7456b6c3cc7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Wed, 21 Aug 2019 10:58:31 +0200
Subject: [PATCH 10/21] Update ESLint dependencies
---
package.json | 6 +++---
.../strapi-generate-new/lib/resources/json/package.json.js | 2 +-
yarn.lock | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
index 6695dacabe..ff87966ee1 100644
--- a/package.json
+++ b/package.json
@@ -7,10 +7,10 @@
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
- "eslint": "^6.1.0",
- "eslint-config-prettier": "^6.0.0",
+ "eslint": "^6.2.0",
+ "eslint-config-prettier": "^6.1.0",
"eslint-plugin-react": "^7.14.0",
- "eslint-plugin-redux-saga": "^1.0.0",
+ "eslint-plugin-redux-saga": "^1.1.0",
"execa": "^1.0.0",
"husky": "^3.0.0",
"istanbul": "~0.4.2",
diff --git a/packages/strapi-generate-new/lib/resources/json/package.json.js b/packages/strapi-generate-new/lib/resources/json/package.json.js
index e7b148a6c0..e28f0b42a6 100644
--- a/packages/strapi-generate-new/lib/resources/json/package.json.js
+++ b/packages/strapi-generate-new/lib/resources/json/package.json.js
@@ -29,7 +29,7 @@ module.exports = opts => {
},
devDependencies: {
'babel-eslint': '^10.0.0',
- eslint: '^6.1.0',
+ eslint: '^6.2.0',
'eslint-config-airbnb': '^18.0.0',
'eslint-plugin-import': '^2.18.0',
'eslint-plugin-react': '^7.14.0',
diff --git a/yarn.lock b/yarn.lock
index b4b84f9f85..96128b2187 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6599,7 +6599,7 @@ escodegen@1.x.x, escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
-eslint-config-prettier@^6.0.0:
+eslint-config-prettier@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.1.0.tgz#e6f678ba367fbd1273998d5510f76f004e9dce7b"
integrity sha512-k9fny9sPjIBQ2ftFTesJV21Rg4R/7a7t7LCtZVrYQiHEp8Nnuk3EGaDmsKSAnsPj0BYcgB2zxzHa2NTkIxcOLg==
@@ -6621,7 +6621,7 @@ eslint-plugin-react@^7.14.0:
prop-types "^15.7.2"
resolve "^1.10.1"
-eslint-plugin-redux-saga@^1.0.0:
+eslint-plugin-redux-saga@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-redux-saga/-/eslint-plugin-redux-saga-1.1.0.tgz#e47e5572e4f951eb5bbda11cf7e07bea391a468a"
integrity sha512-h6QCo7qQGUQR+sXnkgU4aTo8vMI/I0tttM3fk0jdkP7wqTNHGvSyJLGFFchwiBqg6Tfg64zK68tzSq31wesS6w==
@@ -6662,7 +6662,7 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@^6.1.0:
+eslint@^6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.2.1.tgz#66c2e4fe8b6356b9f01e828adc3ad04030122df1"
integrity sha512-ES7BzEzr0Q6m5TK9i+/iTpKjclXitOdDK4vT07OqbkBT2/VcN/gO9EL1C4HlK3TAOXYv2ItcmbVR9jO1MR0fJg==
From fa4d792d04572a8254920292cc117323779801f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Thu, 22 Aug 2019 16:28:20 +0200
Subject: [PATCH 11/21] Pin ESLint to v6.1.0 because babel/babel-eslint#791
---
package.json | 2 +-
yarn.lock | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index ff87966ee1..32f9ee5c21 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
- "eslint": "^6.2.0",
+ "eslint": "6.1.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-react": "^7.14.0",
"eslint-plugin-redux-saga": "^1.1.0",
diff --git a/yarn.lock b/yarn.lock
index 96128b2187..92219fe631 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6650,7 +6650,7 @@ eslint-scope@^5.0.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint-utils@^1.4.2:
+eslint-utils@^1.3.1:
version "1.4.2"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab"
integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==
@@ -6662,10 +6662,10 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@^6.2.0:
- version "6.2.1"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.2.1.tgz#66c2e4fe8b6356b9f01e828adc3ad04030122df1"
- integrity sha512-ES7BzEzr0Q6m5TK9i+/iTpKjclXitOdDK4vT07OqbkBT2/VcN/gO9EL1C4HlK3TAOXYv2ItcmbVR9jO1MR0fJg==
+eslint@6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646"
+ integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
@@ -6674,9 +6674,9 @@ eslint@^6.2.0:
debug "^4.0.1"
doctrine "^3.0.0"
eslint-scope "^5.0.0"
- eslint-utils "^1.4.2"
- eslint-visitor-keys "^1.1.0"
- espree "^6.1.0"
+ eslint-utils "^1.3.1"
+ eslint-visitor-keys "^1.0.0"
+ espree "^6.0.0"
esquery "^1.0.1"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
@@ -6705,7 +6705,7 @@ eslint@^6.2.0:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-espree@^6.1.0:
+espree@^6.0.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.0.tgz#a1e8aa65bf29a331d70351ed814a80e7534e0884"
integrity sha512-boA7CHRLlVWUSg3iL5Kmlt/xT3Q+sXnKoRYYzj1YeM10A76TEJBbotV5pKbnK42hEUIr121zTv+QLRM5LsCPXQ==
From f04f372442b66cc816a95f1cb4213728c40d0c51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Fri, 23 Aug 2019 14:13:19 +0200
Subject: [PATCH 12/21] Update Object.prototype.hasOwnProperty.call to
lodash.has
---
packages/strapi-hook-bookshelf/lib/index.js | 10 +--
.../strapi-hook-bookshelf/lib/utils/index.js | 2 +-
packages/strapi-middleware-views/lib/index.js | 2 +-
.../FilterOptions/InputWithAutoFocus.js | 4 +-
.../admin/src/containers/ListPage/index.js | 5 +-
.../admin/src/containers/SettingPage/index.js | 6 +-
.../config/policies/routing.js | 4 +-
.../services/ContentManager.js | 8 +--
.../containers/AttributesPickerModal/index.js | 3 +-
.../services/Documentation.js | 12 ++--
packages/strapi-utils/lib/finder.js | 2 +-
packages/strapi-utils/lib/models.js | 64 +++++++++----------
packages/strapi/lib/core/bootstrap.js | 4 +-
.../strapi/lib/middlewares/router/index.js | 2 +-
.../strapi/lib/middlewares/session/index.js | 4 +-
15 files changed, 67 insertions(+), 65 deletions(-)
diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js
index 04ba71dbd9..16ebb06784 100644
--- a/packages/strapi-hook-bookshelf/lib/index.js
+++ b/packages/strapi-hook-bookshelf/lib/index.js
@@ -480,7 +480,7 @@ module.exports = function(strapi) {
_.keyBy(
_.filter(definition.attributes, (value, key) => {
if (
- Object.prototype.hasOwnProperty.call(value, 'columnName') &&
+ _.has(value, 'columnName') &&
!_.isEmpty(value.columnName) &&
value.columnName !== key
) {
@@ -576,9 +576,9 @@ module.exports = function(strapi) {
.attributes,
details => {
if (
- Object.prototype.hasOwnProperty.call(details, 'model') &&
+ _.has(details, 'model') &&
details.model === model &&
- Object.prototype.hasOwnProperty.call(details, 'via') &&
+ _.has(details, 'via') &&
details.via === name
) {
return details;
@@ -589,9 +589,9 @@ module.exports = function(strapi) {
strapi.models[details.model].attributes,
details => {
if (
- Object.prototype.hasOwnProperty.call(details, 'model') &&
+ _.has(details, 'model') &&
details.model === model &&
- Object.prototype.hasOwnProperty.call(details, 'via') &&
+ _.has(details, 'via') &&
details.via === name
) {
return details;
diff --git a/packages/strapi-hook-bookshelf/lib/utils/index.js b/packages/strapi-hook-bookshelf/lib/utils/index.js
index bc1743e208..7521996279 100644
--- a/packages/strapi-hook-bookshelf/lib/utils/index.js
+++ b/packages/strapi-hook-bookshelf/lib/utils/index.js
@@ -21,7 +21,7 @@ module.exports = {
// This is not a Bookshelf collection, only the name.
if (_.isString(collectionIdentity) && !_.isUndefined(models)) {
const PK = _.findKey(_.get(models, collectionIdentity + '.attributes'), o => {
- return Object.prototype.hasOwnProperty.call(o, 'primary');
+ return _.has(o, 'primary');
});
if (!_.isEmpty(PK)) {
diff --git a/packages/strapi-middleware-views/lib/index.js b/packages/strapi-middleware-views/lib/index.js
index 8c0c942057..a787b5577e 100644
--- a/packages/strapi-middleware-views/lib/index.js
+++ b/packages/strapi-middleware-views/lib/index.js
@@ -27,7 +27,7 @@ module.exports = strapi => {
if (_.isPlainObject(views) && !_.isEmpty(views)) {
const opts = _.clone(views);
- if (Object.prototype.hasOwnProperty.call(opts, 'default')) {
+ if (_.has(opts, 'default')) {
opts.extension = opts.default;
delete opts.default;
}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js b/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
index e58335d552..4aeda1fcaa 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
@@ -5,7 +5,7 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { get } from 'lodash';
+import { get, has } from 'lodash';
import {
InputDate,
@@ -36,7 +36,7 @@ class InputWithAutoFocus extends React.Component {
if (this.props.filterToFocus === this.props.index) {
return new Promise(resolve => {
setTimeout(() => {
- if (Object.prototype.hasOwnProperty.call(this.inputEl, 'openCalendar')) {
+ if (has(this.inputEl, 'openCalendar')) {
this.inputEl.openCalendar();
} else {
this.inputEl.focus();
diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
index bd4787b626..3712d09b6d 100644
--- a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
@@ -13,6 +13,7 @@ import {
capitalize,
findIndex,
get,
+ has,
isEmpty,
isUndefined,
toInteger,
@@ -141,8 +142,8 @@ export class ListPage extends React.Component {
return Object.keys(attributes).filter(attr => {
return (
- !Object.prototype.hasOwnProperty.call(attributes[attr], 'collection') &&
- !Object.prototype.hasOwnProperty.call(attributes[attr], 'model')
+ !has(attributes[attr], 'collection') &&
+ !has(attributes[attr], 'model')
);
});
};
diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
index e7a84f1321..9272b5fe3a 100644
--- a/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
+++ b/packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
@@ -7,7 +7,7 @@ import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators, compose } from 'redux';
import { createStructuredSelector } from 'reselect';
-import { findIndex, get, isEmpty, upperFirst } from 'lodash';
+import { findIndex, get, has, isEmpty, upperFirst } from 'lodash';
import cn from 'classnames';
import HTML5Backend from 'react-dnd-html5-backend';
import { DragDropContext } from 'react-dnd';
@@ -191,8 +191,8 @@ class SettingPage extends React.PureComponent {
.filter(attr => {
return (
findIndex(this.getListDisplay(), ['name', attr]) === -1 &&
- !Object.prototype.hasOwnProperty.call(attributes[attr], 'collection') &&
- !Object.prototype.hasOwnProperty.call(attributes[attr], 'model')
+ !has(attributes[attr], 'collection') &&
+ !has(attributes[attr], 'model')
);
})
.map(attr => {
diff --git a/packages/strapi-plugin-content-manager/config/policies/routing.js b/packages/strapi-plugin-content-manager/config/policies/routing.js
index bbc65985a7..5f0ca1503c 100644
--- a/packages/strapi-plugin-content-manager/config/policies/routing.js
+++ b/packages/strapi-plugin-content-manager/config/policies/routing.js
@@ -30,8 +30,8 @@ module.exports = async (ctx, next) => {
if (controller && action) {
// Redirect to specific controller.
if (
- Object.prototype.hasOwnProperty.call(ctx.request.body, 'fields') &&
- Object.prototype.hasOwnProperty.call(ctx.request.body, 'files')
+ _.has(ctx.request.body, 'fields') &&
+ _.has(ctx.request.body, 'files')
) {
let { files, fields } = ctx.request.body;
diff --git a/packages/strapi-plugin-content-manager/services/ContentManager.js b/packages/strapi-plugin-content-manager/services/ContentManager.js
index da67ba6dfc..19e82a862a 100644
--- a/packages/strapi-plugin-content-manager/services/ContentManager.js
+++ b/packages/strapi-plugin-content-manager/services/ContentManager.js
@@ -73,8 +73,8 @@ module.exports = {
add: async (params, values, source) => {
// Multipart/form-data.
if (
- Object.prototype.hasOwnProperty.call(values, 'fields') &&
- Object.prototype.hasOwnProperty.call(values, 'files')
+ _.has(values, 'fields') &&
+ _.has(values, 'files')
) {
// Silent recursive parser.
const parser = value => {
@@ -138,8 +138,8 @@ module.exports = {
edit: async (params, values, source) => {
// Multipart/form-data.
if (
- Object.prototype.hasOwnProperty.call(values, 'fields') &&
- Object.prototype.hasOwnProperty.call(values, 'files')
+ _.has(values, 'fields') &&
+ _.has(values, 'files')
) {
// Silent recursive parser.
const parser = value => {
diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
index 4144c9746b..94ecf8f3c4 100644
--- a/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
+++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
@@ -6,6 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { has } from 'lodash';
import pluginId from '../../pluginId';
@@ -49,7 +50,7 @@ class AttributesPickerModal extends React.Component {
const appPlugins = plugins;
return attributes.filter(attr => {
- if (Object.prototype.hasOwnProperty.call(appPlugins, 'upload')) {
+ if (has(appPlugins, 'upload')) {
return true;
}
diff --git a/packages/strapi-plugin-documentation/services/Documentation.js b/packages/strapi-plugin-documentation/services/Documentation.js
index 247b8e8861..44bcf4366b 100755
--- a/packages/strapi-plugin-documentation/services/Documentation.js
+++ b/packages/strapi-plugin-documentation/services/Documentation.js
@@ -381,8 +381,8 @@ module.exports = {
(acc, curr) => {
const attribute = attributes[curr];
const isField =
- !Object.prototype.hasOwnProperty.call(attribute, 'model') &&
- !Object.prototype.hasOwnProperty.call(attribute, 'collection');
+ !_.has(attribute, 'model') &&
+ !_.has(attribute, 'collection');
if (attribute.required) {
acc.required.push(curr);
@@ -1525,8 +1525,8 @@ module.exports = {
.map(attr => {
const attribute = modelAttributes[attr];
const isField =
- !Object.prototype.hasOwnProperty.call(attribute, 'model') &&
- !Object.prototype.hasOwnProperty.call(attribute, 'collection');
+ !_.has(attribute, 'model') &&
+ !_.has(attribute, 'collection');
if (!isField) {
const name = attribute.model || attribute.collection;
@@ -1730,7 +1730,7 @@ module.exports = {
mergeComponents: (initObj, srcObj) => {
const cleanedObj = Object.keys(_.get(initObj, 'schemas', {})).reduce(
(acc, current) => {
- const targetObj = Object.prototype.hasOwnProperty.call(_.get(srcObj, ['schemas'], {}), current)
+ const targetObj = _.has(_.get(srcObj, ['schemas'], {}), current)
? srcObj
: initObj;
@@ -1750,7 +1750,7 @@ module.exports = {
mergePaths: function(initObj, srcObj) {
return Object.keys(initObj.paths).reduce((acc, current) => {
- if (Object.prototype.hasOwnProperty.call(_.get(srcObj, ['paths'], {}), current)) {
+ if (_.has(_.get(srcObj, ['paths'], {}), current)) {
const verbs = Object.keys(initObj.paths[current]).reduce(
(acc1, curr) => {
const verb = this.mergeVerbObject(
diff --git a/packages/strapi-utils/lib/finder.js b/packages/strapi-utils/lib/finder.js
index ea41914248..190ab43af2 100644
--- a/packages/strapi-utils/lib/finder.js
+++ b/packages/strapi-utils/lib/finder.js
@@ -15,7 +15,7 @@ module.exports = (api, controller) => {
throw new Error('Should be an object');
}
- if (_.isObject(controller) && Object.prototype.hasOwnProperty.call(controller, 'identity')) {
+ if (_.isObject(controller) && _.has(controller, 'identity')) {
controller = controller.identity.toLowerCase();
} else if (_.isString(controller)) {
controller = controller.toLowerCase();
diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js
index 0046d66b83..1dc89b7359 100644
--- a/packages/strapi-utils/lib/models.js
+++ b/packages/strapi-utils/lib/models.js
@@ -108,8 +108,8 @@ module.exports = {
}
if (
- (Object.prototype.hasOwnProperty.call(association, 'collection') && association.collection === '*') ||
- (Object.prototype.hasOwnProperty.call(association, 'model') && association.model === '*')
+ (_.has(association, 'collection') && association.collection === '*') ||
+ (_.has(association, 'model') && association.model === '*')
) {
if (association.model) {
types.current = 'morphToD';
@@ -130,13 +130,13 @@ module.exports = {
// We have to find if they are a model linked to this key
_.forIn(allModels, model => {
_.forIn(model.attributes, attribute => {
- if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key && attribute.model === currentModelName) {
- if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
+ if (_.has(attribute, 'via') && attribute.via === key && attribute.model === currentModelName) {
+ if (_.has(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
+ } else if (_.has(attribute, 'model')) {
types.other = 'model';
// Break loop
@@ -145,7 +145,7 @@ module.exports = {
}
});
});
- } else if (Object.prototype.hasOwnProperty.call(association, 'via') && Object.prototype.hasOwnProperty.call(association, 'collection')) {
+ } else if (_.has(association, 'via') && _.has(association, 'collection')) {
const relatedAttribute = models[association.collection].attributes[association.via];
if (!relatedAttribute) {
@@ -159,23 +159,23 @@ module.exports = {
types.current = 'collection';
if (
- Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') &&
+ _.has(relatedAttribute, 'collection') &&
relatedAttribute.collection !== '*' &&
- Object.prototype.hasOwnProperty.call(relatedAttribute, 'via')
+ _.has(relatedAttribute, 'via')
) {
types.other = 'collection';
} else if (
- Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') &&
+ _.has(relatedAttribute, 'collection') &&
relatedAttribute.collection !== '*' &&
- !Object.prototype.hasOwnProperty.call(relatedAttribute, 'via')
+ !_.has(relatedAttribute, 'via')
) {
types.other = 'collectionD';
- } else if (Object.prototype.hasOwnProperty.call(relatedAttribute, 'model') && relatedAttribute.model !== '*') {
+ } else if (_.has(relatedAttribute, 'model') && relatedAttribute.model !== '*') {
types.other = 'model';
- } else if (Object.prototype.hasOwnProperty.call(relatedAttribute, 'collection') || Object.prototype.hasOwnProperty.call(relatedAttribute, 'model')) {
+ } else if (_.has(relatedAttribute, 'collection') || _.has(relatedAttribute, 'model')) {
types.other = 'morphTo';
}
- } else if (Object.prototype.hasOwnProperty.call(association, 'via') && Object.prototype.hasOwnProperty.call(association, 'model')) {
+ } else if (_.has(association, 'via') && _.has(association, 'model')) {
types.current = 'modelD';
// We have to find if they are a model linked to this key
@@ -183,30 +183,30 @@ module.exports = {
const attribute = model.attributes[association.via];
if (
- Object.prototype.hasOwnProperty.call(attribute, 'via') &&
+ _.has(attribute, 'via') &&
attribute.via === key &&
- Object.prototype.hasOwnProperty.call(attribute, 'collection') &&
+ _.has(attribute, 'collection') &&
attribute.collection !== '*'
) {
types.other = 'collection';
- } else if (Object.prototype.hasOwnProperty.call(attribute, 'model') && attribute.model !== '*') {
+ } else if (_.has(attribute, 'model') && attribute.model !== '*') {
types.other = 'model';
- } else if (Object.prototype.hasOwnProperty.call(attribute, 'collection') || Object.prototype.hasOwnProperty.call(attribute, 'model')) {
+ } else if (_.has(attribute, 'collection') || _.has(attribute, 'model')) {
types.other = 'morphTo';
}
- } else if (Object.prototype.hasOwnProperty.call(association, 'model')) {
+ } else if (_.has(association, 'model')) {
types.current = 'model';
// We have to find if they are a model linked to this key
_.forIn(models, model => {
_.forIn(model.attributes, attribute => {
- if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key) {
- if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
+ if (_.has(attribute, 'via') && attribute.via === key) {
+ if (_.has(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
+ } else if (_.has(attribute, 'model')) {
types.other = 'modelD';
// Break loop
@@ -215,19 +215,19 @@ module.exports = {
}
});
});
- } else if (Object.prototype.hasOwnProperty.call(association, 'collection')) {
+ } else if (_.has(association, 'collection')) {
types.current = 'collectionD';
// We have to find if they are a model linked to this key
_.forIn(models, model => {
_.forIn(model.attributes, attribute => {
- if (Object.prototype.hasOwnProperty.call(attribute, 'via') && attribute.via === key) {
- if (Object.prototype.hasOwnProperty.call(attribute, 'collection')) {
+ if (_.has(attribute, 'via') && attribute.via === key) {
+ if (_.has(attribute, 'collection')) {
types.other = 'collection';
// Break loop
return false;
- } else if (Object.prototype.hasOwnProperty.call(attribute, 'model')) {
+ } else if (_.has(attribute, 'model')) {
types.other = 'modelD';
// Break loop
@@ -268,14 +268,14 @@ module.exports = {
nature: 'oneMorphToOne',
verbose: 'belongsToMorph',
};
- } else if (types.current === 'morphTo' && (types.other === 'model' || Object.prototype.hasOwnProperty.call(association, 'model'))) {
+ } else if (types.current === 'morphTo' && (types.other === 'model' || _.has(association, 'model'))) {
return {
nature: 'manyMorphToOne',
verbose: 'belongsToManyMorph',
};
} else if (
types.current === 'morphTo' &&
- (types.other === 'collection' || Object.prototype.hasOwnProperty.call(association, 'collection'))
+ (types.other === 'collection' || _.has(association, 'collection'))
) {
return {
nature: 'manyMorphToMany',
@@ -383,7 +383,7 @@ module.exports = {
}
// Exclude non-relational attribute
- if (!Object.prototype.hasOwnProperty.call(association, 'collection') && !Object.prototype.hasOwnProperty.call(association, 'model')) {
+ if (!_.has(association, 'collection') && !_.has(association, 'model')) {
return undefined;
}
@@ -399,7 +399,7 @@ module.exports = {
}
// Build associations object
- if (Object.prototype.hasOwnProperty.call(association, 'collection') && association.collection !== '*') {
+ if (_.has(association, 'collection') && association.collection !== '*') {
const ast = {
alias: key,
type: 'collection',
@@ -417,7 +417,7 @@ module.exports = {
}
definition.associations.push(ast);
- } else if (Object.prototype.hasOwnProperty.call(association, 'model') && association.model !== '*') {
+ } else if (_.has(association, 'model') && association.model !== '*') {
definition.associations.push({
alias: key,
type: 'model',
@@ -429,7 +429,7 @@ module.exports = {
plugin: association.plugin || undefined,
filter: details.filter,
});
- } else if (Object.prototype.hasOwnProperty.call(association, 'collection') || Object.prototype.hasOwnProperty.call(association, 'model')) {
+ } else if (_.has(association, 'collection') || _.has(association, 'model')) {
const pluginsModels = Object.keys(strapi.plugins).reduce((acc, current) => {
Object.keys(strapi.plugins[current].models).forEach(entity => {
Object.keys(strapi.plugins[current].models[entity].attributes).forEach(attribute => {
@@ -505,7 +505,7 @@ module.exports = {
}, {}),
);
- if (!Object.prototype.hasOwnProperty.call(models, model)) {
+ if (!_.has(models, model)) {
return this.log.error(`The model ${model} can't be found.`);
}
diff --git a/packages/strapi/lib/core/bootstrap.js b/packages/strapi/lib/core/bootstrap.js
index e02eae863b..36a874329c 100644
--- a/packages/strapi/lib/core/bootstrap.js
+++ b/packages/strapi/lib/core/bootstrap.js
@@ -258,7 +258,7 @@ module.exports = function(strapi) {
);
acc[current] = !_.isObject(currentSettings) ? {} : currentSettings;
- if (!Object.prototype.hasOwnProperty.call(acc[current], 'enabled')) {
+ if (!_.has(acc[current], 'enabled')) {
strapi.log.warn(
`(middleware:${current}) wasn't loaded due to missing key \`enabled\` in the configuration`
);
@@ -284,7 +284,7 @@ module.exports = function(strapi) {
acc[current] = !_.isObject(currentSettings) ? {} : currentSettings;
- if (!Object.prototype.hasOwnProperty.call(acc[current], 'enabled')) {
+ if (!_.has(acc[current], 'enabled')) {
strapi.log.warn(
`(hook:${current}) wasn't loaded due to missing key \`enabled\` in the configuration`
);
diff --git a/packages/strapi/lib/middlewares/router/index.js b/packages/strapi/lib/middlewares/router/index.js
index f4be104e2b..b7a97ba9a4 100644
--- a/packages/strapi/lib/middlewares/router/index.js
+++ b/packages/strapi/lib/middlewares/router/index.js
@@ -56,7 +56,7 @@ module.exports = strapi => {
// Exclude routes with prefix.
const excludedRoutes = _.omitBy(
plugin.config.routes,
- o => !Object.prototype.hasOwnProperty.call(o.config, 'prefix')
+ o => !_.has(o.config, 'prefix')
);
_.forEach(
diff --git a/packages/strapi/lib/middlewares/session/index.js b/packages/strapi/lib/middlewares/session/index.js
index ef01cba1ee..17c5712047 100644
--- a/packages/strapi/lib/middlewares/session/index.js
+++ b/packages/strapi/lib/middlewares/session/index.js
@@ -24,7 +24,7 @@ module.exports = strapi => {
strapi.config.hooks.session.secretKeys;
if (
- Object.prototype.hasOwnProperty.call(strapi.config.middleware.settings.session, 'client') &&
+ _.has(strapi.config.middleware.settings.session, 'client') &&
_.isString(strapi.config.middleware.settings.session.client) &&
strapi.config.middleware.settings.session.client !== 'cookie'
) {
@@ -52,7 +52,7 @@ module.exports = strapi => {
});
}
} else if (
- Object.prototype.hasOwnProperty.call(strapi.config.middleware.settings.session, 'client') &&
+ _.has(strapi.config.middleware.settings.session, 'client') &&
_.isString(strapi.config.middleware.settings.session.client) &&
strapi.config.middleware.settings.session.client === 'cookie'
) {
From 3681b20e3de2e652666922454743c228e4210b5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Sun, 25 Aug 2019 23:40:27 +0200
Subject: [PATCH 13/21] Update ESLint to v6.2
---
package.json | 4 +-
yarn.lock | 439 ++++++++++++++++++++-------------------------------
2 files changed, 175 insertions(+), 268 deletions(-)
diff --git a/package.json b/package.json
index 32f9ee5c21..de7cceaed4 100644
--- a/package.json
+++ b/package.json
@@ -2,12 +2,12 @@
"private": true,
"dependencies": {},
"devDependencies": {
- "babel-eslint": "^10.0.1",
+ "babel-eslint": "^10.0.0",
"cross-env": "^5.2.0",
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
- "eslint": "6.1.0",
+ "eslint": "^6.2.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-react": "^7.14.0",
"eslint-plugin-redux-saga": "^1.1.0",
diff --git a/yarn.lock b/yarn.lock
index 92219fe631..0aa2b4e019 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2049,11 +2049,6 @@
"@sendgrid/client" "^6.4.0"
"@sendgrid/helpers" "^6.4.0"
-"@sindresorhus/is@^0.14.0":
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
- integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
-
"@sindresorhus/is@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
@@ -2090,13 +2085,6 @@
resolved "https://registry.yarnpkg.com/@snyk/gemfile/-/gemfile-1.2.0.tgz#919857944973cce74c650e5428aaf11bcd5c0457"
integrity sha512-nI7ELxukf7pT4/VraL4iabtNNMz8mUo7EXlqCFld8O5z6mIMLX9llps24iPpaIZOwArkY3FWA+4t+ixyvtTSIA==
-"@szmarczak/http-timer@^1.1.2":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
- integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
- dependencies:
- defer-to-connect "^1.0.1"
-
"@types/accepts@*", "@types/accepts@^1.3.5":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575"
@@ -2271,19 +2259,14 @@
"@types/node" "*"
"@types/graphql-upload@^8.0.0":
- version "8.0.1"
- resolved "https://registry.yarnpkg.com/@types/graphql-upload/-/graphql-upload-8.0.1.tgz#12c804255c681fd06a904b67bde7506f2484f1a8"
- integrity sha512-xiOwkegzlHXRtcVMDrIjDQ4XbKLzUcJNyW0RKfNjEbiC0iBk1FwSmaiC/8ObXwQaCgE4PfUle3MT12Me8xIVVA==
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/@types/graphql-upload/-/graphql-upload-8.0.2.tgz#88d8fc4a30c681d57592f1deca720d19c50b50f6"
+ integrity sha512-7pfyXHmfa2W/hrM2Q++V7U7zdgSQj8i+wuuTV9FxOI0puKYcBB1GU2DMa/WPbnDPec/1CGWMIPVmhpzZ1ItVlA==
dependencies:
"@types/express" "*"
"@types/fs-capacitor" "*"
- "@types/graphql" "*"
"@types/koa" "*"
-
-"@types/graphql@*":
- version "14.2.3"
- resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-14.2.3.tgz#cfc6420a67eb20420786f90112357921974593b9"
- integrity sha512-UoCovaxbJIxagCvVfalfK7YaNhmxj3BQFRQ2RHQKLiu+9wNXhJnlbspsLHt/YQM99IaLUUFJNzCwzc6W0ypMeQ==
+ graphql "14.5.0"
"@types/hoist-non-react-statics@^3.3.1":
version "3.3.1"
@@ -2418,13 +2401,6 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
-"@types/package-json@^5.0.0":
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/@types/package-json/-/package-json-5.0.1.tgz#0157acd348cf3ec8834290367e7f24b85cf6e1d0"
- integrity sha512-0M6UdBDyGmgWly5Dtenf1U9HPMNCXtAnvvxIKoK9u6b5CCrxiVxc32eoqBzLccH/1Z8ApY927UiYoQ5cwPKcJw==
- dependencies:
- package-json "*"
-
"@types/prop-types@*":
version "15.7.1"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6"
@@ -2520,9 +2496,9 @@
integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==
"@types/ws@^6.0.0":
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/@types/ws/-/ws-6.0.2.tgz#f3340f7e3d7a07104a5dbcaa8ada4e8d2d45eecb"
- integrity sha512-22XiR1ox9LftTaAtn/c5JCninwc7moaqbkJfaDUb7PkaUitcf5vbTZHdq9dxSMviCm9C3W85rzB8e6yNR70apQ==
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/@types/ws/-/ws-6.0.3.tgz#b772375ba59d79066561c8d87500144d674ba6b3"
+ integrity sha512-yBTM0P05Tx9iXGq00BbJPo37ox68R5vaGTXivs6RGh/BQ6QP5zqZDGWdAO6JbRE/iR1l80xeGAwCQS2nMV9S/w==
dependencies:
"@types/node" "*"
@@ -2776,7 +2752,7 @@ acorn-globals@^4.1.0:
acorn "^6.0.1"
acorn-walk "^6.0.1"
-acorn-jsx@^5.0.0:
+acorn-jsx@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f"
integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==
@@ -2827,6 +2803,14 @@ agentkeepalive@^3.4.1:
dependencies:
humanize-ms "^1.2.1"
+aggregate-error@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.0.tgz#5b5a3c95e9095f311c9ab16c19fb4f3527cd3f79"
+ integrity sha512-yKD9kEoJIR+2IFqhMwayIBgheLYbB3PS2OBhWae1L/ODTd/JF/30cW0bc9TqzRL3k4U41Dieu3BF4I29p8xesA==
+ dependencies:
+ clean-stack "^2.0.0"
+ indent-string "^3.2.0"
+
airbnb-prop-types@^2.13.2:
version "2.15.0"
resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.15.0.tgz#5287820043af1eb469f5b0af0d6f70da6c52aaef"
@@ -2902,7 +2886,7 @@ ansi-colors@^3.0.0:
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==
-ansi-escapes@3.2.0, ansi-escapes@^3.0.0:
+ansi-escapes@3.2.0, ansi-escapes@^3.0.0, ansi-escapes@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
@@ -2912,7 +2896,7 @@ ansi-escapes@^1.0.0:
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
integrity sha1-06ioOzGapneTZisT52HHkRQiMG4=
-ansi-escapes@^4.1.0, ansi-escapes@^4.2.1:
+ansi-escapes@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.2.1.tgz#4dccdb846c3eee10f6d64dea66273eab90c37228"
integrity sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==
@@ -3049,10 +3033,10 @@ apollo-server-caching@0.5.0:
dependencies:
lru-cache "^5.0.0"
-apollo-server-core@2.8.2:
- version "2.8.2"
- resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.8.2.tgz#d7e5a94c43457dd5c5a171c79b1c554b418581d4"
- integrity sha512-ePMy1Ci5PflvM9XUWdnF2C+B6kZF2mhmsoV+SUN7O2jWFb5cW2XvWd4Pppov6reusqkz4VlABgZDfjr+Ck09+g==
+apollo-server-core@2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.9.0.tgz#5db251093ee121a5f4d90a24d51aa4c21e421243"
+ integrity sha512-IvKIgqOqEEB8nszlpHWzlhAu4376So2PgNhFP6UrlfNTllt/WDti5YMOHnVimPWIDHmLPKFan0+wfzpsoRCRdg==
dependencies:
"@apollographql/apollo-tools" "^0.4.0"
"@apollographql/graphql-playground-html" "1.6.24"
@@ -3068,7 +3052,7 @@ apollo-server-core@2.8.2:
apollo-server-types "0.2.1"
apollo-tracing "0.8.1"
fast-json-stable-stringify "^2.0.0"
- graphql-extensions "0.9.2"
+ graphql-extensions "0.10.0"
graphql-tag "^2.9.2"
graphql-tools "^4.0.0"
graphql-upload "^8.0.2"
@@ -3090,9 +3074,9 @@ apollo-server-errors@2.3.1:
integrity sha512-errZvnh0vUQChecT7M4A/h94dnBSRL213dNxpM5ueMypaLYgnp4hiCTWIEaooo9E4yMGd1qA6WaNbLDG2+bjcg==
apollo-server-koa@^2.5.0:
- version "2.8.2"
- resolved "https://registry.yarnpkg.com/apollo-server-koa/-/apollo-server-koa-2.8.2.tgz#cd70a5ebaeb83a79bc473f178d80f613aa563064"
- integrity sha512-vXCbVnAoSX5lASAq4MbeE6ImulDX7bCjByY7uHLlOrdLNWuFyMxI+N6IKkGto6gz3HXueaK6PbIOjjjJZP6LzA==
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/apollo-server-koa/-/apollo-server-koa-2.9.0.tgz#313d2ed77d9dcee378c234859fe93088dead7cd2"
+ integrity sha512-RRKF+lPJEAw9UK8x9wQUFYaOmaVPETQtykN4g8Sf1WZyEJV8WteOG4TwW3FCO+YIuexrEGYJpvjPAM4NkOKEOA==
dependencies:
"@apollographql/graphql-playground-html" "1.6.24"
"@koa/cors" "^2.2.1"
@@ -3103,7 +3087,7 @@ apollo-server-koa@^2.5.0:
"@types/koa-compose" "^3.2.2"
"@types/koa__cors" "^2.2.1"
accepts "^1.3.5"
- apollo-server-core "2.8.2"
+ apollo-server-core "2.9.0"
apollo-server-types "0.2.1"
graphql-subscriptions "^1.0.0"
graphql-tools "^4.0.0"
@@ -3468,9 +3452,9 @@ await-busboy@1.0.3:
busboy "0.3.0"
aws-sdk@^2.382.0, aws-sdk@^2.457.0:
- version "2.515.0"
- resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.515.0.tgz#5c433a722fbe5865301bd9c8ff7f1be0c8ba9997"
- integrity sha512-ek/mSJIjJEQpUJTyl9uFw+mENcpTb/InThEKiDKBYoCSvJVPbkxcke9GYvb+1nyL0B+WJbPmboFpFm6r06pjrg==
+ version "2.517.0"
+ resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.517.0.tgz#415e6732d46c478a4f1867920d25af57651063b1"
+ integrity sha512-CX0b+8StmzAGQOP5eoBYJExpjTdPeVPig3NC4crq71/0LkrIDGcc6ekVEl0Rx23WTyGDzExeDD1be1HvQNwHdA==
dependencies:
buffer "4.9.1"
events "1.1.1"
@@ -3497,17 +3481,17 @@ aws4@^1.6.0, aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
-babel-eslint@^10.0.1:
- version "10.0.2"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456"
- integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==
+babel-eslint@^10.0.0:
+ version "10.0.3"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a"
+ integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.0.0"
"@babel/traverse" "^7.0.0"
"@babel/types" "^7.0.0"
- eslint-scope "3.7.1"
eslint-visitor-keys "^1.0.0"
+ resolve "^1.12.0"
babel-jest@^24.9.0:
version "24.9.0"
@@ -4213,19 +4197,6 @@ cacheable-request@^2.1.1:
normalize-url "2.0.1"
responselike "1.0.2"
-cacheable-request@^6.0.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
- integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
- dependencies:
- clone-response "^1.0.2"
- get-stream "^5.1.0"
- http-cache-semantics "^4.0.0"
- keyv "^3.0.0"
- lowercase-keys "^2.0.0"
- normalize-url "^4.1.0"
- responselike "^1.0.2"
-
cachedir@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-1.3.0.tgz#5e01928bf2d95b5edd94b0942188246740e0dbc4"
@@ -4491,6 +4462,11 @@ clean-css@4.2.x:
dependencies:
source-map "~0.6.0"
+clean-stack@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
+ integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
+
cli-boxes@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
@@ -4515,13 +4491,6 @@ cli-cursor@^2.0.0, cli-cursor@^2.1.0:
dependencies:
restore-cursor "^2.0.0"
-cli-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
- integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
- dependencies:
- restore-cursor "^3.1.0"
-
cli-spinners@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
@@ -4591,7 +4560,7 @@ clone-deep@^4.0.1:
kind-of "^6.0.2"
shallow-clone "^3.0.0"
-clone-response@1.0.2, clone-response@^1.0.2:
+clone-response@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
@@ -5411,9 +5380,9 @@ css-selector-tokenizer@^0.7.0:
regexpu-core "^1.0.0"
css-to-react-native@^2.2.2:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.1.tgz#cf0f61e0514846e2d4dc188b0886e29d8bef64a2"
- integrity sha512-yO+oEx1Lf+hDKasqQRVrAvzMCz825Huh1VMlEEDlRWyAhFb/FWb6I0KpEF1PkyKQ7NEdcx9d5M2ZEWgJAsgPvQ==
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d"
+ integrity sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==
dependencies:
camelize "^1.0.0"
css-color-keywords "^1.0.0"
@@ -5862,11 +5831,6 @@ defaults@^1.0.3:
dependencies:
clone "^1.0.2"
-defer-to-connect@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e"
- integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==
-
define-properties@^1.1.1, define-properties@^1.1.2, define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
@@ -5919,15 +5883,18 @@ del@^4.1.1:
rimraf "^2.6.3"
del@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/del/-/del-5.0.0.tgz#4fa698b7a1ffb4e2ab3e8929ed699799654d6720"
- integrity sha512-TfU3nUY0WDIhN18eq+pgpbLY9AfL5RfiE9czKaTSolc6aK7qASXfDErvYgjV1UqCR4sNXDoxO0/idPmhDUt2Sg==
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7"
+ integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==
dependencies:
- globby "^10.0.0"
- is-path-cwd "^2.0.0"
- is-path-in-cwd "^2.0.0"
- p-map "^2.0.0"
- rimraf "^2.6.3"
+ globby "^10.0.1"
+ graceful-fs "^4.2.2"
+ is-glob "^4.0.1"
+ is-path-cwd "^2.2.0"
+ is-path-inside "^3.0.1"
+ p-map "^3.0.0"
+ rimraf "^3.0.0"
+ slash "^3.0.0"
delayed-stream@~1.0.0:
version "1.0.0"
@@ -6332,9 +6299,9 @@ ejs@^2.6.1:
integrity sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==
electron-to-chromium@^1.3.191:
- version "1.3.237"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.237.tgz#39c5d1da59d6fd16ff705b97e772bb3b5dfda7e4"
- integrity sha512-SPAFjDr/7iiVK2kgTluwxela6eaWjjFkS9rO/iYpB/KGXgccUom5YC7OIf19c8m8GGptWxLU0Em8xM64A/N7Fg==
+ version "1.3.240"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.240.tgz#8e278c4d2b3a96fa865725589277c05c8a1e9584"
+ integrity sha512-cMlX5lQpTzLZI0CsC4Mt2sl6z3jz1RvN/8rIqqwqWy3LYCnu8TUf5o8sqST44nP6zIEdjZb0opXq6qswE9o9pA==
elegant-spinner@^1.0.1:
version "1.0.1"
@@ -6626,14 +6593,6 @@ eslint-plugin-redux-saga@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-redux-saga/-/eslint-plugin-redux-saga-1.1.0.tgz#e47e5572e4f951eb5bbda11cf7e07bea391a468a"
integrity sha512-h6QCo7qQGUQR+sXnkgU4aTo8vMI/I0tttM3fk0jdkP7wqTNHGvSyJLGFFchwiBqg6Tfg64zK68tzSq31wesS6w==
-eslint-scope@3.7.1:
- version "3.7.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
- integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=
- dependencies:
- esrecurse "^4.1.0"
- estraverse "^4.1.1"
-
eslint-scope@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
@@ -6650,7 +6609,7 @@ eslint-scope@^5.0.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint-utils@^1.3.1:
+eslint-utils@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab"
integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==
@@ -6662,10 +6621,10 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646"
- integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==
+eslint@^6.2.0:
+ version "6.2.2"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.2.2.tgz#03298280e7750d81fcd31431f3d333e43d93f24f"
+ integrity sha512-mf0elOkxHbdyGX1IJEUsNBzCDdyoUgljF3rRlgfyYh0pwGnreLc0jjD6ZuleOibjmnUWZLY2eXwSooeOgGJ2jw==
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
@@ -6674,9 +6633,9 @@ eslint@6.1.0:
debug "^4.0.1"
doctrine "^3.0.0"
eslint-scope "^5.0.0"
- eslint-utils "^1.3.1"
- eslint-visitor-keys "^1.0.0"
- espree "^6.0.0"
+ eslint-utils "^1.4.2"
+ eslint-visitor-keys "^1.1.0"
+ espree "^6.1.1"
esquery "^1.0.1"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
@@ -6705,13 +6664,13 @@ eslint@6.1.0:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-espree@^6.0.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.0.tgz#a1e8aa65bf29a331d70351ed814a80e7534e0884"
- integrity sha512-boA7CHRLlVWUSg3iL5Kmlt/xT3Q+sXnKoRYYzj1YeM10A76TEJBbotV5pKbnK42hEUIr121zTv+QLRM5LsCPXQ==
+espree@^6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de"
+ integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==
dependencies:
acorn "^7.0.0"
- acorn-jsx "^5.0.0"
+ acorn-jsx "^5.0.2"
eslint-visitor-keys "^1.1.0"
esprima@2.7.x, esprima@^2.7.1:
@@ -7797,7 +7756,7 @@ get-stream@^4.0.0, get-stream@^4.1.0:
dependencies:
pump "^3.0.0"
-get-stream@^5.0.0, get-stream@^5.1.0:
+get-stream@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
@@ -8015,7 +7974,7 @@ globals@^11.1.0, globals@^11.7.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
-globby@^10.0.0:
+globby@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==
@@ -8153,24 +8112,7 @@ got@^8.3.1:
url-parse-lax "^3.0.0"
url-to-options "^1.0.1"
-got@^9.6.0:
- version "9.6.0"
- resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
- integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
- dependencies:
- "@sindresorhus/is" "^0.14.0"
- "@szmarczak/http-timer" "^1.1.2"
- cacheable-request "^6.0.0"
- decompress-response "^3.3.0"
- duplexer3 "^0.1.4"
- get-stream "^4.1.0"
- lowercase-keys "^1.0.1"
- mimic-response "^1.0.1"
- p-cancelable "^1.0.0"
- to-readable-stream "^1.0.0"
- url-parse-lax "^3.0.0"
-
-graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
+graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"
integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==
@@ -8210,6 +8152,15 @@ graphql-depth-limit@^1.1.0:
dependencies:
arrify "^1.0.1"
+graphql-extensions@0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.10.0.tgz#ceafc42e16554930b0dc90f64d5727ee2a9e9cf9"
+ integrity sha512-qz9Ev0NgsRxdTYqYSCpYwBWS9r1imm+vCBt3PmHzqZlE7SEpUPGddn9oKcLRB/P8uXT6dsr60hDmDHukIxiVOw==
+ dependencies:
+ "@apollographql/apollo-tools" "^0.4.0"
+ apollo-server-env "2.4.1"
+ apollo-server-types "0.2.1"
+
graphql-extensions@0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.8.1.tgz#f5f1fed5fe49620c4e70c5d08bdbd0039e91c402"
@@ -8228,15 +8179,6 @@ graphql-extensions@0.9.1:
apollo-server-env "2.4.1"
apollo-server-types "0.2.1"
-graphql-extensions@0.9.2:
- version "0.9.2"
- resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.9.2.tgz#4bdd81d5d9102e20b7ad3d790b16624fb97c7ab7"
- integrity sha512-7yP6Mr6cDBadrM5dl4CIlp1wTMyPPpL64FtcsOABmaOdf9sOb/X7E3wJSi80UsB8sw0CY2V/HCeU3CIXParQjw==
- dependencies:
- "@apollographql/apollo-tools" "^0.4.0"
- apollo-server-env "2.4.1"
- apollo-server-types "0.2.1"
-
graphql-playground-html@1.6.13:
version "1.6.13"
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.13.tgz#16d61416161d96f2725bc37b0b64d135a189f252"
@@ -8299,13 +8241,20 @@ graphql-upload@^8.0.2:
http-errors "^1.7.2"
object-path "^0.11.4"
-graphql@^14.3.0:
+graphql@14.5.0:
version "14.5.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.0.tgz#4801e6460942c9c591944617f6dd224a9e531520"
integrity sha512-wnGcTD181L2xPnIwHHjx/moV4ulxA2Kms9zcUY+B/SIrK+2N+iOC6WNgnR2zVTmg1Z8P+CZq5KXibTnatg3WUw==
dependencies:
iterall "^1.2.2"
+graphql@^14.3.0:
+ version "14.5.3"
+ resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.3.tgz#e025851cc413e153220f4edbbb25d49f55104fa0"
+ integrity sha512-W8A8nt9BsMg0ZK2qA3DJIVU6muWhxZRYLTmc+5XGwzWzVdUdPVlAAg5hTBjiTISEnzsKL/onasu6vl3kgGTbYg==
+ dependencies:
+ iterall "^1.2.2"
+
growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
@@ -8668,11 +8617,6 @@ http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1:
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
-http-cache-semantics@^4.0.0:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5"
- integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==
-
http-deceiver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
@@ -9027,7 +8971,7 @@ indent-string@^2.1.0:
dependencies:
repeating "^2.0.0"
-indent-string@^3.0.0:
+indent-string@^3.0.0, indent-string@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=
@@ -9100,21 +9044,21 @@ init-package-json@^1.10.3:
validate-npm-package-name "^3.0.0"
inquirer@^6.2.0, inquirer@^6.2.1, inquirer@^6.2.2, inquirer@^6.3.1, inquirer@^6.4.1:
- version "6.5.1"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42"
- integrity sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw==
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca"
+ integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==
dependencies:
- ansi-escapes "^4.2.1"
+ ansi-escapes "^3.2.0"
chalk "^2.4.2"
- cli-cursor "^3.1.0"
+ cli-cursor "^2.1.0"
cli-width "^2.0.0"
external-editor "^3.0.3"
- figures "^3.0.0"
- lodash "^4.17.15"
- mute-stream "0.0.8"
+ figures "^2.0.0"
+ lodash "^4.17.12"
+ mute-stream "0.0.7"
run-async "^2.2.0"
rxjs "^6.4.0"
- string-width "^4.1.0"
+ string-width "^2.1.0"
strip-ansi "^5.1.0"
through "^2.3.6"
@@ -9546,7 +9490,7 @@ is-observable@^1.1.0:
dependencies:
symbol-observable "^1.1.0"
-is-path-cwd@^2.0.0:
+is-path-cwd@^2.0.0, is-path-cwd@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==
@@ -9572,6 +9516,11 @@ is-path-inside@^2.1.0:
dependencies:
path-is-inside "^1.0.2"
+is-path-inside@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.1.tgz#7417049ed551d053ab82bba3fdd6baa6b3a81e89"
+ integrity sha512-CKstxrctq1kUesU6WhtZDbYKzzYBuRH0UYInAVrkc/EYdB9ltbfE0gOoayG9nhohG6447sOOVGhHqsdmBvkbNg==
+
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
@@ -10473,10 +10422,10 @@ jws@^3.1.5, jws@^3.2.2:
jwa "^1.4.1"
safe-buffer "^5.0.1"
-kareem@2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.0.tgz#ef33c42e9024dce511eeaf440cd684f3af1fc769"
- integrity sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg==
+kareem@2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.1.tgz#def12d9c941017fabfb00f873af95e9c99e1be87"
+ integrity sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==
kcors@^2.2.0:
version "2.2.2"
@@ -10495,13 +10444,6 @@ keyv@3.0.0:
dependencies:
json-buffer "3.0.0"
-keyv@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
- integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
- dependencies:
- json-buffer "3.0.0"
-
killable@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
@@ -10746,9 +10688,9 @@ koa-send@^5.0.0:
resolve-path "^1.4.0"
koa-session@^5.5.1:
- version "5.12.2"
- resolved "https://registry.yarnpkg.com/koa-session/-/koa-session-5.12.2.tgz#a9549361751e84b137e778bb93df5eeb51478c1f"
- integrity sha512-gCJ3PXMEOrARM9iYgiALZufdHz7UTDVPTZAc8ScrXl7K9kOTFDEcMIIIwNR03AiJ0BHZs7aLO+kqqEZ3Dvd8Mw==
+ version "5.12.3"
+ resolved "https://registry.yarnpkg.com/koa-session/-/koa-session-5.12.3.tgz#c3a10b5195e1f49d13cf48e78efd6724599e16d7"
+ integrity sha512-r1vRerk6z+J54TtgXPG+oYGj1vwrd889bz55hS7VykWvbtmPNb0q/N7arOHGV8dnstlRyZPP3xCJL20wIf9LwA==
dependencies:
crc "^3.4.4"
debug "^3.1.0"
@@ -10949,9 +10891,9 @@ lines-and-columns@^1.1.6:
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
lint-staged@^9.2.0:
- version "9.2.3"
- resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.2.3.tgz#a4ef2b7033f83e8dbc718556610e20e0098356c0"
- integrity sha512-ovDmF0c0VJDTP0VmwLetJQ+lVGyNqOkTniwO9S0MOJxGxIExpSRTL56/ZmvXZ1tHNA53GBbXQbfS8RnNGRXFjg==
+ version "9.2.4"
+ resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.2.4.tgz#7a35839c9c6103ec98eabf43e35657c209509345"
+ integrity sha512-RAt5ogbLRiKy9+T3dKbbPKP6tN2I9VjEtTXQFxdkauUdMjIBsS70ikwwSgsBR8xVVCUSX7sVDyWCyem5xB8YDw==
dependencies:
chalk "^2.4.2"
commander "^2.20.0"
@@ -11297,7 +11239,7 @@ lodash@4.17.10:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==
-lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.7.14, lodash@~4.17.10:
+lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.7.14, lodash@~4.17.10:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
@@ -11393,16 +11335,11 @@ lowercase-keys@1.0.0:
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=
-lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
+lowercase-keys@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
-lowercase-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
- integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
-
lpad-align@^1.0.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e"
@@ -11596,9 +11533,9 @@ mem@^4.0.0:
p-is-promise "^2.0.0"
memoize-one@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.0.tgz#ce7af291c0e2fe041b709cac5e8c7b198c994286"
- integrity sha512-p3tPVJNrjOkJ0vk0FRn6yv898qlQZct1rsQAXuwK9X5brNVajPv/y13ytrUByzSS8olyzeqCLX8BKEWmTmXa1A==
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0"
+ integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==
memory-fs@^0.4.0, memory-fs@^0.4.1:
version "0.4.1"
@@ -11757,7 +11694,7 @@ mimic-fn@^2.0.0, mimic-fn@^2.1.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-mimic-response@^1.0.0, mimic-response@^1.0.1:
+mimic-response@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
@@ -11835,9 +11772,9 @@ minimist@~0.0.1:
integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
minipass@^2.2.1, minipass@^2.3.5:
- version "2.3.5"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
- integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.4.0.tgz#38f0af94f42fb6f34d3d7d82a90e2c99cd3ff485"
+ integrity sha512-6PmOuSP4NnZXzs2z6rbwzLJu/c5gdzYg1mRI/WIYdx45iiX7T+a4esOzavD6V/KmBzAaopFSTZPZcUx73bqKWA==
dependencies:
safe-buffer "^5.1.2"
yallist "^3.0.0"
@@ -11975,13 +11912,13 @@ mongoose-legacy-pluralize@1.0.2:
integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==
mongoose@^5.5.13, mongoose@^5.5.9:
- version "5.6.10"
- resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.6.10.tgz#0758b7ae7d6f9654e994cc1aa41efc63e35e131b"
- integrity sha512-lxWvF4Vl2118K2nZTj+QAEEmNBCbmUAcmF/roe8d+68Np4RXKEQvmpqm1c3aIlE9AVMp//eKB8IfXr38ZHe0Zw==
+ version "5.6.11"
+ resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.6.11.tgz#c63f557b702a02be8e20ec21d8f7776bdb9bd2d8"
+ integrity sha512-+Mxfmu2Jcspmdqk1111BLUj5mzSLHWKVovImkjzO9GMymTwkHshsuSFmUN7ou4dWy2WR8DPSJcwU52HhnnNk8Q==
dependencies:
async "2.6.2"
bson "~1.1.1"
- kareem "2.3.0"
+ kareem "2.3.1"
mongodb "3.2.7"
mongodb-core "3.2.7"
mongoose-legacy-pluralize "1.0.2"
@@ -12078,7 +12015,12 @@ multimatch@^3.0.0:
arrify "^1.0.1"
minimatch "^3.0.4"
-mute-stream@0.0.8, mute-stream@~0.0.4:
+mute-stream@0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
+ integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
+
+mute-stream@~0.0.4:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
@@ -12474,11 +12416,6 @@ normalize-url@^3.0.0, normalize-url@^3.3.0:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
-normalize-url@^4.1.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.3.0.tgz#9c49e10fc1876aeb76dba88bf1b2b5d9fa57b2ee"
- integrity sha512-0NLtR71o4k6GLP+mr6Ty34c5GA6CMoEsncKJxvQd8NzPxaHRJNnb5gZE8R1XF4CPIS7QPHLJ74IFszwtNVAHVQ==
-
npm-bundled@^1.0.1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
@@ -12936,11 +12873,6 @@ p-cancelable@^0.4.0:
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0"
integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==
-p-cancelable@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
- integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
-
p-defer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
@@ -13046,6 +12978,13 @@ p-map@^2.0.0, p-map@^2.1.0:
resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==
+p-map@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d"
+ integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==
+ dependencies:
+ aggregate-error "^3.0.0"
+
p-pipe@^1.1.0, p-pipe@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9"
@@ -13131,16 +13070,6 @@ pac-resolver@^3.0.0:
netmask "^1.0.6"
thunkify "^2.1.2"
-package-json@*:
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0"
- integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==
- dependencies:
- got "^9.6.0"
- registry-auth-token "^4.0.0"
- registry-url "^5.0.0"
- semver "^6.2.0"
-
package-json@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
@@ -14883,7 +14812,7 @@ raw-body@~2.1.2:
iconv-lite "0.4.13"
unpipe "1.0.0"
-rc@1.2.8, rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8:
+rc@1.2.8, rc@^1.0.1, rc@^1.1.6, rc@^1.2.7:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
@@ -15502,14 +15431,6 @@ registry-auth-token@^3.0.1:
rc "^1.1.6"
safe-buffer "^5.0.1"
-registry-auth-token@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.0.0.tgz#30e55961eec77379da551ea5c4cf43cbf03522be"
- integrity sha512-lpQkHxd9UL6tb3k/aHAVfnVtn+Bcs9ob5InuFLLEDqSqeq+AljB8GZW9xY0x7F+xYwEcjKe07nyoxzEYz6yvkw==
- dependencies:
- rc "^1.2.8"
- safe-buffer "^5.0.1"
-
registry-url@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942"
@@ -15517,13 +15438,6 @@ registry-url@^3.0.3:
dependencies:
rc "^1.0.1"
-registry-url@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009"
- integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==
- dependencies:
- rc "^1.2.8"
-
regjsgen@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
@@ -15826,14 +15740,14 @@ resolve@1.1.7, resolve@1.1.x:
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=
-resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1:
+resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1:
version "1.12.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==
dependencies:
path-parse "^1.0.6"
-responselike@1.0.2, responselike@^1.0.2:
+responselike@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
@@ -15856,14 +15770,6 @@ restore-cursor@^2.0.0:
onetime "^2.0.0"
signal-exit "^3.0.2"
-restore-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
- integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
- dependencies:
- onetime "^5.1.0"
- signal-exit "^3.0.2"
-
ret@~0.1.10:
version "0.1.15"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
@@ -15923,6 +15829,13 @@ rimraf@2.6.3:
dependencies:
glob "^7.1.3"
+rimraf@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b"
+ integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==
+ dependencies:
+ glob "^7.1.3"
+
ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
@@ -16049,9 +15962,9 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1:
estree-walker "^0.6.1"
rollup@^1.10.0:
- version "1.20.0"
- resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.20.0.tgz#3799e4cd2f48c0a068d87af575956d8d72c9447a"
- integrity sha512-zW80j9RSJ0VV0VOxP1i7cF279+IlAaD49Ihwqb87PDR0555Fvk10HKmh2yUtXCdBb37bELuhHWZTJc4uoCo8Vw==
+ version "1.20.2"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.20.2.tgz#0e1be13cb5de244c9c463027092f7c93461558b9"
+ integrity sha512-pF4jFzNWMUuudIAeiTgOcSxn8XkBN2Y2/IwPR7iL/IZ8k9RwoLyp2QwNWiYT+HF537zwpmzZHTBYw345H9vq1A==
dependencies:
"@types/estree" "0.0.39"
"@types/node" "^12.7.2"
@@ -16731,13 +16644,12 @@ snyk-python-plugin@^1.13.0:
"@snyk/cli-interface" "^2.0.2"
tmp "0.0.33"
-snyk-resolve-deps@4.3.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/snyk-resolve-deps/-/snyk-resolve-deps-4.3.0.tgz#0f356ebaed9ca78806024aa0d564c229377f39cb"
- integrity sha512-HWGiwnz0hH59tyvcpaWho0G8oHlFiiTMgWbx/wZMZmCcgrmmqbjNRp6g+Zg6Cr0Ng2Gy0oc4jqvwspmOoh0c4g==
+snyk-resolve-deps@4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/snyk-resolve-deps/-/snyk-resolve-deps-4.4.0.tgz#ef20fb578a4c920cc262fb73dd292ff21215f52d"
+ integrity sha512-aFPtN8WLqIk4E1ulMyzvV5reY1Iksz+3oPnUVib1jKdyTHymmOIYF7z8QZ4UUr52UsgmrD9EA/dq7jpytwFoOQ==
dependencies:
"@types/node" "^6.14.4"
- "@types/package-json" "^5.0.0"
"@types/semver" "^5.5.0"
ansicolors "^0.3.2"
debug "^3.2.5"
@@ -16763,10 +16675,10 @@ snyk-resolve@1.0.1, snyk-resolve@^1.0.0, snyk-resolve@^1.0.1:
debug "^3.1.0"
then-fs "^2.0.0"
-snyk-sbt-plugin@2.6.1:
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/snyk-sbt-plugin/-/snyk-sbt-plugin-2.6.1.tgz#bbd01291cb778d5e44689a4a1b0e3de1727942fe"
- integrity sha512-zWU14cm+cpamJ0CJdekTfgmv6ifdgVcapO6d27KTJThqRuR0arCqGPPyZa/Zl+jzhcK0dtRS4Ihk7g+d36SWIg==
+snyk-sbt-plugin@2.7.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/snyk-sbt-plugin/-/snyk-sbt-plugin-2.7.0.tgz#2b28cf5742b52bf38c76c1973324835adaf947e7"
+ integrity sha512-qQSPkiyd/WNfo0z8MDK+87iIIT2wCn+k6tl9mx0VoNJo/z5jJLAoIc41zkGt/K8TjxA7VF1PV5B3tHqBp1xAVA==
dependencies:
semver "^6.1.2"
tmp "^0.1.0"
@@ -16791,9 +16703,9 @@ snyk-try-require@1.3.1, snyk-try-require@^1.1.1, snyk-try-require@^1.3.1:
then-fs "^2.0.0"
snyk@^1.99.0:
- version "1.217.3"
- resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.217.3.tgz#9a363986e3c5c9fb8769e744159c9e416a794595"
- integrity sha512-VVTIEuKqw6O5Cj/ypps3TC/MShc2cM5P6ilMhf5xg6IETMvAFt04svNiE84oMWRedPPTVKhDBhTAOaAWx2qCAA==
+ version "1.219.0"
+ resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.219.0.tgz#cf4925015366abb1f58175a24a9e385849f65217"
+ integrity sha512-AE71frDXHzZQjWm1kEKq0+AgQY4hRG5LkgOI3psRxMVlNsCsgVHwW5oFMhXZ9rv47GZYlirYnIznvjNXjgiEVQ==
dependencies:
"@snyk/dep-graph" "1.12.0"
"@snyk/gemfile" "1.2.0"
@@ -16827,8 +16739,8 @@ snyk@^1.99.0:
snyk-policy "1.13.5"
snyk-python-plugin "^1.13.0"
snyk-resolve "1.0.1"
- snyk-resolve-deps "4.3.0"
- snyk-sbt-plugin "2.6.1"
+ snyk-resolve-deps "4.4.0"
+ snyk-sbt-plugin "2.7.0"
snyk-tree "^1.0.0"
snyk-try-require "1.3.1"
source-map-support "^0.5.11"
@@ -17252,7 +17164,7 @@ string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1:
+"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
@@ -17718,9 +17630,9 @@ terser@^3.14.1:
source-map-support "~0.5.10"
terser@^4.1.2, terser@^4.1.3:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.0.tgz#4b1b5f4424b426a7a47e80d6aae45e0d7979aef0"
- integrity sha512-6lPt7lZdZ/13icQJp8XasFOwZjFJkxFFIb/N1fhYEQNoNI3Ilo3KABZ9OocZvZoB39r6SiIk/0+v/bt8nZoSeA==
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.1.tgz#1052cfe17576c66e7bc70fcc7119f22b155bdac1"
+ integrity sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
@@ -17899,11 +17811,6 @@ to-object-path@^0.3.0:
dependencies:
kind-of "^3.0.2"
-to-readable-stream@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
- integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
-
to-regex-range@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
From 118691808b3cec521930ce026a881d6bc3b379f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Mon, 9 Sep 2019 15:28:59 +0200
Subject: [PATCH 14/21] Update ESLint to v6.3
---
package.json | 4 ++--
.../strapi-generate-new/lib/resources/json/package.json.js | 2 +-
yarn.lock | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package.json b/package.json
index 7be067ef9b..69a7886974 100644
--- a/package.json
+++ b/package.json
@@ -10,8 +10,8 @@
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
- "eslint": "^6.2.0",
- "eslint-config-prettier": "^6.1.0",
+ "eslint": "^6.3.0",
+ "eslint-config-prettier": "^6.2.0",
"eslint-plugin-react": "^7.14.0",
"eslint-plugin-react-hooks": "^2.0.0",
"eslint-plugin-redux-saga": "^1.1.0",
diff --git a/packages/strapi-generate-new/lib/resources/json/package.json.js b/packages/strapi-generate-new/lib/resources/json/package.json.js
index e28f0b42a6..ef309d3d61 100644
--- a/packages/strapi-generate-new/lib/resources/json/package.json.js
+++ b/packages/strapi-generate-new/lib/resources/json/package.json.js
@@ -29,7 +29,7 @@ module.exports = opts => {
},
devDependencies: {
'babel-eslint': '^10.0.0',
- eslint: '^6.2.0',
+ eslint: '^6.3.0',
'eslint-config-airbnb': '^18.0.0',
'eslint-plugin-import': '^2.18.0',
'eslint-plugin-react': '^7.14.0',
diff --git a/yarn.lock b/yarn.lock
index 5afd529df9..c25c1c4ff4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6736,7 +6736,7 @@ escodegen@1.x.x, escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
-eslint-config-prettier@^6.1.0:
+eslint-config-prettier@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.2.0.tgz#80e0b8714e3f6868c4ac2a25fbf39c02e73527a7"
integrity sha512-VLsgK/D+S/FEsda7Um1+N8FThec6LqE3vhcMyp8mlmto97y3fGf3DX7byJexGuOb1QY0Z/zz222U5t+xSfcZDQ==
@@ -6796,7 +6796,7 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@^6.2.0:
+eslint@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.3.0.tgz#1f1a902f67bfd4c354e7288b81e40654d927eb6a"
integrity sha512-ZvZTKaqDue+N8Y9g0kp6UPZtS4FSY3qARxBs7p4f0H0iof381XHduqVerFWtK8DPtKmemqbqCFENWSQgPR/Gow==
From 315399527aef7f2d5c8875eff76166ba12e111b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?=
Date: Mon, 9 Sep 2019 15:32:02 +0200
Subject: [PATCH 15/21] Fix missed lint error
---
packages/strapi-hook-bookshelf/lib/mount-models.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/strapi-hook-bookshelf/lib/mount-models.js b/packages/strapi-hook-bookshelf/lib/mount-models.js
index 184bb9890f..e38169f945 100644
--- a/packages/strapi-hook-bookshelf/lib/mount-models.js
+++ b/packages/strapi-hook-bookshelf/lib/mount-models.js
@@ -161,9 +161,9 @@ module.exports = ({ models, target, plugin = false }, ctx) => {
const FK = _.findKey(target.attributes, details => {
if (
- details.hasOwnProperty('model') &&
+ _.has(details, 'model') &&
details.model === model &&
- details.hasOwnProperty('via') &&
+ _.has(details, 'via') &&
details.via === name
) {
return details;
@@ -841,7 +841,7 @@ module.exports = ({ models, target, plugin = false }, ctx) => {
_.keyBy(
_.filter(definition.attributes, (value, key) => {
if (
- value.hasOwnProperty('columnName') &&
+ _.has(value, 'columnName') &&
!_.isEmpty(value.columnName) &&
value.columnName !== key
) {
From fd02d99b289d09aea8a8a500d932353353ac94ae Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Sun, 1 Sep 2019 02:34:16 +0800
Subject: [PATCH 16/21] Fixed issue where custom GraphQL Mutation resolvers
never triggered policies
---
packages/strapi-plugin-graphql/services/Mutation.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/strapi-plugin-graphql/services/Mutation.js b/packages/strapi-plugin-graphql/services/Mutation.js
index a9ca8c5990..802abeb801 100644
--- a/packages/strapi-plugin-graphql/services/Mutation.js
+++ b/packages/strapi-plugin-graphql/services/Mutation.js
@@ -23,7 +23,11 @@ module.exports = {
// Extract custom resolver or type description.
const { resolver: handler = {} } = _schema;
- const queryName = `${action}${_.capitalize(name)}`;
+ let queryName = `${action}${_.capitalize(name)}`;
+
+ if (_.has(handler, `Mutation.${action}`)) {
+ queryName = action;
+ }
// Retrieve policies.
const policies = _.get(handler, `Mutation.${queryName}.policies`, []);
From ef82e486e67ccd64accbf088c01224acb07cc81d Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Sun, 1 Sep 2019 02:39:34 +0800
Subject: [PATCH 17/21] Fixed issue where all policies triggered by GraphQL
Mutations and Queries had ctx.state.user as undefined
---
.../strapi-plugin-graphql/services/Mutation.js | 14 +++++++++++---
packages/strapi-plugin-graphql/services/Query.js | 13 ++++++++++---
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/packages/strapi-plugin-graphql/services/Mutation.js b/packages/strapi-plugin-graphql/services/Mutation.js
index 802abeb801..4c7dc44b11 100644
--- a/packages/strapi-plugin-graphql/services/Mutation.js
+++ b/packages/strapi-plugin-graphql/services/Mutation.js
@@ -29,9 +29,6 @@ module.exports = {
queryName = action;
}
- // Retrieve policies.
- const policies = _.get(handler, `Mutation.${queryName}.policies`, []);
-
// Retrieve resolverOf.
const resolverOf = _.get(handler, `Mutation.${queryName}.resolverOf`, '');
@@ -158,10 +155,21 @@ module.exports = {
);
}
+ // Retrieve policies.
+ let policies = [];
+
if (strapi.plugins['users-permissions']) {
policies.push('plugins.users-permissions.permissions');
}
+ // Retrieve policies.
+ if (_.get(handler, `Mutation.${queryName}.policies`)) {
+ policies = _.concat(
+ policies,
+ _.get(handler, `Mutation.${queryName}.policies`)
+ );
+ }
+
// Populate policies.
policies.forEach(policy =>
policyUtils.get(
diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js
index 2c70215086..c024a3c988 100644
--- a/packages/strapi-plugin-graphql/services/Query.js
+++ b/packages/strapi-plugin-graphql/services/Query.js
@@ -91,9 +91,6 @@ module.exports = {
: pluralize.plural(name);
}
- // Retrieve policies.
- const policies = _.get(handler, `Query.${queryName}.policies`, []);
-
// Retrieve resolverOf.
const resolverOf = _.get(handler, `Query.${queryName}.resolverOf`, '');
@@ -235,10 +232,20 @@ module.exports = {
);
}
+ // Retrieve policies.
+ let policies = [];
+
if (strapi.plugins['users-permissions']) {
policies.push('plugins.users-permissions.permissions');
}
+ if (_.get(handler, `Query.${queryName}.policies`)) {
+ policies = _.concat(
+ policies,
+ _.get(handler, `Query.${queryName}.policies`)
+ );
+ }
+
// Populate policies.
policies.forEach(policy =>
policyUtils.get(
From be06f7043346b4c4aba368c6d084d688dbe1f551 Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Sun, 1 Sep 2019 03:27:24 +0800
Subject: [PATCH 18/21] Updated documentation so that GraphQL policies use
correct 'policies' key instead of 'policy'
---
docs/3.0.0-beta.x/guides/graphql.md | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/docs/3.0.0-beta.x/guides/graphql.md b/docs/3.0.0-beta.x/guides/graphql.md
index 4fb20835a5..7662a826cd 100644
--- a/docs/3.0.0-beta.x/guides/graphql.md
+++ b/docs/3.0.0-beta.x/guides/graphql.md
@@ -492,7 +492,7 @@ module.exports = {
Query: {
post: {
description: 'Return a single post',
- policy: ['plugins.users-permissions.isAuthenticated', 'isOwner'], // Apply the 'isAuthenticated' policy of the `Users & Permissions` plugin, then the 'isOwner' policy before executing the resolver.
+ policies: ['plugins.users-permissions.isAuthenticated', 'isOwner'], // Apply the 'isAuthenticated' policy of the `Users & Permissions` plugin, then the 'isOwner' policy before executing the resolver.
},
posts: {
description: 'Return a list of posts', // Add a description to the query.
@@ -504,7 +504,7 @@ module.exports = {
},
postsByTags: {
description: 'Return the posts published by the author',
- resolverOf: 'Post.findByTags', // Will apply the same policy on the custom resolver than the controller's action `findByTags`.
+ resolverOf: 'Post.findByTags', // Will apply the same policy on the custom resolver as the controller's action `findByTags`.
resolver: (obj, options, ctx) => {
// ctx is the context of the Koa request.
await strapi.controllers.posts.findByTags(ctx);
@@ -516,7 +516,7 @@ module.exports = {
Mutation: {
attachPostToAuthor: {
description: 'Attach a post to an author',
- policy: ['plugins.users-permissions.isAuthenticated', 'isOwner'],
+ policies: ['plugins.users-permissions.isAuthenticated', 'isOwner'],
resolver: 'Post.attachToAuthor'
}
}
@@ -677,7 +677,7 @@ module.exports = {
Query: {
posts: {
description: 'Return a list of posts',
- policy: [
+ policies: [
'plugins.users-permissions.isAuthenticated',
'isOwner',
'global.logging',
@@ -687,7 +687,10 @@ module.exports = {
Mutation: {
createPost: {
description: 'Create a new post',
- policy: ['plugins.users-permissions.isAuthenticated', 'global.logging'],
+ policies: [
+ 'plugins.users-permissions.isAuthenticated',
+ 'global.logging',
+ ],
},
},
},
@@ -782,7 +785,7 @@ module.exports = {
Query: {
posts: {
description: 'Return a list of posts by author',
- resolverOf: 'Post.find', // Will apply the same policy on the custom resolver than the controller's action `find` located in `Post.js`.
+ resolverOf: 'Post.find', // Will apply the same policy on the custom resolver as the controller's action `find` located in `Post.js`.
resolver: (obj, options, context) => {
// You can return a raw JSON object or a promise.
From 79a253f5bc460f3c880d651b1903d9c6ddc7afef Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Mon, 2 Sep 2019 17:01:04 +0800
Subject: [PATCH 19/21] Simplified ctx.state.user fix
---
.../strapi-plugin-graphql/services/Mutation.js | 16 ++++------------
packages/strapi-plugin-graphql/services/Query.js | 15 ++++-----------
2 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/packages/strapi-plugin-graphql/services/Mutation.js b/packages/strapi-plugin-graphql/services/Mutation.js
index 4c7dc44b11..6068782e3f 100644
--- a/packages/strapi-plugin-graphql/services/Mutation.js
+++ b/packages/strapi-plugin-graphql/services/Mutation.js
@@ -29,6 +29,9 @@ module.exports = {
queryName = action;
}
+ // Retrieve policies.
+ const policies = _.get(handler, `Mutation.${queryName}.policies`, []);
+
// Retrieve resolverOf.
const resolverOf = _.get(handler, `Mutation.${queryName}.resolverOf`, '');
@@ -155,19 +158,8 @@ module.exports = {
);
}
- // Retrieve policies.
- let policies = [];
-
if (strapi.plugins['users-permissions']) {
- policies.push('plugins.users-permissions.permissions');
- }
-
- // Retrieve policies.
- if (_.get(handler, `Mutation.${queryName}.policies`)) {
- policies = _.concat(
- policies,
- _.get(handler, `Mutation.${queryName}.policies`)
- );
+ policies.unshift('plugins.users-permissions.permissions');
}
// Populate policies.
diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js
index c024a3c988..cc3633f25b 100644
--- a/packages/strapi-plugin-graphql/services/Query.js
+++ b/packages/strapi-plugin-graphql/services/Query.js
@@ -91,6 +91,9 @@ module.exports = {
: pluralize.plural(name);
}
+ // Retrieve policies.
+ const policies = _.get(handler, `Query.${queryName}.policies`, []);
+
// Retrieve resolverOf.
const resolverOf = _.get(handler, `Query.${queryName}.resolverOf`, '');
@@ -232,18 +235,8 @@ module.exports = {
);
}
- // Retrieve policies.
- let policies = [];
-
if (strapi.plugins['users-permissions']) {
- policies.push('plugins.users-permissions.permissions');
- }
-
- if (_.get(handler, `Query.${queryName}.policies`)) {
- policies = _.concat(
- policies,
- _.get(handler, `Query.${queryName}.policies`)
- );
+ policies.unshift('plugins.users-permissions.permissions');
}
// Populate policies.
From d3a968aa62e8e8e4c8baecabcc107f81316097c1 Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Wed, 11 Sep 2019 21:55:26 +0800
Subject: [PATCH 20/21] Pass easier-to-understand options instead of arguments
to Mutation.composeMutationResolver() and Query.composeQueryResolver()
---
.../services/Mutation.js | 2 +-
.../strapi-plugin-graphql/services/Query.js | 2 +-
.../services/Resolvers.js | 35 ++++++++++++++++---
.../strapi-plugin-graphql/services/Schema.js | 20 +++++------
4 files changed, 42 insertions(+), 17 deletions(-)
diff --git a/packages/strapi-plugin-graphql/services/Mutation.js b/packages/strapi-plugin-graphql/services/Mutation.js
index 6068782e3f..bf5d5b30bf 100644
--- a/packages/strapi-plugin-graphql/services/Mutation.js
+++ b/packages/strapi-plugin-graphql/services/Mutation.js
@@ -19,7 +19,7 @@ module.exports = {
* @return Promise or Error.
*/
- composeMutationResolver: function(_schema, plugin, name, action) {
+ composeMutationResolver: function({ _schema, plugin, name, action }) {
// Extract custom resolver or type description.
const { resolver: handler = {} } = _schema;
diff --git a/packages/strapi-plugin-graphql/services/Query.js b/packages/strapi-plugin-graphql/services/Query.js
index cc3633f25b..26edffcd76 100644
--- a/packages/strapi-plugin-graphql/services/Query.js
+++ b/packages/strapi-plugin-graphql/services/Query.js
@@ -69,7 +69,7 @@ module.exports = {
* @return Promise or Error.
*/
- composeQueryResolver: function(_schema, plugin, name, isSingular) {
+ composeQueryResolver: function({ _schema, plugin, name, isSingular }) {
const params = {
model: name,
};
diff --git a/packages/strapi-plugin-graphql/services/Resolvers.js b/packages/strapi-plugin-graphql/services/Resolvers.js
index 6952d0b057..53ece2e335 100644
--- a/packages/strapi-plugin-graphql/services/Resolvers.js
+++ b/packages/strapi-plugin-graphql/services/Resolvers.js
@@ -326,11 +326,21 @@ const buildShadowCRUD = (models, plugin) => {
const queries = {
singular:
_.get(resolver, `Query.${singularName}`) !== false
- ? Query.composeQueryResolver(_schema, plugin, name, true)
+ ? Query.composeQueryResolver({
+ _schema,
+ plugin,
+ name,
+ isSingular: true,
+ })
: null,
plural:
_.get(resolver, `Query.${pluralName}`) !== false
- ? Query.composeQueryResolver(_schema, plugin, name, false)
+ ? Query.composeQueryResolver({
+ _schema,
+ plugin,
+ name,
+ isSingular: false,
+ })
: null,
};
@@ -376,15 +386,30 @@ const buildShadowCRUD = (models, plugin) => {
const mutations = {
create:
_.get(resolver, `Mutation.create${capitalizedName}`) !== false
- ? Mutation.composeMutationResolver(_schema, plugin, name, 'create')
+ ? Mutation.composeMutationResolver({
+ _schema,
+ plugin,
+ name,
+ action: 'create',
+ })
: null,
update:
_.get(resolver, `Mutation.update${capitalizedName}`) !== false
- ? Mutation.composeMutationResolver(_schema, plugin, name, 'update')
+ ? Mutation.composeMutationResolver({
+ _schema,
+ plugin,
+ name,
+ action: 'update',
+ })
: null,
delete:
_.get(resolver, `Mutation.delete${capitalizedName}`) !== false
- ? Mutation.composeMutationResolver(_schema, plugin, name, 'delete')
+ ? Mutation.composeMutationResolver({
+ _schema,
+ plugin,
+ name,
+ action: 'delete',
+ })
: null,
};
diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js
index c1217ca39d..b577bc4150 100644
--- a/packages/strapi-plugin-graphql/services/Schema.js
+++ b/packages/strapi-plugin-graphql/services/Schema.js
@@ -228,22 +228,22 @@ const schemaBuilder = {
const [name, action] = acc[type][resolver].split('.');
const normalizedName = _.toLower(name);
- acc[type][resolver] = Mutation.composeMutationResolver(
- strapi.plugins.graphql.config._schema.graphql,
+ acc[type][resolver] = Mutation.composeMutationResolver({
+ _schema: strapi.plugins.graphql.config._schema.graphql,
plugin,
- normalizedName,
- action
- );
+ name: normalizedName,
+ action,
+ });
break;
}
case 'Query':
default:
- acc[type][resolver] = Query.composeQueryResolver(
- strapi.plugins.graphql.config._schema.graphql,
+ acc[type][resolver] = Query.composeQueryResolver({
+ _schema: strapi.plugins.graphql.config._schema.graphql,
plugin,
- resolver,
- 'force' // Avoid singular/pluralize and force query name.
- );
+ name: resolver,
+ isSingular: 'force', // Avoid singular/pluralize and force query name.
+ });
break;
}
}
From c5e61102923cfa046f14223841d3bea994c2042e Mon Sep 17 00:00:00 2001
From: Don Masakayan
Date: Thu, 5 Sep 2019 17:18:36 +0800
Subject: [PATCH 21/21] Fixed issue where GraphQL Mutations that use actions in
plugins didn't work.
This now works, as it should:
```
Mutation: {
customMutation:
resolver: {
plugin: "custom-plugin",
handler: "Post.customMutation"
}
}
}
}
```
---
.../strapi-plugin-graphql/services/Mutation.js | 5 +++--
packages/strapi-plugin-graphql/services/Schema.js | 14 ++++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/packages/strapi-plugin-graphql/services/Mutation.js b/packages/strapi-plugin-graphql/services/Mutation.js
index bf5d5b30bf..43909bcb52 100644
--- a/packages/strapi-plugin-graphql/services/Mutation.js
+++ b/packages/strapi-plugin-graphql/services/Mutation.js
@@ -23,10 +23,11 @@ module.exports = {
// Extract custom resolver or type description.
const { resolver: handler = {} } = _schema;
- let queryName = `${action}${_.capitalize(name)}`;
-
+ let queryName;
if (_.has(handler, `Mutation.${action}`)) {
queryName = action;
+ } else {
+ queryName = `${action}${_.capitalize(name)}`;
}
// Retrieve policies.
diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js
index b577bc4150..7ce4304a08 100644
--- a/packages/strapi-plugin-graphql/services/Schema.js
+++ b/packages/strapi-plugin-graphql/services/Schema.js
@@ -224,14 +224,20 @@ const schemaBuilder = {
switch (type) {
case 'Mutation': {
- // TODO: Verify this...
- const [name, action] = acc[type][resolver].split('.');
- const normalizedName = _.toLower(name);
+ let name, action;
+ if (_.isString(acc[type][resolver])) {
+ [name, action] = acc[type][resolver].split('.');
+ } else if (
+ _.isPlainObject(acc[type][resolver]) &&
+ _.isString(acc[type][resolver].handler)
+ ) {
+ [name, action] = acc[type][resolver].handler.split('.');
+ }
acc[type][resolver] = Mutation.composeMutationResolver({
_schema: strapi.plugins.graphql.config._schema.graphql,
plugin,
- name: normalizedName,
+ name: _.toLower(name),
action,
});
break;
|