@figliolia/galena 2.0.2 → 2.0.4

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.
@@ -22,7 +22,7 @@ class Guards {
22
22
  */
23
23
  this.warnForUndefinedStates = this.developmentGuard((name, state) => {
24
24
  if (!process.env.IGNORE_LAZY_STATE_WARNINGS && !(name in state)) {
25
- console.warn(`A unit of state with the name "${name}" does not yet exist on this Galena instance. If this is expected, you can ignore this warning. To make these warnings go away, you can enable this process argument - "IGNORE_WARNINGS_FOR_LAZY_STATES=1"`);
25
+ console.warn(`A unit of state with the name "${name}" does not yet exist on this Galena instance. If this is expected, you can ignore this warning. To make these warnings go away, you can enable this process argument - "IGNORE_LAZY_STATE_WARNING=1"`);
26
26
  }
27
27
  });
28
28
  /**
@@ -1,6 +1,4 @@
1
- import { EventEmitter } from "@figliolia/event-emitter";
2
1
  import type { State } from "../Galena/State";
3
- import type { MiddlewareEvent } from "./types";
4
2
  /**
5
3
  * # Middleware
6
4
  *
@@ -30,7 +28,7 @@ import type { MiddlewareEvent } from "./types";
30
28
  * ```
31
29
  */
32
30
  export declare class Middleware<T extends any = any> {
33
- static Emitter: EventEmitter<MiddlewareEvent<any>>;
31
+ private static Emitter;
34
32
  constructor();
35
33
  /**
36
34
  * Validate Event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@figliolia/galena",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "A performant state management library supporting mutable state, batched updates, middleware and a rich development API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,7 +47,6 @@
47
47
  "eslint-import-resolver-typescript": "^3.5.5",
48
48
  "eslint-plugin-import": "^2.27.5",
49
49
  "eslint-plugin-prettier": "^4.2.1",
50
- "eslint-plugin-react": "^7.32.2",
51
50
  "eslint-plugin-simple-import-sort": "^10.0.0",
52
51
  "prettier": "^2.8.8",
53
52
  "ts-node": "^10.9.1",
@@ -33,7 +33,7 @@ import { MiddlewareEvents } from "Middleware/types";
33
33
  * ```
34
34
  */
35
35
  export class Middleware<T extends any = any> {
36
- public static Emitter = new EventEmitter<MiddlewareEvent<any>>();
36
+ private static Emitter = new EventEmitter<MiddlewareEvent<any>>();
37
37
  constructor() {
38
38
  const extension = Object.getPrototypeOf(this);
39
39
  const methods = Object.getOwnPropertyNames(extension);