Class Npm

  • All Implemented Interfaces:
    org.ossreviewtoolkit.utils.common.CommandLineTool

    
    public class Npm
    extends PackageManager implements CommandLineTool
                        

    The 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 class Npm.Factory
    • Constructor Summary

      Constructors 
      Constructor Description
      Npm(String name, File analysisRoot, AnalyzerConfiguration analyzerConfig, RepositoryConfiguration repoConfig)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String command(File workingDir)
      RangesList getVersionRequirement()
      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