module ViteRuby::CompatibilityCheck
def compatible_plugin?(npm_req, ruby_req)
Internal: Returns true unless the check is performed and does not meet the
def compatible_plugin?(npm_req, ruby_req) npm_req, ruby_req = [npm_req, ruby_req] .map { |req| Gem::Requirement.new(req.sub('^', '~>')) } current_version = npm_req.requirements.first.second ruby_req.satisfied_by?(current_version) rescue StandardError true end