/upver.el

Update your dependencies interactively

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

upver.el

Easily upgrade your dependencies inside Emacs for your NPM/YARN projects (other package managers are planned). Something similar to VSCode’s Version Lens plugin.

Installation

;; Using straight:
(use-package upver :straight (:host github :repo "isamert/upver.el"))

;; Using quelpa:
(use-package upver :quelpa (upver :fetcher github :repo "isamert/upver.el"))

Usage

  • Do M-x upver. You’ll get possible updates right next/below to your dependencies.
  • Use upver-wanted or upver-latest to update current dependency, or use one of upver-all-wanted, upver-all-latest to upgrade all of the dependencies.
  • Use upver-next and upver-prev to navigate between upgradable dependencies.
  • Do upver-finish to finalize the process. This just closes the upver-mode, nothing special.

You can not edit the buffer manually while upver is active. Just use upver-wanted or upver-latest to upgrade packages and when you are done, do upver-finish to return back to normal editing.

Please note that upver does not upgrade packages. It simply updates the version info definition in the dependency file. You still need to run your installation command (i.e. yarn, npm i etc.) after.

Bindings

When you do M-x upver, you’ll see a helpful text at the echo area that summarizes which keys you can press. Basically you can use the following keys:

KeyFunctionDescription
#upver-wantedUpgrade current dependency to the wanted value.
^upver-latestUpgrade current dependency to the latest value.
nupver-nextGo to next upgradable dependency.
pupver-prevGo to previous upgradable dependency.

These keys belong to the upver-dependency-map and only activated when you are on an upgradable dependency.

Also you do M-x upver, upver-mode is activated. It’s a minor mode that provides some useful but more verbose bindings. Do M-x describe-keymap upver-mode-map to list all actions in it’s keymap or take a look at this:

KeyFunctionDescription
C-c #upver-wantedUpgrade current dependency to the wanted value.
C-c ^upver-latestUpgrade current dependency to the latest value.
C-c C-nupver-nextGo to next upgradable dependency.
C-c C-pupver-prevGo to previous upgradable dependency.
C-c C-#upver-all-wantedUpgrade all dependencies to their wanted value.
C-c C-^upver-all-latestUpgrade all dependencies to their latest value.
C-c C-cupver-finishFinish the upver session.

Customization

Check out all configuration options by doing M-x customize-group upver RET. Important options are:

upver-auto-next
Whether to jump to next upgradable dependency after acting on current one. Enabled by default but you can disable it by setting it to nil.
upver-placement
Place to display upver versions relative to the dependency. It can be either below or right. By default they are shown below.