@wdio/shared-store-service 8.2.0 → 8.2.2

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/README.md CHANGED
@@ -5,7 +5,7 @@ WebdriverIO Shared Store Service
5
5
 
6
6
  ## Installation
7
7
 
8
- The easiest way is to keep `@wdio/shared-store-service` as a devDependency in your `package.json`, via:
8
+ The easiest way is to keep `@wdio/shared-store-service` as a dev dependency in your `package.json`, via:
9
9
 
10
10
  ```sh
11
11
  npm install @wdio/shared-store-service --save-dev
@@ -47,12 +47,19 @@ You could also directly access to `setValue` and `getValue` async handlers.
47
47
  Make sure you properly call them with the `await` keyword.
48
48
 
49
49
  ```js
50
- import { setValue } from '@wdio/shared-store-service'
50
+ // wdio.conf.js
51
+ import { setValue, getValue } from '@wdio/shared-store-service'
51
52
 
52
- // ...
53
- onPrepare: [async function (config, capabilities) {
54
- await setValue('foo', 'bar')
55
- }],
53
+ export const config = {
54
+ // ...
55
+ onPrepare: [async function (config, capabilities) {
56
+ await setValue('foo', 'bar')
57
+ }],
58
+ // ...
59
+ after: async () => {
60
+ const value = await getValue('foo')
61
+ // ...
62
+ }
56
63
  ```
57
64
 
58
65
  IMPORTANT! Every spec file should be atomic and isolated from others' specs.
@@ -61,7 +68,7 @@ Please avoid sharing test execution data!
61
68
 
62
69
  ## Configuration
63
70
 
64
- Add `shared-store` to the services list and the `sharedStore` object will be accessible to you in your test.
71
+ Add `shared-store` to the services list and the `sharedStore` object will be accessible to you on the [`browser` scope](https://webdriver.io/docs/api/browser) in your test.
65
72
 
66
73
  ```js
67
74
  // wdio.conf.js
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cjs/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const esmModule = import('../index.js');
4
+ exports.setValue = async function (key, value) {
5
+ const m = await esmModule;
6
+ return m.setValue(key, value);
7
+ };
8
+ exports.getValue = async function (key) {
9
+ const m = await esmModule;
10
+ return m.getValue(key);
11
+ };
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/shared-store-service",
3
- "version": "8.2.0",
3
+ "version": "8.2.2",
4
4
  "description": "A WebdriverIO service to exchange data across processes",
5
5
  "author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-shared-store-service",
@@ -22,8 +22,19 @@
22
22
  "bugs": {
23
23
  "url": "https://github.com/webdriverio/webdriverio/issues"
24
24
  },
25
+ "main": "./build/cjs/index.js",
25
26
  "type": "module",
26
- "exports": "./build/index.js",
27
+ "module": "./build/index.js",
28
+ "exports": {
29
+ ".": [
30
+ {
31
+ "types": "./build/index.d.ts",
32
+ "import": "./build/index.js",
33
+ "require": "./build/cjs/index.js"
34
+ },
35
+ "./build/cjs/index.js"
36
+ ]
37
+ },
27
38
  "types": "./build/index.d.ts",
28
39
  "typeScriptVersion": "3.8.3",
29
40
  "dependencies": {
@@ -32,10 +43,10 @@
32
43
  "@wdio/types": "8.1.2",
33
44
  "got": "^12.1.0",
34
45
  "polka": "^0.5.2",
35
- "webdriverio": "8.2.0"
46
+ "webdriverio": "8.2.2"
36
47
  },
37
48
  "publishConfig": {
38
49
  "access": "public"
39
50
  },
40
- "gitHead": "3620e90e47b6d3e62832f5de24f43cee6b31e972"
51
+ "gitHead": "dff7f0d540cd0862d393ecceabed44d42794e2be"
41
52
  }