Skip to content

Commit

Permalink
Merge pull request #17 from gql-dart/graph-update
Browse files Browse the repository at this point in the history
support latest release of package:graphs
  • Loading branch information
knaeckeKami authored Jul 23, 2023
2 parents cdff577 + 6fcf3a2 commit c942086
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions bin/multipack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import "package:multipack/package.dart";
void main(List<String> arguments) async {
final dependencyGraph = await getPackageGraph(Directory.current);

final orderedPackages =
dependencyGraph.sortedTopologicalOrdering!.toList().reversed.toList();
final topologicalGraph =
dependencyGraph.sortedTopologicalOrdering ?? <Package>{};

final orderedPackages = List.of(topologicalGraph).reversed.toList();

final packageNames = orderedPackages
.map(
Expand Down
4 changes: 3 additions & 1 deletion lib/commands/pubspec/hard_override.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class HardOverrideCommand extends MultipackCommand {
FutureOr<int> runOnPackage(Package package) async {
try {
MapEntry<String, DependencyReference> map(
String key, DependencyReference ref,) {
String key,
DependencyReference ref,
) {
if (ref is! HostedReference) return MapEntry(key, ref);

final localPackage = packages.firstWhereOrNull(
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: multipack
description: A tool for monorepo management. Link local packages and execute commands in topological order.
version: 0.3.1
version: 0.3.2
homepage: https://github.com/gql-dart/multipack
environment:
sdk: '>=2.12.0 <4.0.0'
description: A tool for monorepo management. Link local packages and execute commands in topological order.
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
ansicolor: ^2.0.0
args: ^2.0.0
Expand All @@ -14,7 +14,7 @@ dependencies:
pub_semver: ^2.0.0
pubspec: ^2.0.0

dev_dependencies:
dev_dependencies:
lint: ^2.0.0
executables:
multipack: null

0 comments on commit c942086

Please sign in to comment.