detect_new_library Pro
Detects newly added direct dependencies in PR-changed pubspec.yaml files. Adds the detect-new-library command to the base monorepo_toolkit.
Version: 1.0.0
Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| appName | string | MyApp | The name of your application |
| isForMonorepo | boolean | true | Whether this is being generated as part of a monorepo |
Usage
Interactive
bash
archipelago generate detect_new_libraryNon-interactive (CI)
bash
archipelago generate detect_new_library --config my_config.jsonConfig Template
json
{
"@appName": "The name of your application",
"appName": "MyApp",
"@isForMonorepo": "Whether this is being generated as part of a monorepo",
"isForMonorepo": true
}Generated Structure
devtools/
└── scripts/
└── detect_new_library/
├── lib/
│ ├── detect_new_library.dart
│ └── src/
│ ├── commands/
│ │ ├── check_command.dart
│ │ └── detect_new_library_command.dart
│ ├── models/
│ │ └── new_library_config.dart
│ └── services/
│ └── detect_new_library_service.dart
└── pubspec.yaml
.newlibrary.yamlThe post_gen hook registers the detect-new-library command in monorepo_toolkit's command runner and adds the .newlibrary.yaml config file at the workspace root with fail_on_new: false as the default.