Class Npm
-
- All Implemented Interfaces:
-
org.ossreviewtoolkit.utils.common.CommandLineTool
public class Npm extends PackageManager implements CommandLineToolThe Node package manager for JavaScript.
This package manager supports the following options:
legacyPeerDeps: If true, the "--legacy-peer-deps" flag is passed to NPM to ignore conflicts in peer dependencies which are reported since NPM 7. This allows to analyze NPM 6 projects with peer dependency conflicts. For more information see the documentation and the NPM Blog.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classNpm.Factory
-
Field Summary
Fields Modifier and Type Field Description public final static StringOPTION_LEGACY_PEER_DEPSprivate final FileanalysisRootprivate final AnalyzerConfigurationanalyzerConfigprivate final Excludesexcludesprivate final StringmanagerNameprivate final RepositoryConfigurationrepoConfig
-
Method Summary
Modifier and Type Method Description Stringcommand(File workingDir)RangesListgetVersionRequirement()List<File>mapDefinitionFiles(List<File> definitionFiles)List<ProjectAnalyzerResult>resolveDependencies(File definitionFile, Map<String, String> labels)-
Methods inherited from class org.ossreviewtoolkit.analyzer.PackageManager
findPackageManagerDependencies, getAnalysisRoot, getAnalyzerConfig, getExcludes, getManagerName, getRepoConfig, resolveDependencies -
Methods inherited from class org.ossreviewtoolkit.utils.common.CommandLineTool
checkVersion, displayName, getVersion, getVersionArguments, isInPath, run, run, transformVersion -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getVersionRequirement
RangesList getVersionRequirement()
-
mapDefinitionFiles
List<File> mapDefinitionFiles(List<File> definitionFiles)
-
-
-
-