@twin.org/modules 0.0.2-next.4 → 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.
- package/dist/cjs/index.cjs +3 -3
- package/dist/esm/index.mjs +3 -3
- package/docs/changelog.md +18 -0
- package/package.json +3 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -95,8 +95,8 @@ class ModuleHelper {
|
|
|
95
95
|
try {
|
|
96
96
|
const { workerData, parentPort } = await import('node:worker_threads');
|
|
97
97
|
|
|
98
|
-
function rejectError(
|
|
99
|
-
parentPort.postMessage({ errorType
|
|
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.
|
|
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);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -93,8 +93,8 @@ class ModuleHelper {
|
|
|
93
93
|
try {
|
|
94
94
|
const { workerData, parentPort } = await import('node:worker_threads');
|
|
95
95
|
|
|
96
|
-
function rejectError(
|
|
97
|
-
parentPort.postMessage({ errorType
|
|
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.
|
|
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,23 @@
|
|
|
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
|
+
|
|
3
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)
|
|
4
22
|
|
|
5
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/modules",
|
|
3
|
-
"version": "0.0.2-next.
|
|
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.
|
|
18
|
-
"@twin.org/nameof": "0.0.2-next.
|
|
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",
|