File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
plugins/package-managers/node/src/main/kotlin Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ import org.ossreviewtoolkit.model.config.AnalyzerConfiguration
3535import org.ossreviewtoolkit.model.utils.DependencyGraphBuilder
3636import org.ossreviewtoolkit.utils.common.realFile
3737
38+ const val NPM_RUNTIME_CONFIGURATION_FILENAME = " .npmrc"
39+
3840abstract class NodePackageManager (val managerType : NodePackageManagerType ) : PackageManager(managerType.projectType) {
3941 internal abstract val graphBuilder: DependencyGraphBuilder <* >
4042
@@ -74,6 +76,21 @@ abstract class NodePackageManager(val managerType: NodePackageManagerType) : Pac
7476 )
7577 }
7678
79+ override fun beforeResolution (
80+ analysisRoot : File ,
81+ definitionFiles : List <File >,
82+ analyzerConfig : AnalyzerConfiguration
83+ ) {
84+ super .beforeResolution(analysisRoot, definitionFiles, analyzerConfig)
85+
86+ definitionFiles.forEach {
87+ val npmrc = it.resolveSibling(NPM_RUNTIME_CONFIGURATION_FILENAME )
88+ if (npmrc.isFile) {
89+ logger.info { " There is a project-specific runtime configuration file at '${npmrc.absolutePath} '." }
90+ }
91+ }
92+ }
93+
7794 override fun mapDefinitionFiles (
7895 analysisRoot : File ,
7996 definitionFiles : List <File >,
You can’t perform that action at this time.
0 commit comments