From 0cb318c1f939acf6435b2d5b37987d03eb864f84 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Fri, 26 Jan 2024 09:58:12 +0100 Subject: [PATCH] refactor(npm): Stop creating analyzer issues for deprecation warnings Using analyzer issues for deprecation warnings seems inappropriate. The concern of the analyzer is to create a correct dependency tree. If that construction is successful there should be no issues. Signed-off-by: Frank Viernau --- .../synthetic/npm-expected-output.yml | 5 --- .../npm-version-urls-expected-output.yml | 42 ------------------- .../node/src/main/kotlin/Npm.kt | 4 +- 3 files changed, 2 insertions(+), 49 deletions(-) diff --git a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-expected-output.yml b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-expected-output.yml index 98bc321eab832..f44e21055e344 100644 --- a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-expected-output.yml +++ b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-expected-output.yml @@ -1193,8 +1193,3 @@ issues: \ supplemental metadata must be fetched from the registry. This is a one-time\ \ fix-up, please be patient..." severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to \"coffeescript\"\ - \ (no hyphen)" - severity: "WARNING" diff --git a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml index d02ca34e80a2e..b1c72f9933fe6 100644 --- a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml +++ b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml @@ -5149,48 +5149,6 @@ packages: revision: "37816c0e2e25da2901d584442235946d5cd8c80d" path: "" issues: -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated gulp-header@1.8.12: Removed event-stream from gulp-header" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported.\ - \ Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises\ - \ in 1.x.)" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated" - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated" - severity: "WARNING" - timestamp: "1970-01-01T00:00:00Z" source: "NPM" message: "skipping integrity check for git dependency ssh://git@github.com/jonschlinkert/gulp-format-md.git " diff --git a/plugins/package-managers/node/src/main/kotlin/Npm.kt b/plugins/package-managers/node/src/main/kotlin/Npm.kt index 7dc2ef26d0dff..75fd2349a0347 100644 --- a/plugins/package-managers/node/src/main/kotlin/Npm.kt +++ b/plugins/package-managers/node/src/main/kotlin/Npm.kt @@ -634,8 +634,8 @@ private fun nodeModulesDirForPackageJson(packageJson: File): File? { } private fun List.groupLines(marker: String): List { - val ignorableLinePrefixes = setOf("code ", "errno ", "path ", "syscall ") - val singleLinePrefixes = setOf("deprecated ", "skipping integrity check for git dependency ") + val ignorableLinePrefixes = setOf("code ", "deprecated ", "errno ", "path ", "syscall ") + val singleLinePrefixes = setOf("skipping integrity check for git dependency ") val minCommonPrefixLength = 5 val issueLines = mapNotNull { line ->