@wdio/browser-runner 9.1.2 → 9.1.4

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 CHANGED
@@ -24,7 +24,6 @@ import { builtinModules } from "node:module";
24
24
  import logger2 from "@wdio/logger";
25
25
  import { polyfillPath } from "modern-node-polyfills";
26
26
  import { deepmerge } from "deepmerge-ts";
27
- import { resolve as resolve2 } from "import-meta-resolve";
28
27
  import {
29
28
  WebDriverProtocol,
30
29
  MJsonWProtocol,
@@ -325,7 +324,6 @@ var protocolCommandList = Object.values(commands).map(
325
324
  ({ command }) => command
326
325
  )
327
326
  ).flat();
328
- var WDIO_PACKAGES = ["webdriverio", "expect-webdriverio"];
329
327
  var virtualModuleId = "virtual:wdio";
330
328
  var resolvedVirtualModuleId = "\0" + virtualModuleId;
331
329
  var MODULES_TO_MOCK = [
@@ -375,14 +373,6 @@ function testrunner(options) {
375
373
  if (id === "expect-webdriverio") {
376
374
  return wdioExpectModulePath;
377
375
  }
378
- if (id === "@wdio/logger") {
379
- const newId = await resolveWDIOModule(id);
380
- return path2.resolve(path2.dirname(newId), "browser.js");
381
- }
382
- if (id.startsWith("@wdio") || WDIO_PACKAGES.includes(id)) {
383
- const resolvedId = await resolveWDIOModule(id);
384
- return resolvedId;
385
- }
386
376
  if (MODULES_TO_MOCK.includes(id)) {
387
377
  return mockModulePath;
388
378
  }
@@ -462,15 +452,6 @@ function testrunner(options) {
462
452
  }
463
453
  }];
464
454
  }
465
- async function resolveWDIOModule(pkgName) {
466
- try {
467
- const pkgPath = await resolve2(pkgName, import.meta.url);
468
- return url2.fileURLToPath(pkgPath);
469
- } catch {
470
- const pkgPath = await resolve2(pkgName, url2.pathToFileURL(path2.resolve(process.cwd())).href);
471
- return url2.fileURLToPath(pkgPath);
472
- }
473
- }
474
455
 
475
456
  // src/vite/plugins/mockHoisting.ts
476
457
  import os from "node:os";
@@ -882,6 +863,10 @@ var DEFAULT_VITE_CONFIG = {
882
863
  // Enable esbuild polyfill plugins
883
864
  plugins: [
884
865
  esbuildCommonjs(["@testing-library/vue"]),
866
+ /**
867
+ * cast to "any" here as Vite's esbuild dependency and WebdriverIOs one
868
+ * may differ and cause type issues here.
869
+ */
885
870
  codeFrameFix()
886
871
  ]
887
872
  }
@@ -979,7 +964,7 @@ var ViteServer = class extends EventEmitter {
979
964
  import url4 from "node:url";
980
965
  import path6 from "node:path";
981
966
  import logger6 from "@wdio/logger";
982
- import { resolve as resolve3 } from "import-meta-resolve";
967
+ import { resolve as resolve2 } from "import-meta-resolve";
983
968
  var log6 = logger6("@wdio/browser-runner:NuxtOptimization");
984
969
  async function isNuxtFramework(rootDir) {
985
970
  return (await Promise.all([
@@ -996,7 +981,7 @@ async function optimizeForNuxt(options, config) {
996
981
  if (nuxtOptions.imports?.autoImport === false) {
997
982
  return {};
998
983
  }
999
- const nuxtDepPath = await resolve3("nuxt", import.meta.url);
984
+ const nuxtDepPath = await resolve2("nuxt", import.meta.url);
1000
985
  const composablesDirs = [];
1001
986
  for (const layer of nuxtOptions._layers) {
1002
987
  composablesDirs.push(path6.resolve(layer.config.srcDir, "composables"));
@@ -1037,7 +1022,7 @@ async function optimizeForNuxt(options, config) {
1037
1022
  // src/vite/frameworks/tailwindcss.ts
1038
1023
  import url5 from "node:url";
1039
1024
  import path7 from "node:path";
1040
- import { resolve as resolve4 } from "import-meta-resolve";
1025
+ import { resolve as resolve3 } from "import-meta-resolve";
1041
1026
  function isUsingTailwindCSS(rootDir) {
1042
1027
  return Promise.all([
1043
1028
  hasFileByExtensions(path7.join(rootDir, "tailwind.config")),
@@ -1048,7 +1033,7 @@ function isUsingTailwindCSS(rootDir) {
1048
1033
  }
1049
1034
  async function optimizeForTailwindCSS(rootDir) {
1050
1035
  const viteConfig = {};
1051
- const tailwindcssPath = await resolve4("tailwindcss", url5.pathToFileURL(path7.resolve(rootDir, "index.js")).href);
1036
+ const tailwindcssPath = await resolve3("tailwindcss", url5.pathToFileURL(path7.resolve(rootDir, "index.js")).href);
1052
1037
  const tailwindcss = (await import(tailwindcssPath)).default;
1053
1038
  viteConfig.css = {
1054
1039
  postcss: { plugins: [tailwindcss] }
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAIlD,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAC3C,eAAO,MAAM,YAAY,qBAA8C,CAAA;AACvE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAiB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CA0CrD,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAIlD,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAC3C,eAAO,MAAM,YAAY,qBAA8C,CAAA;AACvE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAiB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CA8CrD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"testrunner.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/testrunner.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA0ClC,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,GAAG,MAAM,EAAE,CAgJ9E"}
1
+ {"version":3,"file":"testrunner.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/testrunner.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAyClC,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,GAAG,MAAM,EAAE,CAmI9E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browser-runner",
3
- "version": "9.1.2",
3
+ "version": "9.1.4",
4
4
  "description": "A WebdriverIO runner to run unit tests tests in the browser.",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browser-runner",
@@ -65,14 +65,14 @@
65
65
  "@originjs/vite-plugin-commonjs": "^1.0.3",
66
66
  "@types/istanbul-lib-source-maps": "^4.0.4",
67
67
  "@vitest/spy": "^2.0.4",
68
- "@wdio/globals": "9.1.2",
69
- "@wdio/local-runner": "9.1.2",
70
- "@wdio/logger": "9.1.0",
71
- "@wdio/mocha-framework": "9.1.2",
68
+ "@wdio/globals": "9.1.4",
69
+ "@wdio/local-runner": "9.1.4",
70
+ "@wdio/logger": "9.1.3",
71
+ "@wdio/mocha-framework": "9.1.3",
72
72
  "@wdio/protocols": "9.0.8",
73
- "@wdio/runner": "9.1.2",
74
- "@wdio/types": "9.1.2",
75
- "@wdio/utils": "9.1.2",
73
+ "@wdio/runner": "9.1.4",
74
+ "@wdio/types": "9.1.3",
75
+ "@wdio/utils": "9.1.3",
76
76
  "deepmerge-ts": "^7.0.3",
77
77
  "expect": "^29.7.0",
78
78
  "expect-webdriverio": "^5.0.1",
@@ -90,14 +90,14 @@
90
90
  "vite": "~5.4.0",
91
91
  "vite-plugin-istanbul": "^6.0.0",
92
92
  "vite-plugin-top-level-await": "^1.4.1",
93
- "webdriver": "9.1.2",
94
- "webdriverio": "9.1.2"
93
+ "webdriver": "9.1.3",
94
+ "webdriverio": "9.1.4"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@types/istanbul-lib-coverage": "^2.0.6",
98
98
  "@types/istanbul-lib-report": "^3.0.3",
99
99
  "@types/istanbul-reports": "^3.0.4",
100
- "esbuild": "^0.21.3",
100
+ "esbuild": "^0.24.0",
101
101
  "geckodriver": "^4.4.4"
102
102
  },
103
103
  "optionalDependencies": {
@@ -116,5 +116,5 @@
116
116
  "publishConfig": {
117
117
  "access": "public"
118
118
  },
119
- "gitHead": "e009b5102f9f98b99fa62df870ce7f3f5bc1b99a"
119
+ "gitHead": "39fb68e6fa78c99c0def775c2b976f36e0be3af0"
120
120
  }