Commit 68436c2
refactor: make detector implementation details internal (#1694)
* Make data model/contract classes internal in Detectors project
Change public to internal for deserialization model classes that are
implementation details across multiple detector ecosystems: conan,
pnpm, swiftpm, vcpkg, rust (CargoLock, CargoToml, CargoSbom), poetry,
yarn (Berry contracts, TypeConverter), npm (converters), pip
(PipReportGraphNode, PythonVersion), and uv model classes.
Types exposed through public interfaces/APIs are left public to
maintain build compatibility.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: make detector implementation details internal
Make ~80 classes internal in the Detectors project:
- Data model/contract classes (ConanLock, PnpmYaml variants, PoetryLock,
SwiftResolvedFile, VcpkgSBOM, CargoToml/Sbom, YarnBerry types, npm
converters, PipReportGraphNode, PythonVersion, UvLock/Package, etc.)
- Parser implementations (GoModParser, YarnLockParser, RustCargoLockParser,
MavenStyleDependencyGraphParserService, PnpmParsingUtilities, etc.)
- Concrete detector classes (NpmComponentDetector, NuGetComponentDetector,
GoComponentDetector, RustSbomDetector, etc.)
- Linux scanner internals (LinuxScanner, all component factories, filters)
- Service implementations (MavenCommandService, PythonCommandService,
PyPiClient, PipCommandService, YarnLockFileFactory, etc.)
Kept public (used by downstream consumers):
- All interfaces (IComponentDetector, IMavenCommandService, etc.)
- MvnCliComponentDetector, MavenWithFallbackDetector (used in is-checks)
- PipComponentDetector, SimplePipComponentDetector, PipReportComponentDetector
(mocked in tests by component-detection-internal)
Updated test classes to work with internal types via InternalsVisibleTo.
Part of #455
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0da4e34 commit 68436c2
File tree
121 files changed
+457
-406
lines changed- src/Microsoft.ComponentDetection.Detectors
- cocoapods
- conan
- Contracts
- conda
- dockerfile
- dotnet
- go
- Parsers
- gradle
- ivy
- linux
- Factories
- Filters
- maven
- npm
- Contracts
- nuget
- pip
- Contracts
- pnpm
- Contracts
- V6
- V9
- ParsingUtilities
- poetry
- Contracts
- ruby
- rust
- Contracts
- Parsers
- spdx
- swiftpm
- Contracts
- uv
- vcpkg
- Contracts
- yarn
- Contracts
- Parsers
- test
- Microsoft.ComponentDetection.Detectors.Tests
- nuget
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
121 files changed
+457
-406
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments