dir(cwd?: string): string
Returns the per-cwd subdirectory that holds the daemon's info file, lockfile, and any future per-daemon state.
Why a subdirectory instead of files directly under os.tmpdir():
the client's waitForFile (see lib/commands/daemon/index.ts) calls
fs.watch(path.dirname(info())) to detect daemon-readiness.
On Windows, fs.watch on os.tmpdir() itself crashes the process with
Assertion failed: !_wcsnicmp(filename, dir, dirlen), file src\win\fs-event.c, line 72
(libuv exit code 3221226505 / STATUS_STACK_BUFFER_OVERRUN) when concurrent
tests churn the system temp root with unrelated file events whose absolute
paths don't case-insensitively start with the watched dir prefix —
reproducible on hosted windows-latest under the test (windows-latest) lane.
Giving the daemon its own small private directory keeps watch traffic to events the watcher actually cares about and sidesteps the libuv wart.
import * as Paths from './paths.ts'; Paths.dir('/home/me/app'); // '/tmp/qunitx-daemon-<12-hex>' — per-cwd private directory