Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file.

## [1.5.0] - 2026-07-04

### Changed

- **Remove `monocart-coverage-reports` dependency** — The CDP client is now implemented directly in `src/collector/cdp-client.ts` using Node.js 22's built-in `WebSocket` global, eliminating a large transitive dependency. The public API is unchanged.

- **Bump `engines.node` to `>=22.0.0`** — Required for the native `WebSocket` global used by the new CDP client.

- **Disable worker threads on Windows by default** — Worker threads are now automatically set to 0 on Windows (`process.platform === 'win32'`) to avoid a `STATUS_OBJECT_NAME_NOT_FOUND` (0xC0000034) crash caused by Rollup's native Rust binary (`@rollup/rollup-win32-x64-msvc`) failing to initialise in worker thread context. Processing falls back to single-threaded mode via the existing `runTaskDirect` path. Override with `NEXTCOV_WORKERS=<n>` or the `workers` fixture option if needed.

## [1.4.3] - 2026-06-30

### Added
Expand Down
99 changes: 2 additions & 97 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextcov",
"version": "1.4.3",
"version": "1.5.0",
"description": "Collect test coverage for Playwright E2E tests in Next.js applications",
"author": "Steve Zhang",
"license": "MIT",
Expand Down Expand Up @@ -49,7 +49,7 @@
"vitest"
],
"engines": {
"node": ">=20.19.0"
"node": ">=22.0.0"
},
"peerDependencies": {
"@playwright/test": "^1.40.0"
Expand All @@ -68,7 +68,6 @@
"istanbul-lib-report": "^3.0.1",
"istanbul-lib-source-maps": "^5.0.0",
"istanbul-reports": "^3.1.0",
"monocart-coverage-reports": "^2.12.12",
"vite": "^8.1.2"
},
"devDependencies": {
Expand Down
18 changes: 13 additions & 5 deletions src/__tests__/worker-pool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,26 @@ describe('worker-pool', () => {
await terminateWorkerPool() // Reset global pool

const pool = getWorkerPool()
// Should fall back to auto-detection (min 2, max 8)
expect(pool.poolSize).toBeGreaterThanOrEqual(2)
expect(pool.poolSize).toBeLessThanOrEqual(8)
// Should fall back to auto-detection (min 2, max 8 on non-Windows; 0 on Windows)
if (process.platform === 'win32') {
expect(pool.poolSize).toBe(0)
} else {
expect(pool.poolSize).toBeGreaterThanOrEqual(2)
expect(pool.poolSize).toBeLessThanOrEqual(8)
}
})

it('should ignore negative NEXTCOV_WORKERS values', async () => {
process.env.NEXTCOV_WORKERS = '-1'
await terminateWorkerPool() // Reset global pool

const pool = getWorkerPool()
// Should fall back to auto-detection
expect(pool.poolSize).toBeGreaterThanOrEqual(2)
// Should fall back to auto-detection (0 on Windows)
if (process.platform === 'win32') {
expect(pool.poolSize).toBe(0)
} else {
expect(pool.poolSize).toBeGreaterThanOrEqual(2)
}
})
})
})
2 changes: 1 addition & 1 deletion src/cli/commands/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function stripCoverageDirectives(coverageJson: Record<string, FileCoverag

for (const [file, data] of Object.entries(coverageJson)) {
// Read source file to check line content
let lines: string[] = []
let lines: string[]
try {
lines = readFileSync(file, 'utf-8').split('\n')
} catch {
Expand Down
Loading
Loading