req-race 1.1.0 → 1.1.1
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/CHANGELOG.md +15 -15
- package/LICENSE +21 -21
- package/README.md +107 -107
- package/bin/req-race.js +143 -143
- package/config.schema.json +16 -16
- package/package.json +127 -127
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [1.1.0] - 2026-12-05
|
|
4
|
-
|
|
5
|
-
### Added
|
|
6
|
-
- Dual ESM + CJS + TypeScript `.d.ts`/`.d.cts` + minified browser IIFE (`req-race/browser`) builds.
|
|
7
|
-
- 9 new chaos modes (`slow`, `flaky`, `error-status`, `rate-limit`, `offline`, `hang`, `abort-mid-body`, `shuffle`, `custom`) bringing total to 13 modes, plus mode arrays and per-URL `rules`.
|
|
8
|
-
- Deterministic PRNG (`createSeededRandom`), injectable `clock`, `patchBeacon`, `enableXhrRaceChaos`, and typed error classes (`SupersededError`, `TimeoutError`, `RaceAssertionError`, `AlreadyEnabledError`, `ChaosCallbackError`, `UnknownModeError`).
|
|
9
|
-
- Non-fetch ordering & lock helpers: `createLatestGuard()`, `createLatestOnly()`, and `createMutationLock()`.
|
|
10
|
-
- Expanded `createRaceSafeFetch()` with `dedupeWindowMs`, `idempotencyKey`, `respectRetryAfter`, `retryOn`, `totalTimeoutMs`, `response.clone()`, and Node 18 `AbortSignal` merge fallback.
|
|
11
|
-
- 6 new Playwright assertions (`assertHandlesServerError`, `assertHandlesOffline`, `assertNoRetryStorm`, `assertNoStaleAfterNavigation`, `assertNoUnhandledRejections`, `assertNoOutOfOrderSequence`) + `withChaos`, `req-race/puppeteer`, and `req-race/cypress`.
|
|
12
|
-
- Reporters (`toJson`, `toMarkdown`, `toJUnit`, `toSarif`), `defineConfig`/`loadConfig`, `config.schema.json`, and CLI flags (`--format`, `--output`, `--seed`, `--list-modes`, `--no-color`).
|
|
13
|
-
|
|
14
|
-
## [1.0.0] - 2026-12-05
|
|
15
|
-
- Initial stable release with `enableFetchRaceChaos`, `createRaceSafeFetch`, Playwright helpers, and CLI.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.1.0] - 2026-12-05
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Dual ESM + CJS + TypeScript `.d.ts`/`.d.cts` + minified browser IIFE (`req-race/browser`) builds.
|
|
7
|
+
- 9 new chaos modes (`slow`, `flaky`, `error-status`, `rate-limit`, `offline`, `hang`, `abort-mid-body`, `shuffle`, `custom`) bringing total to 13 modes, plus mode arrays and per-URL `rules`.
|
|
8
|
+
- Deterministic PRNG (`createSeededRandom`), injectable `clock`, `patchBeacon`, `enableXhrRaceChaos`, and typed error classes (`SupersededError`, `TimeoutError`, `RaceAssertionError`, `AlreadyEnabledError`, `ChaosCallbackError`, `UnknownModeError`).
|
|
9
|
+
- Non-fetch ordering & lock helpers: `createLatestGuard()`, `createLatestOnly()`, and `createMutationLock()`.
|
|
10
|
+
- Expanded `createRaceSafeFetch()` with `dedupeWindowMs`, `idempotencyKey`, `respectRetryAfter`, `retryOn`, `totalTimeoutMs`, `response.clone()`, and Node 18 `AbortSignal` merge fallback.
|
|
11
|
+
- 6 new Playwright assertions (`assertHandlesServerError`, `assertHandlesOffline`, `assertNoRetryStorm`, `assertNoStaleAfterNavigation`, `assertNoUnhandledRejections`, `assertNoOutOfOrderSequence`) + `withChaos`, `req-race/puppeteer`, and `req-race/cypress`.
|
|
12
|
+
- Reporters (`toJson`, `toMarkdown`, `toJUnit`, `toSarif`), `defineConfig`/`loadConfig`, `config.schema.json`, and CLI flags (`--format`, `--output`, `--seed`, `--list-modes`, `--no-color`).
|
|
13
|
+
|
|
14
|
+
## [1.0.0] - 2026-12-05
|
|
15
|
+
- Initial stable release with `enableFetchRaceChaos`, `createRaceSafeFetch`, Playwright helpers, and CLI.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Prince Bhut
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Prince Bhut
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
# req-race
|
|
2
|
-
|
|
3
|
-
**Automated stale-fetch race condition, out-of-order response chaos, and double-submit mutation tester** for browsers, Playwright, and CI.
|
|
4
|
-
|
|
5
|
-
Zero runtime dependencies for the core engine. Optional `playwright` peer dependency for E2E assertions and CLI scanning.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Why `req-race`?
|
|
10
|
-
|
|
11
|
-
Local APIs respond in ~5ms, hiding two of the most common production bugs:
|
|
12
|
-
|
|
13
|
-
1. **Stale-Fetch Race Conditions:** Typing `"react"` then `"rust"` fires two requests. If `"react"` returns after `"rust"`, the UI gets overwritten with stale `"react"` results.
|
|
14
|
-
2. **Double-Submit Mutations:** Double-clicking a submit/payment button fires duplicate `POST` requests.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install req-race
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
For Playwright assertions or CLI scanning:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install -D playwright
|
|
28
|
-
npx playwright install chromium
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Quick Start
|
|
34
|
-
|
|
35
|
-
### 1. Dev-Mode Chaos (`enableFetchRaceChaos`)
|
|
36
|
-
|
|
37
|
-
Drop into your app entry during development to reverse overlapping `fetch` responses and expose race conditions on `localhost`:
|
|
38
|
-
|
|
39
|
-
```js
|
|
40
|
-
import { enableFetchRaceChaos, formatRaceReport } from "req-race";
|
|
41
|
-
|
|
42
|
-
const chaos = enableFetchRaceChaos({
|
|
43
|
-
mode: "reverse-order", // "reverse-order" | "jitter" | "throttle-mutations"
|
|
44
|
-
delayMs: 1000,
|
|
45
|
-
doubleSubmitWindowMs: 500,
|
|
46
|
-
onRaceDetected: (event) => console.warn("Race detected:", event),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Later inspect telemetry:
|
|
50
|
-
console.log(formatRaceReport(chaos.getStats()));
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 2. Race-Safe Fetch Wrapper (`createRaceSafeFetch`)
|
|
54
|
-
|
|
55
|
-
Automatically abort superseded in-flight `GET`/`HEAD` requests to the same endpoint:
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import { createRaceSafeFetch } from "req-race";
|
|
59
|
-
|
|
60
|
-
const safeFetch = createRaceSafeFetch();
|
|
61
|
-
const res = await safeFetch(`/api/search?q=${encodeURIComponent(query)}`);
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 3. Playwright CI Assertions (`req-race/playwright`)
|
|
65
|
-
|
|
66
|
-
```js
|
|
67
|
-
import { test } from "@playwright/test";
|
|
68
|
-
import { assertNoStaleRace, assertNoDoubleSubmit } from "req-race/playwright";
|
|
69
|
-
|
|
70
|
-
test("search ignores stale out-of-order responses", async ({ page }) => {
|
|
71
|
-
await page.goto("http://localhost:5173/search");
|
|
72
|
-
|
|
73
|
-
await assertNoStaleRace(page, {
|
|
74
|
-
url: "**/api/search*",
|
|
75
|
-
trigger: async () => {
|
|
76
|
-
await page.fill("input[type=search]", "react");
|
|
77
|
-
await page.fill("input[type=search]", "rust");
|
|
78
|
-
},
|
|
79
|
-
selector: ".results-title",
|
|
80
|
-
expectedText: "rust",
|
|
81
|
-
delayMs: 800,
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
test("checkout button prevents double submit", async ({ page }) => {
|
|
86
|
-
await page.goto("http://localhost:5173/checkout");
|
|
87
|
-
|
|
88
|
-
await assertNoDoubleSubmit(page, {
|
|
89
|
-
button: 'button:has-text("Pay Now")',
|
|
90
|
-
url: "**/api/orders",
|
|
91
|
-
maxRequests: 1,
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 4. CLI Usage
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
npx req-race http://localhost:5173 --mode reverse-order --delay 1000
|
|
100
|
-
npx req-race http://localhost:5173 --json
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## License
|
|
106
|
-
|
|
107
|
-
MIT
|
|
1
|
+
# req-race
|
|
2
|
+
|
|
3
|
+
**Automated stale-fetch race condition, out-of-order response chaos, and double-submit mutation tester** for browsers, Playwright, and CI.
|
|
4
|
+
|
|
5
|
+
Zero runtime dependencies for the core engine. Optional `playwright` peer dependency for E2E assertions and CLI scanning.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Why `req-race`?
|
|
10
|
+
|
|
11
|
+
Local APIs respond in ~5ms, hiding two of the most common production bugs:
|
|
12
|
+
|
|
13
|
+
1. **Stale-Fetch Race Conditions:** Typing `"react"` then `"rust"` fires two requests. If `"react"` returns after `"rust"`, the UI gets overwritten with stale `"react"` results.
|
|
14
|
+
2. **Double-Submit Mutations:** Double-clicking a submit/payment button fires duplicate `POST` requests.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install req-race
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For Playwright assertions or CLI scanning:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -D playwright
|
|
28
|
+
npx playwright install chromium
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### 1. Dev-Mode Chaos (`enableFetchRaceChaos`)
|
|
36
|
+
|
|
37
|
+
Drop into your app entry during development to reverse overlapping `fetch` responses and expose race conditions on `localhost`:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
import { enableFetchRaceChaos, formatRaceReport } from "req-race";
|
|
41
|
+
|
|
42
|
+
const chaos = enableFetchRaceChaos({
|
|
43
|
+
mode: "reverse-order", // "reverse-order" | "jitter" | "throttle-mutations"
|
|
44
|
+
delayMs: 1000,
|
|
45
|
+
doubleSubmitWindowMs: 500,
|
|
46
|
+
onRaceDetected: (event) => console.warn("Race detected:", event),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Later inspect telemetry:
|
|
50
|
+
console.log(formatRaceReport(chaos.getStats()));
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Race-Safe Fetch Wrapper (`createRaceSafeFetch`)
|
|
54
|
+
|
|
55
|
+
Automatically abort superseded in-flight `GET`/`HEAD` requests to the same endpoint:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import { createRaceSafeFetch } from "req-race";
|
|
59
|
+
|
|
60
|
+
const safeFetch = createRaceSafeFetch();
|
|
61
|
+
const res = await safeFetch(`/api/search?q=${encodeURIComponent(query)}`);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Playwright CI Assertions (`req-race/playwright`)
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
import { test } from "@playwright/test";
|
|
68
|
+
import { assertNoStaleRace, assertNoDoubleSubmit } from "req-race/playwright";
|
|
69
|
+
|
|
70
|
+
test("search ignores stale out-of-order responses", async ({ page }) => {
|
|
71
|
+
await page.goto("http://localhost:5173/search");
|
|
72
|
+
|
|
73
|
+
await assertNoStaleRace(page, {
|
|
74
|
+
url: "**/api/search*",
|
|
75
|
+
trigger: async () => {
|
|
76
|
+
await page.fill("input[type=search]", "react");
|
|
77
|
+
await page.fill("input[type=search]", "rust");
|
|
78
|
+
},
|
|
79
|
+
selector: ".results-title",
|
|
80
|
+
expectedText: "rust",
|
|
81
|
+
delayMs: 800,
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("checkout button prevents double submit", async ({ page }) => {
|
|
86
|
+
await page.goto("http://localhost:5173/checkout");
|
|
87
|
+
|
|
88
|
+
await assertNoDoubleSubmit(page, {
|
|
89
|
+
button: 'button:has-text("Pay Now")',
|
|
90
|
+
url: "**/api/orders",
|
|
91
|
+
maxRequests: 1,
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 4. CLI Usage
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx req-race http://localhost:5173 --mode reverse-order --delay 1000
|
|
100
|
+
npx req-race http://localhost:5173 --json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|
package/bin/req-race.js
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { readFileSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { dirname, resolve } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
import {
|
|
7
|
-
MODES,
|
|
8
|
-
VERSION,
|
|
9
|
-
formatRaceReport,
|
|
10
|
-
loadConfig,
|
|
11
|
-
toJUnit,
|
|
12
|
-
toJson,
|
|
13
|
-
toMarkdown,
|
|
14
|
-
toSarif,
|
|
15
|
-
} from "../dist/esm/index.js";
|
|
16
|
-
|
|
17
|
-
const args = process.argv.slice(2);
|
|
18
|
-
|
|
19
|
-
if (args.includes("--version") || args.includes("-v")) {
|
|
20
|
-
console.log(VERSION);
|
|
21
|
-
process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (args.includes("--list-modes")) {
|
|
25
|
-
console.log(MODES.join("\n"));
|
|
26
|
-
process.exit(0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|
|
30
|
-
console.log(`
|
|
31
|
-
req-race v${VERSION} — Automated stale-fetch race condition & double-submit tester
|
|
32
|
-
|
|
33
|
-
Usage:
|
|
34
|
-
npx req-race <url> [options]
|
|
35
|
-
|
|
36
|
-
Options:
|
|
37
|
-
--mode <m> Comma-separated modes (${MODES.join(" | ")})
|
|
38
|
-
--delay <ms> Delay ms for reordered/slow/throttled requests (default: 1000)
|
|
39
|
-
--timeout <ms> Timeout ms for timeout mode (default: 1500)
|
|
40
|
-
--wait <ms> Wait ms after load to collect telemetry (default: 1500)
|
|
41
|
-
--seed <n> Deterministic PRNG seed
|
|
42
|
-
--format <f> text | json | sarif | junit | markdown (default: text)
|
|
43
|
-
--json Alias for --format json
|
|
44
|
-
--output <file> Write report to file
|
|
45
|
-
--fail-on <metrics> Comma list: unaborted-stale,duplicate-mutation,timeout,failed
|
|
46
|
-
--list-modes List all 13 chaos modes
|
|
47
|
-
--no-color Disable ANSI colors
|
|
48
|
-
-v, --version Show version
|
|
49
|
-
-h, --help Show help
|
|
50
|
-
`);
|
|
51
|
-
process.exit(0);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const getArgValue = (flag) => {
|
|
55
|
-
const idx = args.indexOf(flag);
|
|
56
|
-
return idx !== -1 && args[idx + 1] ? args[idx + 1] : null;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const url = args.find((a) => !a.startsWith("-"));
|
|
60
|
-
if (!url || !/^(https?|file):\/\//i.test(url)) {
|
|
61
|
-
console.error("Error: Please provide a valid http://, https://, or file:// URL.");
|
|
62
|
-
process.exit(2);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const cfg = await loadConfig(process.cwd(), getArgValue("--config") ?? undefined);
|
|
66
|
-
const modeRaw = getArgValue("--mode") ?? cfg.mode ?? "reverse-order";
|
|
67
|
-
const mode = Array.isArray(modeRaw)
|
|
68
|
-
? modeRaw
|
|
69
|
-
: String(modeRaw)
|
|
70
|
-
.split(",")
|
|
71
|
-
.map((s) => s.trim())
|
|
72
|
-
.filter(Boolean);
|
|
73
|
-
|
|
74
|
-
for (const m of mode) {
|
|
75
|
-
if (!MODES.includes(m)) {
|
|
76
|
-
console.error(`Error: Unknown mode "${m}". Run --list-modes to see valid modes.`);
|
|
77
|
-
process.exit(2);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const delayMs = Number(getArgValue("--delay") ?? cfg.delay ?? 1000);
|
|
82
|
-
const timeoutMs = Number(getArgValue("--timeout") ?? cfg.timeout ?? 1500);
|
|
83
|
-
const waitMs = Number(getArgValue("--wait") ?? cfg.wait ?? 1500);
|
|
84
|
-
const seed = getArgValue("--seed") ?? cfg.seed;
|
|
85
|
-
const format = args.includes("--json") ? "json" : (getArgValue("--format") ?? cfg.format ?? "text");
|
|
86
|
-
const outputFile = getArgValue("--output");
|
|
87
|
-
const noColor = args.includes("--no-color") || Boolean(process.env.NO_COLOR) || !process.stdout.isTTY;
|
|
88
|
-
|
|
89
|
-
let playwright;
|
|
90
|
-
try {
|
|
91
|
-
playwright = await import("playwright");
|
|
92
|
-
} catch {
|
|
93
|
-
console.error(
|
|
94
|
-
"Playwright is required for CLI URL testing.\nInstall it with: npm i -D playwright && npx playwright install chromium"
|
|
95
|
-
);
|
|
96
|
-
process.exit(3);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const dir = dirname(fileURLToPath(import.meta.url));
|
|
100
|
-
const browserBundle = readFileSync(resolve(dir, "../dist/browser/req-race.global.js"), "utf8");
|
|
101
|
-
|
|
102
|
-
const browser = await playwright.chromium.launch({ headless: true });
|
|
103
|
-
try {
|
|
104
|
-
const page = await browser.newPage();
|
|
105
|
-
await page.addInitScript(
|
|
106
|
-
({ bundle, opts }) => {
|
|
107
|
-
const fn = new Function(bundle);
|
|
108
|
-
fn();
|
|
109
|
-
window.__reqRace = window.ReqRace.enable(opts);
|
|
110
|
-
},
|
|
111
|
-
{ bundle: browserBundle, opts: { mode, delayMs, timeoutMs, ...(seed ? { seed } : {}) } }
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
await page.goto(url, { waitUntil: "networkidle" });
|
|
115
|
-
if (waitMs > 0) await page.waitForTimeout(waitMs);
|
|
116
|
-
|
|
117
|
-
const stats = await page.evaluate(() => window.__reqRace?.getStats() ?? null);
|
|
118
|
-
const logs = await page.evaluate(() => window.__reqRace?.getLogs() ?? []);
|
|
119
|
-
|
|
120
|
-
let output = "";
|
|
121
|
-
if (format === "json") {
|
|
122
|
-
output = JSON.stringify(toJson(stats, logs), null, 2);
|
|
123
|
-
} else if (format === "sarif") {
|
|
124
|
-
output = JSON.stringify(toSarif(stats, logs), null, 2);
|
|
125
|
-
} else if (format === "junit") {
|
|
126
|
-
output = toJUnit(stats, logs);
|
|
127
|
-
} else if (format === "markdown") {
|
|
128
|
-
output = toMarkdown(stats, logs);
|
|
129
|
-
} else {
|
|
130
|
-
output = formatRaceReport(stats, { color: !noColor, logs });
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (outputFile) {
|
|
134
|
-
writeFileSync(resolve(process.cwd(), outputFile), output, "utf8");
|
|
135
|
-
} else {
|
|
136
|
-
console.log(output);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const hasIssues = stats && (stats.unabortedStaleCount > 0 || stats.duplicateMutations > 0);
|
|
140
|
-
process.exit(hasIssues ? 1 : 0);
|
|
141
|
-
} finally {
|
|
142
|
-
await browser.close();
|
|
143
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { dirname, resolve } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import {
|
|
7
|
+
MODES,
|
|
8
|
+
VERSION,
|
|
9
|
+
formatRaceReport,
|
|
10
|
+
loadConfig,
|
|
11
|
+
toJUnit,
|
|
12
|
+
toJson,
|
|
13
|
+
toMarkdown,
|
|
14
|
+
toSarif,
|
|
15
|
+
} from "../dist/esm/index.js";
|
|
16
|
+
|
|
17
|
+
const args = process.argv.slice(2);
|
|
18
|
+
|
|
19
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
20
|
+
console.log(VERSION);
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (args.includes("--list-modes")) {
|
|
25
|
+
console.log(MODES.join("\n"));
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|
|
30
|
+
console.log(`
|
|
31
|
+
req-race v${VERSION} — Automated stale-fetch race condition & double-submit tester
|
|
32
|
+
|
|
33
|
+
Usage:
|
|
34
|
+
npx req-race <url> [options]
|
|
35
|
+
|
|
36
|
+
Options:
|
|
37
|
+
--mode <m> Comma-separated modes (${MODES.join(" | ")})
|
|
38
|
+
--delay <ms> Delay ms for reordered/slow/throttled requests (default: 1000)
|
|
39
|
+
--timeout <ms> Timeout ms for timeout mode (default: 1500)
|
|
40
|
+
--wait <ms> Wait ms after load to collect telemetry (default: 1500)
|
|
41
|
+
--seed <n> Deterministic PRNG seed
|
|
42
|
+
--format <f> text | json | sarif | junit | markdown (default: text)
|
|
43
|
+
--json Alias for --format json
|
|
44
|
+
--output <file> Write report to file
|
|
45
|
+
--fail-on <metrics> Comma list: unaborted-stale,duplicate-mutation,timeout,failed
|
|
46
|
+
--list-modes List all 13 chaos modes
|
|
47
|
+
--no-color Disable ANSI colors
|
|
48
|
+
-v, --version Show version
|
|
49
|
+
-h, --help Show help
|
|
50
|
+
`);
|
|
51
|
+
process.exit(0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const getArgValue = (flag) => {
|
|
55
|
+
const idx = args.indexOf(flag);
|
|
56
|
+
return idx !== -1 && args[idx + 1] ? args[idx + 1] : null;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const url = args.find((a) => !a.startsWith("-"));
|
|
60
|
+
if (!url || !/^(https?|file):\/\//i.test(url)) {
|
|
61
|
+
console.error("Error: Please provide a valid http://, https://, or file:// URL.");
|
|
62
|
+
process.exit(2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const cfg = await loadConfig(process.cwd(), getArgValue("--config") ?? undefined);
|
|
66
|
+
const modeRaw = getArgValue("--mode") ?? cfg.mode ?? "reverse-order";
|
|
67
|
+
const mode = Array.isArray(modeRaw)
|
|
68
|
+
? modeRaw
|
|
69
|
+
: String(modeRaw)
|
|
70
|
+
.split(",")
|
|
71
|
+
.map((s) => s.trim())
|
|
72
|
+
.filter(Boolean);
|
|
73
|
+
|
|
74
|
+
for (const m of mode) {
|
|
75
|
+
if (!MODES.includes(m)) {
|
|
76
|
+
console.error(`Error: Unknown mode "${m}". Run --list-modes to see valid modes.`);
|
|
77
|
+
process.exit(2);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const delayMs = Number(getArgValue("--delay") ?? cfg.delay ?? 1000);
|
|
82
|
+
const timeoutMs = Number(getArgValue("--timeout") ?? cfg.timeout ?? 1500);
|
|
83
|
+
const waitMs = Number(getArgValue("--wait") ?? cfg.wait ?? 1500);
|
|
84
|
+
const seed = getArgValue("--seed") ?? cfg.seed;
|
|
85
|
+
const format = args.includes("--json") ? "json" : (getArgValue("--format") ?? cfg.format ?? "text");
|
|
86
|
+
const outputFile = getArgValue("--output");
|
|
87
|
+
const noColor = args.includes("--no-color") || Boolean(process.env.NO_COLOR) || !process.stdout.isTTY;
|
|
88
|
+
|
|
89
|
+
let playwright;
|
|
90
|
+
try {
|
|
91
|
+
playwright = await import("playwright");
|
|
92
|
+
} catch {
|
|
93
|
+
console.error(
|
|
94
|
+
"Playwright is required for CLI URL testing.\nInstall it with: npm i -D playwright && npx playwright install chromium"
|
|
95
|
+
);
|
|
96
|
+
process.exit(3);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const dir = dirname(fileURLToPath(import.meta.url));
|
|
100
|
+
const browserBundle = readFileSync(resolve(dir, "../dist/browser/req-race.global.js"), "utf8");
|
|
101
|
+
|
|
102
|
+
const browser = await playwright.chromium.launch({ headless: true });
|
|
103
|
+
try {
|
|
104
|
+
const page = await browser.newPage();
|
|
105
|
+
await page.addInitScript(
|
|
106
|
+
({ bundle, opts }) => {
|
|
107
|
+
const fn = new Function(bundle);
|
|
108
|
+
fn();
|
|
109
|
+
window.__reqRace = window.ReqRace.enable(opts);
|
|
110
|
+
},
|
|
111
|
+
{ bundle: browserBundle, opts: { mode, delayMs, timeoutMs, ...(seed ? { seed } : {}) } }
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
await page.goto(url, { waitUntil: "networkidle" });
|
|
115
|
+
if (waitMs > 0) await page.waitForTimeout(waitMs);
|
|
116
|
+
|
|
117
|
+
const stats = await page.evaluate(() => window.__reqRace?.getStats() ?? null);
|
|
118
|
+
const logs = await page.evaluate(() => window.__reqRace?.getLogs() ?? []);
|
|
119
|
+
|
|
120
|
+
let output = "";
|
|
121
|
+
if (format === "json") {
|
|
122
|
+
output = JSON.stringify(toJson(stats, logs), null, 2);
|
|
123
|
+
} else if (format === "sarif") {
|
|
124
|
+
output = JSON.stringify(toSarif(stats, logs), null, 2);
|
|
125
|
+
} else if (format === "junit") {
|
|
126
|
+
output = toJUnit(stats, logs);
|
|
127
|
+
} else if (format === "markdown") {
|
|
128
|
+
output = toMarkdown(stats, logs);
|
|
129
|
+
} else {
|
|
130
|
+
output = formatRaceReport(stats, { color: !noColor, logs });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (outputFile) {
|
|
134
|
+
writeFileSync(resolve(process.cwd(), outputFile), output, "utf8");
|
|
135
|
+
} else {
|
|
136
|
+
console.log(output);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const hasIssues = stats && (stats.unabortedStaleCount > 0 || stats.duplicateMutations > 0);
|
|
140
|
+
process.exit(hasIssues ? 1 : 0);
|
|
141
|
+
} finally {
|
|
142
|
+
await browser.close();
|
|
143
|
+
}
|
package/config.schema.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "req-race configuration",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"urls": { "type": "array", "items": { "type": "string" } },
|
|
8
|
-
"mode": { "type": ["string", "array"] },
|
|
9
|
-
"delay": { "type": "number", "minimum": 0 },
|
|
10
|
-
"timeout": { "type": "number", "minimum": 0 },
|
|
11
|
-
"wait": { "type": "number", "minimum": 0 },
|
|
12
|
-
"seed": { "type": ["number", "string"] },
|
|
13
|
-
"failOn": { "type": "array", "items": { "type": "string" } },
|
|
14
|
-
"format": { "enum": ["text", "json", "sarif", "junit", "markdown", "github"] }
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "req-race configuration",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"urls": { "type": "array", "items": { "type": "string" } },
|
|
8
|
+
"mode": { "type": ["string", "array"] },
|
|
9
|
+
"delay": { "type": "number", "minimum": 0 },
|
|
10
|
+
"timeout": { "type": "number", "minimum": 0 },
|
|
11
|
+
"wait": { "type": "number", "minimum": 0 },
|
|
12
|
+
"seed": { "type": ["number", "string"] },
|
|
13
|
+
"failOn": { "type": "array", "items": { "type": "string" } },
|
|
14
|
+
"format": { "enum": ["text", "json", "sarif", "junit", "markdown", "github"] }
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "req-race",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Automated stale-fetch race condition, out-of-order response chaos, timeout, and double-submit mutation tester for browsers, Playwright, Puppeteer, Cypress, and CI.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"main": "./dist/cjs/index.cjs",
|
|
8
|
-
"module": "./dist/esm/index.js",
|
|
9
|
-
"types": "./dist/types/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"import": {
|
|
13
|
-
"types": "./dist/types/index.d.ts",
|
|
14
|
-
"default": "./dist/esm/index.js"
|
|
15
|
-
},
|
|
16
|
-
"require": {
|
|
17
|
-
"types": "./dist/types/index.d.cts",
|
|
18
|
-
"default": "./dist/cjs/index.cjs"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"./playwright": {
|
|
22
|
-
"import": {
|
|
23
|
-
"types": "./dist/types/playwright.d.ts",
|
|
24
|
-
"default": "./dist/esm/playwright.js"
|
|
25
|
-
},
|
|
26
|
-
"require": {
|
|
27
|
-
"types": "./dist/types/playwright.d.cts",
|
|
28
|
-
"default": "./dist/cjs/playwright.cjs"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"./puppeteer": {
|
|
32
|
-
"import": {
|
|
33
|
-
"types": "./dist/types/puppeteer.d.ts",
|
|
34
|
-
"default": "./dist/esm/puppeteer.js"
|
|
35
|
-
},
|
|
36
|
-
"require": {
|
|
37
|
-
"types": "./dist/types/puppeteer.d.cts",
|
|
38
|
-
"default": "./dist/cjs/puppeteer.cjs"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"./cypress": {
|
|
42
|
-
"import": {
|
|
43
|
-
"types": "./dist/types/cypress.d.ts",
|
|
44
|
-
"default": "./dist/esm/cypress.js"
|
|
45
|
-
},
|
|
46
|
-
"require": {
|
|
47
|
-
"types": "./dist/types/cypress.d.cts",
|
|
48
|
-
"default": "./dist/cjs/cypress.cjs"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"./browser": {
|
|
52
|
-
"import": {
|
|
53
|
-
"types": "./dist/types/browser.d.ts",
|
|
54
|
-
"default": "./dist/esm/browser.js"
|
|
55
|
-
},
|
|
56
|
-
"require": {
|
|
57
|
-
"types": "./dist/types/browser.d.cts",
|
|
58
|
-
"default": "./dist/cjs/browser.cjs"
|
|
59
|
-
},
|
|
60
|
-
"default": "./dist/browser/req-race.global.js"
|
|
61
|
-
},
|
|
62
|
-
"./config.schema.json": "./config.schema.json",
|
|
63
|
-
"./package.json": "./package.json"
|
|
64
|
-
},
|
|
65
|
-
"bin": {
|
|
66
|
-
"req-race": "bin/req-race.js"
|
|
67
|
-
},
|
|
68
|
-
"files": [
|
|
69
|
-
"bin",
|
|
70
|
-
"dist",
|
|
71
|
-
"config.schema.json",
|
|
72
|
-
"README.md",
|
|
73
|
-
"docs",
|
|
74
|
-
"CHANGELOG.md",
|
|
75
|
-
"LICENSE"
|
|
76
|
-
],
|
|
77
|
-
"scripts": {
|
|
78
|
-
"build": "node scripts/build.mjs",
|
|
79
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
-
"test": "node --test test/*.test.js",
|
|
81
|
-
"test:coverage": "npx c8 --lines 100 --branches 100 --functions 100 --statements 100 node --test test/*.test.js",
|
|
82
|
-
"check:pkg": "npx publint --strict && npx attw --pack . --ignore-rules no-resolution",
|
|
83
|
-
"prepublishOnly": "npm run build && npm run typecheck && npm test"
|
|
84
|
-
},
|
|
85
|
-
"keywords": [
|
|
86
|
-
"fetch",
|
|
87
|
-
"race-condition",
|
|
88
|
-
"stale-fetch",
|
|
89
|
-
"abortcontroller",
|
|
90
|
-
"double-submit",
|
|
91
|
-
"chaos-testing",
|
|
92
|
-
"playwright",
|
|
93
|
-
"puppeteer",
|
|
94
|
-
"cypress",
|
|
95
|
-
"testing",
|
|
96
|
-
"cli"
|
|
97
|
-
],
|
|
98
|
-
"author": "Prince Bhut",
|
|
99
|
-
"license": "MIT",
|
|
100
|
-
"engines": {
|
|
101
|
-
"node": ">=18.0.0"
|
|
102
|
-
},
|
|
103
|
-
"peerDependencies": {
|
|
104
|
-
"playwright": ">=1.40.0",
|
|
105
|
-
"puppeteer": ">=21.0.0",
|
|
106
|
-
"cypress": ">=12.0.0"
|
|
107
|
-
},
|
|
108
|
-
"peerDependenciesMeta": {
|
|
109
|
-
"playwright": {
|
|
110
|
-
"optional": true
|
|
111
|
-
},
|
|
112
|
-
"puppeteer": {
|
|
113
|
-
"optional": true
|
|
114
|
-
},
|
|
115
|
-
"cypress": {
|
|
116
|
-
"optional": true
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"devDependencies": {
|
|
120
|
-
"@arethetypeswrong/cli": "^0.18.5",
|
|
121
|
-
"@types/node": "^26.6.11",
|
|
122
|
-
"c8": "^12.0.0",
|
|
123
|
-
"esbuild": "^0.28.2",
|
|
124
|
-
"publint": "^0.3.25",
|
|
125
|
-
"typescript": "^7.0.2"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "req-race",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Automated stale-fetch race condition, out-of-order response chaos, timeout, and double-submit mutation tester for browsers, Playwright, Puppeteer, Cypress, and CI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/cjs/index.cjs",
|
|
8
|
+
"module": "./dist/esm/index.js",
|
|
9
|
+
"types": "./dist/types/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/types/index.d.ts",
|
|
14
|
+
"default": "./dist/esm/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/types/index.d.cts",
|
|
18
|
+
"default": "./dist/cjs/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"./playwright": {
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/types/playwright.d.ts",
|
|
24
|
+
"default": "./dist/esm/playwright.js"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/types/playwright.d.cts",
|
|
28
|
+
"default": "./dist/cjs/playwright.cjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"./puppeteer": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/types/puppeteer.d.ts",
|
|
34
|
+
"default": "./dist/esm/puppeteer.js"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/types/puppeteer.d.cts",
|
|
38
|
+
"default": "./dist/cjs/puppeteer.cjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./cypress": {
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/types/cypress.d.ts",
|
|
44
|
+
"default": "./dist/esm/cypress.js"
|
|
45
|
+
},
|
|
46
|
+
"require": {
|
|
47
|
+
"types": "./dist/types/cypress.d.cts",
|
|
48
|
+
"default": "./dist/cjs/cypress.cjs"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"./browser": {
|
|
52
|
+
"import": {
|
|
53
|
+
"types": "./dist/types/browser.d.ts",
|
|
54
|
+
"default": "./dist/esm/browser.js"
|
|
55
|
+
},
|
|
56
|
+
"require": {
|
|
57
|
+
"types": "./dist/types/browser.d.cts",
|
|
58
|
+
"default": "./dist/cjs/browser.cjs"
|
|
59
|
+
},
|
|
60
|
+
"default": "./dist/browser/req-race.global.js"
|
|
61
|
+
},
|
|
62
|
+
"./config.schema.json": "./config.schema.json",
|
|
63
|
+
"./package.json": "./package.json"
|
|
64
|
+
},
|
|
65
|
+
"bin": {
|
|
66
|
+
"req-race": "bin/req-race.js"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"bin",
|
|
70
|
+
"dist",
|
|
71
|
+
"config.schema.json",
|
|
72
|
+
"README.md",
|
|
73
|
+
"docs",
|
|
74
|
+
"CHANGELOG.md",
|
|
75
|
+
"LICENSE"
|
|
76
|
+
],
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "node scripts/build.mjs",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"test": "node --test test/*.test.js",
|
|
81
|
+
"test:coverage": "npx c8 --lines 100 --branches 100 --functions 100 --statements 100 node --test test/*.test.js",
|
|
82
|
+
"check:pkg": "npx publint --strict && npx attw --pack . --ignore-rules no-resolution",
|
|
83
|
+
"prepublishOnly": "npm run build && npm run typecheck && npm test"
|
|
84
|
+
},
|
|
85
|
+
"keywords": [
|
|
86
|
+
"fetch",
|
|
87
|
+
"race-condition",
|
|
88
|
+
"stale-fetch",
|
|
89
|
+
"abortcontroller",
|
|
90
|
+
"double-submit",
|
|
91
|
+
"chaos-testing",
|
|
92
|
+
"playwright",
|
|
93
|
+
"puppeteer",
|
|
94
|
+
"cypress",
|
|
95
|
+
"testing",
|
|
96
|
+
"cli"
|
|
97
|
+
],
|
|
98
|
+
"author": "Prince Bhut",
|
|
99
|
+
"license": "MIT",
|
|
100
|
+
"engines": {
|
|
101
|
+
"node": ">=18.0.0"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"playwright": ">=1.40.0",
|
|
105
|
+
"puppeteer": ">=21.0.0",
|
|
106
|
+
"cypress": ">=12.0.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependenciesMeta": {
|
|
109
|
+
"playwright": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"puppeteer": {
|
|
113
|
+
"optional": true
|
|
114
|
+
},
|
|
115
|
+
"cypress": {
|
|
116
|
+
"optional": true
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"devDependencies": {
|
|
120
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
121
|
+
"@types/node": "^26.6.11",
|
|
122
|
+
"c8": "^12.0.0",
|
|
123
|
+
"esbuild": "^0.28.2",
|
|
124
|
+
"publint": "^0.3.25",
|
|
125
|
+
"typescript": "^7.0.2"
|
|
126
|
+
}
|
|
127
|
+
}
|