Skip to content

fix(deps): ⬆️ update dependency @haskou/value-objects to ^8.4.3 - #62

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/non-major-runtime-dependencies
Oct 13, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/non-major-runtime-dependencies

Conversation

@renovate

@renovate renovate Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@haskou/value-objects (source) ^8.3.4 → ^8.4.3 age confidence

Release Notes

haskou/value-objects (@​haskou/value-objects)

v8.4.3

Compare Source

Changes

  • fix(exports): 🐛 Export ComparableItem and SerializedValue

Release details

Pull request notes

What

ComparableItem (constraint of UniqueObjectArray<T>) and SerializedValue (constraint of PrimitiveOf<T>) appear in the public signatures but were not exported, so consumers could not name them.

  • ComparableItem moves to src/interfaces/ComparableItem.ts.
  • SerializedValue moves to src/types/SerializedValue.ts.
  • Both are re-exported through the existing interfaces and types barrels, so they are available from the package root.
  • UniqueObjectArray.ts and PrimitiveOf.ts now import them instead of declaring them.

Notes

  • Neither type was exported in any earlier release I checked (8.3.4, 8.4.2). This adds exports, it does not restore removed ones.
  • Pure type-level change, no runtime behaviour change.

Verification

yarn test (717 tests) and yarn build pass. Coverage stays at 100%. dist/index.d.cts declares both with export, and a throwaway consumer importing them from dist compiled under --strict.

v8.4.2

Compare Source

Changes

  • fix(positive-integer): 🐛 Extend PositiveNumber instead of Integer

Release details

Pull request notes

What

PositiveInteger now extends PositiveNumber instead of Integer. PositiveNumber validates the sign and PositiveInteger adds the integer check (InvalidIntegerError).

Behaviour changes

  • new PositiveInteger(1) instanceof Integer is now false. Code typing a parameter as Integer and passing a PositiveInteger will stop compiling. FileSize is the only consumer in this repo and is unaffected.
  • The sign is validated first, so new PositiveInteger(-0.5) throws InvalidPositiveNumberError (it used to throw InvalidIntegerError).
  • The % 1 === 0 check now exists in both Integer and PositiveInteger.

Docs and tests

docs/reference/positive-integer.md updated (signature and notes). Spec now asserts inheritance from PositiveNumber, no inheritance from Integer, and the new error for -0.5.

Verification

yarn test (717 tests) and yarn build pass. Coverage stays at 100%.

v8.4.1

Compare Source

Changes

  • fix(file-size): 🐛 Type FileSize add and subtract as FileSize

Release details

Pull request notes

What

FileSize.add and FileSize.subtract were typed as NumberValueObject (inherited), although at runtime they return a FileSize. They are now declared as add(other: FileSize): FileSize and subtract(other: FileSize): FileSize.

Notes

  • Adding or subtracting two FileSize is a closed operation, so the return type is exact. NumberValueObject is unchanged: its arithmetic can fail on subclass invariants, so this would be a wrong promise there.
  • Implemented with clone(), so subclasses of FileSize keep their own type at runtime.
  • Breaking at type level: size.add(100) with a plain number no longer compiles. Pass new FileSize(100).
  • Docs for FileSize updated with the new signatures and the negative-result error.

Verification

yarn test, yarn build pass. Coverage stays at 100%. The arithmetic test calls FileSize.to() on the results, so it only compiles if both return FileSize.

v8.4.0

Compare Source

Changes

  • feat(file-size): ✨ Add FileSize, FileSizeUnit and PositiveInteger value objects

Release details

Pull request notes

What

  • PositiveInteger (extends Integer, accepts 0).
  • FileSizeUnit (extends Enum): SI (kB..PB, base 1000) and IEC (KiB..PiB, base 1024) units, with a single typed bytes-per-unit table and FileSizeUnit.SI / FileSizeUnit.IEC sets.
  • FileSize (extends PositiveInteger, stored in bytes): fromBytes, from(value, unit), parse, toBytes, to(unit), toHumanReadable(units), plus inherited arithmetic.

Behaviour worth reviewing

  • toHumanReadable returns { value, unit }: no formatting or rounding in the domain.
  • from and parse round to the nearest byte. multiply/divide do not round and throw InvalidIntegerError on non-integer results. subtract below zero throws InvalidPositiveNumberError.
  • Static factories use the this: new (...) => T pattern from #​94, so subclasses get their own type (covered in SubclassFactories.spec.ts).
  • parse units are exact and case-sensitive (KB is invalid).

Docs

Reference pages for the three classes, plus sidebar, reference index, docs home and README entries. The README table was re-aligned by prettier.

Verification

yarn test, yarn build and yarn docs:build pass. Coverage is 100% (statements, branches, functions, lines).


Configuration

📅 Schedule: (in timezone Europe/Madrid)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@renovate
renovate Bot force-pushed the renovate/non-major-runtime-dependencies branch from 947d58c to bb6571b Compare October 13, 2026 19:32
@renovate
renovate Bot merged commit 95e7eb7 into main Oct 13, 2026
3 checks passed
@renovate
renovate Bot deleted the renovate/non-major-runtime-dependencies branch October 13, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants