@strapi/plugin-users-permissions 4.9.0-exp.90df253ba90fd6879eb56a720a1f80d04ff745b8 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ node_modules/
2
+ .eslintrc.js
package/.eslintrc.js ADDED
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ root: true,
3
+ overrides: [
4
+ {
5
+ files: ['admin/**/*'],
6
+ extends: ['custom/front'],
7
+ },
8
+ {
9
+ files: ['**/*'],
10
+ excludedFiles: ['admin/**/*'],
11
+ extends: ['custom/back'],
12
+ },
13
+ ],
14
+ };
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
- import { get } from 'lodash';
2
+ import get from 'lodash/get';
3
3
  import styled from 'styled-components';
4
4
  import PropTypes from 'prop-types';
5
5
  import { Box, Checkbox, Flex, Typography, Grid, GridItem } from '@strapi/design-system';
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { Typography, Flex, GridItem } from '@strapi/design-system';
4
- import { get, isEmpty, without } from 'lodash';
4
+ import get from 'lodash/get';
5
+ import isEmpty from 'lodash/isEmpty';
6
+ import without from 'lodash/without';
7
+
5
8
  import { useUsersPermissions } from '../../contexts/UsersPermissionsContext';
6
9
  import BoundRoute from '../BoundRoute';
7
10
 
@@ -1,6 +1,8 @@
1
1
  /* eslint-disable consistent-return */
2
2
  import produce from 'immer';
3
- import { set, get, take } from 'lodash';
3
+ import get from 'lodash/get';
4
+ import set from 'lodash/set';
5
+ import take from 'lodash/take';
4
6
 
5
7
  export const initialState = {
6
8
  initialData: {},
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useReducer } from 'react';
2
2
  import { useNotification, useFetchClient } from '@strapi/helper-plugin';
3
- import { get } from 'lodash';
3
+ import get from 'lodash/get';
4
4
  import init from './init';
5
5
  import pluginId from '../../pluginId';
6
6
  import { cleanPermissions } from '../../utils';
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useReducer, useRef } from 'react';
2
2
  import { request, useNotification } from '@strapi/helper-plugin';
3
- import { get } from 'lodash';
3
+ import get from 'lodash/get';
4
4
  import init from './init';
5
5
  import pluginId from '../../pluginId';
6
6
  import reducer, { initialState } from './reducer';
@@ -1,5 +1,5 @@
1
1
  import produce from 'immer';
2
- import { set } from 'lodash';
2
+ import set from 'lodash/set';
3
3
 
4
4
  const initialState = {
5
5
  formErrors: {},
@@ -1,4 +1,4 @@
1
- import { sortBy } from 'lodash';
1
+ import sortBy from 'lodash/sortBy';
2
2
 
3
3
  const createProvidersArray = (data) => {
4
4
  return sortBy(
@@ -1,4 +1,4 @@
1
- import { isEmpty } from 'lodash';
1
+ import isEmpty from 'lodash/isEmpty';
2
2
 
3
3
  const cleanPermissions = (permissions) =>
4
4
  Object.keys(permissions).reduce((acc, current) => {
@@ -1,10 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const baseConfig = require('../../../jest.base-config.front');
4
- const pkg = require('./package.json');
5
-
6
3
  module.exports = {
7
- ...baseConfig,
8
- displayName: (pkg.strapi && pkg.strapi.name) || pkg.name,
9
- roots: [__dirname],
4
+ preset: '../../../jest-preset.front.js',
10
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-users-permissions",
3
- "version": "4.9.0-exp.90df253ba90fd6879eb56a720a1f80d04ff745b8",
3
+ "version": "4.9.0",
4
4
  "description": "Protect your API with a full-authentication process based on JWT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,17 +20,19 @@
20
20
  }
21
21
  ],
22
22
  "scripts": {
23
- "test:unit": "jest --verbose",
23
+ "test:unit": "jest",
24
+ "test:unit:watch": "jest --watch",
24
25
  "test:front": "cross-env IS_EE=true jest --config ./jest.config.front.js",
25
26
  "test:front:watch": "cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
26
27
  "test:front:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js",
27
- "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
28
+ "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
29
+ "lint": "eslint ."
28
30
  },
29
31
  "dependencies": {
30
- "@strapi/design-system": "1.6.5",
31
- "@strapi/helper-plugin": "4.9.0-exp.90df253ba90fd6879eb56a720a1f80d04ff745b8",
32
- "@strapi/icons": "1.6.5",
33
- "@strapi/utils": "4.9.0-exp.90df253ba90fd6879eb56a720a1f80d04ff745b8",
32
+ "@strapi/design-system": "1.6.6",
33
+ "@strapi/helper-plugin": "4.9.0",
34
+ "@strapi/icons": "1.6.6",
35
+ "@strapi/utils": "4.9.0",
34
36
  "bcryptjs": "2.4.3",
35
37
  "formik": "2.2.9",
36
38
  "grant-koa": "5.4.8",
@@ -43,7 +45,7 @@
43
45
  "match-sorter": "^4.0.2",
44
46
  "prop-types": "^15.7.2",
45
47
  "purest": "4.0.2",
46
- "react-intl": "6.2.8",
48
+ "react-intl": "6.3.2",
47
49
  "react-query": "3.24.3",
48
50
  "react-redux": "8.0.5",
49
51
  "url-join": "4.0.1",
@@ -79,5 +81,5 @@
79
81
  "required": true,
80
82
  "kind": "plugin"
81
83
  },
82
- "gitHead": "366eb8a0d0f06935914854c6d9c4b3fe859468e0"
84
+ "gitHead": "ffe3f4621ccc968ce56fda9a8317ec30d4bad205"
83
85
  }