class Bundler::Resolver::Package

def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil)

def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil)
  @name = name
  @platforms = platforms
  @locked_version = locked_specs[name].first&.version
  @unlock = unlock
  @dependency = dependency || Dependency.new(name, @locked_version)
  @top_level = !dependency.nil?
  @prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
  @prefer_local = prefer_local
end