@wdio/utils 9.1.0 → 9.1.3
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/build/index.js +15 -5
- package/build/shim.d.ts.map +1 -1
- package/package.json +4 -4
package/build/index.js
CHANGED
|
@@ -1327,22 +1327,32 @@ async function executeHooksWithArgs(hookName, hooks = [], args = []) {
|
|
|
1327
1327
|
if (!Array.isArray(args)) {
|
|
1328
1328
|
args = [args];
|
|
1329
1329
|
}
|
|
1330
|
+
const rejectIfSkipped = function(e, rejectionFunc) {
|
|
1331
|
+
if (/^(sync|async) skip; aborting execution$/.test(e.message)) {
|
|
1332
|
+
rejectionFunc();
|
|
1333
|
+
return true;
|
|
1334
|
+
}
|
|
1335
|
+
if (/^=> marked Pending/.test(e)) {
|
|
1336
|
+
rejectionFunc(e);
|
|
1337
|
+
return true;
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1330
1340
|
const hooksPromises = hooks.map((hook) => new Promise((resolve, reject) => {
|
|
1331
1341
|
let result2;
|
|
1332
1342
|
try {
|
|
1333
1343
|
result2 = hook.apply(this, args);
|
|
1334
1344
|
} catch (e) {
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
}
|
|
1338
|
-
if (/^=> marked Pending/.test(e)) {
|
|
1339
|
-
return reject(e);
|
|
1345
|
+
if (rejectIfSkipped(e, reject)) {
|
|
1346
|
+
return;
|
|
1340
1347
|
}
|
|
1341
1348
|
log6.error(e.stack);
|
|
1342
1349
|
return resolve(e);
|
|
1343
1350
|
}
|
|
1344
1351
|
if (result2 && typeof result2.then === "function") {
|
|
1345
1352
|
return result2.then(resolve, (e) => {
|
|
1353
|
+
if (rejectIfSkipped(e, reject)) {
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1346
1356
|
log6.error(e.stack || e.message);
|
|
1347
1357
|
resolve(e);
|
|
1348
1358
|
});
|
package/build/shim.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../src/shim.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAuB7C,wBAAsB,oBAAoB,CAAC,CAAC,EAAG,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,GAAG,QAAQ,EAAO,EAAE,IAAI,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../src/shim.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAuB7C,wBAAsB,oBAAoB,CAAC,CAAC,EAAG,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,GAAG,QAAQ,EAAO,EAAE,IAAI,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAuEvJ;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,CA4N9F;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,EAAE,IAAI,GAAE,GAAG,EAAO,EAAE,OAAO,GAAE,MAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA2CxJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.3",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@puppeteer/browsers": "^2.2.0",
|
|
40
|
-
"@wdio/logger": "9.1.
|
|
41
|
-
"@wdio/types": "9.1.
|
|
40
|
+
"@wdio/logger": "9.1.3",
|
|
41
|
+
"@wdio/types": "9.1.3",
|
|
42
42
|
"decamelize": "^6.0.0",
|
|
43
43
|
"deepmerge-ts": "^7.0.3",
|
|
44
44
|
"edgedriver": "^5.6.1",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "db677c6008e388301aba23f655679f4c5b6ea023"
|
|
57
57
|
}
|