Coder Social home page Coder Social logo

psampaz / go-mod-outdated Goto Github PK

View Code? Open in Web Editor NEW
645.0 7.0 27.0 138 KB

Find outdated dependencies of your Go projects. go-mod-outdated provides a table view of the go list -u -m -json all command which lists all dependencies of a Go project and their available minor and patch updates. It also provides a way to filter indirect dependencies and dependencies without updates.

License: MIT License

Go 97.97% Dockerfile 1.45% Makefile 0.58%
go golang beautify beautifier prettify prettifier go-modules outdated outdated-packages outdated-dependencies

go-mod-outdated's People

Contributors

casprou avatar deseao avatar erjanmx avatar gliptak avatar happypork avatar lcd1232 avatar player1-github avatar psampaz avatar tsak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-mod-outdated's Issues

use as a package

It would be nice if you could use the functionality inside of another application

all that would be required to make this happen is to remove or rename the internal directory.

Does it support golang >= 1.17?

I confirmed through README.md that go-mod-outdated currently supports golang 1.14, 1.15, and 1.16.
But, the test(GitHub Action) seems to be running on golang 1.17, so what version can go-mod-outdated support exactly?

Also, It seems that the field of Golang's 'Module Public' structure has been added since 1.16, so is it not necessary to reflect it?

go-mod-outdated returns empty table

$ go list -mod=mod -u -m -json all | go-mod-outdated
go: downloading github.com/Azure/azure-sdk-for-go v0.2.0-beta
go: downloading github.com/oracle/oci-go-sdk v1.8.0
go list -m: loading module retractions for github.com/coreos/[email protected]: no matching versions for query "latest"
go list -m: loading module retractions for gopkg.in/[email protected]: version "v1.5.3" invalid: go.mod has non-....v1 module path "github.com/go-asn1-ber/asn1-ber" at revision v1.5.3
go list -m: loading module retractions for gopkg.in/cheggaaa/[email protected]: version "v1.0.29" invalid: go.mod has non-....v1 module path "github.com/cheggaaa/pb" at revision v1.0.29
go list -m: loading module retractions for gopkg.in/[email protected]: version "v1.4.9" invalid: go.mod has non-....v1 module path "github.com/fsnotify/fsnotify" at revision v1.4.9
+--------+---------+-------------+--------+------------------+
| MODULE | VERSION | NEW VERSION | DIRECT | VALID TIMESTAMPS |
+--------+---------+-------------+--------+------------------+
+--------+---------+-------------+--------+------------------+

I downloaded at latest commit da89f8c

Any ideas? ๐Ÿ˜‡

Allow programmatic use

Hi,

First of all, thank you for your tool!
I have following two issues when using go-mod-outdated -update -direct.

  1. Exit code is always zero, regardless of updates were found. There is no way to distinguish between updates found or not.

  2. Empty table is shown when no updates were found.

+--------+---------+-------------+--------+------------------+
| MODULE | VERSION | NEW VERSION | DIRECT | VALID TIMESTAMPS |
+--------+---------+-------------+--------+------------------+
+--------+---------+-------------+--------+------------------+

Is it possible to e.g. return -1 if nothing was found?

Possibly wrong output on "private" dependency

It seems that in my case go-mod-outdated recommends an older version:

$ go list -u -m -json all 2>/dev/null | go-mod-outdated -update -direct
+-------------------------+--------------------------------------+-------------+--------+------------------+
|          MODULE         |               VERSION                | NEW VERSION | DIRECT | VALID TIMESTAMPS |
+-------------------------+--------------------------------------+-------------+--------+------------------+
| some.private.dependency | v0.1.1-0.20190429140155-8759a946d40b | v0.1.0      | true   | false            |
+-------------------------+--------------------------------------+-------------+--------+------------------+

The repository for the dependency is private.

Am I missing something here ?

Thanks !

  • go version go1.12 linux/amd64
  • go-mod-outdated: v0.3.0

"New version" isn't always newer

Great tool!

I notice in your examples that the "New version" isn't always newer than the version/revision on the left. I understand why it is so, but I think it is a little misleading -- as you would think that by updating to that version you will include the features in the left version.

Major release support

For this output:

#16 59.78 +------------------------------------------------------------------------------+--------------------------------------+------------------------------------+--------+------------------+
#16 59.78 |                                    MODULE                                    |               VERSION                |            NEW VERSION             | DIRECT | VALID TIMESTAMPS |
#16 59.78 +------------------------------------------------------------------------------+--------------------------------------+------------------------------------+--------+------------------+
#16 59.78 | github.com/Azure/azure-sdk-for-go/sdk/azidentity                             | v1.1.0                               | v1.5.1                             | true   | true             |
#16 59.78 | github.com/Azure/azure-sdk-for-go/sdk/storage/azblob                         | v0.4.1                               | v1.3.0                             | true   | true             |
#16 59.78 | github.com/Masterminds/semver/v3                                             | v3.1.0                               | v3.2.1                             | true   | true             |
#16 59.78 | github.com/aws/aws-sdk-go-v2                                                 | v1.24.1                              | v1.25.2                            | true   | true             |
#16 59.78 | github.com/aws/aws-sdk-go-v2/config                                          | v1.26.6                              | v1.27.4                            | true   | true             |
#16 59.78 | github.com/aws/aws-sdk-go-v2/credentials                                     | v1.16.16                             | v1.17.4                            | true   | true             |
#16 59.78 | github.com/aws/aws-sdk-go-v2/feature/s3/manager                              | v1.15.15                             | v1.16.6                            | true   | true             |
#16 59.78 | github.com/aws/aws-sdk-go-v2/service/s3                                      | v1.48.1                              | v1.51.1                            | true   | true             |
#16 59.78 | github.com/containerd/fuse-overlayfs-snapshotter                             | v1.0.2                               | v1.0.8                             | true   | true             |
#16 59.78 | github.com/containerd/nydus-snapshotter                                      | v0.13.7                              | v0.13.8                            | true   | true             |
#16 59.78 | github.com/grpc-ecosystem/go-grpc-middleware                                 | v1.3.0                               | v1.4.0                             | true   | true             |
#16 59.78 | github.com/hashicorp/golang-lru                                              | v0.5.4                               | v1.0.2                             | true   | true             |
#16 59.78 | github.com/in-toto/in-toto-golang                                            | v0.5.0                               | v0.9.0                             | true   | true             |
#16 59.78 | github.com/klauspost/compress                                                | v1.17.4                              | v1.17.7                            | true   | true             |
#16 59.78 | github.com/opencontainers/image-spec                                         | v1.1.0-rc5                           | v1.1.0                             | true   | true             |
#16 59.78 | github.com/opencontainers/runtime-spec                                       | v1.1.0                               | v1.2.0                             | true   | true             |
#16 59.78 | github.com/package-url/packageurl-go                                         | v0.1.1-0.20220428063043-89078438f170 | v0.1.2                             | true   | true             |
#16 59.78 | github.com/pkg/profile                                                       | v1.5.0                               | v1.7.0                             | true   | true             |
#16 59.78 | github.com/prometheus/client_golang                                          | v1.17.0                              | v1.18.0                            | true   | true             |
#16 59.79 | github.com/serialx/hashring                                                  | v0.0.0-20190422032157-8b2912629002   | v0.0.0-20200727003509-22c0c7ab6b1b | true   | true             |
#16 59.79 | github.com/spdx/tools-golang                                                 | v0.5.1                               | v0.5.3                             | true   | true             |
#16 59.79 | go.etcd.io/bbolt                                                             | v1.3.7                               | v1.3.9                             | true   | true             |

Latest stable of github.com/hashicorp/golang-lru is actually v2.0.7: https://github.com/hashicorp/golang-lru/releases/tag/v2.0.7

I think we should have an extra column showing NEW MAJOR VERSION or smth similar.

list outdated modules with same Minor version (so see patch update only)

Hello

Currently, I am not able to list new version of module but for patch only.

For example:

module github.com/test/test

go 1.15

require go.mongodb.org/mongo-driver v1.3.6

I want to know if a new patch version if available (here v1.3.7 and not v1.4.0), but I don't know how to do.
The given example here https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies is for direct with minor and patch (I just want patch). And yet, the v1.3.7 has been released (https://pkg.go.dev/mod/go.mongodb.org/[email protected]).

$ go list -u -m all | grep "go.mongodb.org/mongo-driver"
go.mongodb.org/mongo-driver v1.3.6 [v1.4.0]

I want use this in my CI with psampaz/go-mod-outdated from @psampaz but only for patch version with something like (with option -patch & use go list -versions) :

go list -versions -u -m -json all | go-mod-outdated -update -direct -style markdown -ci -patch

related to golang/go#40990

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.