@nxtedition/yield 1.0.9 → 1.0.11
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/lib/index.js +9 -5
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -70,10 +70,7 @@ export function maybeYield (
|
|
|
70
70
|
return null
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
|
|
77
74
|
|
|
78
75
|
export function doYield (
|
|
79
76
|
callback ,
|
|
@@ -112,7 +109,14 @@ function dispatchYield() {
|
|
|
112
109
|
yieldQueue[yieldIndex] = null
|
|
113
110
|
yieldIndex += 1
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
try {
|
|
113
|
+
resolve(opaque)
|
|
114
|
+
} catch (err) {
|
|
115
|
+
queueMicrotask(() => {
|
|
116
|
+
// Crash the process on unhandled exceptions to avoid leaving it in an inconsistent state.
|
|
117
|
+
throw err
|
|
118
|
+
})
|
|
119
|
+
}
|
|
116
120
|
|
|
117
121
|
if (shouldYield()) {
|
|
118
122
|
break
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/yield",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^25.2.3",
|
|
25
25
|
"amaroc": "^1.0.1",
|
|
26
|
-
"oxlint-tsgolint": "^0.
|
|
27
|
-
"rimraf": "^6.1.
|
|
26
|
+
"oxlint-tsgolint": "^0.13.0",
|
|
27
|
+
"rimraf": "^6.1.3",
|
|
28
28
|
"typescript": "^5.9.3"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "b58c17cb0fdb8c6781ea35addb2c3b4348dba0d6"
|
|
31
31
|
}
|