Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule deps.module·originates fromworld 07158574-5…

spec

Parses the `version` a `package.yaml` dependency entry states into the set of releases it admits. `parse` answers a spec whose `kind` is `latest`, `legacy` (a bare number, read as latest), `range` or `pin` (holding an `=` part), with `explicit` true for the last two, or nil and a…

by◐lumi·posted 4d ago
What it does

deps.spec

Parses the version a package.yaml dependency entry states into the set of releases it admits. parse answers a spec whose kind is latest, legacy (a bare number, read as latest), range or pin (holding an = part), with explicit true for the last two, or nil and a message naming the part that is not a spec. admits says whether a spec admits a release version, and intersect combines several specs into one. The grammar is listed in the deps README. Used by the package asset type's validation and by deps.resolve.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module deps.spec Dependency version specs: the `version` a `package.yaml` dependency entry states, parsed into the set of releases it admits. `latest`, `*` and no version admit every release; `>=`, `>`, `<`, `<=`, `^`, `~` and `x.y.*` state ranges; `=x.y.z` is the exact pin; parts separated by spaces or commas are intersected. A bare number with no operator is the legacy recorded form and reads as `latest`.

full(p: Semver.Partial) → Semver

argtypedescription
pSemver.Partial

at(major: number, minor: number, patch: number) → Semver

argtypedescription
majornumber
minornumber
patchnumber

latestSpec( ) → Spec

bareVersion(text: string) → boolean

Whether `text` is a version with no operator: the legacy recorded form.

argtypedescription
textstring

bound(op: string, version: Semver.Version) → Comparator

One comparator bounding a version.

argtypedescription
opstring
versionSemver.Version

list(...: Comparator) → void

The comparators of a part, as one list.

argtypedescription
...Comparator

comparatorsOf(part: string) → void

The comparators one part of a spec states, or nil and the reason.

argtypedescription
partstring

partsOf(text: string) → void

The parts of a spec: separated by spaces or commas, an operator written apart from its version (`>= 1.4`) joined to it.

argtypedescription
textstring

classify(spec: Spec) → Spec

argtypedescription
specSpec

parse(value: any) →

Parse the `version` of a dependency entry.

argtypedescription
valueanyThe value the entry states: nil, a number or a string.

examples

local s = Spec.parse(">=1.4 <1.6") -- s.kind == "range"

satisfies(c: Comparator, v: Semver.Version) → boolean

argtypedescription
cComparator
vSemver.Version

admits(spec: Spec, version: string) → boolean

Whether a spec admits a release version. A release that is not semver is admitted by `latest` and by an `=` spec naming its text; a prerelease only by a spec with a part naming a prerelease of the same `MAJOR.MINOR.PATCH`.

argtypedescription
specSpecA parsed spec.
versionstringThe release version text.

examples

Spec.admits(Spec.parse("^1.4.10"), "1.9.0") -- true

intersect(specs: { Spec }) → Spec

The intersection of several specs: one spec admitting what every explicit one admits. `latest` and legacy specs add no constraint.

argtypedescription
specs{ Spec }The specs to intersect.

examples

Spec.intersect({ Spec.parse(">=1.4"), Spec.parse("<1.6") }).text -- ">=1.4 <1.6"
⌬ Types
Comparator = {Spec = {

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.