BoringAvatarsVersion enum
An upstream boring-avatars release whose output this package reproduces.
One value is added per release of this package, and a value's output is frozen once shipped — selecting one always yields the same avatar regardless of which version of this package you are on.
Upstream releases share a value when a caller gets the same thing out of them — not when their source happens to match. Several of upstream's releases changed only how the component was written, and one changed the source not at all across three releases; those collapse. Each value lists every release it reproduces in upstreamVersions.
One upstream release is deliberately absent: 1.11.0 writes its own props
onto the <svg> element (colors="…" name="…"), which no other release
does. Reproducing it would mean reproducing that. Upstream fixed it in
1.11.1, which is covered.
These track upstream's git tags, not its npm versions — the two
disagree. npm 1.2.1, for instance, republished 0.1.4-era code.
Values
- v1_6_1 → const BoringAvatarsVersion
-
Upstream 1.6.1, 1.6.2 and 1.6.3.
The release where upstream replaced its
getNumbercharacter-code sum with the 32-bithashCode, so it is the earliest version whose avatars match anything still in wide use. Earlier releases draw differently and are out of scope.Note that 1.6.x has no
titleprop — it always renders a<title>element, and there is no way to switch it off. Passingtitle: falsewith this value is an ArgumentError rather than a silent no-op. The prop arrives in v1_7_0.const BoringAvatarsVersion(['1.6.1', '1.6.2', '1.6.3']) - v1_7_0 → const BoringAvatarsVersion
-
Upstream 1.7.0, 1.8.0, 1.9.0 and 1.10.0.
The release where
<title>became optional: upstream added atitleprop, defaulting to off, and this value defaults to off with it. That is the only difference from v1_6_1 — measured against the reference tree, the 1.6.3 → 1.7.0 diff touches 7 files and 14 lines, of which 6 are the title and 6 are whitespace inside a JSX expression that reaches no output. Withtitle: truethe two versions render byte-identical documents.Why four releases share one value. 1.8.0 renamed the mask id from a literal to React's
useId(), and 1.8.0–1.10.0 are one unchanged source tree. AuseId()value is not a property of the avatar — it depends on where the component sits in the render tree, so the same avatar comes out:R0:alone and:R3:as a third child. It is an internal reference that names nothing a reader sees, and this package emits the literal upstream used before and after it. Everything a caller can observe about the drawing is identical across the four.Two of them, 1.8.0 and 1.9.0, were never runnable: their npm tarballs contain no JavaScript at all (
mainpoints at abuild/index.jsthat is not in the package — verified by downloading both). They are covered here because their source is 1.10.0's, byte for byte.const BoringAvatarsVersion(['1.7.0', '1.8.0', '1.9.0', '1.10.0']) - v1_10_1 → const BoringAvatarsVersion
-
Upstream 1.10.1, 1.10.2, 1.11.1, 1.11.2, and 2.0.0 through 2.0.4.
The release where
pixel's colour index moved —numFromName % ibecamenumFromName % (i + 1)— which redraws everypixelavatar and is the only drawing change in the whole supported range. The other five variants render exactly what v1_7_0 renders.Why nine releases share one value. Everything else in the range is plumbing that leaves no mark on the document a caller gets: an internal filter-id rename (1.10.2), prop destructuring (1.11.1, 1.11.2), the TypeScript rewrite (2.0.0), and type-only edits (2.0.2 onward). Measured by rendering every release side by side, not read off the diffs.
1.11.0 is deliberately not here. It spreads its own props onto the
<svg>element (colors="…" name="Clara Barton"), which no other release does; upstream fixed it in 1.11.1. Supporting it would mean reproducing those junk attributes, so a caller pinned to 1.11.0 is told it is unsupported rather than quietly given a neighbour's output.2.0.3 and 2.0.4 have no git tag (upstream's tags stop at v2.0.2). They are covered from the npm packages themselves, whose recorded
gitHeadcommits resolve in upstream's history to the samesrc/libtree asmaster— measured, and recorded in this package's fixture.const BoringAvatarsVersion(['1.10.1', '1.10.2', '1.11.1', '1.11.2', '2.0.0', '2.0.1', '2.0.2', '2.0.3', '2.0.4'])
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
upstreamVersions
→ List<
String> -
Every upstream release this value reproduces exactly.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- latest → const BoringAvatarsVersion
- The newest supported release.
-
values
→ const List<
BoringAvatarsVersion> - A constant List of the values in this enum, in order of their declaration.