-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easily identify direct composer dependencies #37
Comments
Thanks! I like this idea very much. I’m not sure when I’ll have time to implement, however. PR welcome!
I hadn’t seen that feature of private packagist. That is very nice.
… On Sep 6, 2022, at 3:12 PM, Peter Jaap Blaakmeer ***@***.***> wrote:
This could be done by making them bold, or by sorting the list on direct & indirect.
For example, here's how Private Packagist updates our issues with a changelog;
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
I also really like the column |
Hmm I did a little bit of investigating and the code looks in the composer.lock file and uses that to compare. However, the composer.lock file does not hold any information on whether the package mentioned is a direct or indirect dependency. A way to extract that information is to run The way how composer does this internally is by fetching the require list from the So the approach here would be to also load the |
Quick & dirty small diff that adds an asterix to direct dependencies;
|
Thanks for the diff! I'd like to implement this a little differently though. The information is read from exactly the same file path, vcs or not, with the extension changed from
And this table output,
I'm not sure I like it, but I'm not coming up with any other good ideas for display right now. |
@davidrjonas I like it! Maybe hide the direct/indirect header when there are none?
|
@davidrjonas hmm I now noticed that table is incorrect, the |
Builds upon davidrjonas#41 Resolves: davidrjonas#37 Example: $ composer-lock-diff --no-links +------------------------------------+-------------+-----------------------+ | Production Changes | From | To | +------------------------------------+-------------+-----------------------+ | andersundsehr/aus-driver-amazon-s3 | 1.12.1 | 1.13.1 | | felixnagel/generic-gallery | 4.3.0 | 5.2.0 | | fluidtypo3/flux | 9.7.2 | 9.7.4 | +------------------------------------+-------------+-----------------------+ +-------------------+---------+---------+ | Dev Changes | From | To | +-------------------+---------+---------+ | mogic/mogic-phpcs | d81fefd | 0eb8337 | +-------------------+---------+---------+ +------------------------------------+---------+---------+ | Indirect Production Changes | From | To | +------------------------------------+---------+---------+ | aws/aws-crt-php | v1.0.2 | v1.2.7 | | aws/aws-sdk-php | 3.255.7 | 3.331.0 | | beberlei/assert | v3.3.2 | v3.3.3 | | clue/stream-filter | v1.6.0 | v1.7.0 | +------------------------------------+---------+---------+ +----------------------+---------+---------+ | Indirect Dev Changes | From | To | +----------------------+---------+---------+ | phpstan/phpstan | 1.12.10 | 1.12.11 | +----------------------+---------+---------+
This could be done by making them bold, or by sorting the list on direct & indirect.
For example, here's how Private Packagist updates our issues with a changelog;
The text was updated successfully, but these errors were encountered: