@redux-devtools/extension
Advanced tools
Comparing version 3.2.2 to 3.2.3
@@ -0,1 +1,2 @@ | ||
import Immutable from 'immutable'; | ||
import { Action, ActionCreator, StoreEnhancer } from 'redux'; | ||
@@ -29,19 +30,49 @@ export interface EnhancerOptions { | ||
/** | ||
* - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode). | ||
* - `false` - will handle also circular references. | ||
* - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions. | ||
* - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys. | ||
* For each of them you can indicate if to include (by setting as `true`). | ||
* For `function` key you can also specify a custom function which handles serialization. | ||
* See [`jsan`](https://github.com/kolodny/jsan) for more details. | ||
* Customizes how actions and state are serialized and deserialized. Can be a boolean or object. If given a boolean, the behavior is the same as if you | ||
* were to pass an object and specify `options` as a boolean. Giving an object allows fine-grained customization using the `replacer` and `reviver` | ||
* functions. | ||
*/ | ||
serialize?: boolean | { | ||
date?: boolean; | ||
regex?: boolean; | ||
undefined?: boolean; | ||
error?: boolean; | ||
symbol?: boolean; | ||
map?: boolean; | ||
set?: boolean; | ||
function?: boolean | Function; | ||
/** | ||
* - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode). | ||
* - `false` - will handle also circular references. | ||
* - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions. | ||
* - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys. | ||
* For each of them you can indicate if to include (by setting as `true`). | ||
* For `function` key you can also specify a custom function which handles serialization. | ||
* See [`jsan`](https://github.com/kolodny/jsan) for more details. | ||
*/ | ||
options?: undefined | boolean | { | ||
date?: true; | ||
regex?: true; | ||
undefined?: true; | ||
error?: true; | ||
symbol?: true; | ||
map?: true; | ||
set?: true; | ||
function?: true | ((fn: (...args: any[]) => any) => string); | ||
}; | ||
/** | ||
* [JSON replacer function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) used for both actions and states stringify. | ||
* In addition, you can specify a data type by adding a [`__serializedType__`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/helpers/index.js#L4) | ||
* key. So you can deserialize it back while importing or persisting data. | ||
* Moreover, it will also [show a nice preview showing the provided custom type](https://cloud.githubusercontent.com/assets/7957859/21814330/a17d556a-d761-11e6-85ef-159dd12f36c5.png): | ||
*/ | ||
replacer?: (key: string, value: unknown) => any; | ||
/** | ||
* [JSON `reviver` function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter) | ||
* used for parsing the imported actions and states. See [`remotedev-serialize`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/immutable/serialize.js#L8-L41) | ||
* as an example on how to serialize special data types and get them back. | ||
*/ | ||
reviver?: (key: string, value: unknown) => any; | ||
/** | ||
* Automatically serialize/deserialize immutablejs via [remotedev-serialize](https://github.com/zalmoxisus/remotedev-serialize). | ||
* Just pass the Immutable library. It will support all ImmutableJS structures. You can even export them into a file and get them back. | ||
* The only exception is `Record` class, for which you should pass this in addition the references to your classes in `refs`. | ||
*/ | ||
immutable?: typeof Immutable; | ||
/** | ||
* ImmutableJS `Record` classes used to make possible restore its instances back when importing, persisting... | ||
*/ | ||
refs?: Immutable.Record.Factory<any>[]; | ||
}; | ||
@@ -48,0 +79,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
export default function assign<T, K extends keyof T>(obj: T, newKey: K, newValue: T[K]): T; | ||
export default function assign<T extends object, K extends keyof T>(obj: T, newKey: K, newValue: T[K]): T; |
{ | ||
"name": "@redux-devtools/extension", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "Wrappers for Redux DevTools Extension.", | ||
@@ -20,4 +20,26 @@ "homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-extension", | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.3", | ||
"immutable": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.10", | ||
"@babel/core": "^7.18.5", | ||
"@babel/eslint-parser": "^7.18.2", | ||
"@babel/plugin-transform-runtime": "^7.18.5", | ||
"@babel/preset-env": "^7.18.2", | ||
"@babel/preset-typescript": "^7.17.12", | ||
"@typescript-eslint/eslint-plugin": "^5.29.0", | ||
"@typescript-eslint/parser": "^5.29.0", | ||
"eslint": "^8.18.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"redux": "^4.2.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "~4.7.4" | ||
}, | ||
"peerDependencies": { | ||
"redux": "^3.1.0 || ^4.0.0" | ||
}, | ||
"scripts": { | ||
"build": "yarn build:cjs && yarn build:esm && yarn build:types", | ||
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
"build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", | ||
@@ -29,26 +51,4 @@ "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", | ||
"type-check": "tsc --noEmit", | ||
"prepack": "yarn run clean && yarn run build", | ||
"prepublish": "yarn run type-check && yarn run lint" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.17.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.0", | ||
"@babel/core": "^7.17.0", | ||
"@babel/eslint-parser": "^7.17.0", | ||
"@babel/plugin-transform-runtime": "^7.17.0", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@typescript-eslint/eslint-plugin": "^5.10.2", | ||
"@typescript-eslint/parser": "^5.10.2", | ||
"eslint": "^8.8.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"redux": "^4.1.2", | ||
"rimraf": "^3.0.2", | ||
"typescript": "~4.5.5" | ||
}, | ||
"peerDependencies": { | ||
"redux": "^3.1.0 || ^4.0.0" | ||
"prepublish": "pnpm run type-check && pnpm run lint" | ||
} | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
import Immutable from 'immutable'; | ||
import { Action, ActionCreator, compose, StoreEnhancer } from 'redux'; | ||
@@ -28,9 +29,5 @@ | ||
/** | ||
* - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode). | ||
* - `false` - will handle also circular references. | ||
* - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions. | ||
* - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys. | ||
* For each of them you can indicate if to include (by setting as `true`). | ||
* For `function` key you can also specify a custom function which handles serialization. | ||
* See [`jsan`](https://github.com/kolodny/jsan) for more details. | ||
* Customizes how actions and state are serialized and deserialized. Can be a boolean or object. If given a boolean, the behavior is the same as if you | ||
* were to pass an object and specify `options` as a boolean. Giving an object allows fine-grained customization using the `replacer` and `reviver` | ||
* functions. | ||
*/ | ||
@@ -40,11 +37,47 @@ serialize?: | ||
| { | ||
date?: boolean; | ||
regex?: boolean; | ||
undefined?: boolean; | ||
error?: boolean; | ||
symbol?: boolean; | ||
map?: boolean; | ||
set?: boolean; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
function?: boolean | Function; | ||
/** | ||
* - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode). | ||
* - `false` - will handle also circular references. | ||
* - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions. | ||
* - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys. | ||
* For each of them you can indicate if to include (by setting as `true`). | ||
* For `function` key you can also specify a custom function which handles serialization. | ||
* See [`jsan`](https://github.com/kolodny/jsan) for more details. | ||
*/ | ||
options?: | ||
| undefined | ||
| boolean | ||
| { | ||
date?: true; | ||
regex?: true; | ||
undefined?: true; | ||
error?: true; | ||
symbol?: true; | ||
map?: true; | ||
set?: true; | ||
function?: true | ((fn: (...args: any[]) => any) => string); | ||
}; | ||
/** | ||
* [JSON replacer function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) used for both actions and states stringify. | ||
* In addition, you can specify a data type by adding a [`__serializedType__`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/helpers/index.js#L4) | ||
* key. So you can deserialize it back while importing or persisting data. | ||
* Moreover, it will also [show a nice preview showing the provided custom type](https://cloud.githubusercontent.com/assets/7957859/21814330/a17d556a-d761-11e6-85ef-159dd12f36c5.png): | ||
*/ | ||
replacer?: (key: string, value: unknown) => any; | ||
/** | ||
* [JSON `reviver` function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter) | ||
* used for parsing the imported actions and states. See [`remotedev-serialize`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/immutable/serialize.js#L8-L41) | ||
* as an example on how to serialize special data types and get them back. | ||
*/ | ||
reviver?: (key: string, value: unknown) => any; | ||
/** | ||
* Automatically serialize/deserialize immutablejs via [remotedev-serialize](https://github.com/zalmoxisus/remotedev-serialize). | ||
* Just pass the Immutable library. It will support all ImmutableJS structures. You can even export them into a file and get them back. | ||
* The only exception is `Record` class, for which you should pass this in addition the references to your classes in `refs`. | ||
*/ | ||
immutable?: typeof Immutable; | ||
/** | ||
* ImmutableJS `Record` classes used to make possible restore its instances back when importing, persisting... | ||
*/ | ||
refs?: Immutable.Record.Factory<any>[]; | ||
}; | ||
@@ -51,0 +84,0 @@ /** |
@@ -11,3 +11,3 @@ const objectKeys = | ||
export default function assign<T, K extends keyof T>( | ||
export default function assign<T extends object, K extends keyof T>( | ||
obj: T, | ||
@@ -14,0 +14,0 @@ newKey: K, |
48040
23
992
3
+ Addedimmutable@^4.0.0
+ Addedimmutable@4.3.6(transitive)
Updated@babel/runtime@^7.18.3