expect-webdriverio 4.0.0-alpha.2 → 4.0.0-alpha.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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/lib/index.js +3 -4
  3. package/package.json +21 -19
package/README.md CHANGED
@@ -38,8 +38,8 @@ See more [Examples](docs/Examples.md)
38
38
  If you embed WebdriverIO in a standalone script, make sure you import `expect-webdriverio` before you use it anywhere.
39
39
 
40
40
  ```js
41
- const { remote } = require('webdriverio');
42
- require('expect-webdriverio')
41
+ import { remote } from 'webdriverio'
42
+ import { expect } from 'expect-webdriverio'
43
43
 
44
44
  ;(async () => {
45
45
  const browser = await remote({
package/lib/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import expectLib from 'expect';
1
+ import { expect as expectLib } from 'expect';
2
2
  import matchers from './matchers.js';
3
3
  import { DEFAULT_OPTIONS } from './constants.js';
4
+ expectLib.extend({ ...matchers });
5
+ export const expect = expectLib;
4
6
  export const getConfig = () => DEFAULT_OPTIONS;
5
7
  export const setDefaultOptions = (options = {}) => {
6
8
  Object.entries(options).forEach(([key, value]) => {
@@ -9,7 +11,4 @@ export const setDefaultOptions = (options = {}) => {
9
11
  }
10
12
  });
11
13
  };
12
- export const expect = async () => {
13
- return expectLib.extend({ ...matchers });
14
- };
15
14
  export const setOptions = setDefaultOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expect-webdriverio",
3
- "version": "4.0.0-alpha.2",
3
+ "version": "4.0.0-alpha.4",
4
4
  "author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
5
5
  "description": "WebdriverIO Assertion Library",
6
6
  "license": "MIT",
@@ -18,20 +18,13 @@
18
18
  "webdriverio",
19
19
  "wdio"
20
20
  ],
21
- "main": "./lib/index.cjs.js",
22
21
  "type": "module",
23
- "module": "./lib/index.js",
24
- "exports": {
25
- ".": [
26
- {
27
- "import": "./lib/index.js",
28
- "require": "./lib/index.cjs.js"
29
- },
30
- "./lib/index.cjs.js"
31
- ]
32
- },
22
+ "exports": "./lib/index.js",
33
23
  "types": "types/jest-global.d.ts",
34
24
  "typeScriptVersion": "3.8.3",
25
+ "engines": {
26
+ "node": "^16.13 || >=18"
27
+ },
35
28
  "scripts": {
36
29
  "build": "run-s clean compile",
37
30
  "clean": "run-p clean:*",
@@ -50,28 +43,37 @@
50
43
  "prepare": "husky install"
51
44
  },
52
45
  "devDependencies": {
53
- "@types/jest": "^28.1.6",
46
+ "@types/jest": "^29.0.0",
54
47
  "@types/node": "^18.7.1",
55
48
  "@typescript-eslint/eslint-plugin": "^5.33.0",
56
49
  "@typescript-eslint/parser": "^5.33.0",
50
+ "@vitest/coverage-c8": "^0.24.0",
57
51
  "c8": "^7.12.0",
58
52
  "eslint": "^8.21.0",
59
53
  "eslint-plugin-import": "^2.26.0",
60
- "eslint-plugin-unicorn": "^43.0.2",
54
+ "eslint-plugin-unicorn": "^44.0.0",
61
55
  "husky": "^8.0.1",
62
56
  "npm-run-all": "^4.1.5",
63
57
  "release-it": "^15.3.0",
64
58
  "rimraf": "^3.0.2",
65
59
  "shelljs": "^0.8.5",
66
60
  "typescript": "^4.7.4",
67
- "vitest": "0.21.1"
61
+ "vitest": "0.24.3"
68
62
  },
69
63
  "peerDependencies": {
70
- "@wdio/globals": "next",
71
- "webdriverio": "next"
64
+ "@wdio/globals": "^8.0.0-alpha.365",
65
+ "webdriverio": "^8.0.0-alpha.365"
66
+ },
67
+ "peerDependenciesMeta": {
68
+ "@wdio/globals": {
69
+ "optional": false
70
+ },
71
+ "webdriverio": {
72
+ "optional": false
73
+ }
72
74
  },
73
75
  "dependencies": {
74
- "expect": "^28.1.3",
75
- "jest-matcher-utils": "^28.1.3"
76
+ "expect": "^29.0.2",
77
+ "jest-matcher-utils": "^29.0.2"
76
78
  }
77
79
  }