@wdio/browser-runner 8.6.1 → 8.6.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.
@@ -21,9 +21,6 @@ export declare const dirname: () => string;
21
21
  export declare const resolve: () => string;
22
22
  export declare const sep = "/";
23
23
  export declare const type = "browser";
24
- export declare const printDiffOrStringify: () => void;
25
- export declare const printReceived: () => void;
26
- export declare const printExpected: () => void;
27
24
  declare const _default: () => void;
28
25
  export default _default;
29
26
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/browser/mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAIzB,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAK,CAAA;AACnC,eAAO,MAAM,eAAe,IAAK,CAAA;AACjC,qBAAa,YAAY;CAAG;AAC5B,eAAO,MAAM,GAAG;;;;;CAAa,CAAA;AAC7B,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,GAAG,MAAM,CAAA;AACtB,eAAO,MAAM,IAAI,YAAY,CAAA;AAG7B,eAAO,MAAM,oBAAoB,YAAW,CAAA;AAC5C,eAAO,MAAM,aAAa,YAAW,CAAA;AACrC,eAAO,MAAM,aAAa,YAAW,CAAA;;AACrC,wBAAuB"}
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/browser/mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAIzB,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAK,CAAA;AACnC,eAAO,MAAM,eAAe,IAAK,CAAA;AACjC,qBAAa,YAAY;CAAG;AAC5B,eAAO,MAAM,GAAG;;;;;CAAa,CAAA;AAC7B,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,GAAG,MAAM,CAAA;AACtB,eAAO,MAAM,IAAI,YAAY,CAAA;;AAC7B,wBAAuB"}
@@ -17,8 +17,4 @@ export const dirname = () => '';
17
17
  export const resolve = () => '';
18
18
  export const sep = '/';
19
19
  export const type = 'browser';
20
- // mock jest-matcher-utils exports
21
- export const printDiffOrStringify = () => { };
22
- export const printReceived = () => { };
23
- export const printExpected = () => { };
24
20
  export default () => { };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAgB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAiCrD,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAgB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAmCrD,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import topLevelAwait from 'vite-plugin-top-level-await';
2
2
  import { esbuildCommonjs } from '@originjs/vite-plugin-commonjs';
3
+ import { codeFrameFix } from './plugins/esbuild.js';
3
4
  export const PRESET_DEPENDENCIES = {
4
5
  react: ['@vitejs/plugin-react', 'default', {
5
6
  babel: {
@@ -36,7 +37,7 @@ export const DEFAULT_VITE_CONFIG = {
36
37
  'expect', 'serialize-error', 'minimatch', 'css-shorthand-properties',
37
38
  'lodash.merge', 'lodash.zip', 'lodash.clonedeep', 'lodash.pickby', 'lodash.flattendeep',
38
39
  'aria-query', 'grapheme-splitter', 'css-value', 'rgb2hex', 'p-iteration', 'fast-safe-stringify',
39
- 'deepmerge-ts', 'jest-util'
40
+ 'deepmerge-ts', 'jest-util', 'jest-matcher-utils'
40
41
  ],
41
42
  esbuildOptions: {
42
43
  logLevel: 'silent',
@@ -46,7 +47,9 @@ export const DEFAULT_VITE_CONFIG = {
46
47
  },
47
48
  // Enable esbuild polyfill plugins
48
49
  plugins: [
49
- esbuildCommonjs(['@testing-library/vue'])
50
+ esbuildCommonjs(['@testing-library/vue']),
51
+ // @ts-expect-error issue between esbuild dep from WebdriverIO vs Vite
52
+ codeFrameFix()
50
53
  ],
51
54
  },
52
55
  }
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from 'esbuild';
2
+ export declare function codeFrameFix(): Plugin;
3
+ //# sourceMappingURL=esbuild.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/esbuild.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,SAAS,CAAA;AAElD,wBAAgB,YAAY,WA8B3B"}
@@ -0,0 +1,25 @@
1
+ import fs from 'node:fs/promises';
2
+ export function codeFrameFix() {
3
+ return {
4
+ name: 'wdio:codeFrameFix',
5
+ setup(build) {
6
+ build.onLoad({ filter: /@babel\/code-frame/, namespace: 'file' },
7
+ /**
8
+ * mock @babel/code-frame as it fails in Safari due
9
+ * to usage of chalk
10
+ */
11
+ async ({ path: id }) => {
12
+ const code = await fs.readFile(id).then((buf) => buf.toString(), () => undefined);
13
+ if (!code) {
14
+ return;
15
+ }
16
+ return {
17
+ contents: code.replace('require("@babel/highlight");', /*js*/ `{
18
+ shouldHighlight: false,
19
+ reset: () => {}
20
+ }`)
21
+ };
22
+ });
23
+ }
24
+ };
25
+ }
@@ -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;AA2ClC,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,GAAG,MAAM,EAAE,CAoH9E"}
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,CAoH9E"}
@@ -22,8 +22,7 @@ const resolvedVirtualModuleId = '\0' + virtualModuleId;
22
22
  * functionality
23
23
  */
24
24
  const MODULES_TO_MOCK = [
25
- 'import-meta-resolve', 'puppeteer-core', 'archiver', 'glob', 'devtools', 'ws',
26
- 'jest-matcher-utils', 'decamelize'
25
+ 'import-meta-resolve', 'puppeteer-core', 'archiver', 'glob', 'devtools', 'ws', 'decamelize'
27
26
  ];
28
27
  const POLYFILLS = [
29
28
  ...builtinModules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browser-runner",
3
- "version": "8.6.1",
3
+ "version": "8.6.3",
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",
@@ -30,10 +30,10 @@
30
30
  "@babel/plugin-proposal-class-properties": "^7.18.6",
31
31
  "@originjs/vite-plugin-commonjs": "^1.0.3",
32
32
  "@types/istanbul-lib-source-maps": "^4.0.1",
33
- "@types/node": "^18.14.0",
34
- "@vitest/spy": "^0.29.1",
35
- "@wdio/globals": "8.6.1",
36
- "@wdio/local-runner": "8.6.1",
33
+ "@types/node": "^18.15.3",
34
+ "@vitest/spy": "^0.29.3",
35
+ "@wdio/globals": "8.6.3",
36
+ "@wdio/local-runner": "8.6.3",
37
37
  "@wdio/logger": "8.1.0",
38
38
  "@wdio/mocha-framework": "8.6.1",
39
39
  "@wdio/protocols": "8.5.7",
@@ -44,7 +44,7 @@
44
44
  "expect-webdriverio": "^4.1.2",
45
45
  "fast-safe-stringify": "^2.1.1",
46
46
  "get-port": "^6.1.2",
47
- "import-meta-resolve": "^2.2.1",
47
+ "import-meta-resolve": "^2.2.2",
48
48
  "istanbul-lib-coverage": "^3.2.0",
49
49
  "istanbul-lib-report": "^3.0.0",
50
50
  "istanbul-lib-source-maps": "^4.0.1",
@@ -53,12 +53,12 @@
53
53
  "recast": "^0.22.0",
54
54
  "serialize-error": "^11.0.0",
55
55
  "source-map-support": "^0.5.21",
56
- "vite": "^4.1.3",
57
- "vite-plugin-istanbul": "^4.0.0",
58
- "vite-plugin-top-level-await": "^1.2.4",
59
- "webdriver": "8.6.1",
60
- "webdriverio": "8.6.1",
61
- "ws": "^8.12.1"
56
+ "vite": "^4.2.0",
57
+ "vite-plugin-istanbul": "^4.0.1",
58
+ "vite-plugin-top-level-await": "^1.3.0",
59
+ "webdriver": "8.6.2",
60
+ "webdriverio": "8.6.3",
61
+ "ws": "^8.13.0"
62
62
  },
63
63
  "scripts": {
64
64
  "prepare": "rimraf node_modules/@wdio/config node_modules/@wdio/repl node_modules/@wdio/utils"
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/ws": "^8.5.4",
71
- "@wdio/runner": "8.6.1"
71
+ "@wdio/runner": "8.6.3"
72
72
  },
73
- "gitHead": "739de878c7b8f9b369c332d3beb366ccce83d0f0"
73
+ "gitHead": "24bb631283562f45dd2bdcb622a0c0d93cf075c2"
74
74
  }