webdriverio 9.8.0 → 9.9.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAkE5E,CAAA;AAED,eAAO,MAAM,uBAAuB,UAA0E,CAAA;AAE9G,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAA;AAED,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAC3D,eAAO,MAAM,aAAa,QAAQ,CAAA;AAClC,eAAO,MAAM,aAAa,UAAU,CAAA;AAEpC,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,sCAA6C,CAAA;AAE1E;;GAEG;AACH,eAAO,MAAM,GAAG;IACZ;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DG,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAyE5E,CAAA;AAED,eAAO,MAAM,uBAAuB,UAA0E,CAAA;AAE9G,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAA;AAED,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAC3D,eAAO,MAAM,aAAa,QAAQ,CAAA;AAClC,eAAO,MAAM,aAAa,UAAU,CAAA;AAEpC,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,sCAA6C,CAAA;AAE1E;;GAEG;AACH,eAAO,MAAM,GAAG;IACZ;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DG,CAAA"}
package/build/index.js CHANGED
@@ -272,7 +272,6 @@ var getElements = function getElements2(selector, elemResponse, props = { isReac
272
272
  };
273
273
 
274
274
  // src/constants.ts
275
- import { resolve } from "import-meta-resolve";
276
275
  import { UNICODE_CHARACTERS, HOOK_DEFINITION } from "@wdio/utils";
277
276
  var WDIO_DEFAULTS = {
278
277
  /**
@@ -285,8 +284,11 @@ var WDIO_DEFAULTS = {
285
284
  if (typeof param !== "string") {
286
285
  throw new Error("automationProtocol should be a string");
287
286
  }
287
+ if (typeof import.meta.resolve !== "function") {
288
+ return;
289
+ }
288
290
  try {
289
- resolve(param, import.meta.url);
291
+ import.meta.resolve(param);
290
292
  } catch (err) {
291
293
  const error = err instanceof Error ? err : new Error("unknown error");
292
294
  throw new Error("Couldn't find automation protocol \"".concat(param, '": ').concat(error.message));
@@ -1110,7 +1112,7 @@ function debug(commandTimeout = 5e3) {
1110
1112
  });
1111
1113
  }
1112
1114
  });
1113
- return new Promise((resolve2) => commandResolve = resolve2);
1115
+ return new Promise((resolve) => commandResolve = resolve);
1114
1116
  }
1115
1117
 
1116
1118
  // src/commands/browser/deleteCookies.ts
@@ -3656,8 +3658,8 @@ var Timer = class {
3656
3658
  __publicField(this, "_timeoutId");
3657
3659
  __publicField(this, "_mainTimeoutId");
3658
3660
  __publicField(this, "_lastError");
3659
- __privateSet(this, _retPromise, new Promise((resolve2, reject) => {
3660
- this._resolve = resolve2;
3661
+ __privateSet(this, _retPromise, new Promise((resolve, reject) => {
3662
+ this._resolve = resolve;
3661
3663
  this._reject = reject;
3662
3664
  }));
3663
3665
  this._start();
@@ -4251,7 +4253,7 @@ async function newWindow2(url2, { type = "window", windowName = "", windowFeatur
4251
4253
 
4252
4254
  // src/commands/browser/pause.ts
4253
4255
  function pause(milliseconds = 1e3) {
4254
- return new Promise((resolve2) => setTimeout(resolve2, milliseconds));
4256
+ return new Promise((resolve) => setTimeout(resolve, milliseconds));
4255
4257
  }
4256
4258
 
4257
4259
  // src/scripts/resq.ts
@@ -5986,7 +5988,7 @@ async function getCurrentContexts({
5986
5988
  }
5987
5989
  return parsedContexts;
5988
5990
  }
5989
- await new Promise((resolve2) => setTimeout(resolve2, retryInterval));
5991
+ await new Promise((resolve) => setTimeout(resolve, retryInterval));
5990
5992
  }
5991
5993
  throw new Error(
5992
5994
  "The packageName '".concat(packageName, "' ").concat(isPackageNameMissing ? "could not be found!" : "matches, but no webview with pages was loaded in this response: " + JSON.stringify(contexts) + "'")
package/build/node.js CHANGED
@@ -119,8 +119,8 @@ async function uploadFile(localPath) {
119
119
  }
120
120
  const zipData = [];
121
121
  const source = fs5.createReadStream(localPath);
122
- return new Promise((resolve2, reject) => {
123
- archiver("zip").on("error", (err) => reject(err)).on("data", (data) => zipData.push(data)).on("end", () => this.file(Buffer.concat(zipData).toString("base64")).then((localPath2) => resolve2(localPath2), reject)).append(source, { name: path3.basename(localPath) }).finalize();
122
+ return new Promise((resolve, reject) => {
123
+ archiver("zip").on("error", (err) => reject(err)).on("data", (data) => zipData.push(data)).on("end", () => this.file(Buffer.concat(zipData).toString("base64")).then((localPath2) => resolve(localPath2), reject)).append(source, { name: path3.basename(localPath) }).finalize();
124
124
  });
125
125
  }
126
126
 
@@ -741,7 +741,6 @@ var getElements = function getElements2(selector, elemResponse, props = { isReac
741
741
  };
742
742
 
743
743
  // src/constants.ts
744
- import { resolve } from "import-meta-resolve";
745
744
  import { UNICODE_CHARACTERS, HOOK_DEFINITION } from "@wdio/utils";
746
745
  var WDIO_DEFAULTS = {
747
746
  /**
@@ -754,8 +753,11 @@ var WDIO_DEFAULTS = {
754
753
  if (typeof param !== "string") {
755
754
  throw new Error("automationProtocol should be a string");
756
755
  }
756
+ if (typeof import.meta.resolve !== "function") {
757
+ return;
758
+ }
757
759
  try {
758
- resolve(param, import.meta.url);
760
+ import.meta.resolve(param);
759
761
  } catch (err) {
760
762
  const error = err instanceof Error ? err : new Error("unknown error");
761
763
  throw new Error(`Couldn't find automation protocol "${param}": ${error.message}`);
@@ -1565,7 +1567,7 @@ function debug(commandTimeout = 5e3) {
1565
1567
  });
1566
1568
  }
1567
1569
  });
1568
- return new Promise((resolve2) => commandResolve = resolve2);
1570
+ return new Promise((resolve) => commandResolve = resolve);
1569
1571
  }
1570
1572
 
1571
1573
  // src/commands/browser/deleteCookies.ts
@@ -3794,8 +3796,8 @@ var Timer = class {
3794
3796
  this._timeout = _timeout;
3795
3797
  this._fn = _fn;
3796
3798
  this._leading = _leading;
3797
- this.#retPromise = new Promise((resolve2, reject) => {
3798
- this._resolve = resolve2;
3799
+ this.#retPromise = new Promise((resolve, reject) => {
3800
+ this._resolve = resolve;
3799
3801
  this._reject = reject;
3800
3802
  });
3801
3803
  this._start();
@@ -4374,7 +4376,7 @@ async function newWindow(url2, { type = "window", windowName = "", windowFeature
4374
4376
 
4375
4377
  // src/commands/browser/pause.ts
4376
4378
  function pause(milliseconds = 1e3) {
4377
- return new Promise((resolve2) => setTimeout(resolve2, milliseconds));
4379
+ return new Promise((resolve) => setTimeout(resolve, milliseconds));
4378
4380
  }
4379
4381
 
4380
4382
  // src/commands/browser/react$$.ts
@@ -6021,7 +6023,7 @@ async function getCurrentContexts({
6021
6023
  }
6022
6024
  return parsedContexts;
6023
6025
  }
6024
- await new Promise((resolve2) => setTimeout(resolve2, retryInterval));
6026
+ await new Promise((resolve) => setTimeout(resolve, retryInterval));
6025
6027
  }
6026
6028
  throw new Error(
6027
6029
  `The packageName '${packageName}' ${isPackageNameMissing ? "could not be found!" : "matches, but no webview with pages was loaded in this response: " + JSON.stringify(contexts) + "'"}`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webdriverio",
3
3
  "description": "Next-gen browser and mobile automation test framework for Node.js",
4
- "version": "9.8.0",
4
+ "version": "9.9.0",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -77,12 +77,12 @@
77
77
  "dependencies": {
78
78
  "@types/node": "^20.11.30",
79
79
  "@types/sinonjs__fake-timers": "^8.1.5",
80
- "@wdio/config": "9.7.3",
80
+ "@wdio/config": "9.9.0",
81
81
  "@wdio/logger": "9.4.4",
82
82
  "@wdio/protocols": "9.7.0",
83
83
  "@wdio/repl": "9.4.4",
84
- "@wdio/types": "9.6.3",
85
- "@wdio/utils": "9.7.3",
84
+ "@wdio/types": "9.9.0",
85
+ "@wdio/utils": "9.9.0",
86
86
  "archiver": "^7.0.1",
87
87
  "aria-query": "^5.3.0",
88
88
  "cheerio": "^1.0.0-rc.12",
@@ -90,18 +90,16 @@
90
90
  "css-value": "^0.0.1",
91
91
  "grapheme-splitter": "^1.0.4",
92
92
  "htmlfy": "^0.6.0",
93
- "import-meta-resolve": "^4.0.0",
94
93
  "is-plain-obj": "^4.1.0",
95
94
  "jszip": "^3.10.1",
96
95
  "lodash.clonedeep": "^4.5.0",
97
96
  "lodash.zip": "^4.2.0",
98
- "minimatch": "^9.0.3",
99
97
  "query-selector-shadow-dom": "^1.0.1",
100
98
  "resq": "^1.11.0",
101
99
  "rgb2hex": "0.2.5",
102
100
  "serialize-error": "^11.0.3",
103
101
  "urlpattern-polyfill": "^10.0.0",
104
- "webdriver": "9.7.3"
102
+ "webdriver": "9.9.0"
105
103
  },
106
104
  "peerDependencies": {
107
105
  "puppeteer-core": "^22.3.0"
@@ -111,5 +109,5 @@
111
109
  "optional": true
112
110
  }
113
111
  },
114
- "gitHead": "ddd40bedd26a3fc1917a84ffc79a3e8ed0d5e68c"
112
+ "gitHead": "620e092391d7bcc71cd7cd55ad146ad72e522da9"
115
113
  }