v6.1.0
Changes
- feat(value-object): ✨ Allow disabling automatic NullObject creation
Release details
- npm: https://www.npmjs.com/package/@haskou/value-objects/v/6.1.0
- Pull request: #57
- Source branch:
feat/null-object-creation-control - Version bump:
minor
Pull request notes
Summary
Allow applications to disable automatic NullObject creation globally.
- Add
ValueObject.disableNullObjectCreation()andValueObject.enableNullObjectCreation(). - Throw
NullObjectCreationDisabledErrorfor nullish construction when automatic creation is disabled. - Preserve automatic NullObject creation by default.
- Add the error export, tests, and documentation.
One commit based directly on current master, which already includes #53 and #56. The diff contains only NullObject creation control; package-format changes are excluded.
Semver
Additive / minor. Existing behavior remains the default.
Validation
Locally validated: 562 tests, ESLint, and TypeScript checking pass.