jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.14k stars 247 forks source link

NPM backend not finding updates #2503

Closed KaBankz closed 3 weeks ago

KaBankz commented 3 weeks ago

Describe the bug Packages installed using the npm backend do not update even though they are set to version "latest"

I've only discovered this because I use eas-cli which notifies me whenever it's out of date.

To Reproduce

Expected behavior npm packages to be updated when there are updated available

mise doctor output

version: 2024.8.13 macos-arm64 (2024-08-26)
activated: yes
shims_on_path: yes

build_info: 
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Mon, 26 Aug 2024 17:55:13 +0000
  Rust Version: rustc 1.80.1 (3f5fd8dd4 2024-08-06) (Homebrew)
  Profile: release

shell: 
  /opt/homebrew/bin/fish
  fish, version 3.7.1

dirs: 
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files: 
  ~/.config/mise/config.toml

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins: 
  usage  https://github.com/jdx/mise-usage.git#fe3888a

toolset: 
  node@20.17.0        
  bun@1.1.26          
  java@openjdk-20     
  zig@0.13.0          
  usage@0.3.0         
  npm:eas-cli@10.2.2  
  cargo:krabby@0.1.8  

env_vars: 
  MISE_FISH_AUTO_ACTIVATE=1
  MISE_NOT_FOUND_AUTO_INSTALL=0
  MISE_SHELL=fish

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf = true
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = false
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "~/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  vfox = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found

Additional context mise config

[tools]
node = "lts"
bun = "latest"
java = "openjdk-20"
zig = "latest"
usage = "latest"
"npm:eas-cli" = "latest"
"cargo:krabby" = "latest"

mise ls

bun           1.1.26      ~/.config/mise/config.toml latest    
cargo:krabby  0.1.8       ~/.config/mise/config.toml latest    
java          openjdk-20  ~/.config/mise/config.toml openjdk-20
node          18.6.0                                           
node          20.16.0                                          
node          20.17.0     ~/.config/mise/config.toml lts       
npm:eas-cli   10.2.2      ~/.config/mise/config.toml latest    
usage         0.3.0       ~/.config/mise/config.toml latest    
zig           0.13.0      ~/.config/mise/config.toml latest    

When I manually install the latest version using mise install npm:eas-cli@11.0.0 the output of mise ls says it's outdated

bun           1.1.26             ~/.config/mise/config.toml latest    
cargo:krabby  0.1.8              ~/.config/mise/config.toml latest    
java          openjdk-20         ~/.config/mise/config.toml openjdk-20
node          18.6.0                                                  
node          20.16.0                                                 
node          20.17.0            ~/.config/mise/config.toml lts       
npm:eas-cli   10.2.2                                                  
npm:eas-cli   11.0.0 (outdated)  ~/.config/mise/config.toml latest    
usage         0.3.0              ~/.config/mise/config.toml latest    
zig           0.13.0             ~/.config/mise/config.toml latest    
roele commented 3 weeks ago

It might well be that caching plays its part here. From my quick try to reproduce i could resolve this by running a mise cache clear before a mise ls which then showed the outdated indicator properly. Maybe the cache freshness threshold for remote/latest versions should be ~lowered~ implemented.