diff --git a/src/utils/find-line-in-file.js b/src/utils/find-line-in-file.js index fd1896e2..44065278 100644 --- a/src/utils/find-line-in-file.js +++ b/src/utils/find-line-in-file.js @@ -8,7 +8,7 @@ export default function findLineInFile(packageJsonContent, jsonKey, needle) { return null; } - // lines[0] does contain every line preceding the wanted package. Let's count the "newline" character + // lines[1] does contain every line preceding the wanted package. Let's count the "newline" character const newlineMatch = lines[1].match(/\n/gm); // if there is not match, we are probably on a single-line JSON file: everything is on the first line