deps_analyzer 0.2.0 copy "deps_analyzer: ^0.2.0" to clipboard
deps_analyzer: ^0.2.0 copied to clipboard

A tool to fetch and manage Flutter/Dart package dependencies and their versions by scanning pubspec.yaml files.

Dependencies Analyzer #

deps_analyzer is a powerful command-line tool designed to manage Flutter/Dart package dependencies by scanning pubspec.yaml files in your project directories. It helps you keep track of your dependencies and ensures they are up-to-date by fetching the latest versions from pub.dev.

Features #

  • Automatic Scanning: Recursively scans all directories for pubspec.yaml files.
  • Version Fetching: Retrieves the latest versions of dependencies from pub.dev.
  • Customizable Options: Skip specific packages or paths and choose output formats via CLI arguments.
  • Comprehensive Reports: Generates a deps_list.txt , deps_list.csv and deps_list.json files listing all dependencies and their versions. CLI Options -f, --format: Specify output formats (e.g., json, csv, text). Multiple formats can be specified. -s, --skip-packages: Specify package names to skip during processing. -i, --ignore-paths: Specify path names to skip during processing. -h, --help: Display usage information.

Installation #

Global Activation #

Install it #

You can install the package from the command line:

dart pub global activate deps_analyzer
copied to clipboard

Use it #

The package has the following executables:

analyze_deps
copied to clipboard

OR #

Use this as a dependency #

Step 1: Add to pubspec.yaml #

dev_dependencies:
  deps_analyzer: ^0.1.1
copied to clipboard

Step 2: Add to pubspec.yaml #

dart run deps_analyzer:deps_list
copied to clipboard

Why Use deps_analyzer? #

In any software project, managing dependencies is crucial to ensure that your application remains up-to-date, secure, and maintainable. deps_analyzer is a Dart CLI tool designed to simplify and streamline the process of analyzing and managing dependencies in Dart and Flutter projects. Here’s how deps_analyzer can add value to your workflow:

  1. Comprehensive Dependency Analysis:

    • deps_analyzer scans all pubspec.yaml files within your project to gather a complete list of dependencies. This provides a holistic view of all the libraries your project relies on.
  2. Latest Version Checks:

    • The tool fetches the latest versions of all dependencies from pub.dev, allowing you to see at a glance which dependencies are outdated. Keeping dependencies up-to-date can help in leveraging the latest features, improvements, and security patches.
  3. Multiple Output Formats:

    • deps_analyzer generates reports in CSV, JSON, and text formats. This flexibility allows you to integrate the analysis results into various parts of your development workflow, whether it's for automated scripts, documentation, or manual review.
  4. Improved Project Maintenance:

    • By regularly using deps_analyzer, you can maintain a clean and updated project dependency tree, which reduces the risk of compatibility issues and technical debt. It also aids in preparing for major upgrades by highlighting dependencies that may need attention.

Sample outputs #

CSV Output #

sample CSV output here.

JSON Output #

Here’s a sample JSON output:

{
  "http": {
    "current_versions": ["^0.13.3"],
    "latest_version": "0.13.4"
  },
  "path": {
    "current_versions": ["^1.8.0"],
    "latest_version": "1.8.1"
  },
  "yaml": {
    "current_versions": ["^3.1.0"],
    "latest_version": "3.1.1"
  }
}
copied to clipboard

sample JSON output here.

Text Output #

sample Text output here.

4
likes
140
points
107
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.16 - 2025.03.31

A tool to fetch and manage Flutter/Dart package dependencies and their versions by scanning pubspec.yaml files.

Homepage
View/report issues

Topics

#dependencies #analyzer #cli #pubspec #list

Documentation

API reference

License

MIT (license)

Dependencies

args, glob, http, path, yaml

More

Packages that depend on deps_analyzer