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:
PickDefinedutility type has been removed. - 💥 BREAKING CHANGE:
PickUndefinedMakeOptionalutility type has been removed. - 💥 BREAKING CHANGE:
NonNullObjectutility type has been removed. - 💥 BREAKING CHANGE:
s.anyis nows.any()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthEqualis nows.array(T).lengthEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthGreaterThanis nows.array(T).lengthGreaterThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthGreaterThanOrEqualis nows.array(T).lengthGreaterThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthLessThanis nows.array(T).lengthLessThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthLessThanOrEqualis nows.array(T).lengthLessThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthNotEqualis nows.array(T).lengthNotEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRangeis nows.array(T).lengthRange()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRangeExclusiveis nows.array(T).lengthRangeExclusive()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).lengthRangeInclusiveis nows.array(T).lengthRangeInclusive()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.array(T).uniqueis nows.array(T).unique()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.arrayis nows.array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.divisibleByis nows.bigint().divisibleBy()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.equalis nows.bigint().equal()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.greaterThanis nows.bigint().greaterThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.greaterThanOrEqualis nows.bigint().greaterThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.lessThanis nows.bigint().lessThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.lessThanOrEqualis nows.bigint().lessThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint.notEqualis nows.bigint().notEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigint().absis nows.bigint().abs()to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigint().negativeis nows.bigint().negative()to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigint().positiveis nows.bigint().positive()to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.bigintis nows.bigint()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigInt64Arrayis nows.bigInt64Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.bigUint64Arrayis nows.bigUint64Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.boolean.falseis nows.boolean().false()to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.boolean.trueis nows.boolean().true()to allow for custom options as second argument. - 💥 BREAKING CHANGE:
s.booleanis 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.equalis nows.date().equal()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.greaterThanis nows.date().greaterThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.greaterThanOrEqualis nows.date().greaterThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.invalidis nows.date().invalid()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.lessThanis nows.date().lessThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.lessThanOrEqualis nows.date().lessThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.notEqualis nows.date().notEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.date.validis nows.date().valid()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.dateis 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.float32Arrayis nows.float32Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.float64Arrayis nows.float64Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int16Arrayis nows.int16Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int32Arrayis nows.int32Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.int8Arrayis nows.int8Array()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.neveris nows.never()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullis nows.null()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullableis nows.nullable()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullishis nows.nullish()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.nullishis nows.nullish()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.absis nows.number().abs()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.ceilis nows.number().ceil()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.divisibleByis nows.number().divisibleBy()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.equalis nows.number().equal()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.finiteis nows.number().finite()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.flooris nows.number().floor()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.froundis nows.number().fround()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.greaterThanis nows.number().greaterThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.greaterThanOrEqualis nows.number().greaterThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.intis nows.number().int()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.lessThanis nows.number().lessThan()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.lessThanOrEqualis nows.number().lessThanOrEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.negativeis nows.number().negative()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.notEqualis nows.number().notEqual()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.positiveis nows.number().positive()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.roundis nows.number().round()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.safeIntis nows.number().safeInt()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.signis nows.number().sign()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.number.truncis nows.number().trunc()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.numberis nows.number()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.ignoreis nows.object().ignore()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.partialis nows.object().partial()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.passthroughis nows.object().passthrough()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.requiredis nows.object().required()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.object.strictis nows.object().strict()to allow for custom options as argument. - 💥 BREAKING CHANGE:
s.optionalis 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