(output: string, logger?: Logger)
| 40 | */ |
| 41 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 42 | function* parseJsonLines(output: string, logger?: Logger): Generator<any> { |
| 43 | for (const line of output.split('\n')) { |
| 44 | if (!line.trim()) { |
| 45 | continue; |
| 46 | } |
| 47 | try { |
| 48 | yield JSON.parse(line); |
| 49 | } catch (e) { |
| 50 | logger?.debug(` Ignoring non-JSON line: ${e}`); |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | interface NpmListDependency { |
| 56 | version: string; |
no test coverage detected