@react-native-harness/platform-web 1.4.1 → 1.5.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":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,4BAA4B,EAClC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9E,QAAA,MAAM,YAAY,EAAE,4BAA4B,CAC9C,iBAAiB,EACjB,aAAa,CA8Kd,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,4BAA4B,EAClC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9E,QAAA,MAAM,YAAY,EAAE,4BAA4B,CAC9C,iBAAiB,EACjB,aAAa,CAmKd,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/dist/runner.js CHANGED
@@ -1,23 +1,12 @@
1
1
  import { createAppSessionEmitter, } from '@react-native-harness/platforms';
2
2
  import { chromium, firefox, webkit } from 'playwright';
3
3
  import { WebPlatformConfigSchema } from './config.js';
4
- const getWebRunner = async (config, _harnessConfig, init) => {
4
+ const getWebRunner = async (config, _harnessConfig, _init) => {
5
+ void _harnessConfig;
6
+ void _init;
5
7
  const parsedConfig = WebPlatformConfigSchema.parse(config);
6
8
  let browser = null;
7
9
  let page = null;
8
- // Session-lifetime signal (see HarnessPlatformInitOptions.signal): close the
9
- // browser on session teardown, in addition to the normal dispose() path.
10
- const closeBrowserOnAbort = () => {
11
- void browser?.close();
12
- browser = null;
13
- page = null;
14
- };
15
- if (init.signal.aborted) {
16
- closeBrowserOnAbort();
17
- }
18
- else {
19
- init.signal.addEventListener('abort', closeBrowserOnAbort, { once: true });
20
- }
21
10
  const launchBrowser = async () => {
22
11
  const browserType = {
23
12
  chromium,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-harness/platform-web",
3
3
  "description": "Web platform for React Native Harness using Playwright",
4
- "version": "1.4.1",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "playwright": "^1.50.0",
20
20
  "zod": "^3.25.67",
21
21
  "tslib": "^2.3.0",
22
- "@react-native-harness/config": "1.4.1",
23
- "@react-native-harness/platforms": "1.4.1"
22
+ "@react-native-harness/config": "1.5.0",
23
+ "@react-native-harness/platforms": "1.5.0"
24
24
  },
25
25
  "license": "MIT"
26
26
  }
package/src/runner.ts CHANGED
@@ -11,25 +11,14 @@ import { WebPlatformConfigSchema, type WebPlatformConfig } from './config.js';
11
11
  const getWebRunner: HarnessPlatformRunnerFactory<
12
12
  WebPlatformConfig,
13
13
  HarnessConfig
14
- > = async (config, _harnessConfig, init) => {
14
+ > = async (config, _harnessConfig, _init) => {
15
+ void _harnessConfig;
16
+ void _init;
15
17
  const parsedConfig = WebPlatformConfigSchema.parse(config);
16
18
 
17
19
  let browser: Browser | null = null;
18
20
  let page: Page | null = null;
19
21
 
20
- // Session-lifetime signal (see HarnessPlatformInitOptions.signal): close the
21
- // browser on session teardown, in addition to the normal dispose() path.
22
- const closeBrowserOnAbort = () => {
23
- void browser?.close();
24
- browser = null;
25
- page = null;
26
- };
27
- if (init.signal.aborted) {
28
- closeBrowserOnAbort();
29
- } else {
30
- init.signal.addEventListener('abort', closeBrowserOnAbort, { once: true });
31
- }
32
-
33
22
  const launchBrowser = async () => {
34
23
  const browserType = {
35
24
  chromium,