@thi.ng/system 3.1.45 → 3.1.47

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-02-13T16:03:11Z
3
+ - **Last updated**: 2025-02-21T21:54:17Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -11,6 +11,14 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
11
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
12
  and/or version bumps of transitive dependencies.
13
13
 
14
+ ### [3.1.47](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.1.47) (2025-02-21)
15
+
16
+ #### ♻️ Refactoring
17
+
18
+ - switch use of `Promise` to `MaybePromise` ([59b3ae1](https://github.com/thi-ng/umbrella/commit/59b3ae1))
19
+ - update `ILifeCycle` and `ComponentFactory` to not require async
20
+ - update tests
21
+
14
22
  ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.1.0) (2024-03-09)
15
23
 
16
24
  #### 🚀 Features
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 201 standalone projects, maintained as part
10
+ > This is one of 202 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Fn, Keys } from "@thi.ng/api";
1
+ import type { Fn, Keys, MaybePromise } from "@thi.ng/api";
2
2
  import type { System } from "./system.js";
3
3
  export interface ILifecycle<T extends SystemMap<T> = any> {
4
4
  /**
@@ -15,7 +15,7 @@ export interface ILifecycle<T extends SystemMap<T> = any> {
15
15
  * components will be stopped (see {@link ILifecycle.stop}) in reverse
16
16
  * order.
17
17
  */
18
- start?(sys: System<T>): Promise<boolean>;
18
+ start?(sys: System<T>): MaybePromise<boolean>;
19
19
  /**
20
20
  * Similar to {@link ILifecycle.start} but for stopping components.
21
21
  *
@@ -23,7 +23,7 @@ export interface ILifecycle<T extends SystemMap<T> = any> {
23
23
  * {@link ILifecycle.start}, returning false will **not** stop the shutdown
24
24
  * of other components.
25
25
  */
26
- stop?(sys: System<T>): Promise<boolean>;
26
+ stop?(sys: System<T>): MaybePromise<boolean>;
27
27
  [id: string]: any;
28
28
  }
29
29
  /**
@@ -34,7 +34,7 @@ export type SystemMap<T> = Record<Keys<T>, ILifecycle>;
34
34
  /**
35
35
  * Async system component initialization function.
36
36
  */
37
- export type ComponentFactory<T extends SystemMap<T>> = Fn<T, Promise<ILifecycle>>;
37
+ export type ComponentFactory<T extends SystemMap<T>> = Fn<T, MaybePromise<ILifecycle>>;
38
38
  export interface SystemSpec<T extends SystemMap<T>> {
39
39
  /**
40
40
  * Async system component initialization function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/system",
3
- "version": "3.1.45",
3
+ "version": "3.1.47",
4
4
  "description": "Minimal and explicit dependency-injection & lifecycle container for stateful app components",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -42,9 +42,9 @@
42
42
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@thi.ng/api": "^8.11.20",
46
- "@thi.ng/dgraph": "^2.1.148",
47
- "@thi.ng/logger": "^3.1.1"
45
+ "@thi.ng/api": "^8.11.21",
46
+ "@thi.ng/dgraph": "^2.1.150",
47
+ "@thi.ng/logger": "^3.1.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "esbuild": "^0.25.0",
@@ -88,5 +88,5 @@
88
88
  "thi.ng": {
89
89
  "year": 2020
90
90
  },
91
- "gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
91
+ "gitHead": "2958e6a9881bd9e06de587a2141f6d23c64278db\n"
92
92
  }