Skip to content

definition-parser should mention which index.d.ts failed to parse #727

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Continuing #179: if the call is in combineDataForALlTypesVersions, parseHeaderOrFail just logs index.d.ts. It'd be useful to also mention the typingsPackageName.

DefinitelyTyped/DefinitelyTyped#66535 -> https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6053892788/job/16430304132?pr=66535:

Parsing in 2 child process(es)...
Error: At 4:0 in index.d.ts: Expected one of
	/(, )|(,?\r?\n\/\/\s\s+)/
	/\r?\n\/\/ Definitions: [^\r\n]+/
    at parseHeaderOrFail (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/header-parser/src/index.ts:56:11)
    at combineDataForAllTypesVersions (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser.ts:230:24)
    at getTypingInfo (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser.ts:76:[15](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6053892788/job/16430304132?pr=66535#step:7:16))
    at /home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser-worker.ts:[18](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6053892788/job/16430304132?pr=66535#step:7:19):41
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions