dependabot-script icon indicating copy to clipboard operation
dependabot-script copied to clipboard

Question: List outdated dependencies

Open darkspirit510 opened this issue 3 years ago • 2 comments

Hi all, sorry for opening an issue for a question, didn't see another place.

Is it possible to just list the outdated dependencies instead of creating PRs? Thanks in advance.

darkspirit510 avatar May 30 '21 15:05 darkspirit510

There are many ways to do this.

One quick way to do it without introducing many changes to the script is to modify the step that creates the PR. You can take a look at the script starting at line 183

For example, you could do this if you wanted to try the update(but not push it) :

 print "  - Updating #{dep.name} (from #{dep.version})… \n"
 next # To iterate to the next item and skip the PR creation

I also added a new line to the print command to keep the output clean. A sample output looks like this :

Parsing dependencies information
  - Updating react-hook-form (from 7.7.0)…
  - Updating react-json-view (from 1.19.1)…
  - Updating reactstrap (from 8.4.1)…
Done

Another way to do the same is to copy the following lines before the requirements_to_unlock step, so it does not even attempt to update the files(it is faster)

  print "  - Updating #{dep.name} (from #{dep.version})… \n"
  next

As mentioned in my original reply

yeikel avatar May 30 '21 17:05 yeikel

Maybe we should add an option to do a dry-run to make this request a feature

yeikel avatar May 30 '21 17:05 yeikel