From 74ca31291605e14eaaee3ea8d4f8562cfb5f6fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Mon, 16 Jan 2023 16:19:28 +0100 Subject: [PATCH] fix(core): fix broken lines and columns import (#14394) (cherry picked from commit a70eec8e404722a15f9d8ce5258be77759a7cd5c) --- 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}`,