From 1991227d0ad99775a75fb377f0bc6928bf76e8ed Mon Sep 17 00:00:00 2001 From: Vildan Softic Date: Wed, 9 Feb 2022 20:14:13 +0100 Subject: [PATCH] chore: prepare release 1.7.1 --- dist/amd/aurelia-store.js | 2 +- dist/aurelia-store.d.ts | 166 +-------------------------- dist/commonjs/aurelia-store.js | 2 +- dist/es2015/aurelia-store.js | 2 +- dist/es2017/aurelia-store.js | 2 +- dist/native-modules/aurelia-store.js | 2 +- dist/umd-es2015/aurelia-store.js | 2 +- dist/umd/aurelia-store.js | 2 +- doc/CHANGELOG.md | 10 ++ package-lock.json | 4 +- package.json | 2 +- 11 files changed, 24 insertions(+), 172 deletions(-) diff --git a/dist/amd/aurelia-store.js b/dist/amd/aurelia-store.js index 133e55d..49a8e7e 100644 --- a/dist/amd/aurelia-store.js +++ b/dist/amd/aurelia-store.js @@ -490,7 +490,7 @@ define('aurelia-store', ['exports', 'rxjs', 'aurelia-dependency-injection', 'aur }; Store.prototype.setupDevTools = function () { var _this = this; - if (aureliaPal.PLATFORM.global.devToolsExtension) { + if (aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", exports.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/aurelia-store.d.ts b/dist/aurelia-store.d.ts index b882f69..e96bda4 100644 --- a/dist/aurelia-store.d.ts +++ b/dist/aurelia-store.d.ts @@ -1,3 +1,4 @@ +import { EnhancerOptions } from '@redux-devtools/extension'; import { Container } from 'aurelia-dependency-injection'; import { Logger } from 'aurelia-logging'; import { Observable } from 'rxjs'; @@ -60,168 +61,9 @@ export interface Action { export interface ActionCreator { (...args: any[]): T; } -export interface DevToolsOptions { - /** - * If disable is true, devtools monitoring - * will be disabled in the browser (disallowing a user to see your state using Redux Dev Tools) - */ - disable?: boolean; - /** - * the instance name to be showed on the monitor page. Default value is `document.title`. - * If not specified and there's no document title, it will consist of `tabId` and `instanceId`. - */ - name?: string; - /** - * action creators functions to be available in the Dispatcher. - */ - actionCreators?: ActionCreator[] | { - [key: string]: ActionCreator; - }; - /** - * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once. - * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly. - * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value). - * - * @default 500 ms. - */ - latency?: number; - /** - * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance. - * - * @default 50 - */ - maxAge?: number; - /** - * - `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. - */ - serialize?: boolean | { - date?: boolean; - regex?: boolean; - undefined?: boolean; - error?: boolean; - symbol?: boolean; - map?: boolean; - set?: boolean; - function?: boolean | Function; - }; - /** - * function which takes `action` object and id number as arguments, and should return `action` object back. - */ - actionSanitizer?: (action: A, id: number) => A; - /** - * function which takes `state` object and index as arguments, and should return `state` object back. - */ - stateSanitizer?: (state: S, index: number) => S; - /** - * *array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers). - * If `actionsWhitelist` specified, `actionsBlacklist` is ignored. - */ - actionsBlacklist?: string[]; - /** - * *array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers). - * If `actionsWhitelist` specified, `actionsBlacklist` is ignored. - */ - actionsWhitelist?: string[]; - /** - * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor. - * Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters. - */ - predicate?: (state: S, action: A) => boolean; - /** - * if specified as `false`, it will not record the changes till clicking on `Start recording` button. - * Available only for Redux enhancer, for others use `autoPause`. - * - * @default true - */ - shouldRecordChanges?: boolean; - /** - * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type. - * If not specified, will commit when paused. Available only for Redux enhancer. - * - * @default "@@PAUSED"" - */ - pauseActionType?: string; - /** - * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use. - * Not available for Redux enhancer (as it already does it but storing the data to be sent). - * - * @default false - */ - autoPause?: boolean; - /** - * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button. - * Available only for Redux enhancer. - * - * @default false - */ - shouldStartLocked?: boolean; - /** - * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer. - * - * @default true - */ - shouldHotReload?: boolean; - /** - * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched. - * - * @default false - */ - shouldCatchErrors?: boolean; - /** - * If you want to restrict the extension, specify the features you allow. - * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed. - * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side. - * Otherwise, you'll get/set the data right from the monitor part. - */ - features?: { - /** - * start/pause recording of dispatched actions - */ - pause?: boolean; - /** - * lock/unlock dispatching actions and side effects - */ - lock?: boolean; - /** - * persist states on page reloading - */ - persist?: boolean; - /** - * export history of actions in a file - */ - export?: boolean | "custom"; - /** - * import history of actions from a file - */ - import?: boolean | "custom"; - /** - * jump back and forth (time travelling) - */ - jump?: boolean; - /** - * skip (cancel) actions - */ - skip?: boolean; - /** - * drag and drop actions in the history list - */ - reorder?: boolean; - /** - * dispatch custom actions or action creators - */ - dispatch?: boolean; - /** - * generate tests for the selected actions - */ - test?: boolean; - }; -} +export declare type DevToolsOptions = import("@redux-devtools/extension").EnhancerOptions | { + disable: boolean; +}; export declare type Reducer = (state: T, ...params: P) => T | false | Promise; export declare enum PerformanceMeasurement { StartEnd = "startEnd", diff --git a/dist/commonjs/aurelia-store.js b/dist/commonjs/aurelia-store.js index b141365..9891f81 100644 --- a/dist/commonjs/aurelia-store.js +++ b/dist/commonjs/aurelia-store.js @@ -498,7 +498,7 @@ var Store = /** @class */ (function () { }; Store.prototype.setupDevTools = function () { var _this = this; - if (aureliaPal.PLATFORM.global.devToolsExtension) { + if (aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", exports.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/es2015/aurelia-store.js b/dist/es2015/aurelia-store.js index 330f00b..bac5593 100644 --- a/dist/es2015/aurelia-store.js +++ b/dist/es2015/aurelia-store.js @@ -367,7 +367,7 @@ class Store { }), state); } setupDevTools() { - if (PLATFORM.global.devToolsExtension) { + if (PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/es2017/aurelia-store.js b/dist/es2017/aurelia-store.js index 0c3b159..0fb852f 100644 --- a/dist/es2017/aurelia-store.js +++ b/dist/es2017/aurelia-store.js @@ -339,7 +339,7 @@ class Store { }, state); } setupDevTools() { - if (PLATFORM.global.devToolsExtension) { + if (PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/native-modules/aurelia-store.js b/dist/native-modules/aurelia-store.js index 5037537..6772536 100644 --- a/dist/native-modules/aurelia-store.js +++ b/dist/native-modules/aurelia-store.js @@ -497,7 +497,7 @@ var Store = /** @class */ (function () { }; Store.prototype.setupDevTools = function () { var _this = this; - if (PLATFORM.global.devToolsExtension) { + if (PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/umd-es2015/aurelia-store.js b/dist/umd-es2015/aurelia-store.js index 4b33f03..a118eda 100644 --- a/dist/umd-es2015/aurelia-store.js +++ b/dist/umd-es2015/aurelia-store.js @@ -364,7 +364,7 @@ }), state); } setupDevTools() { - if (aureliaPal.PLATFORM.global.devToolsExtension) { + if (aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", exports.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/dist/umd/aurelia-store.js b/dist/umd/aurelia-store.js index d56d923..bd0750b 100644 --- a/dist/umd/aurelia-store.js +++ b/dist/umd/aurelia-store.js @@ -494,7 +494,7 @@ }; Store.prototype.setupDevTools = function () { var _this = this; - if (aureliaPal.PLATFORM.global.devToolsExtension) { + if (aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__) { this.logger[getLogType(this.options, "devToolsStatus", exports.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; this.devTools = aureliaPal.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index d0cdf6a..4a2388c 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,13 @@ + +## [1.7.1](https://github.com/aurelia/store/compare/1.7.0...1.7.1) (2022-02-09) + + +### Bug Fixes + +* **devtools:** drop deprecated window global; use typings from upstream ([6ccae8a](https://github.com/aurelia/store/commit/6ccae8a)) + + + # [1.7.0](https://github.com/aurelia/store/compare/1.6.0...1.7.0) (2021-03-27) diff --git a/package-lock.json b/package-lock.json index b08fd4b..734cb8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aurelia-store", - "version": "1.7.0", + "version": "1.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "aurelia-store", - "version": "1.7.0", + "version": "1.7.1", "license": "MIT", "dependencies": { "@redux-devtools/extension": "^3.2.1", diff --git a/package.json b/package.json index 5a51f77..0cfe109 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-store", - "version": "1.7.0", + "version": "1.7.1", "description": "Aurelia single state store based on RxJS", "keywords": [ "aurelia",