Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-deep-persist

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-deep-persist - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

lib/utils/index.js

@@ -281,17 +281,4 @@ "use strict";

const configValidator = function ({ whitelist, blacklist }) {
if (whitelist && blacklist) {
const foundKeys = whitelist
.map((path) => {
const pathArray = path.split('.');
const rootKey = pathArray[0];
if (blacklist.some((path) => path.split('.')[0] === rootKey)) {
return rootKey;
}
})
.filter((value, index, self) => {
return value && self.indexOf(value) === index;
});
if (foundKeys === null || foundKeys === void 0 ? void 0 : foundKeys.length) {
throw new Error(`${constants_1.PACKAGE_NAME}: whitelisted root keys also found in the blacklist.\n\n ${JSON.stringify(foundKeys)}`);
}
if (whitelist && whitelist.length && blacklist && blacklist.length) {
throw new Error(`${constants_1.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);
}

@@ -298,0 +285,0 @@ if (whitelist) {

2

package.json
{
"name": "redux-deep-persist",
"version": "1.0.0",
"version": "1.0.1",
"description": "Allows to easily create a deep configuration of a whitelist or blacklist for the redux-persist module.",

@@ -5,0 +5,0 @@ "author": "Piotr Kujawa <piotrkujawa.dev@gmail.com>",

@@ -88,6 +88,6 @@ # Redux Deep Persist

* **"Whitelisted root keys also found in the blacklist."**
* **"You should not define a whitelist and blacklist in parallel."**
- _it occurs when you try to use whitelist and blacklist at once, you should choose just one approach_
* **"Duplicates of paths found in your whitelist/blacklist"**
* **"Duplicates of paths found in your whitelist/blacklist."**
- _you defined duplicated paths in your whitelist or blacklist arrays. Wrong: ```["root1", "root2.a2", "root1"]```._

@@ -94,0 +94,0 @@

@@ -386,21 +386,6 @@ import { PACKAGE_NAME, PLACEHOLDER_UNDEFINED } from '../constants';

// 1. Find duplicated root keys within whitelist and blacklist
if (whitelist && blacklist) {
const foundKeys = whitelist
.map((path) => {
const pathArray = path.split('.');
const rootKey = pathArray[0];
if (blacklist.some((path) => path.split('.')[0] === rootKey)) {
return rootKey;
}
})
.filter((value, index, self) => {
return value && self.indexOf(value) === index;
});
if (foundKeys?.length) {
throw new Error(
`${PACKAGE_NAME}: whitelisted root keys also found in the blacklist.\n\n ${JSON.stringify(foundKeys)}`,
);
}
if (whitelist && whitelist.length && blacklist && blacklist.length) {
throw new Error(
`${PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`,
);
}

@@ -407,0 +392,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc