class

ShardLockEntry

Inherits YAML::Serializable / Reference / Object

Represents a single entry within the shards section of a shard.lock file. It provides details about a specific dependency.

Constants

GIT_COMMIT_VERSION = /\+git\.commit\.([0-9a-f]{7,40})\z/

X.Y.Z+git.commit.<sha> is what shards writes when the resolved commit is not itself a released tag. The trailing SHA is the only value that actually identifies the tree, so it is what a pkg:github/gitlab/bitbucket PURL should carry — those PURL types define the version as a tag or a commit, and the composite string is neither.

Constructors

new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

bitbucket

The Bitbucket repository path (e.g., "owner/repo").

Source
codeberg

The Codeberg repository path (e.g., "owner/repo").

Source
commit

The commit SHA embedded in version, when shards recorded one.

Source
fossil

The Fossil repository URL.

Source
git

The Git URL if the dependency is sourced from a Git repository.

Source
github

The GitHub repository path (e.g., "owner/repo") if sourced from GitHub.

Source
gitlab

The GitLab repository path (e.g., "owner/repo") if sourced from GitLab.

Source
hg

The Mercurial repository URL.

Source
path

The local path if the dependency is a local path dependency.

Source
version

The version of the locked dependency. Absent for path: entries (and some other lock shapes), in which case it stays nil rather than being filled in with a placeholder: no version is a fact, "unknown" is a fabrication.

Source