diff --git a/lib/index.js b/lib/index.js index 53b604c..d9234c4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -6,7 +6,6 @@ * @typedef {import('./parse-argv.js').State} State */ -import assert from 'node:assert/strict' import process from 'node:process' import stream from 'node:stream' import {fileURLToPath} from 'node:url' @@ -144,10 +143,14 @@ export function args(options) { ? fileURLToPath(state.engine.cwd) : state.engine.cwd - assert(typeof cwd === 'string', '`cwd` is defined') - watcher = chokidar - .watch(urls, {cwd, ignoreInitial: true}) + .watch( + urls, + // @ts-expect-error: chokidar types are wrong w/ + // `exactOptionalPropertyTypes`, + // `cwd` can be `undefined`. + {cwd, ignoreInitial: true} + ) .on('error', done) .on('change', function (filePath) { state.engine.files = [filePath]