You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this should be the solution. The difference is that, instead of matching any character .* until the end of the line $, I match any non-whitespace character \S and I don't match until the end of the line.
Before:
> importmap outdated
/Users/viktor/.rvm/gems/ruby-3.4.1/gems/uri-1.0.2/lib/uri/generic.rb:770:in 'URI::Generic#check_path': bad component(expected absolute path component): /[email protected]/dist/flowbite.turbo.min.js" # (URI::InvalidComponentError) from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/uri-1.0.2/lib/uri/generic.rb:816:in 'URI::Generic#path=' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/npm.rb:67:in 'Importmap::Npm#get_package' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/npm.rb:21:in 'block in Importmap::Npm#outdated_packages' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/npm.rb:17:in 'Array#each' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/npm.rb:17:in 'Enumerator#with_object' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/npm.rb:17:in 'Importmap::Npm#outdated_packages' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/commands.rb:96:in 'Importmap::Commands#outdated' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/thor-1.3.2/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start' from /Users/viktor/.rvm/gems/ruby-3.4.1/gems/importmap-rails-2.1.0/lib/importmap/commands.rb:159:in '<main>'
After:
> importmap outdated
No outdated packages found
Should I make a PR? Should I add a test? What would be a good location for this test? Should I add a line to https://github.com/rails/importmap-rails/blob/main/test/fixtures/files/outdated_import_map.rb and then add a test to test/npm_test.rb?
The text was updated successfully, but these errors were encountered:
I added flowbite with support for Importmaps as per their documentation: https://flowbite.com/docs/getting-started/rails/#importmap:
I wanted to add the version number at the end in a comment, just like
importmap-rails
already added for all the other packages. For example:So I added:
Unfortunately, this breaks
importmap outdated
as the regex matches the wholepin "flowbite"...
line:importmap-rails/lib/importmap/npm.rb
Lines 47 to 53 in d91d5e1
Here's the regex tester:
https://rubular.com/r/uzRSGTsdzOLRXW
I've updated the regex here:
https://rubular.com/r/xuUcWPo4r3ePMa
Not sure if this should be the solution. The difference is that, instead of matching any character
.*
until the end of the line$
, I match any non-whitespace character\S
and I don't match until the end of the line.Before:
After:
Should I make a PR? Should I add a test? What would be a good location for this test? Should I add a line to
https://github.com/rails/importmap-rails/blob/main/test/fixtures/files/outdated_import_map.rb
and then add a test totest/npm_test.rb
?The text was updated successfully, but these errors were encountered: