Skip to content

Commit

Permalink
Implemented Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Octaviusss committed Jan 8, 2025
1 parent 928343d commit ed2ba7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion extractor/filesystem/language/dotnet/depsjson/depsjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]
return packages, err
}

// DepsJSON represents the structure of the deps.json file.
type DepsJSON struct {
// Note: Libraries does not include transitive dependencies.
// Targets is not currently extracted because it introduces significant
// complexity and is not always necessary for basic dependency analysis.
Libraries map[string]struct {
Version string `json:"version"`
Type string `json:"type"` // Represents the package type, if present.
// Type represents the package type, if present. Examples of types include:
// - "package": Indicates a standard NuGet package dependency.
// - "project": Represents a project-level dependency, such as the main application or a locally developed library.
Type string `json:"type"`
} `json:"libraries"`
}

Expand Down
11 changes: 7 additions & 4 deletions extractor/filesystem/language/dotnet/depsjson/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

package depsjson

// Metadata holds parsing information for a depsjson package.
// Metadata holds parsing information for a deps.json package.
type Metadata struct {
PackageName string
PackageVersion string
Type string
PackageName string // The name of the package.
PackageVersion string // The version of the package.
// Type indicates the type of the package. Examples include:
// - "package": Represents an external dependency, such as a NuGet package.
// - "project": Represents an internal dependency, such as the main application
Type string
}

0 comments on commit ed2ba7b

Please sign in to comment.