Sha256: 655f33dd1513d8a67d8f724d900ce9820746aadbd2034be6f69b72785712b10a

Contents?: true

Size: 330 Bytes

Versions: 37

Compression:

Stored size: 330 Bytes

Contents

require "semantic/semantic"

module Extension
  module Models
    NpmPackage = Struct.new(:name, :version, keyword_init: true) do
      include Comparable

      def <=>(other)
        return nil unless name == other.name
        Semantic::Version.new(version) <=> Semantic::Version.new(other.version)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
shopify-cli-2.13.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.12.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.11.2 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.11.1 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.11.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.10.2 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.10.1 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.10.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.9.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.8.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.7.4 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.7.3 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.7.2 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.7.1 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.7.0 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.6.6 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.6.5 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.6.4 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.6.3 lib/project_types/extension/models/npm_package.rb
shopify-cli-2.6.2 lib/project_types/extension/models/npm_package.rb