libmodulor 0.8.0 → 0.9.0

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,12 +1,26 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.9.0 (2025-03-20)
4
+
5
+ **BREAKING**
6
+
7
+ - Move `bindServer` to `libmodulor/node-express`. The following dependencies (`jose`) are now optional. You can remove them if you're using `libmodulor/node` elements in non server targets like `cli`
8
+ - Upgrade to `fast-check` [v4](https://fast-check.dev/docs/migration-guide/from-3.x-to-4.x) : Re-generate your tests with `yarn libmodulor GenerateAppsTests` to get the changes adapted to this version
9
+
10
+ **Misc**
11
+
12
+ - Make `buffer`, `fast-check` and `vitest` deps optional : basic uses of `libmodulor` do not require them (see https://libmodulor.c100k.eu/docs/examples/Basic as an example). You can remove them if you're not using the automated tests
13
+ - Add `ListOrdersUCD` an `CancelOrderUCD` to `examples/supertrader` to showcase data fetching, aggregate building, sensitive use cases, test flows, etc.
14
+ - Remove linter config from examples (linting from repo root folder)
15
+ - Use `debug` instead of `trace` in `ConsoleLogger`
16
+
3
17
  ## v0.8.0 (2025-03-13)
4
18
 
5
19
  **BREAKING**
6
20
 
7
21
  - Move `NodeExpressServerManager` to a dedicated export (`libmodulor/node` => `libmodulor/node-express`). The following dependencies (`cookie-parser`, `express`, `express-fileupload` and `helmet`) are now optional. You can remove them if you're using `libmodulor/node` elements in non server targets like `cli`
8
22
  - Do not enforce `dt` and `policies` folders in app src : place everything that **is not** `*UCD` and `*ServerMain` into `lib` the way you prefer
9
- - Check app src folder contents : it must contain only the elements allowed by the spec (Re-generate your tests `yarn libmodulor GenerateAppsTests` to enforce the new rule)
23
+ - Check app src folder contents : it must contain only the elements allowed by the spec (Re-generate your tests with `yarn libmodulor GenerateAppsTests` to enforce the new rule)
10
24
 
11
25
  **Misc**
12
26
 
package/README.md CHANGED
@@ -23,4 +23,4 @@ If you think you can help in any way, feel free to contact me (cf. `author` in `
23
23
 
24
24
  ## ⚖️ License
25
25
 
26
- [LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.8.0/LICENSE)
26
+ [LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.9.0/LICENSE)
@@ -48,11 +48,11 @@ export const PACKAGE_JSON = (name) => `{
48
48
  "cookie-parser": "^1.4.7",
49
49
  "express": "^4.21.2",
50
50
  "express-fileupload": "^1.5.1",
51
- "fast-check": "^3.23.2",
51
+ "fast-check": "^4.0.0",
52
52
  "helmet": "^8.0.0",
53
- "jose": "^6.0.8",
53
+ "jose": "^6.0.10",
54
54
  "typescript": "^5.8.2",
55
- "vite": "^6.2.1",
55
+ "vite": "^6.2.2",
56
56
  "vitest": "^3.0.8"
57
57
  }
58
58
  }
@@ -1 +1,2 @@
1
1
  export { NodeExpressServerManager } from './target/node-express-server/NodeExpressServerManager.js';
2
+ export { bindServer } from './utils/ioc/bindServer.js';
@@ -1 +1,2 @@
1
1
  export { NodeExpressServerManager } from './target/node-express-server/NodeExpressServerManager.js';
2
+ export { bindServer } from './utils/ioc/bindServer.js';
@@ -10,4 +10,3 @@ export { NodeSpawnShellCommandExecutor } from './std/impl/NodeSpawnShellCommandE
10
10
  export { NodeCoreCLIManager } from './target/node-core-cli/NodeCoreCLIManager.js';
11
11
  export { bindNodeCLI } from './utils/ioc/bindNodeCLI.js';
12
12
  export { bindNodeCore } from './utils/ioc/bindNodeCore.js';
13
- export { bindServer } from './utils/ioc/bindServer.js';
@@ -10,4 +10,3 @@ export { NodeSpawnShellCommandExecutor } from './std/impl/NodeSpawnShellCommandE
10
10
  export { NodeCoreCLIManager } from './target/node-core-cli/NodeCoreCLIManager.js';
11
11
  export { bindNodeCLI } from './utils/ioc/bindNodeCLI.js';
12
12
  export { bindNodeCore } from './utils/ioc/bindNodeCore.js';
13
- export { bindServer } from './utils/ioc/bindServer.js';
@@ -56,8 +56,9 @@ let ConsoleLogger = class ConsoleLogger {
56
56
  if (!this.shouldLog('trace')) {
57
57
  return;
58
58
  }
59
+ // Using "debug" instead of "trace" because trace expands the stacktrace and pollutes the logs
59
60
  // biome-ignore lint/suspicious/noConsole: we want it
60
- console.trace(`${this.t()} [trace] ${message}`, ...meta);
61
+ console.debug(`${this.t()} [trace] ${message}`, ...meta);
61
62
  }
62
63
  warn(message, ...meta) {
63
64
  if (!this.shouldLog('warn')) {
@@ -219,7 +219,7 @@ describe.runIf(ucdRefs.length > 0)('Use Cases', () => {
219
219
  for (const k of Object.keys(inputFields)) {
220
220
  inputLike[k] = anything();
221
221
  }
222
- const cmdArbs = record(inputLike, { withDeletedKeys: true }).map(
222
+ const cmdArbs = record(inputLike, { requiredKeys: [] }).map(
223
223
  (r) => new MyCommand(r),
224
224
  );
225
225
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "libmodulor",
3
3
  "description": "An opinionated TypeScript library to create business oriented applications",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "license": "LGPL-3.0",
6
6
  "author": "Chafik H'nini <chafik.hnini@gmail.com>",
7
7
  "homepage": "https://github.com/c100k/libmodulor#readme",
@@ -76,26 +76,26 @@
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@hono/node-server": "^1.13.8",
79
- "@modelcontextprotocol/sdk": "^1.6.1",
79
+ "@modelcontextprotocol/sdk": "^1.7.0",
80
80
  "@stricli/core": "^1.1.1",
81
81
  "buffer": "^6.0.3",
82
82
  "cookie-parser": "^1.4.7",
83
83
  "express": "^4.21.2",
84
84
  "express-fileupload": "^1.5.1",
85
- "fast-check": "^3.23.2",
85
+ "fast-check": "^4.0.0",
86
86
  "helmet": "^8.0.0",
87
87
  "hono": "^4.7.4",
88
88
  "inversify": "^6.2.2",
89
- "jose": "^6.0.8",
89
+ "jose": "^6.0.10",
90
90
  "knex": "^3.1.0",
91
- "pg": "^8.13.3",
91
+ "pg": "^8.14.0",
92
92
  "react": "^19.0.0",
93
93
  "react-dom": "^19.0.0",
94
94
  "react-native": "^0.78.0",
95
95
  "reflect-metadata": "^0.2.2",
96
96
  "sqlite3": "^5.1.7",
97
97
  "typescript": "^5.8.2",
98
- "vite": "^6.2.1",
98
+ "vite": "^6.2.2",
99
99
  "vitest": "^3.0.8"
100
100
  },
101
101
  "peerDependenciesMeta": {
@@ -108,6 +108,9 @@
108
108
  "@stricli/core": {
109
109
  "optional": true
110
110
  },
111
+ "buffer": {
112
+ "optional": true
113
+ },
111
114
  "cookie-parser": {
112
115
  "optional": true
113
116
  },
@@ -117,6 +120,9 @@
117
120
  "express-fileupload": {
118
121
  "optional": true
119
122
  },
123
+ "fast-check": {
124
+ "optional": true
125
+ },
120
126
  "helmet": {
121
127
  "optional": true
122
128
  },
@@ -146,6 +152,9 @@
146
152
  },
147
153
  "vite": {
148
154
  "optional": true
155
+ },
156
+ "vitest": {
157
+ "optional": true
149
158
  }
150
159
  },
151
160
  "sideEffects": false