@wdio/globals 8.0.0-alpha.600 → 8.0.0-alpha.619
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.d.ts +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +8 -1
- package/cjs/index.js +8 -1
- package/package.json +3 -3
- package/tsconfig.cjs.json +0 -9
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="./standalone" />
|
|
2
2
|
/// <reference types="types" />
|
|
3
3
|
type SupportedGlobals = 'browser' | 'driver' | 'multiremotebrowser' | '$' | '$$' | 'expect';
|
|
4
|
+
declare global {
|
|
5
|
+
var _wdioGlobals: Map<SupportedGlobals, any>;
|
|
6
|
+
}
|
|
4
7
|
export declare const browser: WebdriverIO.Browser;
|
|
5
8
|
export declare const driver: WebdriverIO.Browser;
|
|
6
9
|
export declare const multiremotebrowser: WebdriverIO.MultiRemoteBrowser;
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,KAAK,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,GAAG,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,KAAK,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,GAAG,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAA;AAE3F,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,YAAY,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAA;CAC/C;AAwBD,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,OAGjC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,OAGhC,CAAA;AACD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,kBAG5C,CAAA;AACD,eAAO,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,CAKtC,CAAA;AACD,eAAO,MAAM,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAKxC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,MAKT,CAAA;AAU9B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,UAAO,QAO9E"}
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/// <reference path="../types.d.ts" />
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* As this file gets imported/used as ESM and CJS artifact we have to make sure
|
|
4
|
+
* that we can share the globals map across both files. For example if someone
|
|
5
|
+
* runs a CJS project, we run this file as ESM (/build/index.js) first, but when
|
|
6
|
+
* imported in the test, the same file will be used as CJS version (/cjs/index.js)
|
|
7
|
+
* and can use the Map initiated by the testrunner by making it accessible globally.
|
|
8
|
+
*/
|
|
9
|
+
const globals = globalThis._wdioGlobals = globalThis._wdioGlobals || new Map();
|
|
3
10
|
const GLOBALS_ERROR_MESSAGE = 'No browser instance registered. Don\'t import @wdio/globals outside of the WDIO testrunner context. Or you have two two different "@wdio/globals" packages installed.';
|
|
4
11
|
function proxyHandler(key) {
|
|
5
12
|
return {
|
package/cjs/index.js
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
/// <reference path="../types.d.ts" />
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports._setGlobal = exports.expect = exports.$$ = exports.$ = exports.multiremotebrowser = exports.driver = exports.browser = void 0;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* As this file gets imported/used as ESM and CJS artifact we have to make sure
|
|
7
|
+
* that we can share the globals map across both files. For example if someone
|
|
8
|
+
* runs a CJS project, we run this file as ESM (/build/index.js) first, but when
|
|
9
|
+
* imported in the test, the same file will be used as CJS version (/cjs/index.js)
|
|
10
|
+
* and can use the Map initiated by the testrunner by making it accessible globally.
|
|
11
|
+
*/
|
|
12
|
+
const globals = globalThis._wdioGlobals = globalThis._wdioGlobals || new Map();
|
|
6
13
|
const GLOBALS_ERROR_MESSAGE = 'No browser instance registered. Don\'t import @wdio/globals outside of the WDIO testrunner context. Or you have two two different "@wdio/globals" packages installed.';
|
|
7
14
|
function proxyHandler(key) {
|
|
8
15
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/globals",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.619+49b4900cf",
|
|
4
4
|
"description": "A helper utility for importing global variables directly",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-globals",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"optionalDependencies": {
|
|
42
42
|
"expect-webdriverio": "^4.0.0-alpha.6",
|
|
43
|
-
"webdriverio": "8.0.0-alpha.
|
|
43
|
+
"webdriverio": "8.0.0-alpha.619+49b4900cf"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "49b4900cfab0feeae29193be1ca913278299ddf3"
|
|
46
46
|
}
|