New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/sync

Package Overview
Dependencies
Maintainers
4
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/sync - npm Package Compare versions

Comparing version 5.12.0 to 5.12.1

postinstall.js

49

build/index.js

@@ -36,2 +36,4 @@ "use strict";

var _utils = require("@wdio/utils");
var _executeHooksWithArgs = _interopRequireDefault(require("./executeHooksWithArgs"));

@@ -47,3 +49,3 @@

var _utils = require("./utils");
var _utils2 = require("./utils");

@@ -54,20 +56,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const executeSync = function (fn, repeatTest = 0, args = []) {
return new Promise((resolve, reject) => {
try {
const res = fn.apply(this, args);
resolve(res);
} catch (e) {
if (repeatTest) {
return resolve(executeSync(fn, --repeatTest, args));
}
const executeSync = async function (fn, repeatTest = 0, args = []) {
try {
let res = fn.apply(this, args);
if (!e.stack) {
return reject(e);
}
if (res instanceof Promise) {
return await res;
}
e.stack = e.stack.split('\n').filter(_constants.STACKTRACE_FILTER_FN).join('\n');
reject(e);
return res;
} catch (e) {
if (repeatTest) {
return await executeSync(fn, --repeatTest, args);
}
});
if (!e.stack) {
return Promise.reject(e);
}
e.stack = e.stack.split('\n').filter(_constants.STACKTRACE_FILTER_FN).join('\n');
return Promise.reject(e);
}
};

@@ -115,7 +120,7 @@

return (0, _executeHooksWithArgs.default)(before).catch(hookError('beforeHook')).then(() => {
if (hookFn.constructor && hookFn.constructor.name === 'AsyncFunction' || hookFn.name === 'async') {
return executeAsync.call(this, hookFn, repeatTest, (0, _utils.filterSpecArgs)(hookArgs));
if ((0, _utils.isFunctionAsync)(hookFn)) {
return executeAsync.call(this, hookFn, repeatTest, (0, _utils2.filterSpecArgs)(hookArgs));
}
return new Promise(runSync.call(this, hookFn, repeatTest, (0, _utils.filterSpecArgs)(hookArgs)));
return new Promise(runSync.call(this, hookFn, repeatTest, (0, _utils2.filterSpecArgs)(hookArgs)));
}).then(() => {

@@ -128,5 +133,5 @@ return (0, _executeHooksWithArgs.default)(after).catch(hookError('afterHook'));

const runSpec = function (specTitle, specFn, origFn, repeatTest = 0) {
if (specFn.constructor && specFn.constructor.name === 'AsyncFunction' || specFn.name === 'async') {
if ((0, _utils.isFunctionAsync)(specFn)) {
return origFn(specTitle, function async(...specArgs) {
return executeAsync.call(this, specFn, repeatTest, (0, _utils.filterSpecArgs)(specArgs));
return executeAsync.call(this, specFn, repeatTest, (0, _utils2.filterSpecArgs)(specArgs));
});

@@ -136,3 +141,3 @@ }

return origFn(specTitle, function (...specArgs) {
return new Promise(runSync.call(this, specFn, repeatTest, (0, _utils.filterSpecArgs)(specArgs)));
return new Promise(runSync.call(this, specFn, repeatTest, (0, _utils2.filterSpecArgs)(specArgs)));
});

@@ -139,0 +144,0 @@ };

{
"name": "@wdio/sync",
"version": "5.12.0",
"version": "5.12.1",
"description": "A WebdriverIO plugin. Helper module to run WebdriverIO commands synchronously",

@@ -10,3 +10,3 @@ "author": "Christian Bromann <christian@saucelabs.com>",

"engines": {
"node": ">= 10.13.0"
"node": ">= 8.11.0"
},

@@ -19,3 +19,4 @@ "scripts": {

"test:eslint": "eslint src test",
"test:unit": "jest"
"test:unit": "jest",
"postinstall": "node postinstall.js"
},

@@ -39,5 +40,5 @@ "types": "./webdriverio.d.ts",

"dependencies": {
"@wdio/config": "^5.12.0",
"@wdio/logger": "^5.12.0",
"fibers": "^4.0.0"
"@wdio/config": "^5.12.1",
"@wdio/logger": "^5.12.1",
"@wdio/utils": "^5.12.1"
},

@@ -47,3 +48,3 @@ "publishConfig": {

},
"gitHead": "187c8f044e252877533e53ee2b645f56416d5a41"
"gitHead": "848151e5fdcb8b694c1a273b9b69852c22875687"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc