pgsandstrom / package-json-upgrade

MIT License
49 stars 10 forks source link

Show newest version that satisfies `^`, `~` constraints alongside with the current output #40

Closed KillyMXI closed 3 months ago

KillyMXI commented 2 years ago

What I see currently:

"@types/node": "^14.17.26",    Update available: 18.11.7
"@types/node": "~14.17.26",    Update available: 18.11.7

What I'd like to see:

"@types/node": "^14.17.26",    Update available: 18.11.7, 14.18.33
"@types/node": "~14.17.26",    Update available: 18.11.7, 14.17.34
// or
"@types/node": "~14.17.26",    Update available: 18.11.7, 14.18.33, 14.17.34

It seems to be present in quick actions. I'd like to be able to see beforehand that there is a reason to reach for quick actions.

As for coloring - I'm not sure at the moment whether it better to be colored according to highest or lowest of available options. It might make sense to introduce a (toned down) color for updates that are outside of constraints.

pgsandstrom commented 3 months ago

Hey. Sorry for the late reply. In the future I might add a config to enable this kind of "multi" mode, but currently I think it would require too big a refactor for me to find the time.

If you want to ignore a node-version however, you can add this to your settings.json:

"package-json-upgrade.ignoreVersions": {
  "@types/node": ">14"
},

I just improved the readme a bit to better showcase the different settings that are available.

KillyMXI commented 3 months ago

Thank you for the response. I think I will ignore this setting - it may cause more inconvenience than the current behavior, because it requires more maintenance work from me.