From 9b379c04cbee224ee4f71008770cc228824582a7 Mon Sep 17 00:00:00 2001 From: Micah Geisel Date: Wed, 3 Jan 2024 06:12:07 -0600 Subject: [PATCH] spike basic update command. (#214) Co-authored-by: Micah Geisel --- lib/importmap/commands.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/importmap/commands.rb b/lib/importmap/commands.rb index f3a836b..fd2d9c1 100644 --- a/lib/importmap/commands.rb +++ b/lib/importmap/commands.rb @@ -91,6 +91,11 @@ def outdated end end + desc "update", "Update outdated package pins" + def update + pin npm.outdated_packages.map(&:name) + end + desc "packages", "Print out packages with version numbers" def packages puts npm.packages_with_versions.map { |x| x.join(' ') }