We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61727c4 commit 31b0f16Copy full SHA for 31b0f16
lib/importmap/commands.rb
@@ -75,9 +75,7 @@ def audit
75
76
desc "outdated", "Check for outdated packages"
77
def outdated
78
- outdated_packages = npm.outdated_packages
79
-
80
- if outdated_packages.any?
+ if (outdated_packages = npm.outdated_packages).any?
81
table = [["Package", "Current", "Latest"]]
82
outdated_packages.each { |p| table << [p.name, p.current_version, p.latest_version || p.error] }
83
@@ -93,7 +91,11 @@ def outdated
93
91
94
92
desc "update", "Update outdated package pins"
95
def update
96
- pin npm.outdated_packages.map(&:name)
+ pin outdated_packages.map(&:name)
+ else
97
+ puts "No outdated packages found"
98
+ end
99
end
100
101
desc "packages", "Print out packages with version numbers"
0 commit comments