jefe 1.0.1

jefe #

A library for maintaining sets of related Dart projects versioned in git, in particular managing dependencies between them.

Usage #

For now the best place to learn about Jefe is the introductory blog post.

Jefe is designed to be used both as a command (called jefe) and as source (e.g. integrating with other tools like grinder)

Installing #

pub global activate jefe

Project Lifecycle Basics #


import 'package:jefe/jefe.dart';


main() async {
  // first install the project group
  final ProjectGroup projectGroup = await ProjectGroup.install(
      new Directory('/Users/blah'), 'git@git.example');

  final executor = new CommandExecutor(projectGroup);

  // initialise it (sets it on develop branch etc)
  await executor.execute(lifecycle.init());

  // start a new feature
  // All projects will be on a feature branch called feacha,
  // will have the dependencies to other projects in this group set as
  // path dependencies, and will have pub get called
  await executor.execute(lifecycle.startNewFeature('feacha'));

  // Code something awesome

  // finish off the feature
  // All projects will have their feature branches merged to develop,
  // will have the dependencies to other projects in this group set as
  // git dependencies bashed on the current commit hash,
  // will be git pushed to their origin
  // and will have pub get called
  await executor.execute(lifecycle.completeFeature('feacha'));

  // now cut a release.
  // All the project pubspec versions will be bumped according to the release type
  // and git tagged with same version, will be merged to master
  await executor.execute(lifecycle.release(type: ReleaseType.major));
}

Generate a Production Dockerfile #


main() async {
  final executor = await executorForDirectory('/Users/blah/myfoo_root');

  await executor.execute(docker.generateProductionDockerfile(
      'my_server', 'my_client',
      outputDirectory: new Directory('/tmp'),
      dartVersion: '1.9.3',
      environment: {'MY_FOO': false},
      exposePorts: [8080, 8181, 5858],
      entryPointOptions: ["--debug:5858/0.0.0.0"]));
}


Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

1.0.0 #

  • Dart 2

0.4.0 #

  • Use relative paths in path dependencies

0.3.1 #

  • Added jefetize sub command to turn an existing directory into a jefe container directory

0.3.0 #

  • Major rewrite of internals. Should be much easier to implement new features
  • Removed featureName from jefe finish
  • Allow project names to differ from repo names
  • New command to generate Intellij vcs.xml file

0.2.10 #

  • Updated pubspec dependency

0.2.9 #

  • Bug fix. Missed case for using publish_to property when fetching versions

0.2.8 #

  • Support third party pub repos via publish_to pubspec property

0.2.7 #

  • Fix to work with normal tags (non annotated) too
  • Don't run tests if project doesn't use test package

0.2.4 #

  • added jefe test which runs pub run test on all projects that have a test dir

  • added dev_dependencies to the project dependencies that jefe manages

0.2.3 #

  • support auto update of hosted versions

0.2.2 #

  • tighter constraints for exported packages

0.2.0 #

  • support for hosted packages

0.1.0 #

  • reworked executors to simplify
  • made several commands more idempotent so that you can rerun them as needed

0.0.1 #

  • 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 jefe

2. Use it

The package has the following executables:


$ jefe

Use this package as a library

1. Depend on it

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


dependencies:
  jefe: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


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

We analyzed this package on Jul 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: other

Primary library: package:jefe/jefe.dart with components: io, isolate, mirrors.

Health suggestions

Fix lib/src/project/impl/project_lifecycle_impl.dart. (-8.63 points)

Analysis of lib/src/project/impl/project_lifecycle_impl.dart reported 18 hints, including:

line 27 col 23: Use = to separate a named parameter from its default value.

line 51 col 31: Use = to separate a named parameter from its default value.

line 56 col 28: Use = to separate a named parameter from its default value.

line 57 col 40: Use = to separate a named parameter from its default value.

line 65 col 28: Use = to separate a named parameter from its default value.

Fix bin/jefe.dart. (-7.24 points)

Analysis of bin/jefe.dart reported 15 hints, including:

line 98 col 57: Use = to separate a named parameter from its default value.

line 120 col 45: Use = to separate a named parameter from its default value.

line 146 col 30: Use = to separate a named parameter from its default value.

line 147 col 24: Use = to separate a named parameter from its default value.

line 176 col 28: Use = to separate a named parameter from its default value.

Fix lib/src/project/impl/docker_commands_impl.dart. (-7.24 points)

Analysis of lib/src/project/impl/docker_commands_impl.dart reported 15 hints, including:

line 23 col 23: Use = to separate a named parameter from its default value.

line 66 col 25: Use = to separate a named parameter from its default value.

line 67 col 39: Use = to separate a named parameter from its default value.

line 68 col 32: Use = to separate a named parameter from its default value.

line 69 col 41: Use = to separate a named parameter from its default value.

Fix additional 25 files with analysis or formatting issues. (-34.63 points)

Additional issues in the following files:

  • lib/src/project/docker_commands.dart (12 hints)
  • lib/src/project_commands/impl/project_command_executor.dart (7 hints)
  • lib/src/project/impl/pubspec_commands_impl.dart (6 hints)
  • lib/src/project/project_lifecycle.dart (6 hints)
  • lib/src/project/impl/git_feature_impl.dart (5 hints)
  • lib/src/project_commands/project_command.dart (5 hints)
  • lib/src/git/git.dart (4 hints)
  • lib/src/project/impl/multi_project_command_support.dart (4 hints)
  • lib/src/project/impl/git_commands_impl.dart (3 hints)
  • lib/src/project/impl/process_commands_impl.dart (3 hints)
  • lib/src/project/impl/intellij_commands_impl.dart (2 hints)
  • lib/src/project/impl/jefe_project_impl.dart (2 hints)
  • lib/src/project/impl/project_group_impl.dart (2 hints)
  • lib/src/project/impl/pub_commands_impl.dart (2 hints)
  • lib/src/project/pubspec_commands.dart (2 hints)
  • lib/src/util/process_utils.dart (2 hints)
  • lib/src/project/git_feature.dart (1 hint)
  • lib/src/project/impl/core_impl.dart (1 hint)
  • lib/src/project/intellij_commands.dart (1 hint)
  • lib/src/project/dependency_graph.dart (Run dartfmt to format lib/src/project/dependency_graph.dart.)
  • lib/src/project/impl/project_impl.dart (Run dartfmt to format lib/src/project/impl/project_impl.dart.)
  • lib/src/project/project.dart (Run dartfmt to format lib/src/project/project.dart.)
  • lib/src/project/project_group.dart (Run dartfmt to format lib/src/project/project_group.dart.)
  • lib/src/project/release_type.dart (Run dartfmt to format lib/src/project/release_type.dart.)
  • lib/src/spec/impl/jefe_spec_impl.dart (Run dartfmt to format lib/src/spec/impl/jefe_spec_impl.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (analyzer, git).

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

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

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <3.0.0
analyzer ^0.32.5 0.32.6 0.37.0
args ^1.5.0 1.5.2
collection ^1.14.11 1.14.11
dockerfile ^0.1.0 0.1.0
git ^0.5.1+1 0.5.1+1 1.0.1
http ^0.12.0 0.12.0+2
logging ^0.11.3+2 0.11.3+2
path ^1.6.2 1.6.2
pub_semver ^1.4.2 1.4.2
pubspec ^0.1.0 0.1.1
quiver ^2.0.0+1 2.0.3
stack_trace ^1.9.3 1.9.3
stuff ^0.1.0 0.1.0
xml ^3.2.3 3.5.0
yaml ^2.1.15 2.1.16
yamlicious ^0.1.0 0.1.0
Transitive dependencies
async 2.3.0
charcode 1.1.2
convert 2.1.1
crypto 2.0.6
csslib 0.16.1
front_end 0.1.4+2 0.1.20
glob 1.1.7
html 0.14.0+2
http_parser 3.1.3
kernel 0.3.4+2 0.3.20
matcher 0.12.5
meta 1.1.7
package_config 1.0.5
pedantic 1.8.0+1
petitparser 2.4.0
plugin 0.2.0+3
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5
watcher 0.9.7+12
Dev dependencies
mockito ^3.0.0
test ^1.3.3

Admin