dependency_scanner 1.0.2

  • Readme
  • Changelog
  • Installing
  • new47

dependency_scanner #

Dart Dependency Scanner: scans workspace directory for Dart projects and runs batch commands over them.

Commands #

pub_get #

  • pub get in all workspace dart projects:

      $> depscan /path/to/your/workspace_dir pub_get all
    
  • pub get in specific projects

      $> depscan /path/to/your/workspace_dir pub_get projects1 projects2 extra_project
    

upgrade_dependency #

  • Upgrade a specific dependency in all projects

      $> depscan /path/to/your/workspace_dir upgrade_dependency swiss_knife
    
    • All projects with the dependency swiss_knife where upgraded to the last published version.
  • Upgrade a specific dependency to a specific version in all projects

      $> depscan /path/to/your/workspace_dir upgrade_dependency swiss_knife:2.3.7
    
    • All projects with the dependency swiss_knife where upgraded to version 2.3.7

local_path #

  • Change a specific dependency to local workspace path:

      $> depscan /path/to/your/workspace_dir local_path swiss_knife
    
    • All projects with the dependency swiss_knife where referencing to '../swiss_knife' (if found in the same workspace).
  • Change all dependencies to local workspace path:

      $> depscan /path/to/your/workspace_dir local_path all
    
    • All projects with any dependency also present in the workspace will point to a local path.

rollback_local_path #

  • Rollback a specific local dependency to local hosted version:

      $> depscan /path/to/your/workspace_dir rollback_local_path swiss_knife
    
    • All projects with local dependency swiss_knife will point to commented hosted version.
  • Rollback all local dependencies to commented hosted versions:

      $> depscan /path/to/your/workspace_dir rollback_local_path all
    
    • All projects with any local dependency project will reference to hosted versions (using commented versions by 'local_path' command).

Git #

Only projects with git will be changed as a safety measure. Git allows rollback of any change and control history of your files.

Common usage #

Upgrade and resolve a dependency in all your projects:

$> depscan /path/to/your/workspace_dir upgrade_dependency swiss_knife
$> depscan /path/to/your/workspace_dir pub_get all

Point dependencies to your local workspace projects:

$> depscan /path/to/your/workspace_dir local_path all
$> depscan /path/to/your/workspace_dir pub_get all

Rollback local dependencies to hosted versions:

$> depscan /path/to/your/workspace_dir rollback_local_path all
$> depscan /path/to/your/workspace_dir pub_get all

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Author #

Graciliano M. Passos: gmpassos@GitHub.

License #

Dart free & open-source license.

1.0.2 #

  • add auto confirm response: yes all

1.0.1 #

  • swiss_knife: ^2.3.9

1.0.0 #

  • Initial version, created by Stagehand

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate dependency_scanner

2. Use it

The package has the following executables:


$ depscan

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dependency_scanner: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dependency_scanner/dependency_scanner.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
88
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

We analyzed this package on Mar 26, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/dependency_scanner.dart. (-1.99 points)

Analysis of lib/dependency_scanner.dart reported 4 hints:

line 175 col 16: This function has a return type of 'Future

line 503 col 17: The value of the local variable 'g3_3' isn't used.

line 508 col 37: Dead code.

line 792 col 10: The declaration '_pathReference_toString' isn't referenced.

Fix bin/depscan.dart. (-0.50 points)

Analysis of bin/depscan.dart reported 1 hint:

line 5 col 8: Unused import: 'package:path/path.dart'.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and dependency_scanner.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
path ^1.6.4 1.6.4
pub_client ^3.0.3 3.0.3
pub_semver ^1.4.3 1.4.4
pubspec ^0.1.4 0.1.4
swiss_knife ^2.3.9 2.3.9
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.12
http 0.12.0+4
http_parser 3.1.4
intl 0.16.1
json_annotation 2.4.0 3.0.1
matcher 0.12.6
meta 1.1.8
quiver 2.1.3
resource_portable 2.1.7
source_span 1.7.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5
yaml 2.2.0
Dev dependencies
pedantic ^1.8.0 1.9.0
test ^1.6.0