Skip to content

Commit

Permalink
refactor(node)!: Move Yarn into its own dedicated directory
Browse files Browse the repository at this point in the history
Align with `pnpm` and `yarn2`.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed Nov 6, 2024
1 parent f566a2d commit 5e1d04e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.plugins.packagemanagers.node
package org.ossreviewtoolkit.plugins.packagemanagers.node.yarn

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.should
Expand Down
1 change: 1 addition & 0 deletions plugins/package-managers/node/src/main/kotlin/Npm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.ossreviewtoolkit.model.config.PackageManagerConfiguration
import org.ossreviewtoolkit.model.config.RepositoryConfiguration
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.NodePackageManager
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.NpmDetection
import org.ossreviewtoolkit.plugins.packagemanagers.node.yarn.Yarn
import org.ossreviewtoolkit.utils.common.Os
import org.ossreviewtoolkit.utils.common.ProcessCapture
import org.ossreviewtoolkit.utils.common.withoutPrefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.plugins.packagemanagers.node
package org.ossreviewtoolkit.plugins.packagemanagers.node.yarn

import java.io.File
import java.lang.invoke.MethodHandles
Expand Down Expand Up @@ -50,10 +50,11 @@ import org.ossreviewtoolkit.model.config.RepositoryConfiguration
import org.ossreviewtoolkit.model.createAndLogIssue
import org.ossreviewtoolkit.model.readTree
import org.ossreviewtoolkit.model.utils.DependencyGraphBuilder
import org.ossreviewtoolkit.plugins.packagemanagers.node.PackageJson
import org.ossreviewtoolkit.plugins.packagemanagers.node.groupLines
import org.ossreviewtoolkit.plugins.packagemanagers.node.parsePackageJson
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.NodePackageManager
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.NpmDetection
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.NpmModuleInfo
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.YarnDependencyHandler
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.parseProject
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.splitNpmNamespaceAndName
import org.ossreviewtoolkit.utils.common.CommandLineTool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.plugins.packagemanagers.node.utils
package org.ossreviewtoolkit.plugins.packagemanagers.node.yarn

import java.io.File

Expand All @@ -27,7 +27,7 @@ import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.PackageLinkage
import org.ossreviewtoolkit.model.Project
import org.ossreviewtoolkit.model.utils.DependencyHandler
import org.ossreviewtoolkit.plugins.packagemanagers.node.Yarn
import org.ossreviewtoolkit.plugins.packagemanagers.node.utils.parsePackage

/**
* A data class storing information about a specific NPM module and its dependencies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.ossreviewtoolkit.plugins.packagemanagers.node.Npm$Factory
org.ossreviewtoolkit.plugins.packagemanagers.node.pnpm.Pnpm$Factory
org.ossreviewtoolkit.plugins.packagemanagers.node.Yarn$Factory
org.ossreviewtoolkit.plugins.packagemanagers.node.yarn.Yarn$Factory
org.ossreviewtoolkit.plugins.packagemanagers.node.yarn2.Yarn2$Factory
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import org.ossreviewtoolkit.model.PackageLinkage
import org.ossreviewtoolkit.model.config.AnalyzerConfiguration
import org.ossreviewtoolkit.model.config.RepositoryConfiguration
import org.ossreviewtoolkit.plugins.packagemanagers.node.Npm
import org.ossreviewtoolkit.plugins.packagemanagers.node.yarn.NpmModuleInfo
import org.ossreviewtoolkit.plugins.packagemanagers.node.yarn.YarnDependencyHandler
import org.ossreviewtoolkit.utils.test.USER_DIR

class NpmDependencyHandlerTest : StringSpec({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.plugins.packagemanagers.node
package org.ossreviewtoolkit.plugins.packagemanagers.node.yarn

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.nulls.beNull
Expand Down

0 comments on commit 5e1d04e

Please sign in to comment.