-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node): Add logic for combining single sentence issues lines
When not combining lines, trim them to normalize output from different NPM versions which sometimes has trailing whitespaces. Resolves #7071. Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information
1 parent
1b5a925
commit 811daef
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5193,13 +5193,13 @@ issues: | |
severity: "HINT" | ||
- timestamp: "1970-01-01T00:00:00Z" | ||
source: "NPM" | ||
message: "skipping integrity check for git dependency ssh://[email protected]/jonschlinkert/gulp-format-md.git " | ||
message: "skipping integrity check for git dependency ssh://[email protected]/jonschlinkert/gulp-format-md.git" | ||
severity: "HINT" | ||
- timestamp: "1970-01-01T00:00:00Z" | ||
source: "NPM" | ||
message: "skipping integrity check for git dependency ssh://[email protected]/mochajs/mocha.git " | ||
message: "skipping integrity check for git dependency ssh://[email protected]/mochajs/mocha.git" | ||
severity: "HINT" | ||
- timestamp: "1970-01-01T00:00:00Z" | ||
source: "NPM" | ||
message: "skipping integrity check for git dependency ssh://[email protected]/tinydesk/angular-tileview.git " | ||
message: "skipping integrity check for git dependency ssh://[email protected]/tinydesk/angular-tileview.git" | ||
severity: "HINT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,5 +115,25 @@ class NpmTest : WordSpec({ | |
"deprecated [email protected]: CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)" | ||
) | ||
} | ||
|
||
"treat a single block of errors as one issue" { | ||
val output = """ | ||
npm ERR! code EEXIST | ||
npm ERR! syscall mkdir | ||
npm ERR! path G:\Git\lsp-sample\node_modules.staging | ||
npm ERR! errno -4075 | ||
npm ERR! EEXIST: file already exists, mkdir 'G:\Git\lsp-sample\node_modules.staging' | ||
npm ERR! File exists: G:\Git\lsp-sample\node_modules.staging | ||
npm ERR! Remove the existing file and try again, or run npm | ||
npm ERR! with --force to overwrite files recklessly. | ||
""".trimIndent() | ||
|
||
output.lines().groupLines("npm ERR! ") shouldBe listOf( | ||
"EEXIST: file already exists, mkdir 'G:\\Git\\lsp-sample\\node_modules.staging' " + | ||
"File exists: G:\\Git\\lsp-sample\\node_modules.staging " + | ||
"Remove the existing file and try again, or run npm " + | ||
"with --force to overwrite files recklessly." | ||
) | ||
} | ||
} | ||
}) |