├── .github ├── dependabot.yml └── workflows │ ├── ci.yml │ ├── no-response.yml │ └── publish.yaml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── bin └── pubviz.dart ├── build.yaml ├── dart_test.yaml ├── doc ├── sample.dot └── sample.png ├── example ├── favicon.ico ├── index.html ├── style.css ├── viz-lite.js ├── viz.js └── web_app.dart ├── lib ├── pubviz.dart ├── src │ ├── dependency.dart │ ├── deps_list.dart │ ├── options.dart │ ├── options.g.dart │ ├── outdated_info.dart │ ├── pub_data_service.dart │ ├── pubspek.dart │ ├── service.dart │ ├── util.dart │ ├── version.dart │ ├── viz_package.dart │ └── viz_root.dart └── viz │ └── dot.dart ├── peanut.yaml ├── pubspec.yaml └── test ├── cli_test.dart ├── deps ├── empty_deps.json ├── empty_deps.txt ├── flutter_gallery.json ├── flutter_gallery.txt ├── knarly_deps.json ├── knarly_deps.txt ├── with_dots.json ├── with_dots.txt ├── with_overrides.json └── with_overrides.txt ├── deps_list_test.dart ├── ensure_build_test.dart ├── mock ├── all_deps.dot ├── analysis_options.yaml ├── direct_deps.dot ├── direct_production_deps.dot ├── ignore.dot ├── json_serial.json ├── json_serial.txt ├── list_package_dir.json ├── outdated.dot ├── outdated.json ├── production_deps.dot ├── pub_deps_list.json ├── pub_deps_list.txt └── pubspec.yaml ├── mock_data_service.dart ├── mock_viz_test.dart ├── test_pubspec.yaml └── viz_test.dart /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Dependabot configuration file. 2 | # See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: github-actions 7 | directory: / 8 | schedule: 9 | interval: monthly 10 | labels: 11 | - autosubmit 12 | groups: 13 | github-actions: 14 | patterns: 15 | - "*" 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | # Run on PRs and pushes to the default branch. 5 | push: 6 | branches: [ master ] 7 | pull_request: 8 | branches: [ master ] 9 | schedule: 10 | - cron: "0 0 * * 0" 11 | 12 | env: 13 | PUB_ENVIRONMENT: bot.github 14 | 15 | jobs: 16 | # Check code formatting and static analysis on a single OS (linux) 17 | # against Dart dev. 18 | analyze: 19 | runs-on: ubuntu-latest 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | sdk: [dev] 24 | steps: 25 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 26 | - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c 27 | with: 28 | sdk: ${{ matrix.sdk }} 29 | - id: install 30 | name: Install dependencies 31 | run: dart pub get 32 | - name: Check formatting 33 | run: dart format --output=none --set-exit-if-changed . 34 | if: always() && steps.install.outcome == 'success' 35 | - name: Analyze code 36 | run: dart analyze --fatal-infos 37 | if: always() && steps.install.outcome == 'success' 38 | 39 | # Run tests on a matrix consisting of two dimensions: 40 | # 1. OS: ubuntu-latest, (macos-latest, windows-latest) 41 | # 2. release channel: dev 42 | test: 43 | needs: analyze 44 | runs-on: ${{ matrix.os }} 45 | strategy: 46 | fail-fast: false 47 | matrix: 48 | # Add macos-latest and/or windows-latest if relevant for this package. 49 | os: [ubuntu-latest] 50 | sdk: [3.5, dev] 51 | steps: 52 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 53 | - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c 54 | with: 55 | sdk: ${{ matrix.sdk }} 56 | - id: install 57 | name: Install dependencies 58 | run: dart pub get 59 | - run: dart test --run-skipped 60 | if: always() && steps.install.outcome == 'success' 61 | -------------------------------------------------------------------------------- /.github/workflows/no-response.yml: -------------------------------------------------------------------------------- 1 | # A workflow to close issues where the author hasn't responded to a request for 2 | # more information; see https://github.com/actions/stale. 3 | 4 | name: No Response 5 | 6 | # Run as a daily cron. 7 | on: 8 | schedule: 9 | # Every day at 8am 10 | - cron: '0 8 * * *' 11 | 12 | # All permissions not specified are set to 'none'. 13 | permissions: 14 | issues: write 15 | pull-requests: write 16 | 17 | jobs: 18 | no-response: 19 | runs-on: ubuntu-latest 20 | if: ${{ github.repository_owner == 'kevmoo' }} 21 | steps: 22 | - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 23 | with: 24 | # Don't automatically mark inactive issues+PRs as stale. 25 | days-before-stale: -1 26 | # Close needs-info issues and PRs after 14 days of inactivity. 27 | days-before-close: 14 28 | stale-issue-label: "needs-info" 29 | close-issue-message: > 30 | Without additional information we're not able to resolve this issue. 31 | Feel free to add more info or respond to any questions above and we 32 | can reopen the case. Thanks for your contribution! 33 | stale-pr-label: "needs-info" 34 | close-pr-message: > 35 | Without additional information we're not able to resolve this PR. 36 | Feel free to add more info or respond to any questions above. 37 | Thanks for your contribution! 38 | -------------------------------------------------------------------------------- /.github/workflows/publish.yaml: -------------------------------------------------------------------------------- 1 | # A CI configuration to auto-publish pub packages. 2 | 3 | name: Publish 4 | 5 | on: 6 | pull_request: 7 | branches: [ master ] 8 | push: 9 | tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] 10 | 11 | jobs: 12 | publish: 13 | if: ${{ github.repository_owner == 'kevmoo' }} 14 | uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main 15 | permissions: 16 | id-token: write # Required for authentication using OIDC 17 | pull-requests: write # Required for writing the pull request note 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .dart_tool 2 | .packages 3 | .pub 4 | pubspec.lock 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 4.0.1 2 | 3 | - Fix issue when package has dependency overrides. 4 | 5 | ## 4.0.0 6 | 7 | - Support (Dart 3.6) workspaces. 8 | - API refactoring to support workspaces. 9 | 10 | ## 3.0.1 11 | 12 | - require at least Dart 3.5 13 | 14 | ## 3.0.0 15 | 16 | - require at least Dart 2.18 17 | - Allow latest `pkg:http`. 18 | 19 | ## 2.8.2+1 20 | 21 | * Update README with instructions how to generate PDF, PNG or other files 22 | 23 | ## 2.8.2 24 | 25 | * Handle a `null` output from `pub` without crashing. 26 | 27 | ## 2.8.1 28 | 29 | * Copy valid package name parsing logic from `pub` tool. 30 | * Packages with `.` in their name are now allowed. 31 | 32 | ## 2.8.0 33 | 34 | * Add new `--production-dependencies` flag to only output packages needed for 35 | production. 36 | * Updated `--direct-dependencies` behavior to treat `dev_dependencies` the same 37 | as `dependencies`. 38 | * Don't include `sky_engine` in output ever – it's just `dart:ui`. 39 | * Bumped min Dart SDK to `2.8.1`. 40 | * Implementation: use new `pub outdated` command. 41 | 42 | ## 2.7.0 43 | 44 | * Added `--version` to CLI. 45 | * Bumped min Dart SDK to 2.3. 46 | 47 | ## 2.6.0 48 | 49 | * Add support for direct dependencies only with `--direct-dependencies` (`-d`). 50 | 51 | ## 2.5.5 52 | 53 | * Update dependencies. 54 | 55 | ## 2.5.4 56 | 57 | * Improve the package description. 58 | 59 | * Update some dependencies. 60 | 61 | ## 2.5.3 62 | 63 | * Support Dart 2 stable. 64 | 65 | ## 2.5.2 66 | 67 | * Fixes for Dart 2 type system. 68 | 69 | ## 2.5.1 70 | 71 | * Stop using deprecated HTTP constants. 72 | 73 | ## 2.5.0 74 | 75 | * Use `pkg:pubspec_parse` package. 76 | 77 | * Stop using deprecated constants. 78 | 79 | * Improve handling of pre-release packages. 80 | 81 | ## 2.4.5 82 | 83 | * Fix for latest Flutter SDK. 84 | 85 | ## 2.4.4 86 | 87 | * Fixed code organization to eliminate warning during `pub global activate`. 88 | 89 | ## 2.4.3 90 | 91 | * Improvements in CLI error handling and help. 92 | 93 | ## 2.4.2 94 | 95 | * Updated output format. 96 | 97 | * And other cleanup... 98 | 99 | ## 2.4.1 100 | 101 | * Using `nodesep=0.2` on the graph to make it tighter. 102 | 103 | * Hosted code 104 | 105 | * Much more robust handling of node clicks to add/remove. 106 | 107 | * Make it clear that nodes can be clicked by changing the cursor. 108 | 109 | ## 2.4.0 110 | 111 | * Better error output if a subprocess fails. 112 | 113 | * Try to handle flutter packages. 114 | 115 | ## 2.3.11 116 | 117 | * Better hover-over behavior for outdated dependencies. 118 | 119 | ## 2.3.10 120 | 121 | * Update `gviz`. 122 | 123 | * Support larger dependency graphs. 124 | 125 | * Update version of `viz.js`. 126 | 127 | * Use `viz-lite.js` – smaller download. 128 | * Continue to host `vis.js` so we don't break existing installations. 129 | 130 | ## 2.3.9+1 131 | 132 | * Use `gviz` package. Get out of the GraphViz formatting business. 133 | 134 | ## 2.3.9 135 | 136 | * Updated dependencies. 137 | 138 | * Fix case where we're pulling in a pre-release version that is after the 139 | latest stable version. 140 | 141 | ## 2.3.8 142 | 143 | * Send a descriptive user agent to the server. 144 | 145 | * Added retry logic for HTTP requests. 146 | 147 | * Sort the output. 148 | 149 | ## 2.3.7 150 | 151 | * Better stack trace on errors. 152 | 153 | ## 2.3.6 154 | 155 | * Cleanup, handled some deprecations, improve load time. 156 | 157 | ## 2.3.5 158 | 159 | * Tweaks test code, examples, dependencies. 160 | 161 | ## 2.3.4 162 | 163 | * Properly escape the latest version for outdated dependencies. 164 | 165 | * Add a reasonable tool-tip for the entire graph. 166 | 167 | * Don't show the root node as outdated. 168 | 169 | ## 2.3.3 170 | 171 | * Using CSS animations for effects. Hosting style on GitHub. 172 | 173 | ## 2.3.2 174 | 175 | * All fancy with mouse-over effects. 176 | 177 | ## 2.3.1+1 178 | 179 | * Fix `README.md`. 180 | 181 | ## 2.3.1 182 | 183 | * With `--flag-outdated` (`-o`) do version lookup in parallel. *MUCH* faster. 184 | 185 | ## 2.3.0 186 | 187 | * Allow ignoring packages via `--ignore-packages`. 188 | *Thanks, [Günter](https://github.com/zoechi)!* 189 | 190 | * A fix for running on Windows. 191 | *Thanks, [Oliver](https://github.com/Fox32)!* 192 | 193 | * A fix for formatting packages with hyphens. 194 | *Thanks, [Bryon](https://github.com/bryonmarks)!* 195 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014, the Dart project authors. All rights reserved. 2 | Redistribution and use in source and binary forms, with or without 3 | modification, are permitted provided that the following conditions are 4 | met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above 9 | copyright notice, this list of conditions and the following 10 | disclaimer in the documentation and/or other materials provided 11 | with the distribution. 12 | * Neither the name of Google Inc. nor the names of its 13 | contributors may be used to endorse or promote products derived 14 | from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Visualize package dependencies in your Dart project 2 | 3 | [![Pub Package](https://img.shields.io/pub/v/pubviz.svg)](https://pub.dev/packages/pubviz) 4 | [![package publisher](https://img.shields.io/pub/publisher/pubviz.svg)](https://pub.dev/packages/pubviz/publisher) 5 | [![CI](https://github.com/kevmoo/pubviz/workflows/CI/badge.svg?branch=master)](https://github.com/kevmoo/pubviz/actions?query=workflow%3ACI+branch%3Amaster) 6 | 7 | *Make sure you run `pub get` or `pub upgrade` in your target project directory.* 8 | 9 | ### Example 10 | 11 | Here's an [example](https://kevmoo.github.io/pubviz/) of `pubviz` run on itself. 12 | 13 | ### Installing 14 | 15 | Activate `pubviz`. 16 | ```console 17 | $ dart pub global activate pubviz 18 | ``` 19 | 20 | ### Use 21 | 22 | If you have [configured your PATH correctly][path], you can run `pubviz` 23 | directly. 24 | 25 | ```console 26 | $ pubviz 27 | ``` 28 | 29 | Otherwise, you can use the `pub global` command. 30 | 31 | ```console 32 | $ dart pub global run pubviz 33 | ``` 34 | 35 | ### Generate and open an html file for the package on the current path. 36 | 37 | ```console 38 | $ pubviz open 39 | ``` 40 | 41 | Should open your default browser to something like: 42 | 43 | ![sample](https://raw.github.com/kevmoo/pubviz/master/doc/sample.png) 44 | 45 | ### Print GraphViz dot format to command line for a package on a specified path. 46 | 47 | ```console 48 | $ pubviz --format=dot print /path/to/http_package 49 | ``` 50 | 51 | You should see output something like: 52 | 53 | ```dot 54 | digraph G { 55 | node [fontname=Helvetica]; 56 | edge [fontname=Helvetica, fontcolor=gray]; 57 | 58 | http [label="http 59 | 0.9.2+3",fontsize=18,style=bold,shape=box,margin="0.25,0.15"]; 60 | http -> path [label=">=0.9.0 <2.0.0",penwidth=2]; 61 | http -> stack_trace [label=">=0.9.1 <0.10.0",penwidth=2]; 62 | http -> unittest [label=">=0.9.0 <0.10.0",penwidth=2,style=dashed]; 63 | 64 | path [label="path 65 | 1.0.0",shape=box,margin="0.25,0.15",style=bold]; 66 | 67 | stack_trace [label="stack_trace 68 | 0.9.1",shape=box,margin="0.25,0.15",style=bold]; 69 | stack_trace -> path [label=">=1.0.0-rc.1 <2.0.0"]; 70 | 71 | unittest [label="unittest 72 | 0.9.3",style=bold]; 73 | unittest -> stack_trace [label=">=0.9.0 <0.10.0",color=gray]; 74 | } 75 | ``` 76 | 77 | ### Generate PDF, PNG and other files 78 | 79 | [GraphViz](https://graphviz.org/about/) tool allows dot format to be converted to various types of outputs like PNG, PDF or SVG. 80 | 81 | In order to export `pubviz` data to PNG file you need to install GraphViz package on your machine ([see detailed installation instructions](https://graphviz.org/doc/info/output.html)). 82 | 83 | On macOS: 84 | 85 | ```sh 86 | brew install graphviz 87 | ``` 88 | 89 | On Windows: 90 | 91 | ```sh 92 | winget install graphviz 93 | ``` 94 | 95 | Then you can save the `pubviz` output to a file and convert it with `dot` command to desired output type, e.g.: 96 | 97 | ```sh 98 | pubviz --format=dot print > output.dot 99 | dot -Tpdf output.dot -o output.pdf 100 | ``` 101 | 102 | The full list of possible output types is available on [the GraphViz website](https://graphviz.org/doc/info/output.html). 103 | 104 | ### `pubviz -?` prints help 105 | 106 | ```console 107 | $ pubviz -? 108 | Usage: pubviz [] [] 109 | 110 | Commands: 111 | open Populate a temporary file with the content and open it. 112 | print Print the output to stdout. 113 | 114 | Arguments: 115 | -f, --format= 116 | [dot] Generate a GraphViz dot file 117 | [html] (default) Wrap the GraphViz dot format in an HTML template which renders it. 118 | 119 | -i, --ignore-packages A comma separated list of packages to exclude in the output. 120 | -o, --[no-]flag-outdated Check pub.dev for lasted packages and flag those that are outdated. 121 | -d, --direct-dependencies Include only direct dependencies. 122 | -p, --production-dependencies Include only production (non-dev) dependencies. 123 | -v, --version Print the version of pubviz and exit. 124 | -?, --help Print this help content. 125 | 126 | If is omitted, the current directory is used. 127 | ``` 128 | 129 | [path]: https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path 130 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:dart_flutter_team_lints/analysis_options.yaml 2 | 3 | analyzer: 4 | language: 5 | strict-casts: true 6 | strict-inference: true 7 | strict-raw-types: true 8 | 9 | linter: 10 | rules: 11 | - avoid_bool_literals_in_conditional_expressions 12 | - avoid_classes_with_only_static_members 13 | - avoid_private_typedef_functions 14 | - avoid_redundant_argument_values 15 | - avoid_returning_this 16 | - avoid_unused_constructor_parameters 17 | - avoid_void_async 18 | - cancel_subscriptions 19 | - cascade_invocations 20 | - join_return_with_assignment 21 | - literal_only_boolean_expressions 22 | - missing_whitespace_between_adjacent_strings 23 | - no_adjacent_strings_in_list 24 | - no_runtimeType_toString 25 | - prefer_const_declarations 26 | - prefer_expression_function_bodies 27 | - prefer_final_locals 28 | - require_trailing_commas 29 | - unnecessary_await_in_return 30 | - use_if_null_to_convert_nulls_to_bools 31 | - use_raw_strings 32 | - use_string_buffers 33 | -------------------------------------------------------------------------------- /bin/pubviz.dart: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env dart 2 | 3 | import 'dart:async'; 4 | import 'dart:convert'; 5 | import 'dart:io'; 6 | 7 | import 'package:io/ansi.dart'; 8 | import 'package:io/io.dart'; 9 | import 'package:path/path.dart' as p; 10 | import 'package:pubviz/pubviz.dart'; 11 | import 'package:pubviz/src/options.dart'; 12 | import 'package:pubviz/src/pub_data_service.dart'; 13 | import 'package:pubviz/src/version.dart'; 14 | import 'package:pubviz/viz/dot.dart' as dot; 15 | import 'package:stack_trace/stack_trace.dart'; 16 | 17 | Future main(List args) async { 18 | parser 19 | ..addCommand('open') 20 | ..addCommand('print'); 21 | 22 | Options options; 23 | try { 24 | options = parseOptions(args); 25 | } on FormatException catch (e) { 26 | print(red.wrap(e.message)); 27 | print(''); 28 | _printUsage(); 29 | exitCode = ExitCode.usage.code; 30 | return; 31 | } 32 | 33 | if (options.help) { 34 | _printUsage(); 35 | return; 36 | } 37 | 38 | if (options.version) { 39 | print(packageVersion); 40 | return; 41 | } 42 | 43 | final command = options.command; 44 | 45 | if (command == null) { 46 | print(red.wrap("Specify a command: ${parser.commands.keys.join(', ')}")); 47 | print(''); 48 | _printUsage(); 49 | exitCode = ExitCode.usage.code; 50 | return; 51 | } 52 | 53 | final path = _getPath(command.rest); 54 | 55 | await Chain.capture( 56 | () async { 57 | final service = PubDataService(path); 58 | final vp = await VizRoot.forDirectory( 59 | service, 60 | flagOutdated: options.flagOutdated, 61 | ignorePackages: options.ignorePackages, 62 | directDependenciesOnly: options.directDependencies ?? false, 63 | productionDependenciesOnly: options.productionDependencies, 64 | ); 65 | if (command.name == 'print') { 66 | _printContent(vp, options.format, options.ignorePackages); 67 | } else if (command.name == 'open') { 68 | await _open(vp, options.format, options.ignorePackages); 69 | } else { 70 | throw StateError('Should never get here...'); 71 | } 72 | }, 73 | onError: (error, Chain chain) { 74 | stderr 75 | ..writeln(error) 76 | ..writeln(chain.terse); 77 | exitCode = 1; 78 | }, 79 | ); 80 | } 81 | 82 | String _indent(String input) => 83 | LineSplitter.split(input).map((l) => ' $l'.trimRight()).join('\n'); 84 | 85 | void _printUsage() { 86 | print( 87 | '''Usage: pubviz [] [] 88 | 89 | ${styleBold.wrap('Commands:')} 90 | open Populate a temporary file with the content and open it. 91 | print Print the output to stdout. 92 | 93 | ${styleBold.wrap('Arguments:')} 94 | ${_indent(parser.usage)} 95 | 96 | If is omitted, the current directory is used.''', 97 | ); 98 | } 99 | 100 | String _getContent( 101 | VizRoot root, 102 | FormatOptions format, 103 | List ignorePackages, 104 | ) => 105 | switch (format) { 106 | FormatOptions.html => dot.toDotHtml(root, ignorePackages: ignorePackages), 107 | FormatOptions.dot => dot.toDot(root, ignorePackages: ignorePackages) 108 | }; 109 | 110 | String _getExtension(FormatOptions format) => format.toString().split('.')[1]; 111 | 112 | Future _open( 113 | VizRoot root, 114 | FormatOptions format, 115 | List ignorePackages, 116 | ) async { 117 | final extension = _getExtension(format); 118 | final name = root.root.name; 119 | final dir = await Directory.systemTemp.createTemp('pubviz_${name}_'); 120 | final filePath = p.join(dir.path, '$name.$extension'); 121 | var file = File(filePath); 122 | 123 | file = await file.create(); 124 | final content = _getContent(root, format, ignorePackages); 125 | await file.writeAsString(content, flush: true); 126 | 127 | print('File generated: $filePath'); 128 | 129 | String openCommand; 130 | if (Platform.isMacOS) { 131 | openCommand = 'open'; 132 | } else if (Platform.isLinux) { 133 | openCommand = 'xdg-open'; 134 | } else if (Platform.isWindows) { 135 | openCommand = 'start'; 136 | } else { 137 | print("We don't know how to open a file in ${Platform.operatingSystem}"); 138 | exit(1); 139 | } 140 | 141 | await Process.run(openCommand, [filePath], runInShell: true); 142 | } 143 | 144 | void _printContent( 145 | VizRoot root, 146 | FormatOptions format, 147 | List ignorePackages, 148 | ) { 149 | final content = _getContent(root, format, ignorePackages); 150 | print(content); 151 | } 152 | 153 | String _getPath(List args) { 154 | if (args.length > 1) { 155 | print('Only one argument is allowed. You provided ${args.length}.'); 156 | exit(1); 157 | } 158 | 159 | final path = args.isEmpty ? p.current : args.first; 160 | 161 | if (!FileSystemEntity.isDirectorySync(path)) { 162 | print('The provided path does not exist or is not a directory: $path'); 163 | exit(1); 164 | } 165 | 166 | final yamlPath = p.join(path, 'pubspec.yaml'); 167 | 168 | if (!FileSystemEntity.isFileSync(yamlPath)) { 169 | print('Could not find a pubspec.yaml in the target path.: $path'); 170 | exit(1); 171 | } 172 | 173 | return path; 174 | } 175 | -------------------------------------------------------------------------------- /build.yaml: -------------------------------------------------------------------------------- 1 | # See https://github.com/dart-lang/build/tree/master/build_web_compilers#configuration 2 | targets: 3 | $default: 4 | builders: 5 | build_cli: 6 | generate_for: 7 | - lib/src/options.* 8 | build_web_compilers|entrypoint: 9 | generate_for: 10 | - example/**.dart 11 | source_gen|combining_builder: 12 | options: 13 | ignore_for_file: 14 | - require_trailing_commas 15 | -------------------------------------------------------------------------------- /dart_test.yaml: -------------------------------------------------------------------------------- 1 | tags: 2 | presubmit-only: 3 | skip: "Should only be run during presubmit" 4 | -------------------------------------------------------------------------------- /doc/sample.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | 3 | args [label="args 4 | 0.6.5",shape=box,margin="0.25,0.15",group=primary]; 5 | 6 | bot [label="bot 7 | 0.22.2",shape=box,margin="0.25,0.15",group=primary]; 8 | bot -> meta [label=">=0.6.5",fontcolor=gray]; 9 | bot -> unittest [label=">=0.6.5",fontcolor=gray]; 10 | 11 | bot_io [label="bot_io 12 | 0.22.0+1",shape=box,margin="0.25,0.15",group=primary]; 13 | bot_io -> args [label=">=0.6.5",fontcolor=gray]; 14 | bot_io -> bot [label=">=0.22.1",fontcolor=gray]; 15 | bot_io -> crypto [label=">=0.6.5",fontcolor=gray]; 16 | bot_io -> logging [label=">=0.6.5",fontcolor=gray]; 17 | bot_io -> meta [label=">=0.6.5",fontcolor=gray]; 18 | bot_io -> path [label=">=0.6.5",fontcolor=gray]; 19 | 20 | crypto [label="crypto 21 | 0.6.5",shape=box,margin="0.25,0.15"]; 22 | 23 | hop [label="hop 24 | 0.24.1-dev",fontsize=16,style=bold,shape=box,margin="0.25,0.15",group=primary]; 25 | hop -> args [label=">=0.6.5",fontcolor=gray,penwidth=2]; 26 | hop -> bot [label=">=0.22.1",fontcolor=gray,penwidth=2]; 27 | hop -> bot_io [label=">=0.22.0+1",fontcolor=gray,penwidth=2]; 28 | hop -> logging [label=">=0.6.5",fontcolor=gray,penwidth=2]; 29 | hop -> meta [label=">=0.6.5",fontcolor=gray,penwidth=2]; 30 | hop -> path [label=">=0.6.5",fontcolor=gray,penwidth=2]; 31 | hop -> unittest [label=">=0.6.5",fontcolor=gray,penwidth=2]; 32 | hop -> html5lib [label=">=0.4.3",fontcolor=gray,penwidth=2,style=dashed]; 33 | 34 | html5lib [label="html5lib 35 | 0.4.4",group=primary]; 36 | html5lib -> source_maps [label=">=0.6.5",fontcolor=gray]; 37 | 38 | logging [label="logging 39 | 0.6.5",shape=box,margin="0.25,0.15",group=primary]; 40 | 41 | meta [label="meta 42 | 0.6.5",shape=box,margin="0.25,0.15",group=primary]; 43 | 44 | path [label="path 45 | 0.6.5",shape=box,margin="0.25,0.15",group=primary]; 46 | 47 | source_maps [label="source_maps 48 | 0.6.5"]; 49 | 50 | unittest [label="unittest 51 | 0.6.5",shape=box,margin="0.25,0.15",group=primary]; 52 | unittest -> meta [label="any",fontcolor=gray]; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /doc/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevmoo/pubviz/c7914551b1e883a2c46168ae9955a5153a46ac1b/doc/sample.png -------------------------------------------------------------------------------- /example/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevmoo/pubviz/c7914551b1e883a2c46168ae9955a5153a46ac1b/example/favicon.ico -------------------------------------------------------------------------------- /example/style.css: -------------------------------------------------------------------------------- 1 | text { 2 | font-family: sans-serif; 3 | } 4 | 5 | *, *:before, *:after { 6 | -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; 7 | } 8 | button { 9 | position: fixed; 10 | padding: 10px; 11 | top: 5px; 12 | left: 5px; 13 | opacity: 0.8; 14 | display: none; 15 | } 16 | g > * { 17 | transition-property: stroke, stroke-width, transform, fill, font-size; 18 | transition-duration: .2s; 19 | } 20 | 21 | g.node { 22 | cursor: pointer; 23 | } 24 | 25 | g.active > text { 26 | fill: blue; 27 | font-size: 100%; 28 | } 29 | g.active > polygon, g.active > ellipse, g.active > path { 30 | stroke: blue; 31 | stroke-width: 3px !important; 32 | } 33 | g.active.edge > polygon { 34 | fill: blue; 35 | } 36 | 37 | g.outdated.active > text { 38 | fill: red; 39 | font-size: 100%; 40 | } 41 | g.outdated.active > polygon, g.outdated.active > ellipse, g.outdated.active > path { 42 | stroke: red; 43 | stroke-width: 3px !important; 44 | } 45 | g.outdated.active.edge > polygon { 46 | fill: red; 47 | } 48 | 49 | /* ensures there is a background to hover/click on! */ 50 | g.node > [fill="none"] { 51 | fill: #eee; 52 | } 53 | 54 | html, body { margin:10px; padding:0; } 55 | svg { height:100%; width:100%; } 56 | svg.zoom {height: inherit; width: inherit;} 57 | -------------------------------------------------------------------------------- /example/web_app.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: unreachable_from_main 2 | 3 | @JS() 4 | library; 5 | 6 | import 'dart:convert' show LineSplitter, htmlEscape; 7 | import 'dart:js_interop'; 8 | 9 | import 'package:web/web.dart'; 10 | 11 | final zoomBtn = document.querySelector('#zoomBtn') as HTMLButtonElement; 12 | 13 | SVGElement? __root; 14 | 15 | SVGElement get _root => __root!; 16 | 17 | final List _dotContentLines = List.unmodifiable( 18 | LineSplitter.split( 19 | ((document.querySelector('#dot') as HTMLScriptElement).innerHTML 20 | as JSString) 21 | .toDart 22 | .trim(), 23 | ), 24 | ); 25 | 26 | final _toIgnore = {}; 27 | 28 | void main() { 29 | _process(); 30 | 31 | zoomBtn.onClick.listen((_) { 32 | __root?.classList.toggle('zoom'); 33 | }); 34 | } 35 | 36 | void _process() { 37 | if (__root != null) { 38 | _root.remove(); 39 | __root = null; 40 | } 41 | 42 | final removedLinesContainingNodeDefinitions = []; 43 | 44 | List lines; 45 | 46 | if (_toIgnore.isEmpty) { 47 | lines = _dotContentLines; 48 | } else { 49 | print('Ignoring: ${_toIgnore.join(',')}'); 50 | lines = _dotContentLines.where((line) { 51 | for (var item in _toIgnore) { 52 | if (line == 'digraph $item {') { 53 | return true; 54 | } 55 | 56 | var comparisonLine = line; 57 | // for the purposes of this code, ignore anything after and including [ 58 | final openBracketIndex = line.indexOf('['); 59 | if (openBracketIndex > 0) { 60 | comparisonLine = comparisonLine.substring(0, openBracketIndex); 61 | } 62 | 63 | if (comparisonLine.contains(RegExp('\\W$item\\W'))) { 64 | if (!comparisonLine.contains('->')) { 65 | removedLinesContainingNodeDefinitions.add(line); 66 | } 67 | 68 | return false; 69 | } 70 | } 71 | return true; 72 | }).toList(); 73 | 74 | if (removedLinesContainingNodeDefinitions.isEmpty) { 75 | print('Weird - nothing removed?'); 76 | } else { 77 | if (lines.last != '}') { 78 | throw StateError('huh?'); 79 | } 80 | lines 81 | ..removeLast() 82 | ..add(' subgraph cluster0 {') 83 | ..add(' label=Removed;') 84 | ..add(' style=filled;') 85 | ..add(' fillcolor="#dddddd";') 86 | ..addAll(removedLinesContainingNodeDefinitions) 87 | ..add(' }') 88 | ..add('}'); 89 | } 90 | } 91 | 92 | final watch = Stopwatch()..start(); 93 | try { 94 | // Default memory: 16,777,216 - 16 MiB 95 | // Doubling to 32 MiB 96 | final output = Viz( 97 | lines.join('\n'), 98 | VizOptions(format: 'svg', totalMemory: 32 * 1024 * 1024), 99 | ); 100 | _updateBody(output); 101 | } catch (e) { 102 | final output = '
${htmlEscape.convert(e.toString())}
'; 103 | document.body!.append(output.toJS); 104 | } finally { 105 | print('Total time generating graph: ${watch.elapsed}'); 106 | } 107 | } 108 | 109 | void _updateBody(String output) { 110 | assert(__root == null); 111 | 112 | output = LineSplitter.split(output) 113 | .where( 114 | (line) => 115 | !line.contains('') && 117 | !line.contains('?xml'), 118 | ) 119 | .join('\n'); 120 | 121 | document.body!.insertAdjacentHTML('beforeend', output.toJS); 122 | zoomBtn.style.display = 'block'; 123 | 124 | __root = document.querySelector('svg') as SVGElement; 125 | 126 | for (var element in _root.querySelectorAll('g.node').elements) { 127 | final title = element.querySelector('title')!.textContent!; 128 | element.id = title; 129 | } 130 | 131 | for (var node in _root.querySelectorAll('g.node').elements) { 132 | // NOTE: we are assuming the shape of the generated SVG here – be careful! 133 | final polygonBorder = node.querySelector('polygon')?.getAttribute('stroke'); 134 | if (polygonBorder != null && 135 | polygonBorder.toLowerCase().startsWith('#ff')) { 136 | node.classList.add('outdated'); 137 | } 138 | 139 | node.onClick.listen((MouseEvent event) { 140 | final target = event.currentTarget as Element; 141 | if (_toIgnore.add(target.id)) { 142 | // add succeeded – noop 143 | } else { 144 | _toIgnore.remove(target.id); 145 | } 146 | _process(); 147 | }); 148 | } 149 | 150 | for (var node in _root.querySelectorAll('g.edge').elements) { 151 | final title = node.querySelector('title')!.textContent!; 152 | final things = title.split('->'); 153 | node 154 | ..setAttribute('x-from', things[0]) 155 | ..setAttribute('x-to', things[1]); 156 | 157 | // NOTE: we are assuming the shape of the generated SVG here – be careful! 158 | final textFill = node.querySelector('text')?.getAttribute('fill'); 159 | if (textFill != null) { 160 | assert(textFill.startsWith('#')); 161 | if (textFill.toLowerCase().startsWith('#ff')) { 162 | // This is an outdated dependency 163 | node.classList.add('outdated'); 164 | } 165 | } 166 | } 167 | 168 | final nodesOfInterest = _root.querySelectorAll('g.edge, g.node'); 169 | 170 | for (var interest in nodesOfInterest.elements) { 171 | interest.onMouseEnter.listen((MouseEvent event) { 172 | _updateOver(event.currentTarget as SVGGElement); 173 | }); 174 | 175 | interest.onMouseLeave.listen((MouseEvent event) { 176 | _updateOver(null); 177 | }); 178 | } 179 | } 180 | 181 | void _updateOver(SVGGElement? element) { 182 | final targetPkg = []; 183 | if (element != null) { 184 | if (element.classList.contains('edge')) { 185 | targetPkg 186 | .addAll([element.attributes['x-to'], element.attributes['x-from']]); 187 | } else { 188 | assert(element.classList.contains('node')); 189 | targetPkg.add(element.id); 190 | } 191 | } 192 | 193 | for (var node in _root.querySelectorAll('g.node').elements) { 194 | if (targetPkg.contains(node.id)) { 195 | node.classList.add('active'); 196 | } else { 197 | node.classList.remove('active'); 198 | } 199 | } 200 | 201 | final fromNodes = []; 202 | final toNodes = []; 203 | for (var node in _root.querySelectorAll('g.edge').elements) { 204 | final nodeXTo = node.attributes['x-to']!; 205 | final nodeXFrom = node.attributes['x-from']!; 206 | if (targetPkg.length == 2) { 207 | // then the hover-over is on a line! 208 | if (targetPkg.contains(nodeXTo) && targetPkg.contains(nodeXFrom)) { 209 | node.classList.add('active'); 210 | } else { 211 | node.classList.remove('active'); 212 | } 213 | } else { 214 | if (targetPkg.contains(nodeXTo) || targetPkg.contains(nodeXFrom)) { 215 | if (targetPkg.contains(nodeXTo)) { 216 | fromNodes.add(nodeXFrom); 217 | } 218 | 219 | if (targetPkg.contains(nodeXFrom)) { 220 | toNodes.add(nodeXTo); 221 | } 222 | 223 | node.classList.add('active'); 224 | } else { 225 | node.classList.remove('active'); 226 | } 227 | } 228 | } 229 | 230 | if (targetPkg.length == 1) { 231 | final lines = [targetPkg.single]; 232 | if (fromNodes.isNotEmpty) { 233 | lines.add(' From: ${fromNodes.join(', ')}'); 234 | } 235 | if (toNodes.isNotEmpty) { 236 | lines.add(' To: ${toNodes.join(', ')}'); 237 | } 238 | print(lines.join('\n')); 239 | } 240 | } 241 | 242 | @JS() 243 | // ignore: non_constant_identifier_names 244 | external String Viz(String src, [VizOptions options]); 245 | 246 | extension type VizOptions._(JSObject _) implements JSObject { 247 | external VizOptions({String format, int totalMemory}); 248 | 249 | external String format; 250 | external int totalMemory; 251 | } 252 | 253 | extension on NodeList { 254 | Iterable get elements sync* { 255 | for (var i = 0; i < length; i++) { 256 | yield item(i)! as Element; 257 | } 258 | } 259 | } 260 | 261 | extension on NamedNodeMap { 262 | String? operator [](String key) => getNamedItem(key)?.value; 263 | } 264 | -------------------------------------------------------------------------------- /lib/pubviz.dart: -------------------------------------------------------------------------------- 1 | export 'src/dependency.dart'; 2 | export 'src/viz_package.dart'; 3 | export 'src/viz_root.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/dependency.dart: -------------------------------------------------------------------------------- 1 | import 'package:pub_semver/pub_semver.dart'; 2 | import 'package:pubspec_parse/pubspec_parse.dart' as parse; 3 | 4 | class Dependency implements Comparable { 5 | final String name; 6 | final VersionConstraint versionConstraint; 7 | final bool isDevDependency; 8 | 9 | bool? _includesLatest; 10 | 11 | /// Also true if there is a pre-release version after the latest version 12 | bool? get includesLatest => _includesLatest; 13 | 14 | set includesLatest(bool? value) { 15 | assert(_includesLatest == null); 16 | _includesLatest = value!; 17 | } 18 | 19 | Dependency(this.name, String versionConstraint, this.isDevDependency) 20 | : versionConstraint = _parseOrNull(versionConstraint); 21 | 22 | static Set getDependencies( 23 | parse.Pubspec pubspec, { 24 | bool includeDevDependencies = true, 25 | }) { 26 | final deps = {}; 27 | 28 | _populateFromSection(pubspec.dependencies, deps, false); 29 | if (includeDevDependencies) { 30 | _populateFromSection(pubspec.devDependencies, deps, true); 31 | } 32 | return deps; 33 | } 34 | 35 | static void _populateFromSection( 36 | Map yaml, 37 | Set value, 38 | bool isDev, 39 | ) { 40 | for (var entry in yaml.entries) { 41 | final constraint = entry.value; 42 | final constraintString = (constraint is parse.HostedDependency) 43 | ? constraint.version.toString() 44 | : constraint.toString(); 45 | 46 | final dep = Dependency(entry.key, constraintString, isDev); 47 | 48 | value.add(dep); 49 | } 50 | } 51 | 52 | @override 53 | bool operator ==(Object other) => other is Dependency && other.name == name; 54 | 55 | @override 56 | int get hashCode => name.hashCode; 57 | 58 | @override 59 | int compareTo(Dependency other) { 60 | if (other.isDevDependency == isDevDependency) { 61 | return name.compareTo(other.name); 62 | } else if (isDevDependency) { 63 | return 1; 64 | } else { 65 | return -1; 66 | } 67 | } 68 | 69 | @override 70 | String toString() { 71 | final devStr = isDevDependency ? '(dev)' : ''; 72 | return '$name$devStr $versionConstraint'; 73 | } 74 | } 75 | 76 | VersionConstraint _parseOrNull(String input) { 77 | try { 78 | return VersionConstraint.parse(input); 79 | } on FormatException { 80 | return VersionConstraint.empty; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /lib/src/deps_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:collection/collection.dart'; 2 | import 'package:pub_semver/pub_semver.dart'; 3 | import 'package:string_scanner/string_scanner.dart'; 4 | 5 | class DepsList { 6 | static final _sdkLine = RegExp(r'(\w+) SDK (.+)\n'); 7 | 8 | final Map sdks; 9 | final Map packages; 10 | final Map> 11 | transitiveDependencies; 12 | 13 | DepsList._(this.sdks, this.packages, {required this.transitiveDependencies}) { 14 | for (var entry in packages.values) { 15 | entry._parent = this; 16 | } 17 | } 18 | 19 | factory DepsList.parse(String input) { 20 | final scanner = StringScanner(input); 21 | 22 | final sdks = {}; 23 | 24 | void scanSdk() { 25 | scanner.expect(_sdkLine, name: 'SDK'); 26 | final entry = VersionedEntry.fromMatch(scanner.lastMatch!); 27 | assert(!sdks.containsKey(entry.name)); 28 | sdks[entry.name] = entry.version; 29 | } 30 | 31 | do { 32 | scanSdk(); 33 | } while (scanner.matches(_sdkLine)); 34 | 35 | final pkgs = {}; 36 | while (scanner.matches(_packageLine)) { 37 | final entry = DepsPackageEntry._parse(scanner); 38 | pkgs[entry.name] = entry; 39 | } 40 | 41 | final section = scanner.matches(_transitiveDepsHeaderLine) 42 | ? _scanSection(scanner, headerPattern: _transitiveDepsHeaderLine) 43 | .entries 44 | : >{}; 45 | 46 | return DepsList._( 47 | sdks, 48 | pkgs, 49 | transitiveDependencies: section, 50 | ); 51 | } 52 | 53 | Map toJson() => { 54 | 'sdks': sdks, 55 | 'packages': packages, 56 | 'transitiveDependencies': 57 | transitiveDependencies.map((k, v) => MapEntry(k.toString(), v)), 58 | }; 59 | } 60 | 61 | class DepsPackageEntry extends VersionedEntry { 62 | static final _emptyLine = RegExp(r'\n'); 63 | 64 | final Map>> 65 | sections; 66 | 67 | late final DepsList _parent; 68 | 69 | Map> get allEntries => 70 | CombinedMapView([ 71 | ..._parent.packages.values.expand((e) => e.sections.values), 72 | _parent.transitiveDependencies, 73 | ]); 74 | 75 | DepsPackageEntry._( 76 | super.entry, 77 | this.sections, 78 | ) : super.copy(); 79 | 80 | factory DepsPackageEntry._parse(StringScanner scanner) { 81 | scanner.expect(_packageLine, name: 'Source package'); 82 | 83 | final sourcePackage = VersionedEntry.fromMatch(scanner.lastMatch!); 84 | 85 | final sections = 86 | >>{}; 87 | 88 | while (scanner.scan(_emptyLine)) { 89 | if (!scanner.matches(_sectionHeaderLine)) { 90 | break; 91 | } 92 | 93 | final section = _scanSection(scanner, headerPattern: _sectionHeaderLine); 94 | sections[section.name] = section.entries; 95 | } 96 | 97 | return DepsPackageEntry._( 98 | sourcePackage, 99 | sections, 100 | ); 101 | } 102 | 103 | Map toJson() => { 104 | 'name': name, 105 | 'version': version.toString(), 106 | 'sections': { 107 | for (var section in sections.entries) 108 | section.key: { 109 | for (var usage in section.value.entries) 110 | usage.key.toString(): { 111 | for (var dep in usage.value.entries) 112 | dep.key: dep.value.toString(), 113 | }, 114 | }, 115 | }, 116 | }; 117 | } 118 | 119 | /// A regular expression matching a Dart identifier. 120 | /// 121 | /// This also matches a package name, since they must be Dart identifiers. 122 | const _identifierRegExp = r'[a-zA-Z_]\w*'; 123 | 124 | /// A regular expression matching allowed package names. 125 | /// 126 | /// This allows dot-separated valid Dart identifiers. The dots are there for 127 | /// compatibility with Google's internal Dart packages, but they may not be used 128 | /// when publishing a package to pub.dev. 129 | const _pkgName = '$_identifierRegExp(?:\\.$_identifierRegExp)*'; 130 | 131 | final _sectionHeaderLine = 132 | RegExp(r'(dependencies|dev dependencies|dependency overrides):\n'); 133 | final _transitiveDepsHeaderLine = RegExp(r'(transitive dependencies):\n'); 134 | final _packageLine = RegExp('($_pkgName) (\\d.+)\n'); 135 | final _usageLine = RegExp('- ($_pkgName) (.+)\n'); 136 | final _depLine = RegExp(' - ($_pkgName) (.+)\n'); 137 | 138 | ({String name, Map> entries}) 139 | _scanSection(StringScanner scanner, {required Pattern headerPattern}) { 140 | scanner.expect(headerPattern, name: 'section header'); 141 | final header = scanner.lastMatch![1]!; 142 | 143 | final entries = >{}; 144 | 145 | void scanUsage() { 146 | scanner.expect(_usageLine, name: 'dependency'); 147 | final entry = VersionedEntry.fromMatch(scanner.lastMatch!); 148 | assert(!entries.containsKey(entry)); 149 | 150 | final deps = entries[entry] = {}; 151 | 152 | while (scanner.scan(_depLine)) { 153 | deps[scanner.lastMatch![1]!] = 154 | VersionConstraint.parse(scanner.lastMatch![2]!); 155 | } 156 | } 157 | 158 | do { 159 | scanUsage(); 160 | } while (scanner.matches(_usageLine)); 161 | 162 | return (name: header, entries: entries); 163 | } 164 | 165 | class VersionedEntry { 166 | final String name; 167 | final Version version; 168 | 169 | VersionedEntry(this.name, this.version); 170 | 171 | VersionedEntry.copy(VersionedEntry other) 172 | : name = other.name, 173 | version = other.version; 174 | 175 | factory VersionedEntry.fromMatch(Match match) => VersionedEntry( 176 | match[1]!, 177 | Version.parse(match[2]!), 178 | ); 179 | 180 | @override 181 | String toString() => '$name @ $version'; 182 | 183 | @override 184 | int get hashCode => name.hashCode; 185 | 186 | @override 187 | bool operator ==(Object other) => 188 | other is VersionedEntry && name == other.name; 189 | } 190 | -------------------------------------------------------------------------------- /lib/src/options.dart: -------------------------------------------------------------------------------- 1 | import 'package:build_cli_annotations/build_cli_annotations.dart'; 2 | 3 | part 'options.g.dart'; 4 | 5 | ArgParser get parser => _$parserForOptions; 6 | 7 | @CliOptions() 8 | class Options { 9 | @CliOption( 10 | abbr: 'f', 11 | defaultsTo: FormatOptions.html, 12 | allowedHelp: _formatOptionsHelp, 13 | valueHelp: 'format', 14 | ) 15 | final FormatOptions format; 16 | 17 | @CliOption( 18 | abbr: 'i', 19 | help: 'A comma separated list of packages to exclude in the output.', 20 | ) 21 | final List ignorePackages; 22 | 23 | @CliOption( 24 | abbr: 'o', 25 | help: 'Check pub.dev for lasted packages and flag those that are outdated.', 26 | ) 27 | final bool flagOutdated; 28 | 29 | @CliOption( 30 | abbr: 'd', 31 | help: 'Include only direct dependencies.', 32 | negatable: false, 33 | ) 34 | final bool? directDependencies; 35 | 36 | @CliOption( 37 | abbr: 'p', 38 | help: 'Include only production (non-dev) dependencies.', 39 | negatable: false, 40 | ) 41 | final bool productionDependencies; 42 | 43 | @CliOption( 44 | abbr: 'v', 45 | help: 'Print the version of pubviz and exit.', 46 | negatable: false, 47 | ) 48 | final bool version; 49 | 50 | @CliOption( 51 | abbr: '?', 52 | help: 'Print this help content.', 53 | negatable: false, 54 | ) 55 | final bool help; 56 | 57 | final ArgResults? command; 58 | 59 | const Options({ 60 | required this.format, 61 | List? ignorePackages, 62 | required this.flagOutdated, 63 | this.directDependencies, 64 | required this.productionDependencies, 65 | required this.help, 66 | this.command, 67 | required this.version, 68 | }) : ignorePackages = ignorePackages ?? const []; 69 | } 70 | 71 | enum FormatOptions { dot, html } 72 | 73 | const _formatOptionsHelp = { 74 | FormatOptions.dot: 'Generate a GraphViz dot file', 75 | FormatOptions.html: 76 | 'Wrap the GraphViz dot format in an HTML template which renders it.', 77 | }; 78 | -------------------------------------------------------------------------------- /lib/src/options.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ignore_for_file: require_trailing_commas 4 | 5 | part of 'options.dart'; 6 | 7 | // ************************************************************************** 8 | // CliGenerator 9 | // ************************************************************************** 10 | 11 | T _$enumValueHelper(Map enumValues, String source) => 12 | enumValues.entries 13 | .singleWhere( 14 | (e) => e.value == source, 15 | orElse: () => throw ArgumentError( 16 | '`$source` is not one of the supported values: ' 17 | '${enumValues.values.join(', ')}', 18 | ), 19 | ) 20 | .key; 21 | 22 | Options _$parseOptionsResult(ArgResults result) => Options( 23 | format: _$enumValueHelper( 24 | _$FormatOptionsEnumMapBuildCli, 25 | result['format'] as String, 26 | ), 27 | ignorePackages: result['ignore-packages'] as List, 28 | flagOutdated: result['flag-outdated'] as bool, 29 | directDependencies: result['direct-dependencies'] as bool?, 30 | productionDependencies: result['production-dependencies'] as bool, 31 | help: result['help'] as bool, 32 | command: result.command, 33 | version: result['version'] as bool, 34 | ); 35 | 36 | const _$FormatOptionsEnumMapBuildCli = { 37 | FormatOptions.dot: 'dot', 38 | FormatOptions.html: 'html' 39 | }; 40 | 41 | ArgParser _$populateOptionsParser(ArgParser parser) => parser 42 | ..addOption( 43 | 'format', 44 | abbr: 'f', 45 | valueHelp: 'format', 46 | defaultsTo: 'html', 47 | allowed: ['dot', 'html'], 48 | allowedHelp: { 49 | 'dot': 'Generate a GraphViz dot file', 50 | 'html': 51 | 'Wrap the GraphViz dot format in an HTML template which renders it.' 52 | }, 53 | ) 54 | ..addMultiOption( 55 | 'ignore-packages', 56 | abbr: 'i', 57 | help: 'A comma separated list of packages to exclude in the output.', 58 | ) 59 | ..addFlag( 60 | 'flag-outdated', 61 | abbr: 'o', 62 | help: 'Check pub.dev for lasted packages and flag those that are outdated.', 63 | ) 64 | ..addFlag( 65 | 'direct-dependencies', 66 | abbr: 'd', 67 | help: 'Include only direct dependencies.', 68 | defaultsTo: null, 69 | negatable: false, 70 | ) 71 | ..addFlag( 72 | 'production-dependencies', 73 | abbr: 'p', 74 | help: 'Include only production (non-dev) dependencies.', 75 | negatable: false, 76 | ) 77 | ..addFlag( 78 | 'version', 79 | abbr: 'v', 80 | help: 'Print the version of pubviz and exit.', 81 | negatable: false, 82 | ) 83 | ..addFlag( 84 | 'help', 85 | abbr: '?', 86 | help: 'Print this help content.', 87 | negatable: false, 88 | ); 89 | 90 | final _$parserForOptions = _$populateOptionsParser(ArgParser()); 91 | 92 | Options parseOptions(List args) { 93 | final result = _$parserForOptions.parse(args); 94 | return _$parseOptionsResult(result); 95 | } 96 | -------------------------------------------------------------------------------- /lib/src/outdated_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:pub_semver/pub_semver.dart'; 2 | 3 | class OutdatedInfo { 4 | final String package; 5 | final Version? current, upgradable, resolvable, latest; 6 | 7 | OutdatedInfo( 8 | this.package, 9 | this.current, 10 | this.upgradable, 11 | this.resolvable, 12 | this.latest, 13 | ); 14 | 15 | factory OutdatedInfo.fromJson(Map json) => OutdatedInfo( 16 | json['package'] as String, 17 | _version(json, 'current'), 18 | _version(json, 'upgradable'), 19 | _version(json, 'resolvable'), 20 | _version(json, 'latest'), 21 | ); 22 | } 23 | 24 | Version? _version(Map json, String key) { 25 | final value = json[key]; 26 | if (value == null) return null; 27 | 28 | return Version.parse( 29 | (json[key] as Map)['version'] as String, 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/pub_data_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'deps_list.dart'; 5 | import 'pubspek.dart'; 6 | import 'service.dart'; 7 | 8 | class PubDataService extends Service { 9 | @override 10 | final String rootPackageDir; 11 | final bool _debug; 12 | late final bool _isFlutterPkg; 13 | late final String packageName; 14 | 15 | PubDataService(this.rootPackageDir, {bool debug = false}) : _debug = debug { 16 | final details = packageDeets(rootPackageDir); 17 | _isFlutterPkg = details.isFlutterPackage; 18 | packageName = details.packageName; 19 | } 20 | 21 | @override 22 | Map outdated() { 23 | final commandOutput = _pubCommand(['outdated', '--json']); 24 | 25 | try { 26 | return jsonDecode(commandOutput) as Map; 27 | } on FormatException { 28 | stderr 29 | ..writeln('JSON output from `pub` command was invalid.') 30 | ..writeln( 31 | LineSplitter.split(commandOutput).map((e) => ' $e\n').join(), 32 | ); 33 | rethrow; 34 | } 35 | } 36 | 37 | @override 38 | DepsPackageEntry rootDeps() { 39 | final commandOutput = _pubCommand(['deps', '-s', 'list']); 40 | final list = DepsList.parse(commandOutput); 41 | 42 | return list.packages[packageName]!; 43 | } 44 | 45 | String _pubCommand(List commandArgs) { 46 | final proc = _isFlutterPkg ? 'flutter' : 'dart'; 47 | final args = [ 48 | ...['pub'], 49 | ...commandArgs, 50 | ]; 51 | 52 | _print([proc, ...args].join(' ')); 53 | _print(' in path `$rootPackageDir`'); 54 | 55 | final pubEnv = []; 56 | if (Platform.environment.containsKey(_pubEnvironment)) { 57 | final value = Platform.environment[_pubEnvironment]!.trim(); 58 | if (value.isNotEmpty) { 59 | pubEnv.add(value); 60 | } 61 | } 62 | pubEnv.add('pkg.pubviz'); 63 | 64 | final environment = { 65 | _pubEnvironment: pubEnv.join(':'), 66 | }; 67 | 68 | final result = Process.runSync( 69 | proc, 70 | args, 71 | runInShell: true, 72 | workingDirectory: rootPackageDir, 73 | environment: environment, 74 | ); 75 | 76 | if (result.exitCode != 0) { 77 | var message = result.stderr as String; 78 | try { 79 | final value = jsonDecode(result.stdout as String) as Map; 80 | if (value.containsKey('error')) { 81 | message = value['error'] as String; 82 | } 83 | } catch (e) { 84 | // NOOP 85 | } 86 | 87 | throw ProcessException( 88 | proc, 89 | args, 90 | message, 91 | result.exitCode, 92 | ); 93 | } 94 | 95 | return result.stdout as String; 96 | } 97 | 98 | void _print(Object value) { 99 | if (_debug) { 100 | stderr.writeln(' $value'); 101 | } 102 | } 103 | } 104 | 105 | const _pubEnvironment = 'PUB_ENVIRONMENT'; 106 | -------------------------------------------------------------------------------- /lib/src/pubspek.dart: -------------------------------------------------------------------------------- 1 | // copied from https://github.com/dart-lang/pana/blob/0aca0eb21fe30ef27d625aad0836911a29d02984/lib/src/pubspec.dart 2 | // ...then heavily pruned 3 | 4 | import 'dart:collection'; 5 | import 'dart:io'; 6 | 7 | import 'package:path/path.dart' as p; 8 | import 'package:pubspec_parse/pubspec_parse.dart' as pubspek show Pubspec; 9 | import 'package:pubspec_parse/pubspec_parse.dart' hide Pubspec; 10 | import 'package:yaml/yaml.dart' as yaml; 11 | 12 | ({String packageName, bool isFlutterPackage}) packageDeets(String packageDir) { 13 | final path = p.join(packageDir, 'pubspec.yaml'); 14 | 15 | final map = yaml.loadYaml( 16 | File(path).readAsStringSync(), 17 | sourceUrl: Uri.parse(path), 18 | ) as yaml.YamlMap; 19 | 20 | final pubspec = _Pubspec(map); 21 | 22 | return ( 23 | packageName: pubspec._inner.name, 24 | isFlutterPackage: pubspec.usesFlutter, 25 | ); 26 | } 27 | 28 | class _Pubspec { 29 | final pubspek.Pubspec _inner; 30 | final yaml.YamlMap _content; 31 | 32 | Set? _dependentSdks; 33 | 34 | _Pubspec(this._content) 35 | : _inner = pubspek.Pubspec.fromJson(_content, lenient: true); 36 | 37 | Map get dependencies => _inner.dependencies; 38 | 39 | Map get devDependencies => _inner.devDependencies; 40 | 41 | bool dependsOnPackage(String package) => 42 | (dependencies.containsKey(package)) || 43 | (devDependencies.containsKey(package)); 44 | 45 | bool get hasFlutterKey => _content.containsKey('flutter'); 46 | 47 | bool get hasFlutterPluginKey => 48 | hasFlutterKey && 49 | _content['flutter'] is Map && 50 | (_content['flutter'] as Map)['plugin'] != null; 51 | 52 | bool get dependsOnFlutterSdk => dependentSdks.contains('flutter'); 53 | 54 | bool get dependsOnFlutterPackage => dependsOnPackage('flutter'); 55 | 56 | bool get usesFlutter => 57 | dependsOnFlutterSdk || dependsOnFlutterPackage || hasFlutterKey; 58 | 59 | Set get dependentSdks { 60 | if (_dependentSdks == null) { 61 | _dependentSdks = SplayTreeSet(); 62 | // ignore: avoid_function_literals_in_foreach_calls 63 | dependencies.values.forEach((value) { 64 | if (value is SdkDependency) { 65 | _dependentSdks!.add(value.sdk); 66 | } 67 | }); 68 | // ignore: avoid_function_literals_in_foreach_calls 69 | devDependencies.values.forEach((value) { 70 | if (value is SdkDependency) { 71 | _dependentSdks!.add(value.sdk); 72 | } 73 | }); 74 | final keys = _inner.environment.keys.toList()..remove('sdk'); 75 | _dependentSdks!.addAll(keys); 76 | } 77 | return _dependentSdks!; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/src/service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | import 'dart:io'; 3 | 4 | import 'package:collection/collection.dart'; 5 | import 'package:path/path.dart' as p; 6 | import 'package:pub_semver/pub_semver.dart'; 7 | import 'package:pubspec_parse/pubspec_parse.dart' hide Dependency; 8 | 9 | import 'dependency.dart'; 10 | import 'deps_list.dart'; 11 | import 'outdated_info.dart'; 12 | import 'viz_package.dart'; 13 | 14 | abstract class Service { 15 | Map? _outdatedCache; 16 | 17 | String get rootPackageDir; 18 | 19 | Pubspec rootPubspec() { 20 | assert( 21 | Directory(rootPackageDir).existsSync(), 22 | '`$rootPackageDir` does not exist.', 23 | ); 24 | 25 | final pubspecPath = p.join(rootPackageDir, 'pubspec.yaml'); 26 | 27 | return Pubspec.parse( 28 | File(pubspecPath).readAsStringSync(), 29 | sourceUrl: Uri.parse(pubspecPath), 30 | ); 31 | } 32 | 33 | DepsPackageEntry rootDeps(); 34 | 35 | Future> getReferencedPackages( 36 | bool flagOutdated, 37 | bool directDependenciesOnly, 38 | bool productionDependenciesOnly, 39 | ) async { 40 | final pubspec = rootPubspec(); 41 | 42 | final map = SplayTreeMap(); 43 | 44 | map[pubspec.name] = VizPackage( 45 | pubspec.name, 46 | null, 47 | Dependency.getDependencies( 48 | pubspec, 49 | includeDevDependencies: !productionDependenciesOnly, 50 | ), 51 | null, 52 | ); 53 | 54 | final visitedTransitiveDeps = {}; 55 | 56 | void addPkg(VersionedEntry key, Map value) { 57 | final pkg = VizPackage( 58 | key.name, 59 | key.version, 60 | SplayTreeSet.of( 61 | value.entries 62 | .where((element) => !_ignoredPackages.contains(element.key)) 63 | .map( 64 | (entry) => Dependency(entry.key, entry.value.toString(), false), 65 | ), 66 | ), 67 | flagOutdated ? _latest(key.name) : null, 68 | ); 69 | map[pkg.name] = pkg; 70 | 71 | visitedTransitiveDeps.addAll( 72 | pkg.dependencies 73 | .map((e) => e.name) 74 | .where((element) => !map.containsKey(element)), 75 | ); 76 | } 77 | 78 | void addSectionValues( 79 | Map> section, 80 | ) { 81 | for (var entry in section.entries) { 82 | addPkg(entry.key, entry.value); 83 | } 84 | } 85 | 86 | final deps = rootDeps(); 87 | 88 | addSectionValues(deps.sections['dependencies'] ?? const {}); 89 | 90 | if (!productionDependenciesOnly) { 91 | addSectionValues(deps.sections['dev dependencies'] ?? const {}); 92 | } 93 | 94 | if (!directDependenciesOnly) { 95 | while (visitedTransitiveDeps.isNotEmpty) { 96 | final next = visitedTransitiveDeps.first; 97 | final removed = visitedTransitiveDeps.remove(next); 98 | assert(removed, 'it should be removed'); 99 | final entry = deps.allEntries.entries.singleWhere( 100 | (element) => element.key.name == next, 101 | orElse: () => 102 | throw StateError('Could not find an entry for `$next`.'), 103 | ); 104 | 105 | addPkg(entry.key, entry.value); 106 | } 107 | } 108 | 109 | return map; 110 | } 111 | 112 | Version? _latest(String package) { 113 | final list = (_outdatedCache ??= outdated())['packages'] as List; 114 | final map = list 115 | .cast>() 116 | .singleWhereOrNull((element) => element['package'] == package); 117 | 118 | if (map == null) { 119 | return null; 120 | } 121 | 122 | final info = OutdatedInfo.fromJson(map); 123 | return info.latest; 124 | } 125 | 126 | Map outdated(); 127 | } 128 | 129 | const _ignoredPackages = { 130 | 'sky_engine', // maps to `dart:ui` in Flutter – not useful 131 | }; 132 | -------------------------------------------------------------------------------- /lib/src/util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:path/path.dart' as p; 4 | 5 | final String dartPath = p.join(_sdkDir, 'bin', 'dart'); 6 | 7 | /// The path to the root directory of the SDK. 8 | final String _sdkDir = (() { 9 | // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is 10 | // "/path/to/sdk". 11 | final aboveExecutable = p.dirname(p.dirname(Platform.resolvedExecutable)); 12 | assert(FileSystemEntity.isFileSync(p.join(aboveExecutable, 'version'))); 13 | return aboveExecutable; 14 | })(); 15 | -------------------------------------------------------------------------------- /lib/src/version.dart: -------------------------------------------------------------------------------- 1 | // Generated code. Do not modify. 2 | const packageVersion = '4.0.1'; 3 | -------------------------------------------------------------------------------- /lib/src/viz_package.dart: -------------------------------------------------------------------------------- 1 | import 'package:collection/collection.dart'; 2 | import 'package:pub_semver/pub_semver.dart'; 3 | 4 | import 'dependency.dart'; 5 | 6 | class VizPackage implements Comparable { 7 | final String name; 8 | final Version? version; 9 | final Set dependencies; 10 | bool isPrimary = false; 11 | 12 | bool _onlyDev = true; 13 | 14 | bool get onlyDev => _onlyDev; 15 | 16 | set onlyDev(bool value) { 17 | assert(value == false); 18 | assert(_onlyDev == true); 19 | 20 | _onlyDev = value; 21 | } 22 | 23 | final Version? latestVersion; 24 | 25 | VizPackage( 26 | this.name, 27 | this.version, 28 | Set deps, 29 | this.latestVersion, 30 | ) : dependencies = UnmodifiableSetView(deps); 31 | 32 | @override 33 | String toString() => '$name @ $version'; 34 | 35 | @override 36 | int compareTo(VizPackage other) => name.compareTo(other.name); 37 | 38 | @override 39 | bool operator ==(Object other) { 40 | if (other is VizPackage) { 41 | final match = name == other.name; 42 | if (match) { 43 | assert(other.version == version); 44 | return true; 45 | } 46 | } 47 | return false; 48 | } 49 | 50 | @override 51 | int get hashCode => name.hashCode; 52 | } 53 | -------------------------------------------------------------------------------- /lib/src/viz_root.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:collection'; 3 | 4 | import 'package:pub_semver/pub_semver.dart'; 5 | 6 | import 'dependency.dart'; 7 | import 'service.dart'; 8 | import 'viz_package.dart'; 9 | 10 | class VizRoot { 11 | final String rootPackageName; 12 | final Map packages; 13 | 14 | VizRoot._(this.rootPackageName, Map packages) 15 | : assert(packages.containsKey(rootPackageName)), 16 | packages = UnmodifiableMapView(packages); 17 | 18 | VizPackage get root => packages[rootPackageName]!; 19 | 20 | static Future forDirectory( 21 | Service service, { 22 | bool flagOutdated = false, 23 | Iterable? ignorePackages, 24 | bool directDependenciesOnly = false, 25 | bool productionDependenciesOnly = false, 26 | }) async { 27 | final rootPubspec = service.rootPubspec(); 28 | 29 | final packages = await service.getReferencedPackages( 30 | flagOutdated, 31 | directDependenciesOnly, 32 | productionDependenciesOnly, 33 | ); 34 | 35 | final value = VizRoot._(rootPubspec.name, packages).._update(); 36 | 37 | if (flagOutdated) { 38 | for (var dep in _allDeps(value, ignorePackages)) { 39 | assert(dep.includesLatest == null); 40 | 41 | final package = packages[dep.name]; 42 | 43 | if (package != null && 44 | package.latestVersion != null && 45 | dep.versionConstraint != VersionConstraint.empty) { 46 | var allowsLatest = 47 | dep.versionConstraint.allows(package.latestVersion!); 48 | 49 | if (!allowsLatest) { 50 | // it could be that the versionConstraint is actually *ahead* of 51 | // latest – with a pre-release version 52 | 53 | // TODO: get rid of the `as` here – this is weird! 54 | final constraintAsRange = dep.versionConstraint as VersionRange; 55 | if (package.latestVersion!.compareTo(constraintAsRange) < 0) { 56 | allowsLatest = true; 57 | } 58 | } 59 | 60 | dep.includesLatest = allowsLatest; 61 | } 62 | } 63 | } 64 | 65 | return value; 66 | } 67 | 68 | void _update() { 69 | if (root.isPrimary == false) { 70 | root.isPrimary = true; 71 | 72 | assert(root.onlyDev); 73 | root.onlyDev = false; 74 | 75 | for (var primaryDep in root.dependencies) { 76 | final package = packages[primaryDep.name]; 77 | if (package == null) continue; 78 | 79 | assert(!package.isPrimary); 80 | package.isPrimary = true; 81 | 82 | if (!primaryDep.isDevDependency) { 83 | _updateDevOnly(primaryDep); 84 | } 85 | } 86 | } 87 | } 88 | 89 | void _updateDevOnly(Dependency dep) { 90 | final package = packages[dep.name]; 91 | 92 | if (package?.onlyDev ?? false) { 93 | package!.onlyDev = false; 94 | 95 | package.dependencies 96 | .where((d) => !d.isDevDependency) 97 | .forEach(_updateDevOnly); 98 | } 99 | } 100 | } 101 | 102 | Iterable _allDeps( 103 | VizRoot root, 104 | Iterable? ignorePackages, 105 | ) sync* { 106 | ignorePackages ??= const []; 107 | for (var pkg 108 | in root.packages.values.where((v) => !ignorePackages!.contains(v.name))) { 109 | yield* pkg.dependencies; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/viz/dot.dart: -------------------------------------------------------------------------------- 1 | import 'package:gviz/gviz.dart'; 2 | 3 | import '../src/viz_package.dart'; 4 | import '../src/viz_root.dart'; 5 | 6 | String toDotHtml(VizRoot root, {List ignorePackages = const []}) { 7 | final dot = toDot(root, escapeLabels: true, ignorePackages: ignorePackages); 8 | 9 | return _dotHtmlTemplate 10 | .replaceAll(_dotPlaceHolder, dot) 11 | .replaceAll(_titlePlaceHolder, root.root.name); 12 | } 13 | 14 | String toDot( 15 | VizRoot item, { 16 | bool escapeLabels = false, 17 | Iterable ignorePackages = const [], 18 | }) { 19 | final gviz = Gviz( 20 | name: 'pubviz', 21 | graphProperties: {'nodesep': '0.2'}, 22 | edgeProperties: {'fontcolor': 'gray'}, 23 | ); 24 | 25 | for (var pack 26 | in item.packages.values.where((v) => !ignorePackages.contains(v.name))) { 27 | gviz.addBlankLine(); 28 | _writeDot(pack, gviz, item.root.name, escapeLabels, ignorePackages); 29 | } 30 | 31 | return gviz.toString(); 32 | } 33 | 34 | void _writeDot( 35 | VizPackage pkg, 36 | Gviz gviz, 37 | String rootName, 38 | bool escapeLabels, 39 | Iterable ignorePackages, 40 | ) { 41 | final isRoot = rootName == pkg.name; 42 | 43 | final newLine = escapeLabels ? r'\n' : '\n'; 44 | 45 | var label = pkg.name; 46 | if (pkg.version != null) { 47 | label = '$label$newLine${pkg.version}'; 48 | } 49 | 50 | final props = {'label': label}; 51 | 52 | if (isRoot) { 53 | assert(!pkg.onlyDev); 54 | props['fontsize'] = '18'; 55 | props['style'] = 'bold'; 56 | } 57 | 58 | if (!pkg.onlyDev) { 59 | props['shape'] = 'box'; 60 | props['margin'] = '0.25,0.15'; 61 | } 62 | 63 | if (pkg.isPrimary) { 64 | props['style'] = 'bold'; 65 | } 66 | 67 | if (!isRoot && 68 | pkg.version != null && 69 | pkg.latestVersion != null && 70 | pkg.latestVersion!.compareTo(pkg.version!) > 0) { 71 | props['color'] = 'red'; 72 | props['xlabel'] = '${pkg.latestVersion}'; 73 | } 74 | 75 | gviz.addNode(pkg.name, properties: props); 76 | 77 | final orderedDeps = pkg.dependencies.toList(growable: false)..sort(); 78 | 79 | for (var dep in orderedDeps.where((d) => !ignorePackages.contains(d.name))) { 80 | if (!dep.isDevDependency || isRoot) { 81 | final edgeProps = {}; 82 | 83 | if (!dep.versionConstraint.isAny) { 84 | edgeProps['label'] = '${dep.versionConstraint}'; 85 | } 86 | 87 | if (isRoot) { 88 | edgeProps['penwidth'] = '2'; 89 | } 90 | 91 | if (dep.isDevDependency) { 92 | edgeProps['style'] = 'dashed'; 93 | } else if (pkg.onlyDev) { 94 | edgeProps['color'] = 'gray'; 95 | } 96 | 97 | if (dep.includesLatest != null && !dep.includesLatest!) { 98 | edgeProps['fontcolor'] = 'red'; 99 | if (edgeProps['color'] == 'gray') { 100 | edgeProps['color'] = 'pink'; 101 | } else { 102 | edgeProps['color'] = 'red'; 103 | } 104 | } 105 | 106 | if (dep.name == rootName) { 107 | // If a package depends on the root node, it should not affect layout 108 | edgeProps['constraint'] = 'false'; 109 | } 110 | 111 | gviz.addEdge(pkg.name, dep.name, properties: edgeProps); 112 | } 113 | } 114 | } 115 | 116 | const _dotPlaceHolder = 'DOT_HERE'; 117 | 118 | const _titlePlaceHolder = 'PACKAGE_TITLE'; 119 | 120 | const String _dotHtmlTemplate = r''' 121 | 122 | 123 | 124 | pubviz - PACKAGE_TITLE 125 | 126 | 127 | 128 | 129 | 130 | 131 | 134 | 135 | 136 | 137 | '''; 138 | -------------------------------------------------------------------------------- /peanut.yaml: -------------------------------------------------------------------------------- 1 | # Configuration for https://pub.dev/packages/peanut 2 | directories: 3 | - example 4 | 5 | builder-options: 6 | build_web_compilers|entrypoint: 7 | dart2js_args: 8 | - --stage=dump-info-all 9 | - --no-frequency-based-minification 10 | - --no-source-maps 11 | - -O4 12 | build_web_compilers|dart2js_archive_extractor: 13 | filter_outputs: false 14 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: pubviz 2 | version: 4.0.1 3 | description: >- 4 | A tool to visualize package dependencies and version constraints in your Dart 5 | project. 6 | homepage: https://github.com/kevmoo/pubviz 7 | 8 | environment: 9 | sdk: ^3.5.0 10 | 11 | dependencies: 12 | args: ^2.6.0 13 | build_cli_annotations: ^2.1.0 14 | collection: ^1.17.0 15 | gviz: ^0.4.0 16 | http: ^1.0.0 17 | io: ^1.0.0 18 | path: ^1.8.0 19 | pub_semver: ^2.0.0 20 | pubspec_parse: ^1.4.0 21 | stack_trace: ^1.10.0 22 | string_scanner: ^1.1.0 23 | yaml: ^3.1.0 24 | 25 | dev_dependencies: 26 | build_cli: ^2.2.1 27 | build_runner: ^2.4.8 28 | build_verify: ^3.0.0 29 | build_version: ^2.0.3 30 | build_web_compilers: ^4.0.10 31 | dart_flutter_team_lints: ^3.0.0 32 | test: ^1.25.1 33 | test_descriptor: ^2.0.0 34 | test_process: ^2.0.0 35 | web: ^1.0.0 36 | 37 | executables: 38 | pubviz: null 39 | -------------------------------------------------------------------------------- /test/cli_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:path/path.dart' as p; 4 | import 'package:pubviz/src/util.dart'; 5 | import 'package:pubviz/src/version.dart'; 6 | import 'package:test/test.dart'; 7 | import 'package:test_process/test_process.dart'; 8 | 9 | final _entryPoint = p.join('bin', 'pubviz.dart'); 10 | 11 | void main() { 12 | test('help', () async { 13 | final proc = await TestProcess.start(dartPath, [_entryPoint, '--help']); 14 | 15 | final output = await proc.stdoutStream().join('\n'); 16 | expect(output, _usage); 17 | 18 | await proc.shouldExit(0); 19 | }); 20 | 21 | test('version', () async { 22 | final proc = await TestProcess.start(dartPath, [_entryPoint, '--version']); 23 | 24 | final output = await proc.stdoutStream().join('\n'); 25 | expect(output, packageVersion); 26 | 27 | await proc.shouldExit(0); 28 | }); 29 | 30 | test('bad flag', () async { 31 | final proc = await TestProcess.start(dartPath, [_entryPoint, '--bob']); 32 | 33 | final output = await proc.stdoutStream().join('\n'); 34 | expect( 35 | output, 36 | '''Could not find an option named "--bob". 37 | 38 | $_usage''', 39 | ); 40 | 41 | await proc.shouldExit(64); 42 | }); 43 | 44 | test('no command', () async { 45 | final proc = await TestProcess.start(dartPath, [_entryPoint]); 46 | 47 | final output = await proc.stdoutStream().join('\n'); 48 | expect( 49 | output, 50 | '''Specify a command: open, print 51 | 52 | $_usage''', 53 | ); 54 | 55 | await proc.shouldExit(64); 56 | }); 57 | 58 | test('print dot', () async { 59 | final process = await TestProcess.start( 60 | dartPath, 61 | [_entryPoint, '-f', 'dot', 'print'], 62 | ); 63 | 64 | await expectLater(process.stdout, emits('digraph pubviz {')); 65 | 66 | await process.shouldExit(0); 67 | }); 68 | 69 | test('print dot with outdated', () async { 70 | final process = await TestProcess.start( 71 | dartPath, 72 | [_entryPoint, '-o', '-f', 'dot', 'print'], 73 | ); 74 | 75 | await expectLater(process.stdout, emits('digraph pubviz {')); 76 | 77 | await process.shouldExit(0); 78 | }); 79 | 80 | test('readme', () { 81 | final readmeContent = File('README.md').readAsStringSync(); 82 | 83 | expect( 84 | readmeContent, 85 | contains(['```console', r'$ pubviz -?', _usage, '```'].join('\n')), 86 | ); 87 | }); 88 | } 89 | 90 | const _usage = r'''Usage: pubviz [] [] 91 | 92 | Commands: 93 | open Populate a temporary file with the content and open it. 94 | print Print the output to stdout. 95 | 96 | Arguments: 97 | -f, --format= 98 | [dot] Generate a GraphViz dot file 99 | [html] (default) Wrap the GraphViz dot format in an HTML template which renders it. 100 | 101 | -i, --ignore-packages A comma separated list of packages to exclude in the output. 102 | -o, --[no-]flag-outdated Check pub.dev for lasted packages and flag those that are outdated. 103 | -d, --direct-dependencies Include only direct dependencies. 104 | -p, --production-dependencies Include only production (non-dev) dependencies. 105 | -v, --version Print the version of pubviz and exit. 106 | -?, --help Print this help content. 107 | 108 | If is omitted, the current directory is used.'''; 109 | -------------------------------------------------------------------------------- /test/deps/empty_deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "2.8.0-dev.20.7" 4 | }, 5 | "packages": { 6 | "meta": { 7 | "name": "meta", 8 | "version": "1.1.8", 9 | "sections": {} 10 | } 11 | }, 12 | "transitiveDependencies": {} 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/deps/empty_deps.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 2.8.0-dev.20.7 2 | meta 1.1.8 3 | -------------------------------------------------------------------------------- /test/deps/flutter_gallery.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "2.9.0-3.0.dev.flutter-a69cb6d700", 4 | "Flutter": "1.18.0-9.0.pre.46" 5 | }, 6 | "packages": { 7 | "gallery": { 8 | "name": "gallery", 9 | "version": "2.3.0+020300", 10 | "sections": { 11 | "dependencies": { 12 | "flutter @ 0.0.0": { 13 | "collection": "1.14.12", 14 | "meta": "1.1.8", 15 | "typed_data": "1.1.6", 16 | "vector_math": "2.0.8", 17 | "sky_engine": "any" 18 | }, 19 | "flutter_localizations @ 0.0.0": { 20 | "flutter": "any", 21 | "intl": "0.16.1", 22 | "collection": "1.14.12", 23 | "meta": "1.1.8", 24 | "path": "1.7.0", 25 | "typed_data": "1.1.6", 26 | "vector_math": "2.0.8" 27 | }, 28 | "intl @ 0.16.1": { 29 | "path": ">=0.9.0 <2.0.0" 30 | }, 31 | "intl_translation @ 0.17.10": { 32 | "analyzer": ">=0.36.0 <0.40.0", 33 | "args": ">=0.12.1 <2.0.0", 34 | "dart_style": "^1.0.0", 35 | "intl": ">=0.15.3 <0.17.0", 36 | "path": ">=0.9.0 <2.0.0", 37 | "petitparser": "^3.0.0" 38 | }, 39 | "flutter_localized_locales @ 1.1.1": { 40 | "flutter": "any", 41 | "flutter_localizations": "any", 42 | "intl": "^0.16.0" 43 | }, 44 | "cupertino_icons @ 0.1.3": {}, 45 | "rally_assets @ 2.0.0": { 46 | "flutter": "any" 47 | }, 48 | "meta @ 1.1.8": {}, 49 | "scoped_model @ 1.0.1": { 50 | "flutter": "any" 51 | }, 52 | "shrine_images @ 1.1.2": { 53 | "flutter": "any" 54 | }, 55 | "flare_flutter @ 2.0.3": { 56 | "flutter": "any", 57 | "flare_dart": "^2.3.4", 58 | "meta": "^1.0.5" 59 | }, 60 | "url_launcher @ 5.4.5": { 61 | "flutter": "any", 62 | "url_launcher_platform_interface": "^1.0.4", 63 | "url_launcher_web": "^0.1.0+1", 64 | "url_launcher_macos": "^0.0.1" 65 | }, 66 | "shared_preferences @ 0.5.7": { 67 | "meta": "^1.0.4", 68 | "flutter": "any", 69 | "shared_preferences_platform_interface": "^1.0.0", 70 | "shared_preferences_macos": "^0.0.1", 71 | "shared_preferences_web": "^0.1.2" 72 | }, 73 | "collection @ 1.14.12": {}, 74 | "flutter_gallery_assets @ 0.2.0": {}, 75 | "package_info @ 0.4.0+17": { 76 | "flutter": "any" 77 | }, 78 | "google_fonts @ 1.0.0": { 79 | "flutter": "any", 80 | "http": "^0.12.0+2", 81 | "path_provider": "^1.4.0", 82 | "crypto": "^2.1.3", 83 | "pedantic": "^1.8.0" 84 | }, 85 | "flutter_staggered_grid_view @ 0.3.0": { 86 | "flutter": "any" 87 | } 88 | }, 89 | "dev dependencies": { 90 | "flutter_test @ 0.0.0": { 91 | "flutter": "any", 92 | "test_api": "0.2.15", 93 | "path": "1.7.0", 94 | "fake_async": "1.1.0", 95 | "clock": "1.0.1", 96 | "stack_trace": "1.9.3", 97 | "vector_math": "2.0.8", 98 | "async": "2.4.1", 99 | "boolean_selector": "2.0.0", 100 | "charcode": "1.1.3", 101 | "collection": "1.14.12", 102 | "matcher": "0.12.6", 103 | "meta": "1.1.8", 104 | "source_span": "1.7.0", 105 | "stream_channel": "2.0.0", 106 | "string_scanner": "1.0.5", 107 | "term_glyph": "1.1.0", 108 | "typed_data": "1.1.6" 109 | }, 110 | "flutter_driver @ 0.0.0": { 111 | "file": "5.1.0", 112 | "json_rpc_2": "2.1.1", 113 | "meta": "1.1.8", 114 | "path": "1.7.0", 115 | "web_socket_channel": "1.1.0", 116 | "vm_service_client": "0.2.6+2", 117 | "webdriver": "2.1.2", 118 | "flutter": "any", 119 | "flutter_test": "any", 120 | "fuchsia_remote_debug_protocol": "any", 121 | "archive": "2.0.13", 122 | "args": "1.6.0", 123 | "async": "2.4.1", 124 | "boolean_selector": "2.0.0", 125 | "charcode": "1.1.3", 126 | "clock": "1.0.1", 127 | "collection": "1.14.12", 128 | "convert": "2.1.1", 129 | "crypto": "2.1.4", 130 | "fake_async": "1.1.0", 131 | "intl": "0.16.1", 132 | "matcher": "0.12.6", 133 | "platform": "2.2.1", 134 | "process": "3.0.12", 135 | "pub_semver": "1.4.4", 136 | "source_span": "1.7.0", 137 | "stack_trace": "1.9.3", 138 | "stream_channel": "2.0.0", 139 | "string_scanner": "1.0.5", 140 | "sync_http": "0.2.0", 141 | "term_glyph": "1.1.0", 142 | "test_api": "0.2.15", 143 | "typed_data": "1.1.6", 144 | "vector_math": "2.0.8" 145 | }, 146 | "test @ 1.14.2": { 147 | "analyzer": ">=0.36.0 <0.40.0", 148 | "async": "^2.0.0", 149 | "boolean_selector": ">=1.0.0 <3.0.0", 150 | "coverage": "^0.13.4", 151 | "http": "^0.12.0", 152 | "http_multi_server": "^2.0.0", 153 | "io": "^0.3.0", 154 | "js": "^0.6.0", 155 | "multi_server_socket": "^1.0.0", 156 | "node_preamble": "^1.3.0", 157 | "package_config": "^1.9.0", 158 | "path": "^1.2.0", 159 | "pedantic": "^1.1.0", 160 | "pool": "^1.3.0", 161 | "shelf": "^0.7.0", 162 | "shelf_packages_handler": ">=1.0.0 <3.0.0", 163 | "shelf_static": "^0.2.6", 164 | "shelf_web_socket": "^0.2.0", 165 | "source_span": "^1.4.0", 166 | "stack_trace": "^1.9.0", 167 | "stream_channel": ">=1.7.0 <3.0.0", 168 | "typed_data": "^1.0.0", 169 | "web_socket_channel": "^1.0.0", 170 | "webkit_inspection_protocol": "^0.5.0", 171 | "yaml": "^2.0.0", 172 | "test_api": "0.2.15", 173 | "test_core": "0.3.3" 174 | }, 175 | "grinder @ 0.8.4": { 176 | "cli_util": "^0.1.2", 177 | "glob": "^1.0.0", 178 | "meta": "^1.1.7", 179 | "path": "^1.0.0" 180 | }, 181 | "pedantic @ 1.9.0": {}, 182 | "string_scanner @ 1.0.5": { 183 | "charcode": "^1.1.0", 184 | "meta": "^1.1.0", 185 | "source_span": "^1.4.0" 186 | } 187 | } 188 | } 189 | } 190 | }, 191 | "transitiveDependencies": { 192 | "_fe_analyzer_shared @ 2.2.0": { 193 | "meta": "^1.0.2" 194 | }, 195 | "analyzer @ 0.39.7": { 196 | "_fe_analyzer_shared": "^2.2.0", 197 | "args": "^1.0.0", 198 | "charcode": "^1.1.0", 199 | "collection": "^1.10.1", 200 | "convert": "^2.0.0", 201 | "crypto": "^2.0.0", 202 | "glob": "^1.0.3", 203 | "html": ">=0.13.4+1 <0.15.0", 204 | "meta": "^1.0.2", 205 | "package_config": "^1.0.0", 206 | "path": "^1.0.0", 207 | "pub_semver": "^1.4.2", 208 | "source_span": "^1.2.0", 209 | "watcher": "^0.9.6", 210 | "yaml": "^2.1.2" 211 | }, 212 | "archive @ 2.0.13": { 213 | "crypto": ">=2.0.0 <3.0.0", 214 | "args": ">=1.4.0 <2.0.0", 215 | "path": ">=1.5.1 <2.0.0" 216 | }, 217 | "args @ 1.6.0": {}, 218 | "async @ 2.4.1": { 219 | "collection": "^1.5.0" 220 | }, 221 | "boolean_selector @ 2.0.0": { 222 | "source_span": "^1.0.0", 223 | "string_scanner": "^1.0.0" 224 | }, 225 | "charcode @ 1.1.3": {}, 226 | "cli_util @ 0.1.3+2": { 227 | "path": ">=1.0.0 <2.0.0" 228 | }, 229 | "clock @ 1.0.1": { 230 | "meta": ">=0.9.0 <2.0.0" 231 | }, 232 | "convert @ 2.1.1": { 233 | "charcode": "^1.1.0", 234 | "typed_data": "^1.1.0" 235 | }, 236 | "coverage @ 0.13.9": { 237 | "args": "^1.4.0", 238 | "logging": ">=0.9.0 <0.12.0", 239 | "package_config": "^1.9.0", 240 | "path": ">=0.9.0 <2.0.0", 241 | "source_maps": "^0.10.8", 242 | "stack_trace": "^1.3.0", 243 | "vm_service": ">=1.0.0 <5.0.0" 244 | }, 245 | "crypto @ 2.1.4": { 246 | "collection": "^1.0.0", 247 | "convert": ">=1.0.0 <3.0.0", 248 | "typed_data": "^1.0.0" 249 | }, 250 | "csslib @ 0.16.1": { 251 | "source_span": "^1.4.0" 252 | }, 253 | "dart_style @ 1.3.6": { 254 | "analyzer": ">=0.39.5 <0.40.0", 255 | "args": "^1.0.0", 256 | "path": "^1.0.0", 257 | "source_span": "^1.4.0" 258 | }, 259 | "fake_async @ 1.1.0": { 260 | "clock": "^1.0.0", 261 | "collection": "^1.8.0" 262 | }, 263 | "file @ 5.1.0": { 264 | "intl": ">=0.14.0 <1.0.0", 265 | "meta": "^1.1.2", 266 | "path": "^1.5.1" 267 | }, 268 | "flare_dart @ 2.3.4": {}, 269 | "flutter_web_plugins @ 0.0.0": { 270 | "flutter": "any", 271 | "collection": "1.14.12", 272 | "meta": "1.1.8", 273 | "typed_data": "1.1.6", 274 | "vector_math": "2.0.8" 275 | }, 276 | "fuchsia_remote_debug_protocol @ 0.0.0": { 277 | "json_rpc_2": "2.1.1", 278 | "process": "3.0.12", 279 | "web_socket_channel": "1.1.0", 280 | "flutter_test": "any", 281 | "flutter_driver": "any", 282 | "archive": "2.0.13", 283 | "args": "1.6.0", 284 | "async": "2.4.1", 285 | "boolean_selector": "2.0.0", 286 | "charcode": "1.1.3", 287 | "clock": "1.0.1", 288 | "collection": "1.14.12", 289 | "convert": "2.1.1", 290 | "crypto": "2.1.4", 291 | "fake_async": "1.1.0", 292 | "file": "5.1.0", 293 | "intl": "0.16.1", 294 | "matcher": "0.12.6", 295 | "meta": "1.1.8", 296 | "path": "1.7.0", 297 | "platform": "2.2.1", 298 | "pub_semver": "1.4.4", 299 | "source_span": "1.7.0", 300 | "stack_trace": "1.9.3", 301 | "stream_channel": "2.0.0", 302 | "string_scanner": "1.0.5", 303 | "sync_http": "0.2.0", 304 | "term_glyph": "1.1.0", 305 | "test_api": "0.2.15", 306 | "typed_data": "1.1.6", 307 | "vector_math": "2.0.8", 308 | "vm_service_client": "0.2.6+2", 309 | "webdriver": "2.1.2" 310 | }, 311 | "glob @ 1.2.0": { 312 | "async": ">=1.2.0 <3.0.0", 313 | "collection": "^1.1.0", 314 | "node_io": "^1.0.0", 315 | "path": "^1.3.0", 316 | "pedantic": "^1.2.0", 317 | "string_scanner": ">=0.1.0 <2.0.0" 318 | }, 319 | "html @ 0.14.0+3": { 320 | "csslib": ">=0.13.2 <0.17.0", 321 | "source_span": ">=1.0.0 <2.0.0" 322 | }, 323 | "http @ 0.12.0+4": { 324 | "async": ">=1.10.0 <3.0.0", 325 | "http_parser": ">=0.0.1 <4.0.0", 326 | "path": ">=0.9.0 <2.0.0", 327 | "pedantic": "^1.0.0" 328 | }, 329 | "http_multi_server @ 2.2.0": { 330 | "async": ">=1.2.0 <3.0.0" 331 | }, 332 | "http_parser @ 3.1.4": { 333 | "charcode": "^1.1.0", 334 | "collection": ">=0.9.1 <2.0.0", 335 | "source_span": "^1.0.0", 336 | "string_scanner": ">=0.0.0 <2.0.0", 337 | "typed_data": "^1.1.0" 338 | }, 339 | "io @ 0.3.4": { 340 | "charcode": "^1.0.0", 341 | "meta": "^1.0.2", 342 | "path": "^1.5.1", 343 | "string_scanner": ">=0.1.5 <2.0.0" 344 | }, 345 | "js @ 0.6.1+1": {}, 346 | "json_rpc_2 @ 2.1.1": { 347 | "stack_trace": "^1.0.0", 348 | "stream_channel": ">=1.1.0 <3.0.0" 349 | }, 350 | "logging @ 0.11.4": {}, 351 | "matcher @ 0.12.6": { 352 | "stack_trace": "^1.2.0" 353 | }, 354 | "mime @ 0.9.6+3": {}, 355 | "multi_server_socket @ 1.0.2": { 356 | "async": ">=1.2.0 <3.0.0" 357 | }, 358 | "node_interop @ 1.0.3": { 359 | "js": "^0.6.1" 360 | }, 361 | "node_io @ 1.0.1+2": { 362 | "node_interop": "^1.0.1", 363 | "path": "^1.6.2" 364 | }, 365 | "node_preamble @ 1.4.8": {}, 366 | "package_config @ 1.9.3": { 367 | "path": "^1.6.4", 368 | "charcode": "^1.1.0" 369 | }, 370 | "path @ 1.7.0": {}, 371 | "path_provider @ 1.6.7": { 372 | "flutter": "any", 373 | "path_provider_platform_interface": "^1.0.1", 374 | "path_provider_macos": "^0.0.4" 375 | }, 376 | "path_provider_macos @ 0.0.4+1": { 377 | "flutter": "any" 378 | }, 379 | "path_provider_platform_interface @ 1.0.1": { 380 | "flutter": "any", 381 | "meta": "^1.0.5", 382 | "platform": "^2.0.0", 383 | "plugin_platform_interface": "^1.0.1" 384 | }, 385 | "petitparser @ 3.0.2": { 386 | "meta": "^1.1.0" 387 | }, 388 | "platform @ 2.2.1": {}, 389 | "plugin_platform_interface @ 1.0.2": { 390 | "meta": "^1.0.0" 391 | }, 392 | "pool @ 1.4.0": { 393 | "async": ">=1.4.0 <3.0.0", 394 | "stack_trace": ">=0.9.2 <2.0.0" 395 | }, 396 | "process @ 3.0.12": { 397 | "file": "^5.0.0", 398 | "intl": ">=0.14.0 <0.17.0", 399 | "meta": "^1.1.2", 400 | "path": "^1.5.1", 401 | "platform": ">=1.0.1" 402 | }, 403 | "pub_semver @ 1.4.4": { 404 | "collection": "^1.0.0" 405 | }, 406 | "shared_preferences_macos @ 0.0.1+7": { 407 | "shared_preferences_platform_interface": "^1.0.0", 408 | "flutter": "any" 409 | }, 410 | "shared_preferences_platform_interface @ 1.0.3": { 411 | "meta": "^1.0.4", 412 | "flutter": "any" 413 | }, 414 | "shared_preferences_web @ 0.1.2+4": { 415 | "shared_preferences_platform_interface": "^1.0.0", 416 | "flutter": "any", 417 | "flutter_web_plugins": "any", 418 | "meta": "^1.1.7" 419 | }, 420 | "shelf @ 0.7.5": { 421 | "async": "^2.0.7", 422 | "collection": "^1.5.0", 423 | "http_parser": "^3.1.0", 424 | "path": "^1.0.0", 425 | "stack_trace": "^1.0.0", 426 | "stream_channel": ">=1.0.0 <3.0.0" 427 | }, 428 | "shelf_packages_handler @ 2.0.0": { 429 | "path": "^1.0.0", 430 | "shelf": "^0.7.0", 431 | "shelf_static": "^0.2.0" 432 | }, 433 | "shelf_static @ 0.2.8": { 434 | "convert": ">=1.0.0 <3.0.0", 435 | "http_parser": ">=0.0.2+2 <4.0.0", 436 | "mime": ">=0.9.0 <0.10.0", 437 | "path": ">=1.1.0 <2.0.0", 438 | "shelf": ">=0.5.7 <0.8.0" 439 | }, 440 | "shelf_web_socket @ 0.2.3": { 441 | "shelf": "^0.7.0", 442 | "web_socket_channel": "^1.0.0", 443 | "stream_channel": ">1.4.0 <3.0.0" 444 | }, 445 | "sky_engine @ 0.0.99": {}, 446 | "source_map_stack_trace @ 2.0.0": { 447 | "path": "^1.0.0", 448 | "stack_trace": "^1.0.0", 449 | "source_maps": "^0.10.2" 450 | }, 451 | "source_maps @ 0.10.9": { 452 | "source_span": "^1.3.0" 453 | }, 454 | "source_span @ 1.7.0": { 455 | "charcode": "^1.0.0", 456 | "collection": "^1.8.0", 457 | "meta": ">=0.9.0 <2.0.0", 458 | "path": ">=1.2.0 <2.0.0", 459 | "term_glyph": "^1.0.0" 460 | }, 461 | "stack_trace @ 1.9.3": { 462 | "path": "^1.2.0" 463 | }, 464 | "stream_channel @ 2.0.0": { 465 | "async": ">=1.11.0 <3.0.0" 466 | }, 467 | "sync_http @ 0.2.0": {}, 468 | "term_glyph @ 1.1.0": {}, 469 | "test_api @ 0.2.15": { 470 | "async": "^2.0.0", 471 | "boolean_selector": ">=1.0.0 <3.0.0", 472 | "collection": "^1.8.0", 473 | "meta": "^1.1.5", 474 | "path": "^1.2.0", 475 | "source_span": "^1.4.0", 476 | "stack_trace": "^1.9.0", 477 | "stream_channel": ">=1.7.0 <3.0.0", 478 | "string_scanner": "^1.0.0", 479 | "term_glyph": "^1.0.0", 480 | "matcher": ">=0.12.6 <0.12.7" 481 | }, 482 | "test_core @ 0.3.3": { 483 | "analyzer": ">=0.36.0 <0.40.0", 484 | "async": "^2.0.0", 485 | "args": "^1.4.0", 486 | "boolean_selector": ">=1.0.0 <3.0.0", 487 | "collection": "^1.8.0", 488 | "coverage": "^0.13.3", 489 | "glob": "^1.0.0", 490 | "io": "^0.3.0", 491 | "meta": "^1.1.5", 492 | "path": "^1.2.0", 493 | "pedantic": "^1.0.0", 494 | "pool": "^1.3.0", 495 | "source_map_stack_trace": "^2.0.0", 496 | "source_maps": "^0.10.2", 497 | "source_span": "^1.4.0", 498 | "stack_trace": "^1.9.0", 499 | "stream_channel": ">=1.7.0 <3.0.0", 500 | "vm_service": ">=1.0.0 <5.0.0", 501 | "yaml": "^2.0.0", 502 | "matcher": ">=0.12.6 <0.12.7", 503 | "test_api": "0.2.15" 504 | }, 505 | "typed_data @ 1.1.6": {}, 506 | "url_launcher_macos @ 0.0.1+5": { 507 | "flutter": "any" 508 | }, 509 | "url_launcher_platform_interface @ 1.0.6": { 510 | "flutter": "any", 511 | "meta": "^1.0.5", 512 | "plugin_platform_interface": "^1.0.1" 513 | }, 514 | "url_launcher_web @ 0.1.1+2": { 515 | "url_launcher_platform_interface": "^1.0.1", 516 | "flutter": "any", 517 | "flutter_web_plugins": "any", 518 | "meta": "^1.1.7", 519 | "js": "^0.6.0" 520 | }, 521 | "vector_math @ 2.0.8": {}, 522 | "vm_service @ 4.0.2": { 523 | "meta": "^1.0.2" 524 | }, 525 | "vm_service_client @ 0.2.6+2": { 526 | "async": "^2.0.0", 527 | "collection": "^1.5.0", 528 | "json_rpc_2": "^2.0.0", 529 | "pub_semver": "^1.0.0", 530 | "source_span": "^1.4.0", 531 | "stack_trace": "^1.5.0", 532 | "stream_channel": ">=1.1.0 <3.0.0", 533 | "web_socket_channel": "^1.0.0" 534 | }, 535 | "watcher @ 0.9.7+15": { 536 | "async": "^2.0.0", 537 | "path": "^1.0.0", 538 | "pedantic": "^1.1.0" 539 | }, 540 | "web_socket_channel @ 1.1.0": { 541 | "async": ">=1.3.0 <3.0.0", 542 | "crypto": ">=0.9.2 <3.0.0", 543 | "stream_channel": ">=1.2.0 <3.0.0" 544 | }, 545 | "webdriver @ 2.1.2": { 546 | "archive": ">=1.0.0 <3.0.0", 547 | "matcher": "^0.12.3", 548 | "path": "^1.3.0", 549 | "stack_trace": "^1.3.0", 550 | "sync_http": ">=0.1.1 <0.3.0" 551 | }, 552 | "webkit_inspection_protocol @ 0.5.0+1": { 553 | "logging": "^0.11.0" 554 | }, 555 | "yaml @ 2.2.0": { 556 | "charcode": "^1.1.0", 557 | "collection": ">=1.1.0 <2.0.0", 558 | "string_scanner": ">=0.1.4 <2.0.0", 559 | "source_span": ">=1.0.0 <2.0.0" 560 | } 561 | } 562 | } 563 | 564 | -------------------------------------------------------------------------------- /test/deps/flutter_gallery.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 2.9.0-3.0.dev.flutter-a69cb6d700 2 | Flutter SDK 1.18.0-9.0.pre.46 3 | gallery 2.3.0+020300 4 | 5 | dependencies: 6 | - flutter 0.0.0 7 | - collection 1.14.12 8 | - meta 1.1.8 9 | - typed_data 1.1.6 10 | - vector_math 2.0.8 11 | - sky_engine any 12 | - flutter_localizations 0.0.0 13 | - flutter any 14 | - intl 0.16.1 15 | - collection 1.14.12 16 | - meta 1.1.8 17 | - path 1.7.0 18 | - typed_data 1.1.6 19 | - vector_math 2.0.8 20 | - intl 0.16.1 21 | - path >=0.9.0 <2.0.0 22 | - intl_translation 0.17.10 23 | - analyzer >=0.36.0 <0.40.0 24 | - args >=0.12.1 <2.0.0 25 | - dart_style ^1.0.0 26 | - intl >=0.15.3 <0.17.0 27 | - path >=0.9.0 <2.0.0 28 | - petitparser ^3.0.0 29 | - flutter_localized_locales 1.1.1 30 | - flutter any 31 | - flutter_localizations any 32 | - intl ^0.16.0 33 | - cupertino_icons 0.1.3 34 | - rally_assets 2.0.0 35 | - flutter any 36 | - meta 1.1.8 37 | - scoped_model 1.0.1 38 | - flutter any 39 | - shrine_images 1.1.2 40 | - flutter any 41 | - flare_flutter 2.0.3 42 | - flutter any 43 | - flare_dart ^2.3.4 44 | - meta ^1.0.5 45 | - url_launcher 5.4.5 46 | - flutter any 47 | - url_launcher_platform_interface ^1.0.4 48 | - url_launcher_web ^0.1.0+1 49 | - url_launcher_macos ^0.0.1 50 | - shared_preferences 0.5.7 51 | - meta ^1.0.4 52 | - flutter any 53 | - shared_preferences_platform_interface ^1.0.0 54 | - shared_preferences_macos ^0.0.1 55 | - shared_preferences_web ^0.1.2 56 | - collection 1.14.12 57 | - flutter_gallery_assets 0.2.0 58 | - package_info 0.4.0+17 59 | - flutter any 60 | - google_fonts 1.0.0 61 | - flutter any 62 | - http ^0.12.0+2 63 | - path_provider ^1.4.0 64 | - crypto ^2.1.3 65 | - pedantic ^1.8.0 66 | - flutter_staggered_grid_view 0.3.0 67 | - flutter any 68 | 69 | dev dependencies: 70 | - flutter_test 0.0.0 71 | - flutter any 72 | - test_api 0.2.15 73 | - path 1.7.0 74 | - fake_async 1.1.0 75 | - clock 1.0.1 76 | - stack_trace 1.9.3 77 | - vector_math 2.0.8 78 | - async 2.4.1 79 | - boolean_selector 2.0.0 80 | - charcode 1.1.3 81 | - collection 1.14.12 82 | - matcher 0.12.6 83 | - meta 1.1.8 84 | - source_span 1.7.0 85 | - stream_channel 2.0.0 86 | - string_scanner 1.0.5 87 | - term_glyph 1.1.0 88 | - typed_data 1.1.6 89 | - flutter_driver 0.0.0 90 | - file 5.1.0 91 | - json_rpc_2 2.1.1 92 | - meta 1.1.8 93 | - path 1.7.0 94 | - web_socket_channel 1.1.0 95 | - vm_service_client 0.2.6+2 96 | - webdriver 2.1.2 97 | - flutter any 98 | - flutter_test any 99 | - fuchsia_remote_debug_protocol any 100 | - archive 2.0.13 101 | - args 1.6.0 102 | - async 2.4.1 103 | - boolean_selector 2.0.0 104 | - charcode 1.1.3 105 | - clock 1.0.1 106 | - collection 1.14.12 107 | - convert 2.1.1 108 | - crypto 2.1.4 109 | - fake_async 1.1.0 110 | - intl 0.16.1 111 | - matcher 0.12.6 112 | - platform 2.2.1 113 | - process 3.0.12 114 | - pub_semver 1.4.4 115 | - source_span 1.7.0 116 | - stack_trace 1.9.3 117 | - stream_channel 2.0.0 118 | - string_scanner 1.0.5 119 | - sync_http 0.2.0 120 | - term_glyph 1.1.0 121 | - test_api 0.2.15 122 | - typed_data 1.1.6 123 | - vector_math 2.0.8 124 | - test 1.14.2 125 | - analyzer >=0.36.0 <0.40.0 126 | - async ^2.0.0 127 | - boolean_selector >=1.0.0 <3.0.0 128 | - coverage ^0.13.4 129 | - http ^0.12.0 130 | - http_multi_server ^2.0.0 131 | - io ^0.3.0 132 | - js ^0.6.0 133 | - multi_server_socket ^1.0.0 134 | - node_preamble ^1.3.0 135 | - package_config ^1.9.0 136 | - path ^1.2.0 137 | - pedantic ^1.1.0 138 | - pool ^1.3.0 139 | - shelf ^0.7.0 140 | - shelf_packages_handler >=1.0.0 <3.0.0 141 | - shelf_static ^0.2.6 142 | - shelf_web_socket ^0.2.0 143 | - source_span ^1.4.0 144 | - stack_trace ^1.9.0 145 | - stream_channel >=1.7.0 <3.0.0 146 | - typed_data ^1.0.0 147 | - web_socket_channel ^1.0.0 148 | - webkit_inspection_protocol ^0.5.0 149 | - yaml ^2.0.0 150 | - test_api 0.2.15 151 | - test_core 0.3.3 152 | - grinder 0.8.4 153 | - cli_util ^0.1.2 154 | - glob ^1.0.0 155 | - meta ^1.1.7 156 | - path ^1.0.0 157 | - pedantic 1.9.0 158 | - string_scanner 1.0.5 159 | - charcode ^1.1.0 160 | - meta ^1.1.0 161 | - source_span ^1.4.0 162 | 163 | transitive dependencies: 164 | - _fe_analyzer_shared 2.2.0 165 | - meta ^1.0.2 166 | - analyzer 0.39.7 167 | - _fe_analyzer_shared ^2.2.0 168 | - args ^1.0.0 169 | - charcode ^1.1.0 170 | - collection ^1.10.1 171 | - convert ^2.0.0 172 | - crypto ^2.0.0 173 | - glob ^1.0.3 174 | - html >=0.13.4+1 <0.15.0 175 | - meta ^1.0.2 176 | - package_config ^1.0.0 177 | - path ^1.0.0 178 | - pub_semver ^1.4.2 179 | - source_span ^1.2.0 180 | - watcher ^0.9.6 181 | - yaml ^2.1.2 182 | - archive 2.0.13 183 | - crypto >=2.0.0 <3.0.0 184 | - args >=1.4.0 <2.0.0 185 | - path >=1.5.1 <2.0.0 186 | - args 1.6.0 187 | - async 2.4.1 188 | - collection ^1.5.0 189 | - boolean_selector 2.0.0 190 | - source_span ^1.0.0 191 | - string_scanner ^1.0.0 192 | - charcode 1.1.3 193 | - cli_util 0.1.3+2 194 | - path >=1.0.0 <2.0.0 195 | - clock 1.0.1 196 | - meta >=0.9.0 <2.0.0 197 | - convert 2.1.1 198 | - charcode ^1.1.0 199 | - typed_data ^1.1.0 200 | - coverage 0.13.9 201 | - args ^1.4.0 202 | - logging >=0.9.0 <0.12.0 203 | - package_config ^1.9.0 204 | - path >=0.9.0 <2.0.0 205 | - source_maps ^0.10.8 206 | - stack_trace ^1.3.0 207 | - vm_service >=1.0.0 <5.0.0 208 | - crypto 2.1.4 209 | - collection ^1.0.0 210 | - convert >=1.0.0 <3.0.0 211 | - typed_data ^1.0.0 212 | - csslib 0.16.1 213 | - source_span ^1.4.0 214 | - dart_style 1.3.6 215 | - analyzer >=0.39.5 <0.40.0 216 | - args ^1.0.0 217 | - path ^1.0.0 218 | - source_span ^1.4.0 219 | - fake_async 1.1.0 220 | - clock ^1.0.0 221 | - collection ^1.8.0 222 | - file 5.1.0 223 | - intl >=0.14.0 <1.0.0 224 | - meta ^1.1.2 225 | - path ^1.5.1 226 | - flare_dart 2.3.4 227 | - flutter_web_plugins 0.0.0 228 | - flutter any 229 | - collection 1.14.12 230 | - meta 1.1.8 231 | - typed_data 1.1.6 232 | - vector_math 2.0.8 233 | - fuchsia_remote_debug_protocol 0.0.0 234 | - json_rpc_2 2.1.1 235 | - process 3.0.12 236 | - web_socket_channel 1.1.0 237 | - flutter_test any 238 | - flutter_driver any 239 | - archive 2.0.13 240 | - args 1.6.0 241 | - async 2.4.1 242 | - boolean_selector 2.0.0 243 | - charcode 1.1.3 244 | - clock 1.0.1 245 | - collection 1.14.12 246 | - convert 2.1.1 247 | - crypto 2.1.4 248 | - fake_async 1.1.0 249 | - file 5.1.0 250 | - intl 0.16.1 251 | - matcher 0.12.6 252 | - meta 1.1.8 253 | - path 1.7.0 254 | - platform 2.2.1 255 | - pub_semver 1.4.4 256 | - source_span 1.7.0 257 | - stack_trace 1.9.3 258 | - stream_channel 2.0.0 259 | - string_scanner 1.0.5 260 | - sync_http 0.2.0 261 | - term_glyph 1.1.0 262 | - test_api 0.2.15 263 | - typed_data 1.1.6 264 | - vector_math 2.0.8 265 | - vm_service_client 0.2.6+2 266 | - webdriver 2.1.2 267 | - glob 1.2.0 268 | - async >=1.2.0 <3.0.0 269 | - collection ^1.1.0 270 | - node_io ^1.0.0 271 | - path ^1.3.0 272 | - pedantic ^1.2.0 273 | - string_scanner >=0.1.0 <2.0.0 274 | - html 0.14.0+3 275 | - csslib >=0.13.2 <0.17.0 276 | - source_span >=1.0.0 <2.0.0 277 | - http 0.12.0+4 278 | - async >=1.10.0 <3.0.0 279 | - http_parser >=0.0.1 <4.0.0 280 | - path >=0.9.0 <2.0.0 281 | - pedantic ^1.0.0 282 | - http_multi_server 2.2.0 283 | - async >=1.2.0 <3.0.0 284 | - http_parser 3.1.4 285 | - charcode ^1.1.0 286 | - collection >=0.9.1 <2.0.0 287 | - source_span ^1.0.0 288 | - string_scanner >=0.0.0 <2.0.0 289 | - typed_data ^1.1.0 290 | - io 0.3.4 291 | - charcode ^1.0.0 292 | - meta ^1.0.2 293 | - path ^1.5.1 294 | - string_scanner >=0.1.5 <2.0.0 295 | - js 0.6.1+1 296 | - json_rpc_2 2.1.1 297 | - stack_trace ^1.0.0 298 | - stream_channel >=1.1.0 <3.0.0 299 | - logging 0.11.4 300 | - matcher 0.12.6 301 | - stack_trace ^1.2.0 302 | - mime 0.9.6+3 303 | - multi_server_socket 1.0.2 304 | - async >=1.2.0 <3.0.0 305 | - node_interop 1.0.3 306 | - js ^0.6.1 307 | - node_io 1.0.1+2 308 | - node_interop ^1.0.1 309 | - path ^1.6.2 310 | - node_preamble 1.4.8 311 | - package_config 1.9.3 312 | - path ^1.6.4 313 | - charcode ^1.1.0 314 | - path 1.7.0 315 | - path_provider 1.6.7 316 | - flutter any 317 | - path_provider_platform_interface ^1.0.1 318 | - path_provider_macos ^0.0.4 319 | - path_provider_macos 0.0.4+1 320 | - flutter any 321 | - path_provider_platform_interface 1.0.1 322 | - flutter any 323 | - meta ^1.0.5 324 | - platform ^2.0.0 325 | - plugin_platform_interface ^1.0.1 326 | - petitparser 3.0.2 327 | - meta ^1.1.0 328 | - platform 2.2.1 329 | - plugin_platform_interface 1.0.2 330 | - meta ^1.0.0 331 | - pool 1.4.0 332 | - async >=1.4.0 <3.0.0 333 | - stack_trace >=0.9.2 <2.0.0 334 | - process 3.0.12 335 | - file ^5.0.0 336 | - intl >=0.14.0 <0.17.0 337 | - meta ^1.1.2 338 | - path ^1.5.1 339 | - platform >=1.0.1 340 | - pub_semver 1.4.4 341 | - collection ^1.0.0 342 | - shared_preferences_macos 0.0.1+7 343 | - shared_preferences_platform_interface ^1.0.0 344 | - flutter any 345 | - shared_preferences_platform_interface 1.0.3 346 | - meta ^1.0.4 347 | - flutter any 348 | - shared_preferences_web 0.1.2+4 349 | - shared_preferences_platform_interface ^1.0.0 350 | - flutter any 351 | - flutter_web_plugins any 352 | - meta ^1.1.7 353 | - shelf 0.7.5 354 | - async ^2.0.7 355 | - collection ^1.5.0 356 | - http_parser ^3.1.0 357 | - path ^1.0.0 358 | - stack_trace ^1.0.0 359 | - stream_channel >=1.0.0 <3.0.0 360 | - shelf_packages_handler 2.0.0 361 | - path ^1.0.0 362 | - shelf ^0.7.0 363 | - shelf_static ^0.2.0 364 | - shelf_static 0.2.8 365 | - convert >=1.0.0 <3.0.0 366 | - http_parser >=0.0.2+2 <4.0.0 367 | - mime >=0.9.0 <0.10.0 368 | - path >=1.1.0 <2.0.0 369 | - shelf >=0.5.7 <0.8.0 370 | - shelf_web_socket 0.2.3 371 | - shelf ^0.7.0 372 | - web_socket_channel ^1.0.0 373 | - stream_channel >1.4.0 <3.0.0 374 | - sky_engine 0.0.99 375 | - source_map_stack_trace 2.0.0 376 | - path ^1.0.0 377 | - stack_trace ^1.0.0 378 | - source_maps ^0.10.2 379 | - source_maps 0.10.9 380 | - source_span ^1.3.0 381 | - source_span 1.7.0 382 | - charcode ^1.0.0 383 | - collection ^1.8.0 384 | - meta >=0.9.0 <2.0.0 385 | - path >=1.2.0 <2.0.0 386 | - term_glyph ^1.0.0 387 | - stack_trace 1.9.3 388 | - path ^1.2.0 389 | - stream_channel 2.0.0 390 | - async >=1.11.0 <3.0.0 391 | - sync_http 0.2.0 392 | - term_glyph 1.1.0 393 | - test_api 0.2.15 394 | - async ^2.0.0 395 | - boolean_selector >=1.0.0 <3.0.0 396 | - collection ^1.8.0 397 | - meta ^1.1.5 398 | - path ^1.2.0 399 | - source_span ^1.4.0 400 | - stack_trace ^1.9.0 401 | - stream_channel >=1.7.0 <3.0.0 402 | - string_scanner ^1.0.0 403 | - term_glyph ^1.0.0 404 | - matcher >=0.12.6 <0.12.7 405 | - test_core 0.3.3 406 | - analyzer >=0.36.0 <0.40.0 407 | - async ^2.0.0 408 | - args ^1.4.0 409 | - boolean_selector >=1.0.0 <3.0.0 410 | - collection ^1.8.0 411 | - coverage ^0.13.3 412 | - glob ^1.0.0 413 | - io ^0.3.0 414 | - meta ^1.1.5 415 | - path ^1.2.0 416 | - pedantic ^1.0.0 417 | - pool ^1.3.0 418 | - source_map_stack_trace ^2.0.0 419 | - source_maps ^0.10.2 420 | - source_span ^1.4.0 421 | - stack_trace ^1.9.0 422 | - stream_channel >=1.7.0 <3.0.0 423 | - vm_service >=1.0.0 <5.0.0 424 | - yaml ^2.0.0 425 | - matcher >=0.12.6 <0.12.7 426 | - test_api 0.2.15 427 | - typed_data 1.1.6 428 | - url_launcher_macos 0.0.1+5 429 | - flutter any 430 | - url_launcher_platform_interface 1.0.6 431 | - flutter any 432 | - meta ^1.0.5 433 | - plugin_platform_interface ^1.0.1 434 | - url_launcher_web 0.1.1+2 435 | - url_launcher_platform_interface ^1.0.1 436 | - flutter any 437 | - flutter_web_plugins any 438 | - meta ^1.1.7 439 | - js ^0.6.0 440 | - vector_math 2.0.8 441 | - vm_service 4.0.2 442 | - meta ^1.0.2 443 | - vm_service_client 0.2.6+2 444 | - async ^2.0.0 445 | - collection ^1.5.0 446 | - json_rpc_2 ^2.0.0 447 | - pub_semver ^1.0.0 448 | - source_span ^1.4.0 449 | - stack_trace ^1.5.0 450 | - stream_channel >=1.1.0 <3.0.0 451 | - web_socket_channel ^1.0.0 452 | - watcher 0.9.7+15 453 | - async ^2.0.0 454 | - path ^1.0.0 455 | - pedantic ^1.1.0 456 | - web_socket_channel 1.1.0 457 | - async >=1.3.0 <3.0.0 458 | - crypto >=0.9.2 <3.0.0 459 | - stream_channel >=1.2.0 <3.0.0 460 | - webdriver 2.1.2 461 | - archive >=1.0.0 <3.0.0 462 | - matcher ^0.12.3 463 | - path ^1.3.0 464 | - stack_trace ^1.3.0 465 | - sync_http >=0.1.1 <0.3.0 466 | - webkit_inspection_protocol 0.5.0+1 467 | - logging ^0.11.0 468 | - yaml 2.2.0 469 | - charcode ^1.1.0 470 | - collection >=1.1.0 <2.0.0 471 | - string_scanner >=0.1.4 <2.0.0 472 | - source_span >=1.0.0 <2.0.0 473 | -------------------------------------------------------------------------------- /test/deps/knarly_deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "2.8.0-dev.20.0.flutter-c9710e5059", 4 | "Flutter": "1.18.0-6.0.pre.46" 5 | }, 6 | "packages": { 7 | "knarly": { 8 | "name": "knarly", 9 | "version": "0.0.0", 10 | "sections": { 11 | "dependencies": { 12 | "collection @ 1.14.12": {}, 13 | "flutter @ 0.0.0": { 14 | "collection": "1.14.12", 15 | "meta": "1.1.8", 16 | "typed_data": "1.1.6", 17 | "vector_math": "2.0.8", 18 | "sky_engine": "any" 19 | }, 20 | "provider @ 4.0.4": { 21 | "flutter": "any", 22 | "nested": ">=0.0.4 <2.0.0", 23 | "collection": "^1.14.0" 24 | }, 25 | "vote @ 0.1.1-dev": { 26 | "collection": "^1.0.0", 27 | "graphs": "^0.2.0", 28 | "meta": "^1.0.0", 29 | "string_scanner": "^1.0.0" 30 | } 31 | }, 32 | "dev dependencies": { 33 | "build_runner @ 1.8.0": { 34 | "args": ">=1.4.0 <2.0.0", 35 | "async": ">=1.13.3 <3.0.0", 36 | "build": ">=1.0.0 <1.3.0", 37 | "build_config": ">=0.4.1 <0.4.3", 38 | "build_daemon": "^2.1.0", 39 | "build_resolvers": "^1.0.0", 40 | "build_runner_core": "^4.5.0", 41 | "code_builder": ">2.3.0 <4.0.0", 42 | "collection": "^1.14.0", 43 | "crypto": ">=0.9.2 <3.0.0", 44 | "dart_style": "^1.0.0", 45 | "glob": "^1.1.0", 46 | "graphs": "^0.2.0", 47 | "http_multi_server": "^2.1.0", 48 | "io": "^0.3.0", 49 | "js": "^0.6.1+1", 50 | "logging": "^0.11.2", 51 | "meta": "^1.1.0", 52 | "mime": "^0.9.3+3", 53 | "path": "^1.1.0", 54 | "pedantic": "^1.0.0", 55 | "pool": "^1.0.0", 56 | "pub_semver": "^1.4.0", 57 | "pubspec_parse": "^0.1.0", 58 | "shelf": ">=0.6.5 <0.8.0", 59 | "shelf_web_socket": "^0.2.2+4", 60 | "stack_trace": "^1.9.0", 61 | "stream_transform": ">=0.0.20 <2.0.0", 62 | "timing": "^0.1.1", 63 | "watcher": "^0.9.7", 64 | "web_socket_channel": "^1.0.9", 65 | "yaml": "^2.1.0" 66 | }, 67 | "build_web_compilers @ 2.10.0": { 68 | "analyzer": ">=0.30.0 <0.40.0", 69 | "archive": "^2.0.0", 70 | "bazel_worker": "^0.1.18", 71 | "build": ">=1.2.0 <2.0.0", 72 | "build_config": ">=0.3.0 <0.5.0", 73 | "build_modules": "^2.9.0", 74 | "collection": "^1.0.0", 75 | "glob": "^1.1.0", 76 | "js": "^0.6.1", 77 | "logging": "^0.11.2", 78 | "meta": "^1.1.0", 79 | "path": "^1.4.2", 80 | "pool": "^1.3.0", 81 | "scratch_space": "^0.0.2", 82 | "source_maps": "^0.10.4", 83 | "source_span": "^1.4.0", 84 | "stack_trace": "^1.9.2" 85 | }, 86 | "pedantic @ 1.9.0": {} 87 | } 88 | } 89 | } 90 | }, 91 | "transitiveDependencies": { 92 | "_fe_analyzer_shared @ 1.0.3": { 93 | "meta": "^1.0.2" 94 | }, 95 | "analyzer @ 0.39.4": { 96 | "_fe_analyzer_shared": "^1.0.3", 97 | "args": ">=0.12.1 <2.0.0", 98 | "charcode": "^1.1.0", 99 | "collection": "^1.10.1", 100 | "convert": "^2.0.0", 101 | "crypto": ">=1.1.1 <3.0.0", 102 | "glob": "^1.0.3", 103 | "html": ">=0.13.4+1 <0.15.0", 104 | "meta": "^1.0.2", 105 | "package_config": ">=0.1.5 <2.0.0", 106 | "path": ">=0.9.0 <2.0.0", 107 | "pub_semver": "^1.4.2", 108 | "source_span": "^1.2.0", 109 | "watcher": ">=0.9.6 <0.10.0", 110 | "yaml": "^2.1.2" 111 | }, 112 | "archive @ 2.0.13": { 113 | "crypto": ">=2.0.0 <3.0.0", 114 | "args": ">=1.4.0 <2.0.0", 115 | "path": ">=1.5.1 <2.0.0" 116 | }, 117 | "args @ 1.6.0": {}, 118 | "async @ 2.4.1": { 119 | "collection": "^1.5.0" 120 | }, 121 | "bazel_worker @ 0.1.23+1": { 122 | "async": ">1.9.0 <3.0.0", 123 | "pedantic": "^1.8.0", 124 | "protobuf": ">=0.14.4 <2.0.0" 125 | }, 126 | "build @ 1.2.2": { 127 | "analyzer": ">=0.35.0 <0.40.0", 128 | "async": ">=1.13.3 <3.0.0", 129 | "convert": "^2.0.0", 130 | "crypto": ">=0.9.2 <3.0.0", 131 | "logging": "^0.11.2", 132 | "meta": "^1.1.0", 133 | "path": "^1.1.0", 134 | "glob": "^1.1.0" 135 | }, 136 | "build_config @ 0.4.2": { 137 | "checked_yaml": "^1.0.0", 138 | "json_annotation": ">=1.0.0 <4.0.0", 139 | "meta": "^1.1.0", 140 | "path": "^1.4.0", 141 | "pubspec_parse": "^0.1.5", 142 | "yaml": "^2.1.11" 143 | }, 144 | "build_daemon @ 2.1.3": { 145 | "built_collection": "^4.1.0", 146 | "built_value": "^7.0.0", 147 | "http_multi_server": "^2.0.0", 148 | "logging": "^0.11.0", 149 | "pedantic": "^1.0.0", 150 | "package_resolver": "^1.0.6", 151 | "path": "^1.6.2", 152 | "pool": "^1.3.6", 153 | "shelf": "^0.7.4", 154 | "shelf_web_socket": "^0.2.2+4", 155 | "stream_transform": ">=0.0.20 <2.0.0", 156 | "watcher": "^0.9.7", 157 | "web_socket_channel": "^1.0.9" 158 | }, 159 | "build_modules @ 2.9.0": { 160 | "analyzer": ">0.35.0 <0.40.0", 161 | "async": "^2.0.0", 162 | "bazel_worker": "^0.1.20", 163 | "build": ">=1.2.0 <2.0.0", 164 | "build_config": ">=0.3.0 <0.5.0", 165 | "collection": "^1.0.0", 166 | "crypto": "^2.0.0", 167 | "glob": "^1.0.0", 168 | "graphs": "^0.2.0", 169 | "json_annotation": ">=1.2.0 <4.0.0", 170 | "logging": "^0.11.2", 171 | "meta": "^1.1.0", 172 | "path": "^1.4.2", 173 | "pedantic": "^1.0.0", 174 | "scratch_space": "^0.0.4" 175 | }, 176 | "build_resolvers @ 1.3.3": { 177 | "analyzer": "^0.39.0", 178 | "build": ">=1.1.0 <1.3.0", 179 | "crypto": "^2.0.0", 180 | "graphs": "^0.2.0", 181 | "logging": "^0.11.2", 182 | "package_resolver": "^1.0.0", 183 | "path": "^1.1.0", 184 | "yaml": "^2.0.0" 185 | }, 186 | "build_runner_core @ 4.5.3": { 187 | "async": ">=1.13.3 <3.0.0", 188 | "build": ">=1.2.0 <1.3.0", 189 | "build_config": ">=0.4.2 <0.4.3", 190 | "build_resolvers": "^1.0.0", 191 | "collection": "^1.14.0", 192 | "convert": "^2.0.1", 193 | "crypto": ">=0.9.2 <3.0.0", 194 | "glob": "^1.1.0", 195 | "graphs": "^0.2.0", 196 | "json_annotation": ">=1.0.0 <4.0.0", 197 | "logging": "^0.11.2", 198 | "meta": "^1.1.0", 199 | "path": "^1.1.0", 200 | "pedantic": "^1.0.0", 201 | "pool": "^1.0.0", 202 | "timing": "^0.1.1", 203 | "watcher": "^0.9.7", 204 | "yaml": "^2.1.0" 205 | }, 206 | "built_collection @ 4.3.2": { 207 | "collection": "^1.7.0", 208 | "quiver": ">=0.21.0 <3.0.0" 209 | }, 210 | "built_value @ 7.0.9": { 211 | "built_collection": ">=2.0.0 <5.0.0", 212 | "collection": "^1.0.0", 213 | "fixnum": "^0.10.0", 214 | "quiver": ">=0.21.0 <3.0.0" 215 | }, 216 | "charcode @ 1.1.3": {}, 217 | "checked_yaml @ 1.0.2": { 218 | "json_annotation": ">=2.2.0 <4.0.0", 219 | "source_span": "^1.0.0", 220 | "yaml": "^2.1.13" 221 | }, 222 | "code_builder @ 3.2.1": { 223 | "built_collection": ">=3.0.0 <5.0.0", 224 | "built_value": "^7.0.0", 225 | "collection": "^1.14.0", 226 | "matcher": "^0.12.0", 227 | "meta": "^1.0.5" 228 | }, 229 | "convert @ 2.1.1": { 230 | "charcode": "^1.1.0", 231 | "typed_data": "^1.1.0" 232 | }, 233 | "crypto @ 2.1.4": { 234 | "collection": "^1.0.0", 235 | "convert": ">=1.0.0 <3.0.0", 236 | "typed_data": "^1.0.0" 237 | }, 238 | "csslib @ 0.16.1": { 239 | "source_span": "^1.4.0" 240 | }, 241 | "dart_style @ 1.3.3": { 242 | "analyzer": ">=0.38.3 <0.40.0", 243 | "args": "^1.0.0", 244 | "path": "^1.0.0", 245 | "source_span": "^1.4.0" 246 | }, 247 | "fixnum @ 0.10.11": {}, 248 | "glob @ 1.2.0": { 249 | "async": ">=1.2.0 <3.0.0", 250 | "collection": "^1.1.0", 251 | "node_io": "^1.0.0", 252 | "path": "^1.3.0", 253 | "pedantic": "^1.2.0", 254 | "string_scanner": ">=0.1.0 <2.0.0" 255 | }, 256 | "graphs @ 0.2.0": {}, 257 | "html @ 0.14.0+3": { 258 | "csslib": ">=0.13.2 <0.17.0", 259 | "source_span": ">=1.0.0 <2.0.0" 260 | }, 261 | "http @ 0.12.0+4": { 262 | "async": ">=1.10.0 <3.0.0", 263 | "http_parser": ">=0.0.1 <4.0.0", 264 | "path": ">=0.9.0 <2.0.0", 265 | "pedantic": "^1.0.0" 266 | }, 267 | "http_multi_server @ 2.2.0": { 268 | "async": ">=1.2.0 <3.0.0" 269 | }, 270 | "http_parser @ 3.1.4": { 271 | "charcode": "^1.1.0", 272 | "collection": ">=0.9.1 <2.0.0", 273 | "source_span": "^1.0.0", 274 | "string_scanner": ">=0.0.0 <2.0.0", 275 | "typed_data": "^1.1.0" 276 | }, 277 | "io @ 0.3.3": { 278 | "charcode": "^1.0.0", 279 | "meta": "^1.0.2", 280 | "path": "^1.5.1", 281 | "string_scanner": ">=0.1.5 <2.0.0" 282 | }, 283 | "js @ 0.6.1+1": {}, 284 | "json_annotation @ 3.0.1": {}, 285 | "logging @ 0.11.4": {}, 286 | "matcher @ 0.12.6": { 287 | "stack_trace": "^1.2.0" 288 | }, 289 | "meta @ 1.1.8": {}, 290 | "mime @ 0.9.6+3": {}, 291 | "nested @ 0.0.4": { 292 | "flutter": "any" 293 | }, 294 | "node_interop @ 1.0.3": { 295 | "js": "^0.6.1" 296 | }, 297 | "node_io @ 1.0.1+2": { 298 | "node_interop": "^1.0.1", 299 | "path": "^1.6.2" 300 | }, 301 | "package_config @ 1.9.3": { 302 | "path": "^1.6.4", 303 | "charcode": "^1.1.0" 304 | }, 305 | "package_resolver @ 1.0.10": { 306 | "collection": "^1.9.0", 307 | "http": ">0.11.0 <0.13.0", 308 | "package_config": ">=0.1.0 <2.0.0", 309 | "path": "^1.0.0" 310 | }, 311 | "path @ 1.6.4": {}, 312 | "pool @ 1.4.0": { 313 | "async": ">=1.4.0 <3.0.0", 314 | "stack_trace": ">=0.9.2 <2.0.0" 315 | }, 316 | "protobuf @ 1.0.1": { 317 | "fixnum": "^0.10.9" 318 | }, 319 | "pub_semver @ 1.4.4": { 320 | "collection": "^1.0.0" 321 | }, 322 | "pubspec_parse @ 0.1.5": { 323 | "checked_yaml": "^1.0.0", 324 | "json_annotation": ">=1.0.0 <4.0.0", 325 | "pub_semver": "^1.3.2", 326 | "yaml": "^2.1.12" 327 | }, 328 | "quiver @ 2.1.3": { 329 | "matcher": ">=0.12.5 <0.13.0", 330 | "meta": ">=1.0.0 <2.0.0" 331 | }, 332 | "scratch_space @ 0.0.4+2": { 333 | "build": ">=0.10.0 <2.0.0", 334 | "crypto": ">=2.0.3 <3.0.0", 335 | "path": "^1.1.0", 336 | "pedantic": "^1.0.0", 337 | "pool": "^1.0.0" 338 | }, 339 | "shelf @ 0.7.5": { 340 | "async": "^2.0.7", 341 | "collection": "^1.5.0", 342 | "http_parser": "^3.1.0", 343 | "path": "^1.0.0", 344 | "stack_trace": "^1.0.0", 345 | "stream_channel": ">=1.0.0 <3.0.0" 346 | }, 347 | "shelf_web_socket @ 0.2.3": { 348 | "shelf": "^0.7.0", 349 | "web_socket_channel": "^1.0.0", 350 | "stream_channel": ">1.4.0 <3.0.0" 351 | }, 352 | "sky_engine @ 0.0.99": {}, 353 | "source_maps @ 0.10.9": { 354 | "source_span": "^1.3.0" 355 | }, 356 | "source_span @ 1.7.0": { 357 | "charcode": "^1.0.0", 358 | "collection": "^1.8.0", 359 | "meta": ">=0.9.0 <2.0.0", 360 | "path": ">=1.2.0 <2.0.0", 361 | "term_glyph": "^1.0.0" 362 | }, 363 | "stack_trace @ 1.9.3": { 364 | "path": "^1.2.0" 365 | }, 366 | "stream_channel @ 2.0.0": { 367 | "async": ">=1.11.0 <3.0.0" 368 | }, 369 | "stream_transform @ 1.2.0": {}, 370 | "string_scanner @ 1.0.5": { 371 | "charcode": "^1.1.0", 372 | "meta": "^1.1.0", 373 | "source_span": "^1.4.0" 374 | }, 375 | "term_glyph @ 1.1.0": {}, 376 | "timing @ 0.1.1+2": { 377 | "json_annotation": ">=1.0.0 <4.0.0" 378 | }, 379 | "typed_data @ 1.1.6": {}, 380 | "vector_math @ 2.0.8": {}, 381 | "watcher @ 0.9.7+14": { 382 | "async": "^2.0.0", 383 | "path": "^1.0.0", 384 | "pedantic": "^1.1.0" 385 | }, 386 | "web_socket_channel @ 1.1.0": { 387 | "async": ">=1.3.0 <3.0.0", 388 | "crypto": ">=0.9.2 <3.0.0", 389 | "stream_channel": ">=1.2.0 <3.0.0" 390 | }, 391 | "yaml @ 2.2.0": { 392 | "charcode": "^1.1.0", 393 | "collection": ">=1.1.0 <2.0.0", 394 | "string_scanner": ">=0.1.4 <2.0.0", 395 | "source_span": ">=1.0.0 <2.0.0" 396 | } 397 | } 398 | } 399 | 400 | -------------------------------------------------------------------------------- /test/deps/knarly_deps.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 2.8.0-dev.20.0.flutter-c9710e5059 2 | Flutter SDK 1.18.0-6.0.pre.46 3 | knarly 0.0.0 4 | 5 | dependencies: 6 | - collection 1.14.12 7 | - flutter 0.0.0 8 | - collection 1.14.12 9 | - meta 1.1.8 10 | - typed_data 1.1.6 11 | - vector_math 2.0.8 12 | - sky_engine any 13 | - provider 4.0.4 14 | - flutter any 15 | - nested >=0.0.4 <2.0.0 16 | - collection ^1.14.0 17 | - vote 0.1.1-dev 18 | - collection ^1.0.0 19 | - graphs ^0.2.0 20 | - meta ^1.0.0 21 | - string_scanner ^1.0.0 22 | 23 | dev dependencies: 24 | - build_runner 1.8.0 25 | - args >=1.4.0 <2.0.0 26 | - async >=1.13.3 <3.0.0 27 | - build >=1.0.0 <1.3.0 28 | - build_config >=0.4.1 <0.4.3 29 | - build_daemon ^2.1.0 30 | - build_resolvers ^1.0.0 31 | - build_runner_core ^4.5.0 32 | - code_builder >2.3.0 <4.0.0 33 | - collection ^1.14.0 34 | - crypto >=0.9.2 <3.0.0 35 | - dart_style ^1.0.0 36 | - glob ^1.1.0 37 | - graphs ^0.2.0 38 | - http_multi_server ^2.1.0 39 | - io ^0.3.0 40 | - js ^0.6.1+1 41 | - logging ^0.11.2 42 | - meta ^1.1.0 43 | - mime ^0.9.3+3 44 | - path ^1.1.0 45 | - pedantic ^1.0.0 46 | - pool ^1.0.0 47 | - pub_semver ^1.4.0 48 | - pubspec_parse ^0.1.0 49 | - shelf >=0.6.5 <0.8.0 50 | - shelf_web_socket ^0.2.2+4 51 | - stack_trace ^1.9.0 52 | - stream_transform >=0.0.20 <2.0.0 53 | - timing ^0.1.1 54 | - watcher ^0.9.7 55 | - web_socket_channel ^1.0.9 56 | - yaml ^2.1.0 57 | - build_web_compilers 2.10.0 58 | - analyzer >=0.30.0 <0.40.0 59 | - archive ^2.0.0 60 | - bazel_worker ^0.1.18 61 | - build >=1.2.0 <2.0.0 62 | - build_config >=0.3.0 <0.5.0 63 | - build_modules ^2.9.0 64 | - collection ^1.0.0 65 | - glob ^1.1.0 66 | - js ^0.6.1 67 | - logging ^0.11.2 68 | - meta ^1.1.0 69 | - path ^1.4.2 70 | - pool ^1.3.0 71 | - scratch_space ^0.0.2 72 | - source_maps ^0.10.4 73 | - source_span ^1.4.0 74 | - stack_trace ^1.9.2 75 | - pedantic 1.9.0 76 | 77 | transitive dependencies: 78 | - _fe_analyzer_shared 1.0.3 79 | - meta ^1.0.2 80 | - analyzer 0.39.4 81 | - _fe_analyzer_shared ^1.0.3 82 | - args >=0.12.1 <2.0.0 83 | - charcode ^1.1.0 84 | - collection ^1.10.1 85 | - convert ^2.0.0 86 | - crypto >=1.1.1 <3.0.0 87 | - glob ^1.0.3 88 | - html >=0.13.4+1 <0.15.0 89 | - meta ^1.0.2 90 | - package_config >=0.1.5 <2.0.0 91 | - path >=0.9.0 <2.0.0 92 | - pub_semver ^1.4.2 93 | - source_span ^1.2.0 94 | - watcher >=0.9.6 <0.10.0 95 | - yaml ^2.1.2 96 | - archive 2.0.13 97 | - crypto >=2.0.0 <3.0.0 98 | - args >=1.4.0 <2.0.0 99 | - path >=1.5.1 <2.0.0 100 | - args 1.6.0 101 | - async 2.4.1 102 | - collection ^1.5.0 103 | - bazel_worker 0.1.23+1 104 | - async >1.9.0 <3.0.0 105 | - pedantic ^1.8.0 106 | - protobuf >=0.14.4 <2.0.0 107 | - build 1.2.2 108 | - analyzer >=0.35.0 <0.40.0 109 | - async >=1.13.3 <3.0.0 110 | - convert ^2.0.0 111 | - crypto >=0.9.2 <3.0.0 112 | - logging ^0.11.2 113 | - meta ^1.1.0 114 | - path ^1.1.0 115 | - glob ^1.1.0 116 | - build_config 0.4.2 117 | - checked_yaml ^1.0.0 118 | - json_annotation >=1.0.0 <4.0.0 119 | - meta ^1.1.0 120 | - path ^1.4.0 121 | - pubspec_parse ^0.1.5 122 | - yaml ^2.1.11 123 | - build_daemon 2.1.3 124 | - built_collection ^4.1.0 125 | - built_value ^7.0.0 126 | - http_multi_server ^2.0.0 127 | - logging ^0.11.0 128 | - pedantic ^1.0.0 129 | - package_resolver ^1.0.6 130 | - path ^1.6.2 131 | - pool ^1.3.6 132 | - shelf ^0.7.4 133 | - shelf_web_socket ^0.2.2+4 134 | - stream_transform >=0.0.20 <2.0.0 135 | - watcher ^0.9.7 136 | - web_socket_channel ^1.0.9 137 | - build_modules 2.9.0 138 | - analyzer >0.35.0 <0.40.0 139 | - async ^2.0.0 140 | - bazel_worker ^0.1.20 141 | - build >=1.2.0 <2.0.0 142 | - build_config >=0.3.0 <0.5.0 143 | - collection ^1.0.0 144 | - crypto ^2.0.0 145 | - glob ^1.0.0 146 | - graphs ^0.2.0 147 | - json_annotation >=1.2.0 <4.0.0 148 | - logging ^0.11.2 149 | - meta ^1.1.0 150 | - path ^1.4.2 151 | - pedantic ^1.0.0 152 | - scratch_space ^0.0.4 153 | - build_resolvers 1.3.3 154 | - analyzer ^0.39.0 155 | - build >=1.1.0 <1.3.0 156 | - crypto ^2.0.0 157 | - graphs ^0.2.0 158 | - logging ^0.11.2 159 | - package_resolver ^1.0.0 160 | - path ^1.1.0 161 | - yaml ^2.0.0 162 | - build_runner_core 4.5.3 163 | - async >=1.13.3 <3.0.0 164 | - build >=1.2.0 <1.3.0 165 | - build_config >=0.4.2 <0.4.3 166 | - build_resolvers ^1.0.0 167 | - collection ^1.14.0 168 | - convert ^2.0.1 169 | - crypto >=0.9.2 <3.0.0 170 | - glob ^1.1.0 171 | - graphs ^0.2.0 172 | - json_annotation >=1.0.0 <4.0.0 173 | - logging ^0.11.2 174 | - meta ^1.1.0 175 | - path ^1.1.0 176 | - pedantic ^1.0.0 177 | - pool ^1.0.0 178 | - timing ^0.1.1 179 | - watcher ^0.9.7 180 | - yaml ^2.1.0 181 | - built_collection 4.3.2 182 | - collection ^1.7.0 183 | - quiver >=0.21.0 <3.0.0 184 | - built_value 7.0.9 185 | - built_collection >=2.0.0 <5.0.0 186 | - collection ^1.0.0 187 | - fixnum ^0.10.0 188 | - quiver >=0.21.0 <3.0.0 189 | - charcode 1.1.3 190 | - checked_yaml 1.0.2 191 | - json_annotation >=2.2.0 <4.0.0 192 | - source_span ^1.0.0 193 | - yaml ^2.1.13 194 | - code_builder 3.2.1 195 | - built_collection >=3.0.0 <5.0.0 196 | - built_value ^7.0.0 197 | - collection ^1.14.0 198 | - matcher ^0.12.0 199 | - meta ^1.0.5 200 | - convert 2.1.1 201 | - charcode ^1.1.0 202 | - typed_data ^1.1.0 203 | - crypto 2.1.4 204 | - collection ^1.0.0 205 | - convert >=1.0.0 <3.0.0 206 | - typed_data ^1.0.0 207 | - csslib 0.16.1 208 | - source_span ^1.4.0 209 | - dart_style 1.3.3 210 | - analyzer >=0.38.3 <0.40.0 211 | - args ^1.0.0 212 | - path ^1.0.0 213 | - source_span ^1.4.0 214 | - fixnum 0.10.11 215 | - glob 1.2.0 216 | - async >=1.2.0 <3.0.0 217 | - collection ^1.1.0 218 | - node_io ^1.0.0 219 | - path ^1.3.0 220 | - pedantic ^1.2.0 221 | - string_scanner >=0.1.0 <2.0.0 222 | - graphs 0.2.0 223 | - html 0.14.0+3 224 | - csslib >=0.13.2 <0.17.0 225 | - source_span >=1.0.0 <2.0.0 226 | - http 0.12.0+4 227 | - async >=1.10.0 <3.0.0 228 | - http_parser >=0.0.1 <4.0.0 229 | - path >=0.9.0 <2.0.0 230 | - pedantic ^1.0.0 231 | - http_multi_server 2.2.0 232 | - async >=1.2.0 <3.0.0 233 | - http_parser 3.1.4 234 | - charcode ^1.1.0 235 | - collection >=0.9.1 <2.0.0 236 | - source_span ^1.0.0 237 | - string_scanner >=0.0.0 <2.0.0 238 | - typed_data ^1.1.0 239 | - io 0.3.3 240 | - charcode ^1.0.0 241 | - meta ^1.0.2 242 | - path ^1.5.1 243 | - string_scanner >=0.1.5 <2.0.0 244 | - js 0.6.1+1 245 | - json_annotation 3.0.1 246 | - logging 0.11.4 247 | - matcher 0.12.6 248 | - stack_trace ^1.2.0 249 | - meta 1.1.8 250 | - mime 0.9.6+3 251 | - nested 0.0.4 252 | - flutter any 253 | - node_interop 1.0.3 254 | - js ^0.6.1 255 | - node_io 1.0.1+2 256 | - node_interop ^1.0.1 257 | - path ^1.6.2 258 | - package_config 1.9.3 259 | - path ^1.6.4 260 | - charcode ^1.1.0 261 | - package_resolver 1.0.10 262 | - collection ^1.9.0 263 | - http >0.11.0 <0.13.0 264 | - package_config >=0.1.0 <2.0.0 265 | - path ^1.0.0 266 | - path 1.6.4 267 | - pool 1.4.0 268 | - async >=1.4.0 <3.0.0 269 | - stack_trace >=0.9.2 <2.0.0 270 | - protobuf 1.0.1 271 | - fixnum ^0.10.9 272 | - pub_semver 1.4.4 273 | - collection ^1.0.0 274 | - pubspec_parse 0.1.5 275 | - checked_yaml ^1.0.0 276 | - json_annotation >=1.0.0 <4.0.0 277 | - pub_semver ^1.3.2 278 | - yaml ^2.1.12 279 | - quiver 2.1.3 280 | - matcher >=0.12.5 <0.13.0 281 | - meta >=1.0.0 <2.0.0 282 | - scratch_space 0.0.4+2 283 | - build >=0.10.0 <2.0.0 284 | - crypto >=2.0.3 <3.0.0 285 | - path ^1.1.0 286 | - pedantic ^1.0.0 287 | - pool ^1.0.0 288 | - shelf 0.7.5 289 | - async ^2.0.7 290 | - collection ^1.5.0 291 | - http_parser ^3.1.0 292 | - path ^1.0.0 293 | - stack_trace ^1.0.0 294 | - stream_channel >=1.0.0 <3.0.0 295 | - shelf_web_socket 0.2.3 296 | - shelf ^0.7.0 297 | - web_socket_channel ^1.0.0 298 | - stream_channel >1.4.0 <3.0.0 299 | - sky_engine 0.0.99 300 | - source_maps 0.10.9 301 | - source_span ^1.3.0 302 | - source_span 1.7.0 303 | - charcode ^1.0.0 304 | - collection ^1.8.0 305 | - meta >=0.9.0 <2.0.0 306 | - path >=1.2.0 <2.0.0 307 | - term_glyph ^1.0.0 308 | - stack_trace 1.9.3 309 | - path ^1.2.0 310 | - stream_channel 2.0.0 311 | - async >=1.11.0 <3.0.0 312 | - stream_transform 1.2.0 313 | - string_scanner 1.0.5 314 | - charcode ^1.1.0 315 | - meta ^1.1.0 316 | - source_span ^1.4.0 317 | - term_glyph 1.1.0 318 | - timing 0.1.1+2 319 | - json_annotation >=1.0.0 <4.0.0 320 | - typed_data 1.1.6 321 | - vector_math 2.0.8 322 | - watcher 0.9.7+14 323 | - async ^2.0.0 324 | - path ^1.0.0 325 | - pedantic ^1.1.0 326 | - web_socket_channel 1.1.0 327 | - async >=1.3.0 <3.0.0 328 | - crypto >=0.9.2 <3.0.0 329 | - stream_channel >=1.2.0 <3.0.0 330 | - yaml 2.2.0 331 | - charcode ^1.1.0 332 | - collection >=1.1.0 <2.0.0 333 | - string_scanner >=0.1.4 <2.0.0 334 | - source_span >=1.0.0 <2.0.0 335 | -------------------------------------------------------------------------------- /test/deps/with_dots.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "2.9.0-3.0.dev.flutter-a69cb6d700", 4 | "Flutter": "1.18.0-9.0.pre.46" 5 | }, 6 | "packages": { 7 | "with.dots": { 8 | "name": "with.dots", 9 | "version": "2.3.0+020300", 10 | "sections": { 11 | "dependencies": { 12 | "other.dots @ 0.0.0": { 13 | "dep.dots": "1.14.12" 14 | } 15 | } 16 | } 17 | } 18 | }, 19 | "transitiveDependencies": {} 20 | } 21 | 22 | -------------------------------------------------------------------------------- /test/deps/with_dots.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 2.9.0-3.0.dev.flutter-a69cb6d700 2 | Flutter SDK 1.18.0-9.0.pre.46 3 | with.dots 2.3.0+020300 4 | 5 | dependencies: 6 | - other.dots 0.0.0 7 | - dep.dots 1.14.12 8 | -------------------------------------------------------------------------------- /test/deps/with_overrides.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "3.7.0-207.0.dev", 4 | "Flutter": "3.27.0-1.0.pre.686" 5 | }, 6 | "packages": { 7 | "build_runner": { 8 | "name": "build_runner", 9 | "version": "2.4.14-wip", 10 | "sections": { 11 | "dependencies": { 12 | "analyzer @ 6.11.0": { 13 | "_fe_analyzer_shared": "^76.0.0", 14 | "collection": "^1.19.0", 15 | "convert": "^3.0.0", 16 | "crypto": "^3.0.0", 17 | "glob": "^2.0.0", 18 | "macros": ">=0.1.3-main.0 <0.1.4", 19 | "meta": "^1.15.0", 20 | "package_config": "^2.0.0", 21 | "path": "^1.9.0", 22 | "pub_semver": "^2.1.4", 23 | "source_span": "^1.8.0", 24 | "watcher": "^1.1.0", 25 | "yaml": "^3.0.0" 26 | }, 27 | "args @ 2.6.0": {}, 28 | "async @ 2.12.0": { 29 | "collection": "^1.15.0", 30 | "meta": "^1.3.0" 31 | }, 32 | "build @ 2.4.1": { 33 | "analyzer": ">=1.5.0 <7.0.0", 34 | "async": "^2.5.0", 35 | "convert": "^3.0.0", 36 | "crypto": "^3.0.0", 37 | "glob": "^2.0.0", 38 | "logging": "^1.0.0", 39 | "meta": "^1.3.0", 40 | "package_config": "^2.1.0", 41 | "path": "^1.8.0" 42 | }, 43 | "build_config @ 1.1.1": { 44 | "checked_yaml": "^2.0.0", 45 | "json_annotation": "^4.5.0", 46 | "path": "^1.8.0", 47 | "pubspec_parse": "^1.0.0", 48 | "yaml": "^3.0.0" 49 | }, 50 | "build_daemon @ 4.0.2": { 51 | "built_collection": "^5.0.0", 52 | "built_value": "^8.1.0", 53 | "crypto": "^3.0.3", 54 | "http_multi_server": "^3.0.0", 55 | "logging": "^1.0.0", 56 | "path": "^1.8.0", 57 | "pool": "^1.5.0", 58 | "shelf": "^1.0.0", 59 | "shelf_web_socket": ">=1.0.0 <3.0.0", 60 | "stream_transform": "^2.0.0", 61 | "watcher": "^1.0.0", 62 | "web_socket_channel": ">=2.0.0 <4.0.0" 63 | }, 64 | "build_resolvers @ 2.4.2": { 65 | "analyzer": ">=5.12.0 <7.0.0", 66 | "async": "^2.5.0", 67 | "build": "^2.0.0", 68 | "collection": "^1.17.0", 69 | "convert": "^3.1.1", 70 | "crypto": "^3.0.0", 71 | "graphs": ">=1.0.0 <3.0.0", 72 | "logging": "^1.0.0", 73 | "package_config": "^2.0.0", 74 | "path": "^1.8.0", 75 | "pool": "^1.5.0", 76 | "pub_semver": "^2.0.0", 77 | "stream_transform": "^2.0.0", 78 | "yaml": "^3.0.0" 79 | }, 80 | "build_runner_core @ 8.0.0-wip": { 81 | "async": "^2.5.0", 82 | "build": "^2.4.0", 83 | "build_config": "^1.0.0", 84 | "build_resolvers": "^2.4.0", 85 | "collection": "^1.15.0", 86 | "convert": "^3.0.0", 87 | "crypto": "^3.0.0", 88 | "glob": "^2.0.0", 89 | "graphs": "^2.0.0", 90 | "json_annotation": "^4.8.1", 91 | "logging": "^1.2.0", 92 | "meta": "^1.3.0", 93 | "package_config": "^2.0.0", 94 | "path": "^1.8.0", 95 | "pool": "^1.5.0", 96 | "timing": "^1.0.0", 97 | "watcher": "^1.0.0", 98 | "yaml": "^3.0.0" 99 | }, 100 | "code_builder @ 4.10.1": { 101 | "built_collection": "^5.0.0", 102 | "built_value": "^8.0.0", 103 | "collection": "^1.15.0", 104 | "matcher": "^0.12.10", 105 | "meta": "^1.3.0" 106 | }, 107 | "collection @ 1.19.1": {}, 108 | "crypto @ 3.0.6": { 109 | "typed_data": "^1.3.0" 110 | }, 111 | "dart_style @ 2.3.7": { 112 | "analyzer": "^6.5.0", 113 | "args": ">=1.0.0 <3.0.0", 114 | "collection": "^1.17.0", 115 | "package_config": "^2.1.0", 116 | "path": "^1.0.0", 117 | "pub_semver": ">=1.4.4 <3.0.0", 118 | "source_span": "^1.4.0" 119 | }, 120 | "frontend_server_client @ 4.0.0": { 121 | "async": "^2.5.0", 122 | "path": "^1.8.0" 123 | }, 124 | "glob @ 2.1.2": { 125 | "async": "^2.5.0", 126 | "collection": "^1.15.0", 127 | "file": ">=6.1.3 <8.0.0", 128 | "path": "^1.8.0", 129 | "string_scanner": "^1.1.0" 130 | }, 131 | "graphs @ 2.3.2": { 132 | "collection": "^1.15.0" 133 | }, 134 | "http_multi_server @ 3.2.1": { 135 | "async": "^2.5.0" 136 | }, 137 | "io @ 1.0.4": { 138 | "meta": "^1.3.0", 139 | "path": "^1.8.0", 140 | "string_scanner": "^1.1.0" 141 | }, 142 | "js @ 0.7.1": {}, 143 | "logging @ 1.3.0": {}, 144 | "meta @ 1.16.0": {}, 145 | "mime @ 2.0.0": {}, 146 | "package_config @ 2.1.0": { 147 | "path": "^1.8.0" 148 | }, 149 | "path @ 1.9.1": {}, 150 | "pool @ 1.5.1": { 151 | "async": "^2.5.0", 152 | "stack_trace": "^1.10.0" 153 | }, 154 | "pub_semver @ 2.1.4": { 155 | "collection": "^1.15.0", 156 | "meta": "^1.3.0" 157 | }, 158 | "pubspec_parse @ 1.3.0": { 159 | "checked_yaml": "^2.0.1", 160 | "collection": "^1.15.0", 161 | "json_annotation": "^4.8.0", 162 | "pub_semver": "^2.0.0", 163 | "yaml": "^3.0.0" 164 | }, 165 | "shelf @ 1.4.2": { 166 | "async": "^2.5.0", 167 | "collection": "^1.15.0", 168 | "http_parser": "^4.1.0", 169 | "path": "^1.8.0", 170 | "stack_trace": "^1.10.0", 171 | "stream_channel": "^2.1.0" 172 | }, 173 | "shelf_web_socket @ 2.0.1": { 174 | "shelf": "^1.1.0", 175 | "stream_channel": "^2.1.0", 176 | "web_socket_channel": ">=2.0.0 <4.0.0" 177 | }, 178 | "stack_trace @ 1.12.0": { 179 | "path": "^1.8.0" 180 | }, 181 | "stream_transform @ 2.1.0": {}, 182 | "timing @ 1.0.1": { 183 | "json_annotation": "^4.3.0" 184 | }, 185 | "watcher @ 1.1.0": { 186 | "async": "^2.5.0", 187 | "path": "^1.8.0" 188 | }, 189 | "web_socket_channel @ 3.0.1": { 190 | "async": "^2.5.0", 191 | "crypto": "^3.0.0", 192 | "stream_channel": "^2.1.0", 193 | "web": ">=0.5.0 <2.0.0", 194 | "web_socket": "^0.1.5" 195 | }, 196 | "yaml @ 3.1.2": { 197 | "collection": "^1.15.0", 198 | "source_span": "^1.8.0", 199 | "string_scanner": "^1.1.0" 200 | } 201 | }, 202 | "dev dependencies": { 203 | "_test_common @ 0.0.0": { 204 | "build": "any", 205 | "build_config": "any", 206 | "build_runner_core": "any", 207 | "build_test": "any", 208 | "crypto": "^3.0.0", 209 | "logging": "^1.0.0", 210 | "package_config": "^2.0.0", 211 | "path": "^1.8.0", 212 | "pub_semver": "^2.0.0", 213 | "test": "^1.16.0", 214 | "test_descriptor": "^2.0.0", 215 | "watcher": "^1.0.0" 216 | }, 217 | "build_test @ 2.2.2": { 218 | "async": "^2.5.0", 219 | "build": "^2.1.0", 220 | "build_config": "^1.0.0", 221 | "build_resolvers": "^2.4.0", 222 | "crypto": "^3.0.0", 223 | "glob": "^2.0.0", 224 | "html": "^0.15.0", 225 | "logging": "^1.0.0", 226 | "matcher": "^0.12.0", 227 | "package_config": "^2.0.0", 228 | "path": "^1.8.0", 229 | "stream_transform": "^2.0.0", 230 | "test": "^1.16.0", 231 | "test_core": ">=0.3.19 <0.7.0", 232 | "watcher": "^1.0.0" 233 | }, 234 | "build_web_compilers @ 4.1.0-beta.3": { 235 | "analyzer": ">=5.1.0 <7.0.0", 236 | "archive": "^3.0.0", 237 | "bazel_worker": "^1.0.0", 238 | "build": "^2.0.0", 239 | "build_config": "^1.0.0", 240 | "build_modules": "^5.0.0", 241 | "collection": "^1.15.0", 242 | "glob": "^2.0.0", 243 | "js": ">=0.6.3 <0.8.0", 244 | "logging": "^1.0.0", 245 | "path": "^1.8.0", 246 | "pool": "^1.5.0", 247 | "scratch_space": "^1.0.0", 248 | "source_maps": "^0.10.10", 249 | "source_span": "^1.8.0", 250 | "stack_trace": "^1.10.0" 251 | }, 252 | "dart_flutter_team_lints @ 3.2.1": { 253 | "lints": "^5.0.0" 254 | }, 255 | "stream_channel @ 2.1.2": { 256 | "async": "^2.5.0" 257 | }, 258 | "test @ 1.25.10": { 259 | "analyzer": ">=6.0.0 <8.0.0", 260 | "async": "^2.5.0", 261 | "boolean_selector": "^2.1.0", 262 | "collection": "^1.15.0", 263 | "coverage": "^1.0.1", 264 | "http_multi_server": "^3.0.0", 265 | "io": "^1.0.0", 266 | "js": ">=0.6.4 <0.8.0", 267 | "matcher": ">=0.12.16 <0.12.17", 268 | "node_preamble": "^2.0.0", 269 | "package_config": "^2.0.0", 270 | "path": "^1.8.0", 271 | "pool": "^1.5.0", 272 | "shelf": "^1.0.0", 273 | "shelf_packages_handler": "^3.0.0", 274 | "shelf_static": "^1.0.0", 275 | "shelf_web_socket": ">=1.0.0 <3.0.0", 276 | "source_span": "^1.8.0", 277 | "stack_trace": "^1.10.0", 278 | "stream_channel": "^2.1.0", 279 | "test_api": "0.7.4", 280 | "test_core": "0.6.7", 281 | "typed_data": "^1.3.0", 282 | "web_socket_channel": ">=2.0.0 <4.0.0", 283 | "webkit_inspection_protocol": "^1.0.0", 284 | "yaml": "^3.0.0" 285 | }, 286 | "test_descriptor @ 2.0.1": { 287 | "async": "^2.5.0", 288 | "collection": "^1.15.0", 289 | "matcher": "^0.12.10", 290 | "meta": "^1.3.0", 291 | "path": "^1.8.0", 292 | "term_glyph": "^1.2.0", 293 | "test": "^1.16.0" 294 | }, 295 | "test_process @ 2.1.0": { 296 | "async": "^2.5.0", 297 | "meta": "^1.3.0", 298 | "path": "^1.8.0", 299 | "test": "^1.16.0" 300 | } 301 | }, 302 | "dependency overrides": { 303 | "build_runner_core @ 8.0.0-wip": { 304 | "async": "^2.5.0", 305 | "build": "^2.4.0", 306 | "build_config": "^1.0.0", 307 | "build_resolvers": "^2.4.0", 308 | "collection": "^1.15.0", 309 | "convert": "^3.0.0", 310 | "crypto": "^3.0.0", 311 | "glob": "^2.0.0", 312 | "graphs": "^2.0.0", 313 | "json_annotation": "^4.8.1", 314 | "logging": "^1.2.0", 315 | "meta": "^1.3.0", 316 | "package_config": "^2.0.0", 317 | "path": "^1.8.0", 318 | "pool": "^1.5.0", 319 | "timing": "^1.0.0", 320 | "watcher": "^1.0.0", 321 | "yaml": "^3.0.0" 322 | } 323 | } 324 | } 325 | } 326 | }, 327 | "transitiveDependencies": { 328 | "_fe_analyzer_shared @ 76.0.0": { 329 | "meta": "^1.9.0" 330 | }, 331 | "_macros @ 0.3.3": {}, 332 | "archive @ 3.6.1": { 333 | "crypto": "^3.0.3", 334 | "path": "^1.8.0" 335 | }, 336 | "bazel_worker @ 1.1.2": { 337 | "async": "^2.5.0", 338 | "protobuf": "^3.0.0" 339 | }, 340 | "boolean_selector @ 2.1.2": { 341 | "source_span": "^1.8.0", 342 | "string_scanner": "^1.1.0" 343 | }, 344 | "build_modules @ 5.0.10-beta.0": { 345 | "analyzer": ">=5.1.0 <7.0.0", 346 | "async": "^2.5.0", 347 | "bazel_worker": "^1.0.0", 348 | "build": "^2.0.0", 349 | "build_config": "^1.0.0", 350 | "collection": "^1.15.0", 351 | "crypto": "^3.0.0", 352 | "glob": "^2.0.0", 353 | "graphs": "^2.0.0", 354 | "json_annotation": "^4.3.0", 355 | "logging": "^1.0.0", 356 | "path": "^1.8.0", 357 | "scratch_space": "^1.0.0", 358 | "stream_transform": "^2.0.0" 359 | }, 360 | "built_collection @ 5.1.1": {}, 361 | "built_value @ 8.9.2": { 362 | "built_collection": "^5.0.0", 363 | "collection": "^1.15.0", 364 | "fixnum": "^1.0.0", 365 | "meta": "^1.3.0" 366 | }, 367 | "checked_yaml @ 2.0.3": { 368 | "json_annotation": "^4.3.0", 369 | "source_span": "^1.8.0", 370 | "yaml": "^3.0.0" 371 | }, 372 | "convert @ 3.1.2": { 373 | "typed_data": "^1.3.0" 374 | }, 375 | "coverage @ 1.11.0": { 376 | "args": "^2.0.0", 377 | "glob": "^2.1.2", 378 | "logging": "^1.0.0", 379 | "meta": "^1.0.2", 380 | "package_config": "^2.0.0", 381 | "path": "^1.8.0", 382 | "source_maps": "^0.10.10", 383 | "stack_trace": "^1.10.0", 384 | "vm_service": ">=12.0.0 <15.0.0" 385 | }, 386 | "csslib @ 1.0.2": { 387 | "source_span": "^1.8.0" 388 | }, 389 | "file @ 7.0.1": { 390 | "meta": "^1.9.1", 391 | "path": "^1.8.3" 392 | }, 393 | "fixnum @ 1.1.1": {}, 394 | "html @ 0.15.5": { 395 | "csslib": "^1.0.0", 396 | "source_span": "^1.8.0" 397 | }, 398 | "http_parser @ 4.1.1": { 399 | "collection": "^1.19.0", 400 | "source_span": "^1.8.0", 401 | "string_scanner": "^1.1.0", 402 | "typed_data": "^1.3.0" 403 | }, 404 | "json_annotation @ 4.9.0": { 405 | "meta": "^1.4.0" 406 | }, 407 | "lints @ 5.1.0": {}, 408 | "macros @ 0.1.3-main.0": { 409 | "_macros": "0.3.3" 410 | }, 411 | "matcher @ 0.12.16+1": { 412 | "async": "^2.10.0", 413 | "meta": "^1.8.0", 414 | "stack_trace": "^1.10.0", 415 | "term_glyph": "^1.2.0", 416 | "test_api": ">=0.5.0 <0.8.0" 417 | }, 418 | "node_preamble @ 2.0.2": {}, 419 | "protobuf @ 3.1.0": { 420 | "collection": "^1.15.0", 421 | "fixnum": "^1.0.0", 422 | "meta": "^1.7.0" 423 | }, 424 | "scratch_space @ 1.0.2": { 425 | "build": "^2.0.0", 426 | "crypto": "^3.0.0", 427 | "path": "^1.8.0", 428 | "pool": "^1.5.0" 429 | }, 430 | "shelf_packages_handler @ 3.0.2": { 431 | "path": "^1.8.0", 432 | "shelf": "^1.0.0", 433 | "shelf_static": "^1.0.0" 434 | }, 435 | "shelf_static @ 1.1.3": { 436 | "convert": "^3.0.0", 437 | "http_parser": "^4.0.0", 438 | "mime": ">=1.0.0 <3.0.0", 439 | "path": "^1.8.0", 440 | "shelf": "^1.1.2" 441 | }, 442 | "source_map_stack_trace @ 2.1.2": { 443 | "path": "^1.8.0", 444 | "source_maps": "^0.10.10", 445 | "stack_trace": "^1.10.0" 446 | }, 447 | "source_maps @ 0.10.12": { 448 | "source_span": "^1.8.0" 449 | }, 450 | "source_span @ 1.10.0": { 451 | "collection": "^1.15.0", 452 | "path": "^1.8.0", 453 | "term_glyph": "^1.2.0" 454 | }, 455 | "string_scanner @ 1.4.0": { 456 | "source_span": "^1.8.0" 457 | }, 458 | "term_glyph @ 1.2.1": {}, 459 | "test_api @ 0.7.4": { 460 | "async": "^2.5.0", 461 | "boolean_selector": "^2.1.0", 462 | "collection": "^1.15.0", 463 | "meta": "^1.14.0", 464 | "source_span": "^1.8.0", 465 | "stack_trace": "^1.10.0", 466 | "stream_channel": "^2.1.0", 467 | "string_scanner": "^1.1.0", 468 | "term_glyph": "^1.2.0" 469 | }, 470 | "test_core @ 0.6.7": { 471 | "analyzer": ">=6.0.0 <8.0.0", 472 | "args": "^2.0.0", 473 | "async": "^2.5.0", 474 | "boolean_selector": "^2.1.0", 475 | "collection": "^1.15.0", 476 | "coverage": "^1.0.0", 477 | "frontend_server_client": ">=3.2.0 <5.0.0", 478 | "glob": "^2.0.0", 479 | "io": "^1.0.0", 480 | "meta": "^1.3.0", 481 | "package_config": "^2.0.0", 482 | "path": "^1.8.0", 483 | "pool": "^1.5.0", 484 | "source_map_stack_trace": "^2.1.0", 485 | "source_maps": "^0.10.10", 486 | "source_span": "^1.8.0", 487 | "stack_trace": "^1.10.0", 488 | "stream_channel": "^2.1.0", 489 | "test_api": "0.7.4", 490 | "vm_service": ">=6.0.0 <16.0.0", 491 | "yaml": "^3.0.0" 492 | }, 493 | "typed_data @ 1.4.0": { 494 | "collection": "^1.15.0" 495 | }, 496 | "vm_service @ 14.3.1": {}, 497 | "web @ 1.1.0": {}, 498 | "web_socket @ 0.1.6": { 499 | "web": ">=0.5.0 <2.0.0" 500 | }, 501 | "webkit_inspection_protocol @ 1.2.1": { 502 | "logging": "^1.0.0" 503 | } 504 | } 505 | } 506 | 507 | -------------------------------------------------------------------------------- /test/deps/with_overrides.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 3.7.0-207.0.dev 2 | Flutter SDK 3.27.0-1.0.pre.686 3 | build_runner 2.4.14-wip 4 | 5 | dependencies: 6 | - analyzer 6.11.0 7 | - _fe_analyzer_shared ^76.0.0 8 | - collection ^1.19.0 9 | - convert ^3.0.0 10 | - crypto ^3.0.0 11 | - glob ^2.0.0 12 | - macros >=0.1.3-main.0 <0.1.4 13 | - meta ^1.15.0 14 | - package_config ^2.0.0 15 | - path ^1.9.0 16 | - pub_semver ^2.1.4 17 | - source_span ^1.8.0 18 | - watcher ^1.1.0 19 | - yaml ^3.0.0 20 | - args 2.6.0 21 | - async 2.12.0 22 | - collection ^1.15.0 23 | - meta ^1.3.0 24 | - build 2.4.1 25 | - analyzer >=1.5.0 <7.0.0 26 | - async ^2.5.0 27 | - convert ^3.0.0 28 | - crypto ^3.0.0 29 | - glob ^2.0.0 30 | - logging ^1.0.0 31 | - meta ^1.3.0 32 | - package_config ^2.1.0 33 | - path ^1.8.0 34 | - build_config 1.1.1 35 | - checked_yaml ^2.0.0 36 | - json_annotation ^4.5.0 37 | - path ^1.8.0 38 | - pubspec_parse ^1.0.0 39 | - yaml ^3.0.0 40 | - build_daemon 4.0.2 41 | - built_collection ^5.0.0 42 | - built_value ^8.1.0 43 | - crypto ^3.0.3 44 | - http_multi_server ^3.0.0 45 | - logging ^1.0.0 46 | - path ^1.8.0 47 | - pool ^1.5.0 48 | - shelf ^1.0.0 49 | - shelf_web_socket >=1.0.0 <3.0.0 50 | - stream_transform ^2.0.0 51 | - watcher ^1.0.0 52 | - web_socket_channel >=2.0.0 <4.0.0 53 | - build_resolvers 2.4.2 54 | - analyzer >=5.12.0 <7.0.0 55 | - async ^2.5.0 56 | - build ^2.0.0 57 | - collection ^1.17.0 58 | - convert ^3.1.1 59 | - crypto ^3.0.0 60 | - graphs >=1.0.0 <3.0.0 61 | - logging ^1.0.0 62 | - package_config ^2.0.0 63 | - path ^1.8.0 64 | - pool ^1.5.0 65 | - pub_semver ^2.0.0 66 | - stream_transform ^2.0.0 67 | - yaml ^3.0.0 68 | - build_runner_core 8.0.0-wip 69 | - async ^2.5.0 70 | - build ^2.4.0 71 | - build_config ^1.0.0 72 | - build_resolvers ^2.4.0 73 | - collection ^1.15.0 74 | - convert ^3.0.0 75 | - crypto ^3.0.0 76 | - glob ^2.0.0 77 | - graphs ^2.0.0 78 | - json_annotation ^4.8.1 79 | - logging ^1.2.0 80 | - meta ^1.3.0 81 | - package_config ^2.0.0 82 | - path ^1.8.0 83 | - pool ^1.5.0 84 | - timing ^1.0.0 85 | - watcher ^1.0.0 86 | - yaml ^3.0.0 87 | - code_builder 4.10.1 88 | - built_collection ^5.0.0 89 | - built_value ^8.0.0 90 | - collection ^1.15.0 91 | - matcher ^0.12.10 92 | - meta ^1.3.0 93 | - collection 1.19.1 94 | - crypto 3.0.6 95 | - typed_data ^1.3.0 96 | - dart_style 2.3.7 97 | - analyzer ^6.5.0 98 | - args >=1.0.0 <3.0.0 99 | - collection ^1.17.0 100 | - package_config ^2.1.0 101 | - path ^1.0.0 102 | - pub_semver >=1.4.4 <3.0.0 103 | - source_span ^1.4.0 104 | - frontend_server_client 4.0.0 105 | - async ^2.5.0 106 | - path ^1.8.0 107 | - glob 2.1.2 108 | - async ^2.5.0 109 | - collection ^1.15.0 110 | - file >=6.1.3 <8.0.0 111 | - path ^1.8.0 112 | - string_scanner ^1.1.0 113 | - graphs 2.3.2 114 | - collection ^1.15.0 115 | - http_multi_server 3.2.1 116 | - async ^2.5.0 117 | - io 1.0.4 118 | - meta ^1.3.0 119 | - path ^1.8.0 120 | - string_scanner ^1.1.0 121 | - js 0.7.1 122 | - logging 1.3.0 123 | - meta 1.16.0 124 | - mime 2.0.0 125 | - package_config 2.1.0 126 | - path ^1.8.0 127 | - path 1.9.1 128 | - pool 1.5.1 129 | - async ^2.5.0 130 | - stack_trace ^1.10.0 131 | - pub_semver 2.1.4 132 | - collection ^1.15.0 133 | - meta ^1.3.0 134 | - pubspec_parse 1.3.0 135 | - checked_yaml ^2.0.1 136 | - collection ^1.15.0 137 | - json_annotation ^4.8.0 138 | - pub_semver ^2.0.0 139 | - yaml ^3.0.0 140 | - shelf 1.4.2 141 | - async ^2.5.0 142 | - collection ^1.15.0 143 | - http_parser ^4.1.0 144 | - path ^1.8.0 145 | - stack_trace ^1.10.0 146 | - stream_channel ^2.1.0 147 | - shelf_web_socket 2.0.1 148 | - shelf ^1.1.0 149 | - stream_channel ^2.1.0 150 | - web_socket_channel >=2.0.0 <4.0.0 151 | - stack_trace 1.12.0 152 | - path ^1.8.0 153 | - stream_transform 2.1.0 154 | - timing 1.0.1 155 | - json_annotation ^4.3.0 156 | - watcher 1.1.0 157 | - async ^2.5.0 158 | - path ^1.8.0 159 | - web_socket_channel 3.0.1 160 | - async ^2.5.0 161 | - crypto ^3.0.0 162 | - stream_channel ^2.1.0 163 | - web >=0.5.0 <2.0.0 164 | - web_socket ^0.1.5 165 | - yaml 3.1.2 166 | - collection ^1.15.0 167 | - source_span ^1.8.0 168 | - string_scanner ^1.1.0 169 | 170 | dev dependencies: 171 | - _test_common 0.0.0 172 | - build any 173 | - build_config any 174 | - build_runner_core any 175 | - build_test any 176 | - crypto ^3.0.0 177 | - logging ^1.0.0 178 | - package_config ^2.0.0 179 | - path ^1.8.0 180 | - pub_semver ^2.0.0 181 | - test ^1.16.0 182 | - test_descriptor ^2.0.0 183 | - watcher ^1.0.0 184 | - build_test 2.2.2 185 | - async ^2.5.0 186 | - build ^2.1.0 187 | - build_config ^1.0.0 188 | - build_resolvers ^2.4.0 189 | - crypto ^3.0.0 190 | - glob ^2.0.0 191 | - html ^0.15.0 192 | - logging ^1.0.0 193 | - matcher ^0.12.0 194 | - package_config ^2.0.0 195 | - path ^1.8.0 196 | - stream_transform ^2.0.0 197 | - test ^1.16.0 198 | - test_core >=0.3.19 <0.7.0 199 | - watcher ^1.0.0 200 | - build_web_compilers 4.1.0-beta.3 201 | - analyzer >=5.1.0 <7.0.0 202 | - archive ^3.0.0 203 | - bazel_worker ^1.0.0 204 | - build ^2.0.0 205 | - build_config ^1.0.0 206 | - build_modules ^5.0.0 207 | - collection ^1.15.0 208 | - glob ^2.0.0 209 | - js >=0.6.3 <0.8.0 210 | - logging ^1.0.0 211 | - path ^1.8.0 212 | - pool ^1.5.0 213 | - scratch_space ^1.0.0 214 | - source_maps ^0.10.10 215 | - source_span ^1.8.0 216 | - stack_trace ^1.10.0 217 | - dart_flutter_team_lints 3.2.1 218 | - lints ^5.0.0 219 | - stream_channel 2.1.2 220 | - async ^2.5.0 221 | - test 1.25.10 222 | - analyzer >=6.0.0 <8.0.0 223 | - async ^2.5.0 224 | - boolean_selector ^2.1.0 225 | - collection ^1.15.0 226 | - coverage ^1.0.1 227 | - http_multi_server ^3.0.0 228 | - io ^1.0.0 229 | - js >=0.6.4 <0.8.0 230 | - matcher >=0.12.16 <0.12.17 231 | - node_preamble ^2.0.0 232 | - package_config ^2.0.0 233 | - path ^1.8.0 234 | - pool ^1.5.0 235 | - shelf ^1.0.0 236 | - shelf_packages_handler ^3.0.0 237 | - shelf_static ^1.0.0 238 | - shelf_web_socket >=1.0.0 <3.0.0 239 | - source_span ^1.8.0 240 | - stack_trace ^1.10.0 241 | - stream_channel ^2.1.0 242 | - test_api 0.7.4 243 | - test_core 0.6.7 244 | - typed_data ^1.3.0 245 | - web_socket_channel >=2.0.0 <4.0.0 246 | - webkit_inspection_protocol ^1.0.0 247 | - yaml ^3.0.0 248 | - test_descriptor 2.0.1 249 | - async ^2.5.0 250 | - collection ^1.15.0 251 | - matcher ^0.12.10 252 | - meta ^1.3.0 253 | - path ^1.8.0 254 | - term_glyph ^1.2.0 255 | - test ^1.16.0 256 | - test_process 2.1.0 257 | - async ^2.5.0 258 | - meta ^1.3.0 259 | - path ^1.8.0 260 | - test ^1.16.0 261 | 262 | dependency overrides: 263 | - build_runner_core 8.0.0-wip 264 | - async ^2.5.0 265 | - build ^2.4.0 266 | - build_config ^1.0.0 267 | - build_resolvers ^2.4.0 268 | - collection ^1.15.0 269 | - convert ^3.0.0 270 | - crypto ^3.0.0 271 | - glob ^2.0.0 272 | - graphs ^2.0.0 273 | - json_annotation ^4.8.1 274 | - logging ^1.2.0 275 | - meta ^1.3.0 276 | - package_config ^2.0.0 277 | - path ^1.8.0 278 | - pool ^1.5.0 279 | - timing ^1.0.0 280 | - watcher ^1.0.0 281 | - yaml ^3.0.0 282 | 283 | transitive dependencies: 284 | - _fe_analyzer_shared 76.0.0 285 | - meta ^1.9.0 286 | - _macros 0.3.3 287 | - archive 3.6.1 288 | - crypto ^3.0.3 289 | - path ^1.8.0 290 | - bazel_worker 1.1.2 291 | - async ^2.5.0 292 | - protobuf ^3.0.0 293 | - boolean_selector 2.1.2 294 | - source_span ^1.8.0 295 | - string_scanner ^1.1.0 296 | - build_modules 5.0.10-beta.0 297 | - analyzer >=5.1.0 <7.0.0 298 | - async ^2.5.0 299 | - bazel_worker ^1.0.0 300 | - build ^2.0.0 301 | - build_config ^1.0.0 302 | - collection ^1.15.0 303 | - crypto ^3.0.0 304 | - glob ^2.0.0 305 | - graphs ^2.0.0 306 | - json_annotation ^4.3.0 307 | - logging ^1.0.0 308 | - path ^1.8.0 309 | - scratch_space ^1.0.0 310 | - stream_transform ^2.0.0 311 | - built_collection 5.1.1 312 | - built_value 8.9.2 313 | - built_collection ^5.0.0 314 | - collection ^1.15.0 315 | - fixnum ^1.0.0 316 | - meta ^1.3.0 317 | - checked_yaml 2.0.3 318 | - json_annotation ^4.3.0 319 | - source_span ^1.8.0 320 | - yaml ^3.0.0 321 | - convert 3.1.2 322 | - typed_data ^1.3.0 323 | - coverage 1.11.0 324 | - args ^2.0.0 325 | - glob ^2.1.2 326 | - logging ^1.0.0 327 | - meta ^1.0.2 328 | - package_config ^2.0.0 329 | - path ^1.8.0 330 | - source_maps ^0.10.10 331 | - stack_trace ^1.10.0 332 | - vm_service >=12.0.0 <15.0.0 333 | - csslib 1.0.2 334 | - source_span ^1.8.0 335 | - file 7.0.1 336 | - meta ^1.9.1 337 | - path ^1.8.3 338 | - fixnum 1.1.1 339 | - html 0.15.5 340 | - csslib ^1.0.0 341 | - source_span ^1.8.0 342 | - http_parser 4.1.1 343 | - collection ^1.19.0 344 | - source_span ^1.8.0 345 | - string_scanner ^1.1.0 346 | - typed_data ^1.3.0 347 | - json_annotation 4.9.0 348 | - meta ^1.4.0 349 | - lints 5.1.0 350 | - macros 0.1.3-main.0 351 | - _macros 0.3.3 352 | - matcher 0.12.16+1 353 | - async ^2.10.0 354 | - meta ^1.8.0 355 | - stack_trace ^1.10.0 356 | - term_glyph ^1.2.0 357 | - test_api >=0.5.0 <0.8.0 358 | - node_preamble 2.0.2 359 | - protobuf 3.1.0 360 | - collection ^1.15.0 361 | - fixnum ^1.0.0 362 | - meta ^1.7.0 363 | - scratch_space 1.0.2 364 | - build ^2.0.0 365 | - crypto ^3.0.0 366 | - path ^1.8.0 367 | - pool ^1.5.0 368 | - shelf_packages_handler 3.0.2 369 | - path ^1.8.0 370 | - shelf ^1.0.0 371 | - shelf_static ^1.0.0 372 | - shelf_static 1.1.3 373 | - convert ^3.0.0 374 | - http_parser ^4.0.0 375 | - mime >=1.0.0 <3.0.0 376 | - path ^1.8.0 377 | - shelf ^1.1.2 378 | - source_map_stack_trace 2.1.2 379 | - path ^1.8.0 380 | - source_maps ^0.10.10 381 | - stack_trace ^1.10.0 382 | - source_maps 0.10.12 383 | - source_span ^1.8.0 384 | - source_span 1.10.0 385 | - collection ^1.15.0 386 | - path ^1.8.0 387 | - term_glyph ^1.2.0 388 | - string_scanner 1.4.0 389 | - source_span ^1.8.0 390 | - term_glyph 1.2.1 391 | - test_api 0.7.4 392 | - async ^2.5.0 393 | - boolean_selector ^2.1.0 394 | - collection ^1.15.0 395 | - meta ^1.14.0 396 | - source_span ^1.8.0 397 | - stack_trace ^1.10.0 398 | - stream_channel ^2.1.0 399 | - string_scanner ^1.1.0 400 | - term_glyph ^1.2.0 401 | - test_core 0.6.7 402 | - analyzer >=6.0.0 <8.0.0 403 | - args ^2.0.0 404 | - async ^2.5.0 405 | - boolean_selector ^2.1.0 406 | - collection ^1.15.0 407 | - coverage ^1.0.0 408 | - frontend_server_client >=3.2.0 <5.0.0 409 | - glob ^2.0.0 410 | - io ^1.0.0 411 | - meta ^1.3.0 412 | - package_config ^2.0.0 413 | - path ^1.8.0 414 | - pool ^1.5.0 415 | - source_map_stack_trace ^2.1.0 416 | - source_maps ^0.10.10 417 | - source_span ^1.8.0 418 | - stack_trace ^1.10.0 419 | - stream_channel ^2.1.0 420 | - test_api 0.7.4 421 | - vm_service >=6.0.0 <16.0.0 422 | - yaml ^3.0.0 423 | - typed_data 1.4.0 424 | - collection ^1.15.0 425 | - vm_service 14.3.1 426 | - web 1.1.0 427 | - web_socket 0.1.6 428 | - web >=0.5.0 <2.0.0 429 | - webkit_inspection_protocol 1.2.1 430 | - logging ^1.0.0 431 | -------------------------------------------------------------------------------- /test/deps_list_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:path/path.dart' as p; 5 | import 'package:pub_semver/pub_semver.dart'; 6 | import 'package:pubviz/src/deps_list.dart'; 7 | import 'package:stack_trace/stack_trace.dart'; 8 | import 'package:test/test.dart'; 9 | 10 | const _write = false; 11 | 12 | void main() { 13 | const depsList = [ 14 | ['deps', 'empty_deps'], 15 | ['deps', 'flutter_gallery'], 16 | ['deps', 'knarly_deps'], 17 | ['deps', 'with_dots'], 18 | ['deps', 'with_overrides'], 19 | ['mock', 'json_serial'], 20 | ['mock', 'pub_deps_list'], 21 | ]; 22 | 23 | for (var path in depsList.map((e) => p.joinAll(['test', ...e]))) { 24 | test(path, () { 25 | final file = File('$path.txt'); 26 | final deps = DepsList.parse(file.readAsStringSync()); 27 | 28 | // ignore: prefer_interpolation_to_compose_strings 29 | final depsJson = _prettyJsonEncode(deps) + '\n'; 30 | 31 | final jsonFile = File('$path.json'); 32 | 33 | if (_write) { 34 | jsonFile.writeAsStringSync(depsJson); 35 | fail('Set `_write` to false!'); 36 | } 37 | 38 | expect(depsJson, jsonFile.readAsStringSync()); 39 | }); 40 | } 41 | } 42 | 43 | String _prettyJsonEncode(Object? content) { 44 | try { 45 | return '${_encoder.convert(content)}\n'; 46 | } catch (e) { 47 | if (e is JsonUnsupportedObjectError) { 48 | Object? error = e; 49 | 50 | var count = 1; 51 | 52 | while (error is JsonUnsupportedObjectError) { 53 | final juoe = error; 54 | print( 55 | '(${count++}) $error ${juoe.unsupportedObject} ' 56 | '${juoe.unsupportedObject.runtimeType} !!!', 57 | ); 58 | print(Trace.from(juoe.stackTrace!).terse); 59 | error = juoe.cause; 60 | } 61 | 62 | if (error != null) { 63 | print('(${count++}) $error ???'); 64 | if (error is AssertionError) { 65 | print(error.stackTrace); 66 | } 67 | } 68 | } 69 | rethrow; 70 | } 71 | } 72 | 73 | const _encoder = JsonEncoder.withIndent(' ', _toEncodable); 74 | 75 | Object? _toEncodable(Object? source) { 76 | if (source is DepsList) { 77 | return source.toJson(); 78 | } else if (source is DepsPackageEntry) { 79 | return source.toJson(); 80 | } else if (source is VersionConstraint) { 81 | return source.toString(); 82 | } 83 | throw UnsupportedError('unknown ${source.runtimeType} ${source.hashCode}'); 84 | } 85 | -------------------------------------------------------------------------------- /test/ensure_build_test.dart: -------------------------------------------------------------------------------- 1 | @Timeout.factor(2) 2 | @Tags(['presubmit-only']) 3 | library; 4 | 5 | import 'package:build_verify/build_verify.dart'; 6 | import 'package:test/test.dart'; 7 | 8 | void main() { 9 | test('ensure_build', expectBuildClean); 10 | } 11 | -------------------------------------------------------------------------------- /test/mock/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | language: 3 | strict-inference: true 4 | strict-casts: true 5 | 6 | linter: 7 | rules: 8 | - always_declare_return_types 9 | - avoid_bool_literals_in_conditional_expressions 10 | - avoid_catching_errors 11 | - avoid_classes_with_only_static_members 12 | - avoid_dynamic_calls 13 | - avoid_private_typedef_functions 14 | - avoid_redundant_argument_values 15 | - avoid_returning_this 16 | - avoid_unused_constructor_parameters 17 | - avoid_void_async 18 | - cancel_subscriptions 19 | - cascade_invocations 20 | - comment_references 21 | - directives_ordering 22 | - join_return_with_assignment 23 | - lines_longer_than_80_chars 24 | - literal_only_boolean_expressions 25 | - missing_whitespace_between_adjacent_strings 26 | - no_adjacent_strings_in_list 27 | - no_runtimeType_toString 28 | - omit_local_variable_types 29 | - only_throw_errors 30 | - package_api_docs 31 | - prefer_asserts_in_initializer_lists 32 | - prefer_const_constructors 33 | - prefer_const_declarations 34 | - prefer_expression_function_bodies 35 | - prefer_final_locals 36 | - prefer_interpolation_to_compose_strings 37 | - prefer_relative_imports 38 | - prefer_single_quotes 39 | - sort_pub_dependencies 40 | - test_types_in_equals 41 | - throw_in_finally 42 | - type_annotate_public_apis 43 | - unawaited_futures 44 | - unnecessary_await_in_return 45 | - unnecessary_lambdas 46 | - unnecessary_null_aware_assignments 47 | - unnecessary_parenthesis 48 | - unnecessary_statements 49 | - use_is_even_rather_than_modulo 50 | - use_string_buffers 51 | -------------------------------------------------------------------------------- /test/mock/direct_deps.dot: -------------------------------------------------------------------------------- 1 | digraph pubviz { 2 | graph [nodesep="0.2"]; 3 | edge [fontcolor=gray]; 4 | 5 | args [label="args 6 | 1.6.0", shape=box, margin="0.25,0.15", style=bold]; 7 | 8 | build_runner [label="build_runner 9 | 1.9.0", style=bold]; 10 | build_runner -> args [label=">=1.4.0 <2.0.0", color=gray]; 11 | build_runner -> async [label=">=1.13.3 <3.0.0", color=gray]; 12 | build_runner -> build [label=">=1.0.0 <1.3.0", color=gray]; 13 | build_runner -> build_config [label=">=0.4.1 <0.4.3", color=gray]; 14 | build_runner -> build_daemon [label="^2.1.0", color=gray]; 15 | build_runner -> build_resolvers [label="^1.0.0", color=gray]; 16 | build_runner -> build_runner_core [label="^5.1.0", color=gray]; 17 | build_runner -> code_builder [label=">2.3.0 <4.0.0", color=gray]; 18 | build_runner -> collection [label="^1.14.0", color=gray]; 19 | build_runner -> crypto [label=">=0.9.2 <3.0.0", color=gray]; 20 | build_runner -> dart_style [label="^1.0.0", color=gray]; 21 | build_runner -> glob [label="^1.1.0", color=gray]; 22 | build_runner -> graphs [label="^0.2.0", color=gray]; 23 | build_runner -> http_multi_server [label="^2.1.0", color=gray]; 24 | build_runner -> io [label="^0.3.0", color=gray]; 25 | build_runner -> js [label="^0.6.1+1", color=gray]; 26 | build_runner -> logging [label="^0.11.2", color=gray]; 27 | build_runner -> meta [label="^1.1.0", color=gray]; 28 | build_runner -> mime [label="^0.9.3+3", color=gray]; 29 | build_runner -> path [label="^1.1.0", color=gray]; 30 | build_runner -> pedantic [label="^1.0.0", color=gray]; 31 | build_runner -> pool [label="^1.0.0", color=gray]; 32 | build_runner -> pub_semver [label="^1.4.0", color=gray]; 33 | build_runner -> pubspec_parse [label="^0.1.0", color=gray]; 34 | build_runner -> shelf [label=">=0.6.5 <0.8.0", color=gray]; 35 | build_runner -> shelf_web_socket [label="^0.2.2+4", color=gray]; 36 | build_runner -> stack_trace [label="^1.9.0", color=gray]; 37 | build_runner -> stream_transform [label=">=0.0.20 <2.0.0", color=gray]; 38 | build_runner -> timing [label="^0.1.1", color=gray]; 39 | build_runner -> watcher [label="^0.9.7", color=gray]; 40 | build_runner -> web_socket_channel [label="^1.0.9", color=gray]; 41 | build_runner -> yaml [label="^2.1.0", color=gray]; 42 | 43 | build_web_compilers [label="build_web_compilers 44 | 2.10.0", style=bold]; 45 | build_web_compilers -> analyzer [label=">=0.30.0 <0.40.0", color=gray]; 46 | build_web_compilers -> archive [label="^2.0.0", color=gray]; 47 | build_web_compilers -> bazel_worker [label="^0.1.18", color=gray]; 48 | build_web_compilers -> build [label=">=1.2.0 <2.0.0", color=gray]; 49 | build_web_compilers -> build_config [label=">=0.3.0 <0.5.0", color=gray]; 50 | build_web_compilers -> build_modules [label="^2.9.0", color=gray]; 51 | build_web_compilers -> collection [label="^1.0.0", color=gray]; 52 | build_web_compilers -> glob [label="^1.1.0", color=gray]; 53 | build_web_compilers -> js [label="^0.6.1", color=gray]; 54 | build_web_compilers -> logging [label="^0.11.2", color=gray]; 55 | build_web_compilers -> meta [label="^1.1.0", color=gray]; 56 | build_web_compilers -> path [label="^1.4.2", color=gray]; 57 | build_web_compilers -> pool [label="^1.3.0", color=gray]; 58 | build_web_compilers -> scratch_space [label="^0.0.2", color=gray]; 59 | build_web_compilers -> source_maps [label="^0.10.4", color=gray]; 60 | build_web_compilers -> source_span [label="^1.4.0", color=gray]; 61 | build_web_compilers -> stack_trace [label="^1.9.2", color=gray]; 62 | 63 | collection [label="collection 64 | 1.15.0", shape=box, margin="0.25,0.15", style=bold]; 65 | 66 | github [label="github 67 | 6.2.3", shape=box, margin="0.25,0.15", style=bold]; 68 | github -> http [label="^0.12.0"]; 69 | github -> http_parser [label="^3.1.1"]; 70 | github -> json_annotation [label=">=2.0.0 <4.0.0"]; 71 | github -> meta [label="^1.1.0"]; 72 | 73 | gviz [label="gviz 74 | 0.3.0", shape=box, margin="0.25,0.15", style=bold]; 75 | 76 | http [label="http 77 | 0.12.2", shape=box, margin="0.25,0.15", style=bold]; 78 | http -> http_parser [label=">=0.0.1 <4.0.0"]; 79 | http -> path [label=">=0.9.0 <2.0.0"]; 80 | http -> pedantic [label="^1.0.0"]; 81 | 82 | http_retry [label="http_retry 83 | 0.1.1+3", shape=box, margin="0.25,0.15", style=bold]; 84 | http_retry -> async [label="^2.0.7"]; 85 | http_retry -> http [label=">=0.11.0 <0.13.0"]; 86 | 87 | http_throttle [label="http_throttle 88 | 1.0.4", shape=box, margin="0.25,0.15", style=bold]; 89 | http_throttle -> http [label=">=0.9.0 <0.13.0"]; 90 | http_throttle -> pool [label=">=1.0.0 <2.0.0"]; 91 | 92 | io [label="io 93 | 0.3.5", shape=box, margin="0.25,0.15", style=bold]; 94 | io -> meta [label="^1.0.2"]; 95 | io -> path [label="^1.5.1"]; 96 | io -> string_scanner [label=">=0.1.5 <2.0.0"]; 97 | 98 | json_annotation [label="json_annotation 99 | 3.0.1", shape=box, margin="0.25,0.15", style=bold]; 100 | 101 | json_serializable [label="json_serializable 102 | 3.2.3", style=bold]; 103 | json_serializable -> analyzer [label=">=0.37.1 <0.39.0", color=gray]; 104 | json_serializable -> build [label=">=0.12.6 <2.0.0", color=gray]; 105 | json_serializable -> build_config [label=">=0.2.6 <0.5.0", color=gray]; 106 | json_serializable -> json_annotation [label=">=3.0.0 <3.1.0", color=gray]; 107 | json_serializable -> meta [label="^1.1.0", color=gray]; 108 | json_serializable -> path [label="^1.3.2", color=gray]; 109 | json_serializable -> source_gen [label="^0.9.0", color=gray]; 110 | 111 | lints [label="lints 112 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 113 | 114 | meta [label="meta 115 | 1.7.0", shape=box, margin="0.25,0.15", style=bold]; 116 | 117 | pana [label="pana 118 | 0.12.21", shape=box, margin="0.25,0.15", style=bold]; 119 | pana -> analyzer [label="^0.38.0"]; 120 | pana -> args [label=">=0.13.7 <2.0.0"]; 121 | pana -> async [label=">=1.13.3 <3.0.0"]; 122 | pana -> cli_util [label="^0.1.3"]; 123 | pana -> html [label=">=0.13.3 <0.15.0"]; 124 | pana -> http [label=">=0.11.3 <0.13.0"]; 125 | pana -> io [label="^0.3.3"]; 126 | pana -> json_annotation [label=">=2.0.0 <4.0.0"]; 127 | pana -> logging [label="^0.11.3+1"]; 128 | pana -> markdown [label="^2.0.2"]; 129 | pana -> meta [label="^1.1.7"]; 130 | pana -> package_config [label=">=0.1.5 <2.0.0"]; 131 | pana -> path [label="^1.6.2"]; 132 | pana -> pedantic [label="^1.4.0"]; 133 | pana -> pool [label="^1.3.6"]; 134 | pana -> pub_semver [label="^1.4.2"]; 135 | pana -> pubspec_parse [label="^0.1.4"]; 136 | pana -> quiver [label=">=0.24.0 <3.0.0"]; 137 | pana -> resource [label="^2.1.5"]; 138 | pana -> yaml [label="^2.1.15"]; 139 | 140 | path [label="path 141 | 1.8.0", shape=box, margin="0.25,0.15", style=bold]; 142 | 143 | pedantic [label="pedantic 144 | 1.11.1", shape=box, margin="0.25,0.15", style=bold]; 145 | 146 | pool [label="pool 147 | 1.5.0", shape=box, margin="0.25,0.15", style=bold]; 148 | pool -> async [label="^2.5.0"]; 149 | pool -> stack_trace [label="^1.10.0"]; 150 | 151 | preload [label="preload 152 | 1.1.6", style=bold]; 153 | preload -> build [label=">=0.12.1 <2.0.0", color=gray]; 154 | preload -> build_config [label=">=0.3.0 <5.0.0", color=gray]; 155 | preload -> glob [label="^1.0.0", color=gray]; 156 | preload -> path [label="^1.0.0", color=gray]; 157 | 158 | pub_semver [label="pub_semver 159 | 1.4.4", shape=box, margin="0.25,0.15", style=bold]; 160 | pub_semver -> collection [label="^1.0.0"]; 161 | 162 | pubspec_parse [label="pubspec_parse 163 | 0.1.8", shape=box, margin="0.25,0.15", style=bold]; 164 | pubspec_parse -> checked_yaml [label="^1.0.0"]; 165 | pubspec_parse -> json_annotation [label=">=1.0.0 <5.0.0"]; 166 | pubspec_parse -> pub_semver [label=">=1.3.2 <3.0.0"]; 167 | pubspec_parse -> yaml [label=">=2.1.12 <4.0.0"]; 168 | 169 | repo_manager [label=repo_manager, fontsize="18", style=bold, shape=box, margin="0.25,0.15"]; 170 | repo_manager -> args [label="^1.4.3", penwidth="2"]; 171 | repo_manager -> collection [label="^1.11.0", penwidth="2"]; 172 | repo_manager -> github [label="^6.0.2", penwidth="2"]; 173 | repo_manager -> gviz [label="^0.3.0", penwidth="2"]; 174 | repo_manager -> http [label=">=0.12.0 <2.0.0", penwidth="2"]; 175 | repo_manager -> http_retry [label="^0.1.0", penwidth="2"]; 176 | repo_manager -> http_throttle [label="^1.0.4", penwidth="2"]; 177 | repo_manager -> io [label="^0.3.1", penwidth="2"]; 178 | repo_manager -> json_annotation [label="^3.0.0", penwidth="2"]; 179 | repo_manager -> lints [label="^1.0.0", penwidth="2"]; 180 | repo_manager -> meta [penwidth="2"]; 181 | repo_manager -> pana [label="^0.12.2", penwidth="2"]; 182 | repo_manager -> path [label="^1.4.1", penwidth="2"]; 183 | repo_manager -> pool [label="^1.4.0", penwidth="2"]; 184 | repo_manager -> pub_semver [label="^1.3.0", penwidth="2"]; 185 | repo_manager -> pubspec_parse [label="^0.1.3", penwidth="2"]; 186 | repo_manager -> stack_trace [label="^1.7.3", penwidth="2"]; 187 | repo_manager -> stats [label="^1.0.0", penwidth="2"]; 188 | repo_manager -> yaml [label="^2.1.12", penwidth="2"]; 189 | repo_manager -> build_runner [label="^1.0.0", penwidth="2", style=dashed]; 190 | repo_manager -> build_web_compilers [label="^2.0.0", penwidth="2", style=dashed]; 191 | repo_manager -> json_serializable [label="^3.0.0", penwidth="2", style=dashed]; 192 | repo_manager -> pedantic [label="^1.2.0", penwidth="2", style=dashed]; 193 | repo_manager -> preload [label="^1.0.0", penwidth="2", style=dashed]; 194 | 195 | stack_trace [label="stack_trace 196 | 1.10.0", shape=box, margin="0.25,0.15", style=bold]; 197 | stack_trace -> path [label="^1.8.0"]; 198 | 199 | stats [label="stats 200 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 201 | stats -> json_annotation [label=">=3.0.0 <5.0.0"]; 202 | 203 | yaml [label="yaml 204 | 2.2.1", shape=box, margin="0.25,0.15", style=bold]; 205 | yaml -> charcode [label="^1.1.0"]; 206 | yaml -> collection [label=">=1.1.0 <2.0.0"]; 207 | yaml -> source_span [label=">=1.0.0 <2.0.0"]; 208 | yaml -> string_scanner [label=">=0.1.4 <2.0.0"]; 209 | } 210 | -------------------------------------------------------------------------------- /test/mock/direct_production_deps.dot: -------------------------------------------------------------------------------- 1 | digraph pubviz { 2 | graph [nodesep="0.2"]; 3 | edge [fontcolor=gray]; 4 | 5 | args [label="args 6 | 1.6.0", shape=box, margin="0.25,0.15", style=bold]; 7 | 8 | collection [label="collection 9 | 1.15.0", shape=box, margin="0.25,0.15", style=bold]; 10 | 11 | github [label="github 12 | 6.2.3", shape=box, margin="0.25,0.15", style=bold]; 13 | github -> http [label="^0.12.0"]; 14 | github -> http_parser [label="^3.1.1"]; 15 | github -> json_annotation [label=">=2.0.0 <4.0.0"]; 16 | github -> meta [label="^1.1.0"]; 17 | 18 | gviz [label="gviz 19 | 0.3.0", shape=box, margin="0.25,0.15", style=bold]; 20 | 21 | http [label="http 22 | 0.12.2", shape=box, margin="0.25,0.15", style=bold]; 23 | http -> http_parser [label=">=0.0.1 <4.0.0"]; 24 | http -> path [label=">=0.9.0 <2.0.0"]; 25 | http -> pedantic [label="^1.0.0"]; 26 | 27 | http_retry [label="http_retry 28 | 0.1.1+3", shape=box, margin="0.25,0.15", style=bold]; 29 | http_retry -> async [label="^2.0.7"]; 30 | http_retry -> http [label=">=0.11.0 <0.13.0"]; 31 | 32 | http_throttle [label="http_throttle 33 | 1.0.4", shape=box, margin="0.25,0.15", style=bold]; 34 | http_throttle -> http [label=">=0.9.0 <0.13.0"]; 35 | http_throttle -> pool [label=">=1.0.0 <2.0.0"]; 36 | 37 | io [label="io 38 | 0.3.5", shape=box, margin="0.25,0.15", style=bold]; 39 | io -> meta [label="^1.0.2"]; 40 | io -> path [label="^1.5.1"]; 41 | io -> string_scanner [label=">=0.1.5 <2.0.0"]; 42 | 43 | json_annotation [label="json_annotation 44 | 3.0.1", shape=box, margin="0.25,0.15", style=bold]; 45 | 46 | lints [label="lints 47 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 48 | 49 | meta [label="meta 50 | 1.7.0", shape=box, margin="0.25,0.15", style=bold]; 51 | 52 | pana [label="pana 53 | 0.12.21", shape=box, margin="0.25,0.15", style=bold]; 54 | pana -> analyzer [label="^0.38.0"]; 55 | pana -> args [label=">=0.13.7 <2.0.0"]; 56 | pana -> async [label=">=1.13.3 <3.0.0"]; 57 | pana -> cli_util [label="^0.1.3"]; 58 | pana -> html [label=">=0.13.3 <0.15.0"]; 59 | pana -> http [label=">=0.11.3 <0.13.0"]; 60 | pana -> io [label="^0.3.3"]; 61 | pana -> json_annotation [label=">=2.0.0 <4.0.0"]; 62 | pana -> logging [label="^0.11.3+1"]; 63 | pana -> markdown [label="^2.0.2"]; 64 | pana -> meta [label="^1.1.7"]; 65 | pana -> package_config [label=">=0.1.5 <2.0.0"]; 66 | pana -> path [label="^1.6.2"]; 67 | pana -> pedantic [label="^1.4.0"]; 68 | pana -> pool [label="^1.3.6"]; 69 | pana -> pub_semver [label="^1.4.2"]; 70 | pana -> pubspec_parse [label="^0.1.4"]; 71 | pana -> quiver [label=">=0.24.0 <3.0.0"]; 72 | pana -> resource [label="^2.1.5"]; 73 | pana -> yaml [label="^2.1.15"]; 74 | 75 | path [label="path 76 | 1.8.0", shape=box, margin="0.25,0.15", style=bold]; 77 | 78 | pool [label="pool 79 | 1.5.0", shape=box, margin="0.25,0.15", style=bold]; 80 | pool -> async [label="^2.5.0"]; 81 | pool -> stack_trace [label="^1.10.0"]; 82 | 83 | pub_semver [label="pub_semver 84 | 1.4.4", shape=box, margin="0.25,0.15", style=bold]; 85 | pub_semver -> collection [label="^1.0.0"]; 86 | 87 | pubspec_parse [label="pubspec_parse 88 | 0.1.8", shape=box, margin="0.25,0.15", style=bold]; 89 | pubspec_parse -> checked_yaml [label="^1.0.0"]; 90 | pubspec_parse -> json_annotation [label=">=1.0.0 <5.0.0"]; 91 | pubspec_parse -> pub_semver [label=">=1.3.2 <3.0.0"]; 92 | pubspec_parse -> yaml [label=">=2.1.12 <4.0.0"]; 93 | 94 | repo_manager [label=repo_manager, fontsize="18", style=bold, shape=box, margin="0.25,0.15"]; 95 | repo_manager -> args [label="^1.4.3", penwidth="2"]; 96 | repo_manager -> collection [label="^1.11.0", penwidth="2"]; 97 | repo_manager -> github [label="^6.0.2", penwidth="2"]; 98 | repo_manager -> gviz [label="^0.3.0", penwidth="2"]; 99 | repo_manager -> http [label=">=0.12.0 <2.0.0", penwidth="2"]; 100 | repo_manager -> http_retry [label="^0.1.0", penwidth="2"]; 101 | repo_manager -> http_throttle [label="^1.0.4", penwidth="2"]; 102 | repo_manager -> io [label="^0.3.1", penwidth="2"]; 103 | repo_manager -> json_annotation [label="^3.0.0", penwidth="2"]; 104 | repo_manager -> lints [label="^1.0.0", penwidth="2"]; 105 | repo_manager -> meta [penwidth="2"]; 106 | repo_manager -> pana [label="^0.12.2", penwidth="2"]; 107 | repo_manager -> path [label="^1.4.1", penwidth="2"]; 108 | repo_manager -> pool [label="^1.4.0", penwidth="2"]; 109 | repo_manager -> pub_semver [label="^1.3.0", penwidth="2"]; 110 | repo_manager -> pubspec_parse [label="^0.1.3", penwidth="2"]; 111 | repo_manager -> stack_trace [label="^1.7.3", penwidth="2"]; 112 | repo_manager -> stats [label="^1.0.0", penwidth="2"]; 113 | repo_manager -> yaml [label="^2.1.12", penwidth="2"]; 114 | 115 | stack_trace [label="stack_trace 116 | 1.10.0", shape=box, margin="0.25,0.15", style=bold]; 117 | stack_trace -> path [label="^1.8.0"]; 118 | 119 | stats [label="stats 120 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 121 | stats -> json_annotation [label=">=3.0.0 <5.0.0"]; 122 | 123 | yaml [label="yaml 124 | 2.2.1", shape=box, margin="0.25,0.15", style=bold]; 125 | yaml -> charcode [label="^1.1.0"]; 126 | yaml -> collection [label=">=1.1.0 <2.0.0"]; 127 | yaml -> source_span [label=">=1.0.0 <2.0.0"]; 128 | yaml -> string_scanner [label=">=0.1.4 <2.0.0"]; 129 | } 130 | -------------------------------------------------------------------------------- /test/mock/list_package_dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "_note": "This file has been heavily modified to work with the test!", 3 | "packages": { 4 | "analyzer": "test/mock/analyzer/lib", 5 | "angular": "test/mock/angular/lib", 6 | "angular_ast": "test/mock/angular_ast/lib", 7 | "angular_compiler": "test/mock/angular_compiler/lib", 8 | "angular_components": "test/mock/angular_components/lib", 9 | "angular_forms": "test/mock/angular_forms/lib", 10 | "archive": "test/mock/archive/lib", 11 | "args": "test/mock/args/lib", 12 | "async": "test/mock/async/lib", 13 | "bazel_worker": "test/mock/bazel_worker/lib", 14 | "build": "test/mock/build/lib", 15 | "build_config": "test/mock/build_config/lib", 16 | "build_daemon": "test/mock/build_daemon/lib", 17 | "build_modules": "test/mock/build_modules/lib", 18 | "build_resolvers": "test/mock/build_resolvers/lib", 19 | "build_runner": "test/mock/build_runner/lib", 20 | "build_runner_core": "test/mock/build_runner_core/lib", 21 | "build_web_compilers": "test/mock/build_web_compilers/lib", 22 | "built_collection": "test/mock/built_collection/lib", 23 | "built_value": "test/mock/built_value/lib", 24 | "charcode": "test/mock/charcode/lib", 25 | "checked_yaml": "test/mock/checked_yaml/lib", 26 | "cli_repl": "test/mock/cli_repl/lib", 27 | "cli_util": "test/mock/cli_util/lib", 28 | "code_builder": "test/mock/code_builder/lib", 29 | "collection": "test/mock/collection/lib", 30 | "convert": "test/mock/convert/lib", 31 | "crypto": "test/mock/crypto/lib", 32 | "csslib": "test/mock/csslib/lib", 33 | "dart_internal": "test/mock/dart_internal/lib", 34 | "dart_style": "test/mock/dart_style/lib", 35 | "fixnum": "test/mock/fixnum/lib", 36 | "front_end": "test/mock/front_end/lib", 37 | "github": "test/mock/github/lib", 38 | "glob": "test/mock/glob/lib", 39 | "graphs": "test/mock/graphs/lib", 40 | "gviz": "test/mock/gviz/lib", 41 | "html": "test/mock/html/lib", 42 | "http": "test/mock/http/lib", 43 | "http_multi_server": "test/mock/http_multi_server/lib", 44 | "http_parser": "test/mock/http_parser/lib", 45 | "http_retry": "test/mock/http_retry/lib", 46 | "http_throttle": "test/mock/http_throttle/lib", 47 | "intl": "test/mock/intl/lib", 48 | "io": "test/mock/io/lib", 49 | "js": "test/mock/js/lib", 50 | "json_annotation": "test/mock/json_annotation/lib", 51 | "json_serializable": "test/mock/json_serializable/lib", 52 | "kernel": "test/mock/kernel/lib", 53 | "logging": "test/mock/logging/lib", 54 | "markdown": "test/mock/markdown/lib", 55 | "matcher": "test/mock/matcher/lib", 56 | "meta": "test/mock/meta/lib", 57 | "mime": "test/mock/mime/lib", 58 | "node_interop": "test/mock/node_interop/lib", 59 | "node_io": "test/mock/node_io/lib", 60 | "observable": "test/mock/observable/lib", 61 | "package_config": "test/mock/package_config/lib", 62 | "package_resolver": "test/mock/package_resolver/lib", 63 | "pana": "test/mock/pana/lib", 64 | "path": "test/mock/path/lib", 65 | "pedantic": "test/mock/pedantic/lib", 66 | "pool": "test/mock/pool/lib", 67 | "preload": "test/mock/preload/lib", 68 | "protobuf": "test/mock/protobuf/lib", 69 | "pub_semver": "test/mock/pub_semver/lib", 70 | "pubspec_parse": "test/mock/pubspec_parse/lib", 71 | "quiver": "test/mock/quiver/lib", 72 | "resource": "test/mock/resource/lib", 73 | "sass": "test/mock/sass/lib", 74 | "sass_builder": "test/mock/sass_builder/lib", 75 | "scratch_space": "test/mock/scratch_space/lib", 76 | "shelf": "test/mock/shelf/lib", 77 | "shelf_web_socket": "test/mock/shelf_web_socket/lib", 78 | "source_gen": "test/mock/source_gen/lib", 79 | "source_maps": "test/mock/source_maps/lib", 80 | "source_span": "test/mock/source_span/lib", 81 | "stack_trace": "test/mock/stack_trace/lib", 82 | "stats": "test/mock/stats/lib", 83 | "stream_channel": "test/mock/stream_channel/lib", 84 | "stream_transform": "test/mock/stream_transform/lib", 85 | "string_scanner": "test/mock/string_scanner/lib", 86 | "term_glyph": "test/mock/term_glyph/lib", 87 | "timing": "test/mock/timing/lib", 88 | "tuple": "test/mock/tuple/lib", 89 | "typed_data": "test/mock/typed_data/lib", 90 | "watcher": "test/mock/watcher/lib", 91 | "web_socket_channel": "test/mock/web_socket_channel/lib", 92 | "yaml": "test/mock/yaml/lib", 93 | "repo_manager": "test/mock/repo_manager/lib" 94 | }, 95 | "input_files": [ 96 | "/Users/kevmoo/github/repo_manager/pubspec.lock", 97 | "/Users/kevmoo/github/repo_manager/pubspec.yaml" 98 | ] 99 | } 100 | -------------------------------------------------------------------------------- /test/mock/outdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "package": "angular", 5 | "current": { 6 | "version": "6.0.0-alpha+1" 7 | }, 8 | "upgradable": { 9 | "version": "6.0.0-alpha+1" 10 | }, 11 | "resolvable": { 12 | "version": "6.0.0-alpha+1" 13 | }, 14 | "latest": { 15 | "version": "5.3.1" 16 | } 17 | }, 18 | { 19 | "package": "angular_components", 20 | "current": { 21 | "version": "0.14.0-alpha+1" 22 | }, 23 | "upgradable": { 24 | "version": "0.14.0-alpha+1" 25 | }, 26 | "resolvable": { 27 | "version": "0.14.0-alpha+1" 28 | }, 29 | "latest": { 30 | "version": "0.13.0+1" 31 | } 32 | }, 33 | { 34 | "package": "pana", 35 | "current": { 36 | "version": "0.12.20" 37 | }, 38 | "upgradable": { 39 | "version": "0.12.20" 40 | }, 41 | "resolvable": { 42 | "version": "0.12.20" 43 | }, 44 | "latest": { 45 | "version": "0.13.7" 46 | } 47 | }, 48 | { 49 | "package": "json_serializable", 50 | "current": { 51 | "version": "3.2.3" 52 | }, 53 | "upgradable": { 54 | "version": "3.2.3" 55 | }, 56 | "resolvable": { 57 | "version": "3.2.3" 58 | }, 59 | "latest": { 60 | "version": "3.3.0" 61 | } 62 | }, 63 | { 64 | "package": "analyzer", 65 | "current": { 66 | "version": "0.37.1+1" 67 | }, 68 | "upgradable": { 69 | "version": "0.37.1+1" 70 | }, 71 | "resolvable": { 72 | "version": "0.37.1+1" 73 | }, 74 | "latest": { 75 | "version": "0.39.7" 76 | } 77 | }, 78 | { 79 | "package": "dart_style", 80 | "current": { 81 | "version": "1.2.10" 82 | }, 83 | "upgradable": { 84 | "version": "1.2.10" 85 | }, 86 | "resolvable": { 87 | "version": "1.2.10" 88 | }, 89 | "latest": { 90 | "version": "1.3.4" 91 | } 92 | }, 93 | { 94 | "package": "front_end", 95 | "current": { 96 | "version": "0.1.21+1" 97 | }, 98 | "upgradable": { 99 | "version": "0.1.21+1" 100 | }, 101 | "resolvable": { 102 | "version": "0.1.21+1" 103 | }, 104 | "latest": { 105 | "version": "0.1.29" 106 | } 107 | }, 108 | { 109 | "package": "intl", 110 | "current": { 111 | "version": "0.15.8" 112 | }, 113 | "upgradable": { 114 | "version": "0.15.8" 115 | }, 116 | "resolvable": { 117 | "version": "0.15.8" 118 | }, 119 | "latest": { 120 | "version": "0.16.1" 121 | } 122 | }, 123 | { 124 | "package": "kernel", 125 | "current": { 126 | "version": "0.3.21+1" 127 | }, 128 | "upgradable": { 129 | "version": "0.3.21+1" 130 | }, 131 | "resolvable": { 132 | "version": "0.3.21+1" 133 | }, 134 | "latest": { 135 | "version": "0.3.29" 136 | } 137 | }, 138 | { 139 | "package": "protobuf", 140 | "current": { 141 | "version": "0.13.16+1" 142 | }, 143 | "upgradable": { 144 | "version": "0.13.16+1" 145 | }, 146 | "resolvable": { 147 | "version": "0.13.16+1" 148 | }, 149 | "latest": { 150 | "version": "1.0.1" 151 | } 152 | }, 153 | { 154 | "package": "source_gen", 155 | "current": { 156 | "version": "0.9.4+6" 157 | }, 158 | "upgradable": { 159 | "version": "0.9.4+6" 160 | }, 161 | "resolvable": { 162 | "version": "0.9.4+6" 163 | }, 164 | "latest": { 165 | "version": "0.9.5" 166 | } 167 | }, 168 | { 169 | "package": "bazel_worker", 170 | "current": { 171 | "version": "0.1.21" 172 | }, 173 | "upgradable": { 174 | "version": "0.1.21" 175 | }, 176 | "resolvable": { 177 | "version": "0.1.21" 178 | }, 179 | "latest": { 180 | "version": "0.1.23+1" 181 | } 182 | }, 183 | { 184 | "package": "build_resolvers", 185 | "current": { 186 | "version": "1.2.1" 187 | }, 188 | "upgradable": { 189 | "version": "1.2.1" 190 | }, 191 | "resolvable": { 192 | "version": "1.2.1" 193 | }, 194 | "latest": { 195 | "version": "1.3.5" 196 | } 197 | } 198 | ] 199 | } 200 | -------------------------------------------------------------------------------- /test/mock/production_deps.dot: -------------------------------------------------------------------------------- 1 | digraph pubviz { 2 | graph [nodesep="0.2"]; 3 | edge [fontcolor=gray]; 4 | 5 | analyzer [label="analyzer 6 | 0.38.5", shape=box, margin="0.25,0.15"]; 7 | analyzer -> args [label=">=0.12.1 <2.0.0"]; 8 | analyzer -> charcode [label="^1.1.0"]; 9 | analyzer -> collection [label="^1.10.1"]; 10 | analyzer -> convert [label="^2.0.0"]; 11 | analyzer -> crypto [label=">=1.1.1 <3.0.0"]; 12 | analyzer -> front_end [label="0.1.27"]; 13 | analyzer -> glob [label="^1.0.3"]; 14 | analyzer -> html [label=">=0.13.4+1 <0.15.0"]; 15 | analyzer -> kernel [label="0.3.27"]; 16 | analyzer -> meta [label="^1.0.2"]; 17 | analyzer -> package_config [label=">=0.1.5 <2.0.0"]; 18 | analyzer -> path [label=">=0.9.0 <2.0.0"]; 19 | analyzer -> pub_semver [label="^1.4.2"]; 20 | analyzer -> source_span [label="^1.2.0"]; 21 | analyzer -> watcher [label=">=0.9.6 <0.10.0"]; 22 | analyzer -> yaml [label="^2.1.2"]; 23 | 24 | args [label="args 25 | 1.6.0", shape=box, margin="0.25,0.15", style=bold]; 26 | 27 | async [label="async 28 | 2.8.2", shape=box, margin="0.25,0.15"]; 29 | async -> collection [label="^1.15.0"]; 30 | async -> meta [label="^1.1.7"]; 31 | 32 | charcode [label="charcode 33 | 1.3.1", shape=box, margin="0.25,0.15"]; 34 | 35 | checked_yaml [label="checked_yaml 36 | 1.0.4", shape=box, margin="0.25,0.15"]; 37 | checked_yaml -> json_annotation [label=">=2.2.0 <5.0.0"]; 38 | checked_yaml -> source_span [label="^1.0.0"]; 39 | checked_yaml -> yaml [label=">=2.1.13 <4.0.0"]; 40 | 41 | cli_util [label="cli_util 42 | 0.1.4", shape=box, margin="0.25,0.15"]; 43 | cli_util -> path [label=">=1.0.0 <2.0.0"]; 44 | 45 | clock [label="clock 46 | 1.1.0", shape=box, margin="0.25,0.15"]; 47 | 48 | collection [label="collection 49 | 1.15.0", shape=box, margin="0.25,0.15", style=bold]; 50 | 51 | convert [label="convert 52 | 2.1.1", shape=box, margin="0.25,0.15"]; 53 | convert -> charcode [label="^1.1.0"]; 54 | convert -> typed_data [label="^1.1.0"]; 55 | 56 | crypto [label="crypto 57 | 2.1.5", shape=box, margin="0.25,0.15"]; 58 | crypto -> collection [label="^1.0.0"]; 59 | crypto -> convert [label=">=1.0.0 <3.0.0"]; 60 | crypto -> typed_data [label="^1.0.0"]; 61 | 62 | csslib [label="csslib 63 | 0.16.2", shape=box, margin="0.25,0.15"]; 64 | csslib -> source_span [label="^1.4.0"]; 65 | 66 | file [label="file 67 | 5.2.1", shape=box, margin="0.25,0.15"]; 68 | file -> intl [label=">=0.14.0 <1.0.0"]; 69 | file -> meta [label="^1.1.2"]; 70 | file -> path [label="^1.5.1"]; 71 | 72 | front_end [label="front_end 73 | 0.1.27", shape=box, margin="0.25,0.15"]; 74 | front_end -> kernel [label="0.3.27"]; 75 | front_end -> meta [label="^1.0.2"]; 76 | front_end -> package_config [label="^1.1.0"]; 77 | 78 | github [label="github 79 | 6.2.3", shape=box, margin="0.25,0.15", style=bold]; 80 | github -> http [label="^0.12.0"]; 81 | github -> http_parser [label="^3.1.1"]; 82 | github -> json_annotation [label=">=2.0.0 <4.0.0"]; 83 | github -> meta [label="^1.1.0"]; 84 | 85 | glob [label="glob 86 | 1.2.0", shape=box, margin="0.25,0.15"]; 87 | glob -> async [label=">=1.2.0 <3.0.0"]; 88 | glob -> collection [label="^1.1.0"]; 89 | glob -> node_io [label="^1.0.0"]; 90 | glob -> path [label="^1.3.0"]; 91 | glob -> pedantic [label="^1.2.0"]; 92 | glob -> string_scanner [label=">=0.1.0 <2.0.0"]; 93 | 94 | gviz [label="gviz 95 | 0.3.0", shape=box, margin="0.25,0.15", style=bold]; 96 | 97 | html [label="html 98 | 0.14.0+4", shape=box, margin="0.25,0.15"]; 99 | html -> csslib [label=">=0.13.2 <0.17.0"]; 100 | html -> source_span [label=">=1.0.0 <2.0.0"]; 101 | 102 | http [label="http 103 | 0.12.2", shape=box, margin="0.25,0.15", style=bold]; 104 | http -> http_parser [label=">=0.0.1 <4.0.0"]; 105 | http -> path [label=">=0.9.0 <2.0.0"]; 106 | http -> pedantic [label="^1.0.0"]; 107 | 108 | http_parser [label="http_parser 109 | 3.1.4", shape=box, margin="0.25,0.15"]; 110 | http_parser -> charcode [label="^1.1.0"]; 111 | http_parser -> collection [label=">=0.9.1 <2.0.0"]; 112 | http_parser -> source_span [label="^1.0.0"]; 113 | http_parser -> string_scanner [label=">=0.0.0 <2.0.0"]; 114 | http_parser -> typed_data [label="^1.1.0"]; 115 | 116 | http_retry [label="http_retry 117 | 0.1.1+3", shape=box, margin="0.25,0.15", style=bold]; 118 | http_retry -> async [label="^2.0.7"]; 119 | http_retry -> http [label=">=0.11.0 <0.13.0"]; 120 | 121 | http_throttle [label="http_throttle 122 | 1.0.4", shape=box, margin="0.25,0.15", style=bold]; 123 | http_throttle -> http [label=">=0.9.0 <0.13.0"]; 124 | http_throttle -> pool [label=">=1.0.0 <2.0.0"]; 125 | 126 | intl [label="intl 127 | 0.17.0", shape=box, margin="0.25,0.15"]; 128 | intl -> clock [label="^1.1.0"]; 129 | intl -> path [label="^1.8.0"]; 130 | 131 | io [label="io 132 | 0.3.5", shape=box, margin="0.25,0.15", style=bold]; 133 | io -> meta [label="^1.0.2"]; 134 | io -> path [label="^1.5.1"]; 135 | io -> string_scanner [label=">=0.1.5 <2.0.0"]; 136 | 137 | js [label="js 138 | 0.6.3", shape=box, margin="0.25,0.15"]; 139 | 140 | json_annotation [label="json_annotation 141 | 3.0.1", shape=box, margin="0.25,0.15", style=bold]; 142 | 143 | kernel [label="kernel 144 | 0.3.27", shape=box, margin="0.25,0.15"]; 145 | kernel -> args [label=">=0.13.4 <2.0.0"]; 146 | kernel -> meta [label="^1.0.0"]; 147 | 148 | lints [label="lints 149 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 150 | 151 | logging [label="logging 152 | 0.11.4", shape=box, margin="0.25,0.15"]; 153 | 154 | markdown [label="markdown 155 | 2.1.8", shape=box, margin="0.25,0.15"]; 156 | markdown -> args [label="^1.0.0"]; 157 | markdown -> charcode [label="^1.1.0"]; 158 | markdown -> meta [label="^1.0.0"]; 159 | 160 | matcher [label="matcher 161 | 0.12.11", shape=box, margin="0.25,0.15"]; 162 | matcher -> stack_trace [label="^1.10.0"]; 163 | 164 | meta [label="meta 165 | 1.7.0", shape=box, margin="0.25,0.15", style=bold]; 166 | 167 | node_interop [label="node_interop 168 | 1.2.1", shape=box, margin="0.25,0.15"]; 169 | node_interop -> js [label="^0.6.1"]; 170 | 171 | node_io [label="node_io 172 | 1.2.0", shape=box, margin="0.25,0.15"]; 173 | node_io -> file [label="^5.0.0"]; 174 | node_io -> node_interop [label="^1.2.1"]; 175 | node_io -> path [label="^1.6.2"]; 176 | 177 | package_config [label="package_config 178 | 1.9.3", shape=box, margin="0.25,0.15"]; 179 | package_config -> charcode [label="^1.1.0"]; 180 | package_config -> path [label="^1.6.4"]; 181 | 182 | pana [label="pana 183 | 0.12.21", shape=box, margin="0.25,0.15", style=bold]; 184 | pana -> analyzer [label="^0.38.0"]; 185 | pana -> args [label=">=0.13.7 <2.0.0"]; 186 | pana -> async [label=">=1.13.3 <3.0.0"]; 187 | pana -> cli_util [label="^0.1.3"]; 188 | pana -> html [label=">=0.13.3 <0.15.0"]; 189 | pana -> http [label=">=0.11.3 <0.13.0"]; 190 | pana -> io [label="^0.3.3"]; 191 | pana -> json_annotation [label=">=2.0.0 <4.0.0"]; 192 | pana -> logging [label="^0.11.3+1"]; 193 | pana -> markdown [label="^2.0.2"]; 194 | pana -> meta [label="^1.1.7"]; 195 | pana -> package_config [label=">=0.1.5 <2.0.0"]; 196 | pana -> path [label="^1.6.2"]; 197 | pana -> pedantic [label="^1.4.0"]; 198 | pana -> pool [label="^1.3.6"]; 199 | pana -> pub_semver [label="^1.4.2"]; 200 | pana -> pubspec_parse [label="^0.1.4"]; 201 | pana -> quiver [label=">=0.24.0 <3.0.0"]; 202 | pana -> resource [label="^2.1.5"]; 203 | pana -> yaml [label="^2.1.15"]; 204 | 205 | path [label="path 206 | 1.8.0", shape=box, margin="0.25,0.15", style=bold]; 207 | 208 | pedantic [label="pedantic 209 | 1.11.1", shape=box, margin="0.25,0.15"]; 210 | 211 | pool [label="pool 212 | 1.5.0", shape=box, margin="0.25,0.15", style=bold]; 213 | pool -> async [label="^2.5.0"]; 214 | pool -> stack_trace [label="^1.10.0"]; 215 | 216 | pub_semver [label="pub_semver 217 | 1.4.4", shape=box, margin="0.25,0.15", style=bold]; 218 | pub_semver -> collection [label="^1.0.0"]; 219 | 220 | pubspec_parse [label="pubspec_parse 221 | 0.1.8", shape=box, margin="0.25,0.15", style=bold]; 222 | pubspec_parse -> checked_yaml [label="^1.0.0"]; 223 | pubspec_parse -> json_annotation [label=">=1.0.0 <5.0.0"]; 224 | pubspec_parse -> pub_semver [label=">=1.3.2 <3.0.0"]; 225 | pubspec_parse -> yaml [label=">=2.1.12 <4.0.0"]; 226 | 227 | quiver [label="quiver 228 | 2.1.5", shape=box, margin="0.25,0.15"]; 229 | quiver -> matcher [label=">=0.12.5 <0.13.0"]; 230 | quiver -> meta [label=">=1.0.0 <2.0.0"]; 231 | 232 | repo_manager [label=repo_manager, fontsize="18", style=bold, shape=box, margin="0.25,0.15"]; 233 | repo_manager -> args [label="^1.4.3", penwidth="2"]; 234 | repo_manager -> collection [label="^1.11.0", penwidth="2"]; 235 | repo_manager -> github [label="^6.0.2", penwidth="2"]; 236 | repo_manager -> gviz [label="^0.3.0", penwidth="2"]; 237 | repo_manager -> http [label=">=0.12.0 <2.0.0", penwidth="2"]; 238 | repo_manager -> http_retry [label="^0.1.0", penwidth="2"]; 239 | repo_manager -> http_throttle [label="^1.0.4", penwidth="2"]; 240 | repo_manager -> io [label="^0.3.1", penwidth="2"]; 241 | repo_manager -> json_annotation [label="^3.0.0", penwidth="2"]; 242 | repo_manager -> lints [label="^1.0.0", penwidth="2"]; 243 | repo_manager -> meta [penwidth="2"]; 244 | repo_manager -> pana [label="^0.12.2", penwidth="2"]; 245 | repo_manager -> path [label="^1.4.1", penwidth="2"]; 246 | repo_manager -> pool [label="^1.4.0", penwidth="2"]; 247 | repo_manager -> pub_semver [label="^1.3.0", penwidth="2"]; 248 | repo_manager -> pubspec_parse [label="^0.1.3", penwidth="2"]; 249 | repo_manager -> stack_trace [label="^1.7.3", penwidth="2"]; 250 | repo_manager -> stats [label="^1.0.0", penwidth="2"]; 251 | repo_manager -> yaml [label="^2.1.12", penwidth="2"]; 252 | 253 | resource [label="resource 254 | 2.1.7", shape=box, margin="0.25,0.15"]; 255 | resource -> typed_data [label="^1.0.0"]; 256 | 257 | source_span [label="source_span 258 | 1.8.1", shape=box, margin="0.25,0.15"]; 259 | source_span -> collection [label="^1.15.0"]; 260 | source_span -> path [label="^1.8.0"]; 261 | source_span -> term_glyph [label="^1.2.0"]; 262 | 263 | stack_trace [label="stack_trace 264 | 1.10.0", shape=box, margin="0.25,0.15", style=bold]; 265 | stack_trace -> path [label="^1.8.0"]; 266 | 267 | stats [label="stats 268 | 1.0.1", shape=box, margin="0.25,0.15", style=bold]; 269 | stats -> json_annotation [label=">=3.0.0 <5.0.0"]; 270 | 271 | string_scanner [label="string_scanner 272 | 1.1.0", shape=box, margin="0.25,0.15"]; 273 | string_scanner -> charcode [label="^1.2.0"]; 274 | string_scanner -> source_span [label="^1.8.0"]; 275 | 276 | term_glyph [label="term_glyph 277 | 1.2.0", shape=box, margin="0.25,0.15"]; 278 | 279 | typed_data [label="typed_data 280 | 1.3.0", shape=box, margin="0.25,0.15"]; 281 | typed_data -> collection [label="^1.15.0"]; 282 | 283 | watcher [label="watcher 284 | 0.9.7+15", shape=box, margin="0.25,0.15"]; 285 | watcher -> async [label="^2.0.0"]; 286 | watcher -> path [label="^1.0.0"]; 287 | watcher -> pedantic [label="^1.1.0"]; 288 | 289 | yaml [label="yaml 290 | 2.2.1", shape=box, margin="0.25,0.15", style=bold]; 291 | yaml -> charcode [label="^1.1.0"]; 292 | yaml -> collection [label=">=1.1.0 <2.0.0"]; 293 | yaml -> source_span [label=">=1.0.0 <2.0.0"]; 294 | yaml -> string_scanner [label=">=0.1.4 <2.0.0"]; 295 | } 296 | -------------------------------------------------------------------------------- /test/mock/pub_deps_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdks": { 3 | "Dart": "2.16.0-42.0.dev" 4 | }, 5 | "packages": { 6 | "repo_manager": { 7 | "name": "repo_manager", 8 | "version": "0.0.0", 9 | "sections": { 10 | "dependencies": { 11 | "args @ 1.6.0": {}, 12 | "collection @ 1.15.0": {}, 13 | "github @ 6.2.3": { 14 | "http": "^0.12.0", 15 | "http_parser": "^3.1.1", 16 | "json_annotation": ">=2.0.0 <4.0.0", 17 | "meta": "^1.1.0" 18 | }, 19 | "gviz @ 0.3.0": {}, 20 | "http @ 0.12.2": { 21 | "http_parser": ">=0.0.1 <4.0.0", 22 | "path": ">=0.9.0 <2.0.0", 23 | "pedantic": "^1.0.0" 24 | }, 25 | "http_retry @ 0.1.1+3": { 26 | "async": "^2.0.7", 27 | "http": ">=0.11.0 <0.13.0" 28 | }, 29 | "http_throttle @ 1.0.4": { 30 | "http": ">=0.9.0 <0.13.0", 31 | "pool": ">=1.0.0 <2.0.0" 32 | }, 33 | "io @ 0.3.5": { 34 | "meta": "^1.0.2", 35 | "path": "^1.5.1", 36 | "string_scanner": ">=0.1.5 <2.0.0" 37 | }, 38 | "json_annotation @ 3.0.1": {}, 39 | "lints @ 1.0.1": {}, 40 | "meta @ 1.7.0": {}, 41 | "pana @ 0.12.21": { 42 | "analyzer": "^0.38.0", 43 | "args": ">=0.13.7 <2.0.0", 44 | "async": ">=1.13.3 <3.0.0", 45 | "cli_util": "^0.1.3", 46 | "html": ">=0.13.3 <0.15.0", 47 | "http": ">=0.11.3 <0.13.0", 48 | "io": "^0.3.3", 49 | "json_annotation": ">=2.0.0 <4.0.0", 50 | "logging": "^0.11.3+1", 51 | "markdown": "^2.0.2", 52 | "meta": "^1.1.7", 53 | "package_config": ">=0.1.5 <2.0.0", 54 | "path": "^1.6.2", 55 | "pedantic": "^1.4.0", 56 | "pool": "^1.3.6", 57 | "pub_semver": "^1.4.2", 58 | "pubspec_parse": "^0.1.4", 59 | "quiver": ">=0.24.0 <3.0.0", 60 | "resource": "^2.1.5", 61 | "yaml": "^2.1.15" 62 | }, 63 | "path @ 1.8.0": {}, 64 | "pool @ 1.5.0": { 65 | "async": "^2.5.0", 66 | "stack_trace": "^1.10.0" 67 | }, 68 | "pub_semver @ 1.4.4": { 69 | "collection": "^1.0.0" 70 | }, 71 | "pubspec_parse @ 0.1.8": { 72 | "checked_yaml": "^1.0.0", 73 | "json_annotation": ">=1.0.0 <5.0.0", 74 | "pub_semver": ">=1.3.2 <3.0.0", 75 | "yaml": ">=2.1.12 <4.0.0" 76 | }, 77 | "stack_trace @ 1.10.0": { 78 | "path": "^1.8.0" 79 | }, 80 | "stats @ 1.0.1": { 81 | "json_annotation": ">=3.0.0 <5.0.0" 82 | }, 83 | "yaml @ 2.2.1": { 84 | "charcode": "^1.1.0", 85 | "collection": ">=1.1.0 <2.0.0", 86 | "string_scanner": ">=0.1.4 <2.0.0", 87 | "source_span": ">=1.0.0 <2.0.0" 88 | } 89 | }, 90 | "dev dependencies": { 91 | "build_runner @ 1.9.0": { 92 | "args": ">=1.4.0 <2.0.0", 93 | "async": ">=1.13.3 <3.0.0", 94 | "build": ">=1.0.0 <1.3.0", 95 | "build_config": ">=0.4.1 <0.4.3", 96 | "build_daemon": "^2.1.0", 97 | "build_resolvers": "^1.0.0", 98 | "build_runner_core": "^5.1.0", 99 | "code_builder": ">2.3.0 <4.0.0", 100 | "collection": "^1.14.0", 101 | "crypto": ">=0.9.2 <3.0.0", 102 | "dart_style": "^1.0.0", 103 | "glob": "^1.1.0", 104 | "graphs": "^0.2.0", 105 | "http_multi_server": "^2.1.0", 106 | "io": "^0.3.0", 107 | "js": "^0.6.1+1", 108 | "logging": "^0.11.2", 109 | "meta": "^1.1.0", 110 | "mime": "^0.9.3+3", 111 | "path": "^1.1.0", 112 | "pedantic": "^1.0.0", 113 | "pool": "^1.0.0", 114 | "pub_semver": "^1.4.0", 115 | "pubspec_parse": "^0.1.0", 116 | "shelf": ">=0.6.5 <0.8.0", 117 | "shelf_web_socket": "^0.2.2+4", 118 | "stack_trace": "^1.9.0", 119 | "stream_transform": ">=0.0.20 <2.0.0", 120 | "timing": "^0.1.1", 121 | "watcher": "^0.9.7", 122 | "web_socket_channel": "^1.0.9", 123 | "yaml": "^2.1.0" 124 | }, 125 | "build_web_compilers @ 2.10.0": { 126 | "analyzer": ">=0.30.0 <0.40.0", 127 | "archive": "^2.0.0", 128 | "bazel_worker": "^0.1.18", 129 | "build": ">=1.2.0 <2.0.0", 130 | "build_config": ">=0.3.0 <0.5.0", 131 | "build_modules": "^2.9.0", 132 | "collection": "^1.0.0", 133 | "glob": "^1.1.0", 134 | "js": "^0.6.1", 135 | "logging": "^0.11.2", 136 | "meta": "^1.1.0", 137 | "path": "^1.4.2", 138 | "pool": "^1.3.0", 139 | "scratch_space": "^0.0.2", 140 | "source_maps": "^0.10.4", 141 | "source_span": "^1.4.0", 142 | "stack_trace": "^1.9.2" 143 | }, 144 | "json_serializable @ 3.2.3": { 145 | "analyzer": ">=0.37.1 <0.39.0", 146 | "build": ">=0.12.6 <2.0.0", 147 | "build_config": ">=0.2.6 <0.5.0", 148 | "json_annotation": ">=3.0.0 <3.1.0", 149 | "meta": "^1.1.0", 150 | "path": "^1.3.2", 151 | "source_gen": "^0.9.0" 152 | }, 153 | "pedantic @ 1.11.1": {}, 154 | "preload @ 1.1.6": { 155 | "build": ">=0.12.1 <2.0.0", 156 | "build_config": ">=0.3.0 <5.0.0", 157 | "glob": "^1.0.0", 158 | "path": "^1.0.0" 159 | } 160 | } 161 | } 162 | } 163 | }, 164 | "transitiveDependencies": { 165 | "analyzer @ 0.38.5": { 166 | "args": ">=0.12.1 <2.0.0", 167 | "charcode": "^1.1.0", 168 | "collection": "^1.10.1", 169 | "convert": "^2.0.0", 170 | "crypto": ">=1.1.1 <3.0.0", 171 | "front_end": "0.1.27", 172 | "glob": "^1.0.3", 173 | "html": ">=0.13.4+1 <0.15.0", 174 | "kernel": "0.3.27", 175 | "meta": "^1.0.2", 176 | "package_config": ">=0.1.5 <2.0.0", 177 | "path": ">=0.9.0 <2.0.0", 178 | "pub_semver": "^1.4.2", 179 | "source_span": "^1.2.0", 180 | "watcher": ">=0.9.6 <0.10.0", 181 | "yaml": "^2.1.2" 182 | }, 183 | "archive @ 2.0.13": { 184 | "crypto": ">=2.0.0 <3.0.0", 185 | "args": ">=1.4.0 <2.0.0", 186 | "path": ">=1.5.1 <2.0.0" 187 | }, 188 | "async @ 2.8.2": { 189 | "collection": "^1.15.0", 190 | "meta": "^1.1.7" 191 | }, 192 | "bazel_worker @ 0.1.25": { 193 | "async": ">1.9.0 <3.0.0", 194 | "pedantic": "^1.8.0", 195 | "protobuf": ">=0.14.4 <2.0.0" 196 | }, 197 | "build @ 1.2.2": { 198 | "analyzer": ">=0.35.0 <0.40.0", 199 | "async": ">=1.13.3 <3.0.0", 200 | "convert": "^2.0.0", 201 | "crypto": ">=0.9.2 <3.0.0", 202 | "logging": "^0.11.2", 203 | "meta": "^1.1.0", 204 | "path": "^1.1.0", 205 | "glob": "^1.1.0" 206 | }, 207 | "build_config @ 0.4.2": { 208 | "checked_yaml": "^1.0.0", 209 | "json_annotation": ">=1.0.0 <4.0.0", 210 | "meta": "^1.1.0", 211 | "path": "^1.4.0", 212 | "pubspec_parse": "^0.1.5", 213 | "yaml": "^2.1.11" 214 | }, 215 | "build_daemon @ 2.1.10": { 216 | "built_collection": ">=4.1.0 <6.0.0", 217 | "built_value": ">=7.0.0 <9.0.0", 218 | "http_multi_server": ">=2.0.0 <4.0.0", 219 | "logging": ">=0.11.0 <2.0.0", 220 | "pedantic": "^1.0.0", 221 | "path": "^1.6.2", 222 | "pool": "^1.3.6", 223 | "shelf": ">=0.7.4 <2.0.0", 224 | "shelf_web_socket": ">=0.2.2+4 <2.0.0", 225 | "stream_transform": ">=0.0.20 <3.0.0", 226 | "watcher": ">=0.9.7 <2.0.0", 227 | "web_socket_channel": ">=1.0.9 <3.0.0" 228 | }, 229 | "build_modules @ 2.9.0": { 230 | "analyzer": ">0.35.0 <0.40.0", 231 | "async": "^2.0.0", 232 | "bazel_worker": "^0.1.20", 233 | "build": ">=1.2.0 <2.0.0", 234 | "build_config": ">=0.3.0 <0.5.0", 235 | "collection": "^1.0.0", 236 | "crypto": "^2.0.0", 237 | "glob": "^1.0.0", 238 | "graphs": "^0.2.0", 239 | "json_annotation": ">=1.2.0 <4.0.0", 240 | "logging": "^0.11.2", 241 | "meta": "^1.1.0", 242 | "path": "^1.4.2", 243 | "pedantic": "^1.0.0", 244 | "scratch_space": "^0.0.4" 245 | }, 246 | "build_resolvers @ 1.2.1": { 247 | "analyzer": ">=0.35.0 <0.39.0", 248 | "build": ">=1.1.0 <1.3.0", 249 | "crypto": "^2.0.0", 250 | "graphs": "^0.2.0", 251 | "logging": "^0.11.2", 252 | "package_resolver": "^1.0.0", 253 | "path": "^1.1.0", 254 | "yaml": "^2.0.0" 255 | }, 256 | "build_runner_core @ 5.1.0": { 257 | "async": ">=1.13.3 <3.0.0", 258 | "build": ">=1.2.0 <1.3.0", 259 | "build_config": ">=0.4.2 <0.4.3", 260 | "build_resolvers": "^1.0.0", 261 | "collection": "^1.14.0", 262 | "convert": "^2.0.1", 263 | "crypto": ">=0.9.2 <3.0.0", 264 | "glob": "^1.1.0", 265 | "graphs": "^0.2.0", 266 | "json_annotation": ">=1.0.0 <4.0.0", 267 | "logging": "^0.11.2", 268 | "meta": "^1.1.0", 269 | "path": "^1.1.0", 270 | "package_config": "^1.9.0", 271 | "pedantic": "^1.0.0", 272 | "pool": "^1.0.0", 273 | "timing": "^0.1.1", 274 | "watcher": "^0.9.7", 275 | "yaml": "^2.1.0" 276 | }, 277 | "built_collection @ 4.3.2": { 278 | "collection": "^1.7.0", 279 | "quiver": ">=0.21.0 <3.0.0" 280 | }, 281 | "built_value @ 7.1.0": { 282 | "built_collection": ">=2.0.0 <5.0.0", 283 | "collection": "^1.0.0", 284 | "fixnum": "^0.10.0", 285 | "quiver": ">=0.21.0 <3.0.0" 286 | }, 287 | "charcode @ 1.3.1": {}, 288 | "checked_yaml @ 1.0.4": { 289 | "json_annotation": ">=2.2.0 <5.0.0", 290 | "source_span": "^1.0.0", 291 | "yaml": ">=2.1.13 <4.0.0" 292 | }, 293 | "cli_util @ 0.1.4": { 294 | "path": ">=1.0.0 <2.0.0" 295 | }, 296 | "clock @ 1.1.0": {}, 297 | "code_builder @ 3.7.0": { 298 | "built_collection": ">=3.0.0 <6.0.0", 299 | "built_value": ">=7.0.0 <9.0.0", 300 | "collection": "^1.14.0", 301 | "matcher": "^0.12.0", 302 | "meta": "^1.0.5" 303 | }, 304 | "convert @ 2.1.1": { 305 | "charcode": "^1.1.0", 306 | "typed_data": "^1.1.0" 307 | }, 308 | "crypto @ 2.1.5": { 309 | "collection": "^1.0.0", 310 | "convert": ">=1.0.0 <3.0.0", 311 | "typed_data": "^1.0.0" 312 | }, 313 | "csslib @ 0.16.2": { 314 | "source_span": "^1.4.0" 315 | }, 316 | "dart_style @ 1.3.3": { 317 | "analyzer": ">=0.38.3 <0.40.0", 318 | "args": "^1.0.0", 319 | "path": "^1.0.0", 320 | "source_span": "^1.4.0" 321 | }, 322 | "file @ 5.2.1": { 323 | "intl": ">=0.14.0 <1.0.0", 324 | "meta": "^1.1.2", 325 | "path": "^1.5.1" 326 | }, 327 | "fixnum @ 0.10.11": {}, 328 | "front_end @ 0.1.27": { 329 | "kernel": "0.3.27", 330 | "package_config": "^1.1.0", 331 | "meta": "^1.0.2" 332 | }, 333 | "glob @ 1.2.0": { 334 | "async": ">=1.2.0 <3.0.0", 335 | "collection": "^1.1.0", 336 | "node_io": "^1.0.0", 337 | "path": "^1.3.0", 338 | "pedantic": "^1.2.0", 339 | "string_scanner": ">=0.1.0 <2.0.0" 340 | }, 341 | "graphs @ 0.2.0": {}, 342 | "html @ 0.14.0+4": { 343 | "csslib": ">=0.13.2 <0.17.0", 344 | "source_span": ">=1.0.0 <2.0.0" 345 | }, 346 | "http_multi_server @ 2.2.0": { 347 | "async": ">=1.2.0 <3.0.0" 348 | }, 349 | "http_parser @ 3.1.4": { 350 | "charcode": "^1.1.0", 351 | "collection": ">=0.9.1 <2.0.0", 352 | "source_span": "^1.0.0", 353 | "string_scanner": ">=0.0.0 <2.0.0", 354 | "typed_data": "^1.1.0" 355 | }, 356 | "intl @ 0.17.0": { 357 | "clock": "^1.1.0", 358 | "path": "^1.8.0" 359 | }, 360 | "js @ 0.6.3": {}, 361 | "kernel @ 0.3.27": { 362 | "args": ">=0.13.4 <2.0.0", 363 | "meta": "^1.0.0" 364 | }, 365 | "logging @ 0.11.4": {}, 366 | "markdown @ 2.1.8": { 367 | "args": "^1.0.0", 368 | "charcode": "^1.1.0", 369 | "meta": "^1.0.0" 370 | }, 371 | "matcher @ 0.12.11": { 372 | "stack_trace": "^1.10.0" 373 | }, 374 | "mime @ 0.9.7": {}, 375 | "node_interop @ 1.2.1": { 376 | "js": "^0.6.1" 377 | }, 378 | "node_io @ 1.2.0": { 379 | "file": "^5.0.0", 380 | "node_interop": "^1.2.1", 381 | "path": "^1.6.2" 382 | }, 383 | "package_config @ 1.9.3": { 384 | "path": "^1.6.4", 385 | "charcode": "^1.1.0" 386 | }, 387 | "package_resolver @ 1.0.10": { 388 | "collection": "^1.9.0", 389 | "http": ">0.11.0 <0.13.0", 390 | "package_config": ">=0.1.0 <2.0.0", 391 | "path": "^1.0.0" 392 | }, 393 | "protobuf @ 1.1.4": { 394 | "fixnum": "^0.10.9" 395 | }, 396 | "quiver @ 2.1.5": { 397 | "matcher": ">=0.12.5 <0.13.0", 398 | "meta": ">=1.0.0 <2.0.0" 399 | }, 400 | "resource @ 2.1.7": { 401 | "typed_data": "^1.0.0" 402 | }, 403 | "scratch_space @ 0.0.4+3": { 404 | "build": ">=0.10.0 <2.0.0", 405 | "crypto": ">=2.0.3 <4.0.0", 406 | "path": "^1.1.0", 407 | "pedantic": "^1.0.0", 408 | "pool": "^1.0.0" 409 | }, 410 | "shelf @ 0.7.9": { 411 | "async": "^2.0.7", 412 | "collection": "^1.5.0", 413 | "http_parser": "^3.1.0", 414 | "path": "^1.0.0", 415 | "stack_trace": "^1.0.0", 416 | "stream_channel": ">=1.0.0 <3.0.0" 417 | }, 418 | "shelf_web_socket @ 0.2.4+1": { 419 | "shelf": ">=0.7.0 <2.0.0", 420 | "stream_channel": ">1.4.0 <3.0.0", 421 | "web_socket_channel": ">=1.0.0 <3.0.0" 422 | }, 423 | "source_gen @ 0.9.4+6": { 424 | "analyzer": ">=0.37.1 <0.40.0", 425 | "async": "^2.0.7", 426 | "build": "^1.0.0", 427 | "dart_style": "^1.0.0", 428 | "glob": "^1.1.0", 429 | "meta": "^1.1.0", 430 | "path": "^1.3.2", 431 | "pedantic": "^1.0.0", 432 | "source_span": "^1.4.0" 433 | }, 434 | "source_maps @ 0.10.10": { 435 | "source_span": "^1.8.0" 436 | }, 437 | "source_span @ 1.8.1": { 438 | "collection": "^1.15.0", 439 | "path": "^1.8.0", 440 | "term_glyph": "^1.2.0" 441 | }, 442 | "stream_channel @ 2.1.0": { 443 | "async": "^2.5.0" 444 | }, 445 | "stream_transform @ 1.2.0": {}, 446 | "string_scanner @ 1.1.0": { 447 | "charcode": "^1.2.0", 448 | "source_span": "^1.8.0" 449 | }, 450 | "term_glyph @ 1.2.0": {}, 451 | "timing @ 0.1.1+3": { 452 | "json_annotation": ">=1.0.0 <5.0.0" 453 | }, 454 | "typed_data @ 1.3.0": { 455 | "collection": "^1.15.0" 456 | }, 457 | "watcher @ 0.9.7+15": { 458 | "async": "^2.0.0", 459 | "path": "^1.0.0", 460 | "pedantic": "^1.1.0" 461 | }, 462 | "web_socket_channel @ 1.2.0": { 463 | "async": ">=1.3.0 <3.0.0", 464 | "crypto": ">=0.9.2 <4.0.0", 465 | "stream_channel": ">=1.2.0 <3.0.0" 466 | } 467 | } 468 | } 469 | 470 | -------------------------------------------------------------------------------- /test/mock/pub_deps_list.txt: -------------------------------------------------------------------------------- 1 | Dart SDK 2.16.0-42.0.dev 2 | repo_manager 0.0.0 3 | 4 | dependencies: 5 | - args 1.6.0 6 | - collection 1.15.0 7 | - github 6.2.3 8 | - http ^0.12.0 9 | - http_parser ^3.1.1 10 | - json_annotation >=2.0.0 <4.0.0 11 | - meta ^1.1.0 12 | - gviz 0.3.0 13 | - http 0.12.2 14 | - http_parser >=0.0.1 <4.0.0 15 | - path >=0.9.0 <2.0.0 16 | - pedantic ^1.0.0 17 | - http_retry 0.1.1+3 18 | - async ^2.0.7 19 | - http >=0.11.0 <0.13.0 20 | - http_throttle 1.0.4 21 | - http >=0.9.0 <0.13.0 22 | - pool >=1.0.0 <2.0.0 23 | - io 0.3.5 24 | - meta ^1.0.2 25 | - path ^1.5.1 26 | - string_scanner >=0.1.5 <2.0.0 27 | - json_annotation 3.0.1 28 | - lints 1.0.1 29 | - meta 1.7.0 30 | - pana 0.12.21 31 | - analyzer ^0.38.0 32 | - args >=0.13.7 <2.0.0 33 | - async >=1.13.3 <3.0.0 34 | - cli_util ^0.1.3 35 | - html >=0.13.3 <0.15.0 36 | - http >=0.11.3 <0.13.0 37 | - io ^0.3.3 38 | - json_annotation >=2.0.0 <4.0.0 39 | - logging ^0.11.3+1 40 | - markdown ^2.0.2 41 | - meta ^1.1.7 42 | - package_config >=0.1.5 <2.0.0 43 | - path ^1.6.2 44 | - pedantic ^1.4.0 45 | - pool ^1.3.6 46 | - pub_semver ^1.4.2 47 | - pubspec_parse ^0.1.4 48 | - quiver >=0.24.0 <3.0.0 49 | - resource ^2.1.5 50 | - yaml ^2.1.15 51 | - path 1.8.0 52 | - pool 1.5.0 53 | - async ^2.5.0 54 | - stack_trace ^1.10.0 55 | - pub_semver 1.4.4 56 | - collection ^1.0.0 57 | - pubspec_parse 0.1.8 58 | - checked_yaml ^1.0.0 59 | - json_annotation >=1.0.0 <5.0.0 60 | - pub_semver >=1.3.2 <3.0.0 61 | - yaml >=2.1.12 <4.0.0 62 | - stack_trace 1.10.0 63 | - path ^1.8.0 64 | - stats 1.0.1 65 | - json_annotation >=3.0.0 <5.0.0 66 | - yaml 2.2.1 67 | - charcode ^1.1.0 68 | - collection >=1.1.0 <2.0.0 69 | - string_scanner >=0.1.4 <2.0.0 70 | - source_span >=1.0.0 <2.0.0 71 | 72 | dev dependencies: 73 | - build_runner 1.9.0 74 | - args >=1.4.0 <2.0.0 75 | - async >=1.13.3 <3.0.0 76 | - build >=1.0.0 <1.3.0 77 | - build_config >=0.4.1 <0.4.3 78 | - build_daemon ^2.1.0 79 | - build_resolvers ^1.0.0 80 | - build_runner_core ^5.1.0 81 | - code_builder >2.3.0 <4.0.0 82 | - collection ^1.14.0 83 | - crypto >=0.9.2 <3.0.0 84 | - dart_style ^1.0.0 85 | - glob ^1.1.0 86 | - graphs ^0.2.0 87 | - http_multi_server ^2.1.0 88 | - io ^0.3.0 89 | - js ^0.6.1+1 90 | - logging ^0.11.2 91 | - meta ^1.1.0 92 | - mime ^0.9.3+3 93 | - path ^1.1.0 94 | - pedantic ^1.0.0 95 | - pool ^1.0.0 96 | - pub_semver ^1.4.0 97 | - pubspec_parse ^0.1.0 98 | - shelf >=0.6.5 <0.8.0 99 | - shelf_web_socket ^0.2.2+4 100 | - stack_trace ^1.9.0 101 | - stream_transform >=0.0.20 <2.0.0 102 | - timing ^0.1.1 103 | - watcher ^0.9.7 104 | - web_socket_channel ^1.0.9 105 | - yaml ^2.1.0 106 | - build_web_compilers 2.10.0 107 | - analyzer >=0.30.0 <0.40.0 108 | - archive ^2.0.0 109 | - bazel_worker ^0.1.18 110 | - build >=1.2.0 <2.0.0 111 | - build_config >=0.3.0 <0.5.0 112 | - build_modules ^2.9.0 113 | - collection ^1.0.0 114 | - glob ^1.1.0 115 | - js ^0.6.1 116 | - logging ^0.11.2 117 | - meta ^1.1.0 118 | - path ^1.4.2 119 | - pool ^1.3.0 120 | - scratch_space ^0.0.2 121 | - source_maps ^0.10.4 122 | - source_span ^1.4.0 123 | - stack_trace ^1.9.2 124 | - json_serializable 3.2.3 125 | - analyzer >=0.37.1 <0.39.0 126 | - build >=0.12.6 <2.0.0 127 | - build_config >=0.2.6 <0.5.0 128 | - json_annotation >=3.0.0 <3.1.0 129 | - meta ^1.1.0 130 | - path ^1.3.2 131 | - source_gen ^0.9.0 132 | - pedantic 1.11.1 133 | - preload 1.1.6 134 | - build >=0.12.1 <2.0.0 135 | - build_config >=0.3.0 <5.0.0 136 | - glob ^1.0.0 137 | - path ^1.0.0 138 | 139 | transitive dependencies: 140 | - analyzer 0.38.5 141 | - args >=0.12.1 <2.0.0 142 | - charcode ^1.1.0 143 | - collection ^1.10.1 144 | - convert ^2.0.0 145 | - crypto >=1.1.1 <3.0.0 146 | - front_end 0.1.27 147 | - glob ^1.0.3 148 | - html >=0.13.4+1 <0.15.0 149 | - kernel 0.3.27 150 | - meta ^1.0.2 151 | - package_config >=0.1.5 <2.0.0 152 | - path >=0.9.0 <2.0.0 153 | - pub_semver ^1.4.2 154 | - source_span ^1.2.0 155 | - watcher >=0.9.6 <0.10.0 156 | - yaml ^2.1.2 157 | - archive 2.0.13 158 | - crypto >=2.0.0 <3.0.0 159 | - args >=1.4.0 <2.0.0 160 | - path >=1.5.1 <2.0.0 161 | - async 2.8.2 162 | - collection ^1.15.0 163 | - meta ^1.1.7 164 | - bazel_worker 0.1.25 165 | - async >1.9.0 <3.0.0 166 | - pedantic ^1.8.0 167 | - protobuf >=0.14.4 <2.0.0 168 | - build 1.2.2 169 | - analyzer >=0.35.0 <0.40.0 170 | - async >=1.13.3 <3.0.0 171 | - convert ^2.0.0 172 | - crypto >=0.9.2 <3.0.0 173 | - logging ^0.11.2 174 | - meta ^1.1.0 175 | - path ^1.1.0 176 | - glob ^1.1.0 177 | - build_config 0.4.2 178 | - checked_yaml ^1.0.0 179 | - json_annotation >=1.0.0 <4.0.0 180 | - meta ^1.1.0 181 | - path ^1.4.0 182 | - pubspec_parse ^0.1.5 183 | - yaml ^2.1.11 184 | - build_daemon 2.1.10 185 | - built_collection >=4.1.0 <6.0.0 186 | - built_value >=7.0.0 <9.0.0 187 | - http_multi_server >=2.0.0 <4.0.0 188 | - logging >=0.11.0 <2.0.0 189 | - pedantic ^1.0.0 190 | - path ^1.6.2 191 | - pool ^1.3.6 192 | - shelf >=0.7.4 <2.0.0 193 | - shelf_web_socket >=0.2.2+4 <2.0.0 194 | - stream_transform >=0.0.20 <3.0.0 195 | - watcher >=0.9.7 <2.0.0 196 | - web_socket_channel >=1.0.9 <3.0.0 197 | - build_modules 2.9.0 198 | - analyzer >0.35.0 <0.40.0 199 | - async ^2.0.0 200 | - bazel_worker ^0.1.20 201 | - build >=1.2.0 <2.0.0 202 | - build_config >=0.3.0 <0.5.0 203 | - collection ^1.0.0 204 | - crypto ^2.0.0 205 | - glob ^1.0.0 206 | - graphs ^0.2.0 207 | - json_annotation >=1.2.0 <4.0.0 208 | - logging ^0.11.2 209 | - meta ^1.1.0 210 | - path ^1.4.2 211 | - pedantic ^1.0.0 212 | - scratch_space ^0.0.4 213 | - build_resolvers 1.2.1 214 | - analyzer >=0.35.0 <0.39.0 215 | - build >=1.1.0 <1.3.0 216 | - crypto ^2.0.0 217 | - graphs ^0.2.0 218 | - logging ^0.11.2 219 | - package_resolver ^1.0.0 220 | - path ^1.1.0 221 | - yaml ^2.0.0 222 | - build_runner_core 5.1.0 223 | - async >=1.13.3 <3.0.0 224 | - build >=1.2.0 <1.3.0 225 | - build_config >=0.4.2 <0.4.3 226 | - build_resolvers ^1.0.0 227 | - collection ^1.14.0 228 | - convert ^2.0.1 229 | - crypto >=0.9.2 <3.0.0 230 | - glob ^1.1.0 231 | - graphs ^0.2.0 232 | - json_annotation >=1.0.0 <4.0.0 233 | - logging ^0.11.2 234 | - meta ^1.1.0 235 | - path ^1.1.0 236 | - package_config ^1.9.0 237 | - pedantic ^1.0.0 238 | - pool ^1.0.0 239 | - timing ^0.1.1 240 | - watcher ^0.9.7 241 | - yaml ^2.1.0 242 | - built_collection 4.3.2 243 | - collection ^1.7.0 244 | - quiver >=0.21.0 <3.0.0 245 | - built_value 7.1.0 246 | - built_collection >=2.0.0 <5.0.0 247 | - collection ^1.0.0 248 | - fixnum ^0.10.0 249 | - quiver >=0.21.0 <3.0.0 250 | - charcode 1.3.1 251 | - checked_yaml 1.0.4 252 | - json_annotation >=2.2.0 <5.0.0 253 | - source_span ^1.0.0 254 | - yaml >=2.1.13 <4.0.0 255 | - cli_util 0.1.4 256 | - path >=1.0.0 <2.0.0 257 | - clock 1.1.0 258 | - code_builder 3.7.0 259 | - built_collection >=3.0.0 <6.0.0 260 | - built_value >=7.0.0 <9.0.0 261 | - collection ^1.14.0 262 | - matcher ^0.12.0 263 | - meta ^1.0.5 264 | - convert 2.1.1 265 | - charcode ^1.1.0 266 | - typed_data ^1.1.0 267 | - crypto 2.1.5 268 | - collection ^1.0.0 269 | - convert >=1.0.0 <3.0.0 270 | - typed_data ^1.0.0 271 | - csslib 0.16.2 272 | - source_span ^1.4.0 273 | - dart_style 1.3.3 274 | - analyzer >=0.38.3 <0.40.0 275 | - args ^1.0.0 276 | - path ^1.0.0 277 | - source_span ^1.4.0 278 | - file 5.2.1 279 | - intl >=0.14.0 <1.0.0 280 | - meta ^1.1.2 281 | - path ^1.5.1 282 | - fixnum 0.10.11 283 | - front_end 0.1.27 284 | - kernel 0.3.27 285 | - package_config ^1.1.0 286 | - meta ^1.0.2 287 | - glob 1.2.0 288 | - async >=1.2.0 <3.0.0 289 | - collection ^1.1.0 290 | - node_io ^1.0.0 291 | - path ^1.3.0 292 | - pedantic ^1.2.0 293 | - string_scanner >=0.1.0 <2.0.0 294 | - graphs 0.2.0 295 | - html 0.14.0+4 296 | - csslib >=0.13.2 <0.17.0 297 | - source_span >=1.0.0 <2.0.0 298 | - http_multi_server 2.2.0 299 | - async >=1.2.0 <3.0.0 300 | - http_parser 3.1.4 301 | - charcode ^1.1.0 302 | - collection >=0.9.1 <2.0.0 303 | - source_span ^1.0.0 304 | - string_scanner >=0.0.0 <2.0.0 305 | - typed_data ^1.1.0 306 | - intl 0.17.0 307 | - clock ^1.1.0 308 | - path ^1.8.0 309 | - js 0.6.3 310 | - kernel 0.3.27 311 | - args >=0.13.4 <2.0.0 312 | - meta ^1.0.0 313 | - logging 0.11.4 314 | - markdown 2.1.8 315 | - args ^1.0.0 316 | - charcode ^1.1.0 317 | - meta ^1.0.0 318 | - matcher 0.12.11 319 | - stack_trace ^1.10.0 320 | - mime 0.9.7 321 | - node_interop 1.2.1 322 | - js ^0.6.1 323 | - node_io 1.2.0 324 | - file ^5.0.0 325 | - node_interop ^1.2.1 326 | - path ^1.6.2 327 | - package_config 1.9.3 328 | - path ^1.6.4 329 | - charcode ^1.1.0 330 | - package_resolver 1.0.10 331 | - collection ^1.9.0 332 | - http >0.11.0 <0.13.0 333 | - package_config >=0.1.0 <2.0.0 334 | - path ^1.0.0 335 | - protobuf 1.1.4 336 | - fixnum ^0.10.9 337 | - quiver 2.1.5 338 | - matcher >=0.12.5 <0.13.0 339 | - meta >=1.0.0 <2.0.0 340 | - resource 2.1.7 341 | - typed_data ^1.0.0 342 | - scratch_space 0.0.4+3 343 | - build >=0.10.0 <2.0.0 344 | - crypto >=2.0.3 <4.0.0 345 | - path ^1.1.0 346 | - pedantic ^1.0.0 347 | - pool ^1.0.0 348 | - shelf 0.7.9 349 | - async ^2.0.7 350 | - collection ^1.5.0 351 | - http_parser ^3.1.0 352 | - path ^1.0.0 353 | - stack_trace ^1.0.0 354 | - stream_channel >=1.0.0 <3.0.0 355 | - shelf_web_socket 0.2.4+1 356 | - shelf >=0.7.0 <2.0.0 357 | - stream_channel >1.4.0 <3.0.0 358 | - web_socket_channel >=1.0.0 <3.0.0 359 | - source_gen 0.9.4+6 360 | - analyzer >=0.37.1 <0.40.0 361 | - async ^2.0.7 362 | - build ^1.0.0 363 | - dart_style ^1.0.0 364 | - glob ^1.1.0 365 | - meta ^1.1.0 366 | - path ^1.3.2 367 | - pedantic ^1.0.0 368 | - source_span ^1.4.0 369 | - source_maps 0.10.10 370 | - source_span ^1.8.0 371 | - source_span 1.8.1 372 | - collection ^1.15.0 373 | - path ^1.8.0 374 | - term_glyph ^1.2.0 375 | - stream_channel 2.1.0 376 | - async ^2.5.0 377 | - stream_transform 1.2.0 378 | - string_scanner 1.1.0 379 | - charcode ^1.2.0 380 | - source_span ^1.8.0 381 | - term_glyph 1.2.0 382 | - timing 0.1.1+3 383 | - json_annotation >=1.0.0 <5.0.0 384 | - typed_data 1.3.0 385 | - collection ^1.15.0 386 | - watcher 0.9.7+15 387 | - async ^2.0.0 388 | - path ^1.0.0 389 | - pedantic ^1.1.0 390 | - web_socket_channel 1.2.0 391 | - async >=1.3.0 <3.0.0 392 | - crypto >=0.9.2 <4.0.0 393 | - stream_channel >=1.2.0 <3.0.0 394 | -------------------------------------------------------------------------------- /test/mock/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: repo_manager 2 | homepage: https://github.com/dart-lang/repo_manager 3 | 4 | environment: 5 | sdk: '>=2.6.0 <3.0.0' 6 | 7 | dependencies: 8 | args: ^1.4.3 9 | collection: ^1.11.0 10 | github: ^6.0.2 11 | gviz: ^0.3.0 12 | http: '>=0.12.0 <2.0.0' 13 | http_retry: ^0.1.0 14 | http_throttle: ^1.0.4 15 | io: ^0.3.1 16 | json_annotation: ^3.0.0 17 | lints: ^1.0.0 18 | meta: any 19 | pana: ^0.12.2 20 | path: ^1.4.1 21 | pool: ^1.4.0 22 | pub_semver: ^1.3.0 23 | pubspec_parse: ^0.1.3 24 | stack_trace: ^1.7.3 25 | stats: ^1.0.0 26 | yaml: ^2.1.12 27 | 28 | dev_dependencies: 29 | build_runner: ^1.0.0 30 | build_web_compilers: ^2.0.0 31 | json_serializable: ^3.0.0 32 | pedantic: ^1.2.0 33 | preload: ^1.0.0 34 | -------------------------------------------------------------------------------- /test/mock_data_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:path/path.dart' as p; 5 | import 'package:pubviz/src/deps_list.dart'; 6 | import 'package:pubviz/src/service.dart'; 7 | 8 | class MockDataService extends Service { 9 | @override 10 | final String rootPackageDir; 11 | 12 | MockDataService(this.rootPackageDir); 13 | 14 | @override 15 | Map outdated() { 16 | final file = File(p.join(rootPackageDir, 'outdated.json')); 17 | return jsonDecode(file.readAsStringSync()) as Map; 18 | } 19 | 20 | @override 21 | DepsPackageEntry rootDeps() { 22 | final depsFile = File(p.join(rootPackageDir, 'pub_deps_list.txt')); 23 | final list = DepsList.parse(depsFile.readAsStringSync()); 24 | return list.packages['repo_manager']!; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/mock_viz_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:path/path.dart' as p; 4 | import 'package:pubviz/pubviz.dart'; 5 | import 'package:pubviz/src/service.dart'; 6 | import 'package:pubviz/viz/dot.dart'; 7 | import 'package:test/test.dart'; 8 | 9 | import 'mock_data_service.dart'; 10 | 11 | final _mockPath = p.join('test', 'mock'); 12 | 13 | void main() { 14 | group('generate VizRoot', () { 15 | late Service service; 16 | 17 | setUpAll(() { 18 | service = MockDataService(_mockPath); 19 | }); 20 | 21 | test('all dependencies', () async { 22 | final vp = await VizRoot.forDirectory(service); 23 | 24 | expect(vp.root.name, 'repo_manager'); 25 | expect(vp.packages, hasLength(82)); 26 | 27 | expect( 28 | vp.packages.values.where((element) => element.isPrimary), 29 | hasLength(25), 30 | reason: 'Only primary', 31 | ); 32 | expect( 33 | vp.packages.values.where((element) => !element.isPrimary), 34 | hasLength(57), 35 | reason: 'Only non-primary', 36 | ); 37 | 38 | _verifyDotOutput(vp, 'all_deps'); 39 | }); 40 | 41 | test('direct dependencies only', () async { 42 | final vp = await VizRoot.forDirectory( 43 | service, 44 | directDependenciesOnly: true, 45 | ); 46 | 47 | expect(vp.root.name, 'repo_manager'); 48 | expect(vp.packages, hasLength(25)); 49 | 50 | expect( 51 | vp.packages.values.where((element) => element.isPrimary), 52 | hasLength(25), 53 | reason: 'Only primary', 54 | ); 55 | expect( 56 | vp.packages.values.where((element) => !element.isPrimary), 57 | isEmpty, 58 | reason: 'Only non-primary', 59 | ); 60 | 61 | _verifyDotOutput(vp, 'direct_deps'); 62 | }); 63 | 64 | test('prod dependencies only', () async { 65 | final vp = await VizRoot.forDirectory( 66 | service, 67 | productionDependenciesOnly: true, 68 | ); 69 | 70 | expect(vp.root.name, 'repo_manager'); 71 | expect(vp.packages, hasLength(51)); 72 | 73 | expect( 74 | vp.packages.values.where((element) => element.isPrimary), 75 | hasLength(20), 76 | reason: 'Only primary', 77 | ); 78 | expect( 79 | vp.packages.values.where((element) => !element.isPrimary), 80 | hasLength(31), 81 | reason: 'Only non-primary', 82 | ); 83 | 84 | _verifyDotOutput(vp, 'production_deps'); 85 | }); 86 | 87 | test('prod + direct dependencies only', () async { 88 | final vp = await VizRoot.forDirectory( 89 | service, 90 | directDependenciesOnly: true, 91 | productionDependenciesOnly: true, 92 | ); 93 | 94 | expect(vp.root.name, 'repo_manager'); 95 | expect(vp.packages, hasLength(20)); 96 | 97 | expect( 98 | vp.packages.values.where((element) => element.isPrimary), 99 | hasLength(20), 100 | reason: 'Only primary', 101 | ); 102 | expect( 103 | vp.packages.values.where((element) => !element.isPrimary), 104 | isEmpty, 105 | reason: 'Only non-primary', 106 | ); 107 | 108 | _verifyDotOutput(vp, 'direct_production_deps'); 109 | }); 110 | 111 | test('outdated', () async { 112 | final vp = await VizRoot.forDirectory( 113 | service, 114 | flagOutdated: true, 115 | ); 116 | 117 | expect(vp.root.name, 'repo_manager'); 118 | expect(vp.packages, hasLength(82)); 119 | 120 | expect( 121 | vp.packages.values.where((element) => element.isPrimary), 122 | hasLength(25), 123 | reason: 'Only primary', 124 | ); 125 | expect( 126 | vp.packages.values.where((element) => !element.isPrimary), 127 | hasLength(57), 128 | reason: 'Only non-primary', 129 | ); 130 | 131 | _verifyDotOutput(vp, 'outdated'); 132 | }); 133 | 134 | test('ignore', () async { 135 | final ignoredPackages = ['markdown', 'shelf', 'build_runner']; 136 | final vp = await VizRoot.forDirectory( 137 | service, 138 | flagOutdated: true, 139 | ignorePackages: ignoredPackages, 140 | ); 141 | 142 | expect(vp.root.name, 'repo_manager'); 143 | expect(vp.packages, hasLength(82)); 144 | 145 | expect( 146 | vp.packages.values.where((element) => element.isPrimary), 147 | hasLength(25), 148 | reason: 'Only primary', 149 | ); 150 | expect( 151 | vp.packages.values.where((element) => !element.isPrimary), 152 | hasLength(57), 153 | reason: 'Only non-primary', 154 | ); 155 | 156 | _verifyDotOutput(vp, 'ignore', ignoredPackages: ignoredPackages); 157 | }); 158 | }); 159 | } 160 | 161 | const _writeOutput = false; 162 | 163 | void _verifyDotOutput( 164 | VizRoot root, 165 | String name, { 166 | Iterable ignoredPackages = const [], 167 | }) { 168 | final dotOutput = toDot(root, ignorePackages: ignoredPackages); 169 | 170 | final filePath = p.join(_mockPath, '$name.dot'); 171 | 172 | if (_writeOutput) { 173 | File(filePath).writeAsStringSync(dotOutput); 174 | fail('Set `_writeOutput` to false!'); 175 | } 176 | 177 | printOnFailure(dotOutput); 178 | 179 | final fileContent = File(filePath).readAsStringSync(); 180 | 181 | expect(dotOutput, fileContent); 182 | } 183 | -------------------------------------------------------------------------------- /test/test_pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: test_pubspec 2 | environment: 3 | sdk: '>=2.12.0 <3.0.0' 4 | dependencies: 5 | http: '>=0.12.0 <2.0.0' 6 | dev_dependencies: 7 | test: ^1.6.3 8 | -------------------------------------------------------------------------------- /test/viz_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:path/path.dart' as p; 5 | import 'package:pubviz/pubviz.dart'; 6 | import 'package:pubviz/src/pub_data_service.dart'; 7 | import 'package:pubviz/src/util.dart'; 8 | import 'package:test/test.dart'; 9 | import 'package:test_descriptor/test_descriptor.dart' as d; 10 | 11 | void main() { 12 | setUpAll(() async { 13 | await _initTest(); 14 | }); 15 | 16 | test('validate pub completed', () async { 17 | final type = await FileSystemEntity.type(p.join(d.sandbox, 'pubspec.lock')); 18 | 19 | expect(type, FileSystemEntityType.file); 20 | }); 21 | 22 | group('generate VizRoot', () { 23 | late PubDataService service; 24 | 25 | setUpAll(() { 26 | service = PubDataService(d.sandbox); 27 | }); 28 | 29 | test('all dependencies', () async { 30 | final vp = await VizRoot.forDirectory(service); 31 | 32 | expect(vp.root.name, 'test_pubspec'); 33 | expect(vp.packages, contains('http')); 34 | expect(vp.packages, contains('test')); 35 | expect(vp.packages, contains('test_core')); 36 | }); 37 | 38 | test('direct dependencies only', () async { 39 | final vp = await VizRoot.forDirectory( 40 | service, 41 | directDependenciesOnly: true, 42 | ); 43 | 44 | expect(vp.root.name, 'test_pubspec'); 45 | expect(vp.packages, contains('http')); 46 | expect(vp.packages, contains('test')); 47 | expect(vp.packages, isNot(contains('test_core'))); 48 | }); 49 | }); 50 | } 51 | 52 | Future _initTest() async { 53 | // add pubspec 54 | final content = 55 | await File(p.join('test', 'test_pubspec.yaml')).readAsString(); 56 | 57 | await d.file('pubspec.yaml', content).create(); 58 | 59 | // NOTE: since all dependencies in the the sample pubspec are in pubviz 60 | // we can use offline to improve speed. 61 | final pr = await Process.run( 62 | dartPath, 63 | ['pub', 'get', '--offline'], 64 | workingDirectory: d.sandbox, 65 | ); 66 | 67 | if (pr.exitCode != 0) { 68 | fail([pr.stdout, pr.stderr].join('\n')); 69 | } 70 | } 71 | --------------------------------------------------------------------------------