mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
## Summary 1. Show all packages owned by a specific team ``` node scripts/dependency_ownership -o <owner> ``` 2. Identify owners of a specific dependency ``` node scripts/dependency_ownership -d <dependency> ``` 3. List dependencies without an owner ``` node scripts/dependency_ownership --missing-owner ``` 4. Generate a full dependency ownership report ``` node scripts/dependency_ownership ``` ### Checklist - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) __Closes: https://github.com/elastic/kibana/issues/196767__ --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
3.3 KiB
3.3 KiB
@kbn/dependency-ownership
A CLI tool for analyzing package ownership.
Table of Contents
- Show all packages owned by a specific team
- Show who owns specific dependency
- List all dependencies with without owner
- Generate dependency ownership report
1. Show all packages owned by a specific team
Use this command to list all packages or plugins within a directory that use a specified dependency.
node scripts/dependency_ownership -o <owner>
or
node scripts/dependency_ownership --owner <owner>
Example:
node scripts/dependency_ownership -o @elastic/kibana-core
-o @elastic/kibana-core
: Specifies the team.
Output: Lists dev and prod dependencies.
{
"prodDependencies": [
"<dependency_1>",
"<dependency_2>",
"<dependency_3>",
//...
],
"devDependencies": [
"<dependency_1>",
"<dependency_2>",
//...
]
}
2. Show who owns specific dependency
Get the owner for a specific dependency.
node scripts/dependency_ownership -d <dependency>
or
node scripts/dependency_ownership --dependency <dependency>
Example:
node scripts/dependency_ownership -d rxjs
-d rxjs
: Specifies the dependency.
Output: Lists owners for rxjs
.
[
"@elastic/kibana-core"
]
3. List all dependencies with without owner
To display all dependencies that do not have owner defined.
node scripts/dependency_ownership --missing-owner
Example:
node scripts/dependency_ownership --missing-owner
Output: Lists all dev and prod dependencies without owner.
{
"prodDependencies": [
"<dependency_1>",
"<dependency_2>",
//...
],
"devDependencies": [
"<dependency_1>",
"<dependency_2>",
//...
]
}
4. Generate dependency ownership report
Generates a comprehensive report with all dependencies with and without owner.
node scripts/dependency_ownership --missing-owner
Example:
node scripts/dependency_ownership --missing-owner
Output: Lists all covered dev and prod dependencies, uncovered dev and prod dependencies, dependencies aggregated by owner.
{
"coveredProdDependencies": [ // Prod dependencies with owner
"<dependency_1>",
"<dependency_2>",
//...
],
"coveredDevDependencies": [ // Dev dependencies with owner
"<dependency_1>",
"<dependency_2>",
//...
],
"uncoveredProdDependencies": [ // Prod dependencies without owner
"<dependency_1>",
"<dependency_2>",
//...
],
"uncoveredDevDependencies": [ // Dev dependencies without owner
"<dependency_1>",
"<dependency_2>",
//...
],
"prodDependenciesByOwner": { // Prod dependencies aggregated by owner
"@elastic/team_1": ["<dependency_1>"],
"@elastic/team_2": ["<dependency_1>"],
},
"devDependenciesByOwner": { // Dev dependencies aggregated by owner
"@elastic/team_1": ["<dependency_1>"],
"@elastic/team_2": ["<dependency_1>"],
},
}
For further information on additional flags and options, refer to the script's help command.