Releases: sapphiredev/shapeshift
Releases · sapphiredev/shapeshift
v4.0.0
4.0.0 - (2024-05-20)
🚀 Features
- Add custom message options to all shapes, validators and constraints (#231) (44a5cea)
- 💥 BREAKING CHANGE: Most shapes and validators that were previously getters are now functions to allow for custom options. The following list should show all of the changes, but if we have forgot any and you get an error saying something should be a function where you have provided a constant it is safe to assume you simply need to add
()
to your code for it to work again. - 💥 BREAKING CHANGE:
PickDefined
utility type has been removed. - 💥 BREAKING CHANGE:
PickUndefinedMakeOptional
utility type has been removed. - 💥 BREAKING CHANGE:
NonNullObject
utility type has been removed. - 💥 BREAKING CHANGE:
s.any
is nows.any()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthEqual
is nows.array(T).lengthEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthGreaterThan
is nows.array(T).lengthGreaterThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthGreaterThanOrEqual
is nows.array(T).lengthGreaterThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthLessThan
is nows.array(T).lengthLessThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthLessThanOrEqual
is nows.array(T).lengthLessThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthNotEqual
is nows.array(T).lengthNotEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRange
is nows.array(T).lengthRange()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRangeExclusive
is nows.array(T).lengthRangeExclusive()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRangeInclusive
is nows.array(T).lengthRangeInclusive()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).unique
is nows.array(T).unique()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array
is nows.array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.divisibleBy
is nows.bigint().divisibleBy()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.equal
is nows.bigint().equal()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.greaterThan
is nows.bigint().greaterThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.greaterThanOrEqual
is nows.bigint().greaterThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.lessThan
is nows.bigint().lessThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.lessThanOrEqual
is nows.bigint().lessThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.notEqual
is nows.bigint().notEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint().abs
is nows.bigint().abs()
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigint().negative
is nows.bigint().negative()
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigint().positive
is nows.bigint().positive()
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigint
is nows.bigint()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigInt64Array
is nows.bigInt64Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigUint64Array
is nows.bigUint64Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.boolean.false
is nows.boolean().false()
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.boolean.true
is nows.boolean().true()
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.boolean
is nows.boolean()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.default(...)
now gets a second parameter to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.default(...).default(...)
now gets a second parameter to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.equal
is nows.date().equal()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.greaterThan
is nows.date().greaterThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.greaterThanOrEqual
is nows.date().greaterThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.invalid
is nows.date().invalid()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.lessThan
is nows.date().lessThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.lessThanOrEqual
is nows.date().lessThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.notEqual
is nows.date().notEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.valid
is nows.date().valid()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date
is nows.date()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.enum(1, 2, 3)
is nows.enum([1, 2, 3])
to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.float32Array
is nows.float32Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.float64Array
is nows.float64Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int16Array
is nows.int16Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int32Array
is nows.int32Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int8Array
is nows.int8Array()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.never
is nows.never()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.null
is nows.null()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullable
is nows.nullable()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullish
is nows.nullish()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullish
is nows.nullish()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.abs
is nows.number().abs()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.ceil
is nows.number().ceil()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.divisibleBy
is nows.number().divisibleBy()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.equal
is nows.number().equal()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.finite
is nows.number().finite()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.floor
is nows.number().floor()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.fround
is nows.number().fround()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.greaterThan
is nows.number().greaterThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.greaterThanOrEqual
is nows.number().greaterThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.int
is nows.number().int()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.lessThan
is nows.number().lessThan()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.lessThanOrEqual
is nows.number().lessThanOrEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.negative
is nows.number().negative()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.notEqual
is nows.number().notEqual()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.positive
is nows.number().positive()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.round
is nows.number().round()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.safeInt
is nows.number().safeInt()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.sign
is nows.number().sign()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.trunc
is nows.number().trunc()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number
is nows.number()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.ignore
is nows.object().ignore()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.partial
is nows.object().partial()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.passthrough
is nows.object().passthrough()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.required
is nows.object().required()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.strict
is nows.object().strict()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.optional
is nows.optional()
to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.required(...)
now gets a second pa...
- 💥 BREAKING CHANGE: Most shapes and validators that were previously getters are now functions to allow for custom options. The following list should show all of the changes, but if we have forgot any and you get an error saying something should be a function where you have provided a constant it is safe to assume you simply need to add