@wdio/browser-runner 8.15.10 → 8.16.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":"mockHoisting.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/mockHoisting.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAU7C,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CA8U/D"}
1
+ {"version":3,"file":"mockHoisting.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/mockHoisting.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAU7C,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAgV/D"}
@@ -192,8 +192,10 @@ export function mockHoisting(mockHandler) {
192
192
  const newNode = b.importDeclaration([b.importNamespaceSpecifier(b.identifier(newImportIdentifier))], b.literal(source));
193
193
  nodePath.insertBefore(newNode);
194
194
  }
195
+ // determine file extension length so we can cut it out, fall back to infinity if no extension is set
196
+ const mockExtensionLengh = (path.extname(source).length * -1) || Infinity;
195
197
  const wdioImportModuleIdentifier = source.startsWith('.') || source.startsWith('/')
196
- ? url.pathToFileURL(path.resolve(path.dirname(id), source).slice(0, path.extname(source).length * -1)).pathname
198
+ ? url.pathToFileURL(path.resolve(path.dirname(id), source).slice(0, mockExtensionLengh)).pathname
197
199
  : source;
198
200
  const isNamespaceImport = dec.specifiers.length === 1 && dec.specifiers[0].type === types.namedTypes.ImportNamespaceSpecifier.toString();
199
201
  const mockImport = isSpecFile && !isMockedModule
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browser-runner",
3
- "version": "8.15.10",
3
+ "version": "8.16.0",
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",
@@ -35,13 +35,13 @@
35
35
  "@types/istanbul-lib-source-maps": "^4.0.1",
36
36
  "@types/node": "^20.1.0",
37
37
  "@vitest/spy": "^0.34.1",
38
- "@wdio/globals": "8.15.10",
39
- "@wdio/local-runner": "8.15.10",
38
+ "@wdio/globals": "8.16.0",
39
+ "@wdio/local-runner": "8.16.0",
40
40
  "@wdio/logger": "8.11.0",
41
- "@wdio/mocha-framework": "8.15.10",
41
+ "@wdio/mocha-framework": "8.16.0",
42
42
  "@wdio/protocols": "8.14.6",
43
43
  "@wdio/types": "8.15.10",
44
- "@wdio/utils": "8.15.10",
44
+ "@wdio/utils": "8.16.0",
45
45
  "ast-types": "^0.14.2",
46
46
  "deepmerge-ts": "^5.0.0",
47
47
  "expect-webdriverio": "^4.2.5",
@@ -60,8 +60,8 @@
60
60
  "vite": "~4.4.6",
61
61
  "vite-plugin-istanbul": "^5.0.0",
62
62
  "vite-plugin-top-level-await": "^1.3.0",
63
- "webdriver": "8.15.10",
64
- "webdriverio": "8.15.10",
63
+ "webdriver": "8.16.0",
64
+ "webdriverio": "8.16.0",
65
65
  "ws": "^8.13.0"
66
66
  },
67
67
  "scripts": {
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/ws": "^8.5.4",
75
- "@wdio/runner": "8.15.10"
75
+ "@wdio/runner": "8.16.0"
76
76
  },
77
- "gitHead": "63a02b672216ae86a58475746a5eed5adf0d736f"
77
+ "gitHead": "69af55a5cd2aa1f1e4173b2fa2c28a7d65ceca83"
78
78
  }