From 3dbd4eac6f60084aa640acbf2579381d17310620 Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Mon, 16 Jan 2023 15:32:41 +0100 Subject: [PATCH] fix(core): fix broken lines and columns import --- packages/nx/src/utils/json.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/utils/json.ts b/packages/nx/src/utils/json.ts index b088a2c73fa95..4c453c23a027e 100644 --- a/packages/nx/src/utils/json.ts +++ b/packages/nx/src/utils/json.ts @@ -1,6 +1,6 @@ import { parse, printParseErrorCode, stripComments } from 'jsonc-parser'; import type { ParseError, ParseOptions } from 'jsonc-parser'; -import LinesAndColumn from 'lines-and-columns'; +import { LinesAndColumns } from 'lines-and-columns'; export { stripComments as stripJsonComments }; @@ -72,7 +72,7 @@ function formatParseError( numContextLine: number ) { const { error, offset, length } = parseError; - const { line, column } = new LinesAndColumn(input).locationForIndex(offset); + const { line, column } = new LinesAndColumns(input).locationForIndex(offset); const errorLines = [ `${printParseErrorCode(error)} in JSON at ${line + 1}:${column + 1}`,