diff --git a/package-lock.json b/package-lock.json index e5ff26c7..31f9e736 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "unwritten", - "version": "0.2.11", + "version": "0.2.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "unwritten", - "version": "0.2.11", + "version": "0.2.12", "license": "MIT", "dependencies": { "cac": "^6.7.14", diff --git a/package.json b/package.json index c546b4f7..e281c882 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.11", + "version": "0.2.12", "type": "module", "name": "unwritten", "description": "unwritten is a cli tool that auto generates documentation from your JavaScript or TypeScript project by utilizing TSDoc or JSDoc comments.", diff --git a/src/compiler/shared.ts b/src/compiler/shared.ts index f7aa35f6..b6a511c5 100644 --- a/src/compiler/shared.ts +++ b/src/compiler/shared.ts @@ -27,6 +27,9 @@ export function convertDiagnostics(ctx: DefaultContext, diagnostics: readonly Di column: diagnostic.file && diagnostic.start ? getColumnFromPosition(ctx, diagnostic.file, diagnostic.start) : undefined, + end: diagnostic.start && diagnostic.length + ? diagnostic.start + diagnostic.length + : undefined, line: diagnostic.file && diagnostic.start ? getLineFromPosition(ctx, diagnostic.file, diagnostic.start) : undefined, @@ -34,7 +37,8 @@ export function convertDiagnostics(ctx: DefaultContext, diagnostics: readonly Di path: diagnostic.file?.fileName, severity: diagnostic.category === ctx.dependencies.ts.DiagnosticCategory.Error ? DiagnosticSeverity.Error - : DiagnosticSeverity.Warning + : DiagnosticSeverity.Warning, + start: diagnostic.start }; }); } diff --git a/src/type-definitions/unwritten.ts b/src/type-definitions/unwritten.ts index 3b4d23b5..c6867be1 100644 --- a/src/type-definitions/unwritten.ts +++ b/src/type-definitions/unwritten.ts @@ -11,8 +11,10 @@ export interface DiagnosticMessage { message: string; severity: DiagnosticSeverity; column?: number; + end?: number; line?: number; path?: string; + start?: number; } export interface UnwrittenOutput {