@twin.org/modules 0.0.2-next.3 → 0.0.2-next.5

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.
@@ -95,8 +95,8 @@ class ModuleHelper {
95
95
  try {
96
96
  const { workerData, parentPort } = await import('node:worker_threads');
97
97
 
98
- function rejectError(type, innerError) {
99
- parentPort.postMessage({ errorType: type, innerError });
98
+ function rejectError(errorType, cause) {
99
+ parentPort.postMessage({ errorType, cause });
100
100
  }
101
101
 
102
102
  async function executeMethod(method) {
@@ -136,7 +136,7 @@ class ModuleHelper {
136
136
  `, { eval: true, workerData: { module, method, args: args ?? [] } });
137
137
  worker.on("message", msg => {
138
138
  if (core.Is.stringValue(msg.errorType)) {
139
- reject(new core.GeneralError(ModuleHelper.CLASS_NAME, msg.errorType, { module, entry: method }, msg.innerError));
139
+ reject(new core.GeneralError(ModuleHelper.CLASS_NAME, msg.errorType, { module, entry: method }, msg.cause));
140
140
  }
141
141
  else {
142
142
  resolve(msg.result);
@@ -93,8 +93,8 @@ class ModuleHelper {
93
93
  try {
94
94
  const { workerData, parentPort } = await import('node:worker_threads');
95
95
 
96
- function rejectError(type, innerError) {
97
- parentPort.postMessage({ errorType: type, innerError });
96
+ function rejectError(errorType, cause) {
97
+ parentPort.postMessage({ errorType, cause });
98
98
  }
99
99
 
100
100
  async function executeMethod(method) {
@@ -134,7 +134,7 @@ class ModuleHelper {
134
134
  `, { eval: true, workerData: { module, method, args: args ?? [] } });
135
135
  worker.on("message", msg => {
136
136
  if (Is.stringValue(msg.errorType)) {
137
- reject(new GeneralError(ModuleHelper.CLASS_NAME, msg.errorType, { module, entry: method }, msg.innerError));
137
+ reject(new GeneralError(ModuleHelper.CLASS_NAME, msg.errorType, { module, entry: method }, msg.cause));
138
138
  }
139
139
  else {
140
140
  resolve(msg.result);
package/docs/changelog.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @twin.org/modules - Changelog
2
2
 
3
+ ## [0.0.2-next.5](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.4...modules-v0.0.2-next.5) (2025-08-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/core bumped from 0.0.2-next.4 to 0.0.2-next.5
16
+ * @twin.org/nameof bumped from 0.0.2-next.4 to 0.0.2-next.5
17
+ * devDependencies
18
+ * @twin.org/nameof-transformer bumped from 0.0.2-next.4 to 0.0.2-next.5
19
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.4 to 0.0.2-next.5
20
+
21
+ ## [0.0.2-next.4](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.3...modules-v0.0.2-next.4) (2025-08-15)
22
+
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * **modules:** Synchronize repo versions
27
+
28
+
29
+ ### Dependencies
30
+
31
+ * The following workspace dependencies were updated
32
+ * dependencies
33
+ * @twin.org/core bumped from 0.0.2-next.3 to 0.0.2-next.4
34
+ * @twin.org/nameof bumped from 0.0.2-next.3 to 0.0.2-next.4
35
+ * devDependencies
36
+ * @twin.org/nameof-transformer bumped from 0.0.2-next.3 to 0.0.2-next.4
37
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.3 to 0.0.2-next.4
38
+
3
39
  ## [0.0.2-next.3](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.2...modules-v0.0.2-next.3) (2025-08-06)
4
40
 
5
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/modules",
3
- "version": "0.0.2-next.3",
3
+ "version": "0.0.2-next.5",
4
4
  "description": "Helper classes for loading and executing from modules",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "0.0.2-next.3",
18
- "@twin.org/nameof": "0.0.2-next.3"
17
+ "@twin.org/core": "0.0.2-next.5",
18
+ "@twin.org/nameof": "0.0.2-next.5"
19
19
  },
20
20
  "main": "./dist/cjs/index.cjs",
21
21
  "module": "./dist/esm/index.mjs",