use of com.synopsys.integration.detectable.detectables.pnpm.lockfile.PnpmLockExtractor in project synopsys-detect by blackducksoftware.
the class DetectableFactory method createPnpmLockDetectable.
public PnpmLockDetectable createPnpmLockDetectable(DetectableEnvironment environment, PnpmLockOptions pnpmLockOptions) {
PnpmYamlTransformer pnpmYamlTransformer = new PnpmYamlTransformer(pnpmLockOptions.getDependencyTypeFilter());
PnpmLockYamlParser pnpmLockYamlParser = new PnpmLockYamlParser(pnpmYamlTransformer);
PnpmLockExtractor pnpmLockExtractor = new PnpmLockExtractor(pnpmLockYamlParser, packageJsonFiles());
return new PnpmLockDetectable(environment, fileFinder, pnpmLockExtractor, packageJsonFiles());
}
use of com.synopsys.integration.detectable.detectables.pnpm.lockfile.PnpmLockExtractor in project synopsys-detect by blackducksoftware.
the class PnpmLockExtractorTest method testNoFailureOnNullPackageJson.
@Test
public void testNoFailureOnNullPackageJson() {
PackageJsonFiles packageJsonFiles = new PackageJsonFiles(new PackageJsonReader(new Gson()));
EnumListFilter<PnpmDependencyType> dependencyTypeFilter = EnumListFilter.fromExcluded(PnpmDependencyType.APP);
PnpmLockExtractor extractor = new PnpmLockExtractor(new PnpmLockYamlParser(new PnpmYamlTransformer(dependencyTypeFilter)), packageJsonFiles);
File pnpmLockYaml = FunctionalTestFiles.asFile("/pnpm/pnpm-lock.yaml");
Extraction extraction = extractor.extract(pnpmLockYaml, null, new PnpmLinkedPackageResolver(new File(""), packageJsonFiles));
Assertions.assertTrue(extraction.isSuccess());
}
Aggregations