Releases: ValkyrieStudios/validator
Releases · ValkyrieStudios/validator
4.0.0
Added
- Dev Dep: c8@8.0.1
- Dev Dep: @babel/eslint-parser (used for assert type during import in test files)
- Dev Dep: @babel/plugin-syntax-import-assertions (used for assert type during import in test files)
- Dev Dep: @valkyriestudios/data-countries
- Dev Dep: @valkyriestudios/data-continents
- Dev Dep: @valkyriestudios/data-timezones
- Rule 'in': Now supports passing a comma-delimited string of string values (eg:
in:jpeg,jpg,png
) on top of the previous parameter support - internal benchmark with 4.0.0 results here
Improved
- Dep: Upgrade @valkyriestudios/utils to 9.0.0
- Dep Dep: Upgrade @babel/cli to 7.23.4
- Dev Dep: Upgrade @babel/core to 7.23.5
- Dev Dep: Upgrade @babel/preset-env to 7.23.5
- Dev Dep: Upgrade eslint to 8.55.0
- Switch from using chai/mocha to node native test runner
- Switch internals to .mjs format
- Reduce total bundle size when importing all of validator by not importing full country/continent data packs from @valkyriestudios/utils (still verifying correctness against the packs through tests)
- Published package will now also include original mjs src files which can be imported through @valkyriestudios/validator/src/*
- Performance boost across the board thanks to @valkyriestudios/utils:8.x
- Performance boost across the board due to swapping out internal behaviors supporting pre-2016 browsers for more widely supported primordials (eg Number.isFinite/Number.isInteger/Array.isArray)
- Rule: vPhone ~5% performance improvement on valid phone checks thanks to regex capture group improvements as well as swapping out of startsWith/endsWith vs charAt for single char checks
- Rule: vEmail ~10% performance improvement on valid email checks thanks to regex capture group improvements as well as swapping substring checks for charAt for single char checks
- Rule: vEmail now allows up to 6 characters in TLD (adding support for eg: .coffee as a domain) (@SpekkoRice)
- Rule: vTimeZone 7217% performance improvement due to ditching usage of Intl spec for verifying whether or not a zone exists in favor of embedded timezone/alias names (still being verified through tests with @valkyriestudios/data-timezones)
Breaking
- Rule 'url': Will no longer see a string that is a url after trimming as valid
- Rule 'url_noquery': Will no longer see a string that is a url after trimming as valid
- Validator@extendMulti: Will now throw instead of silently do nothing when passed anything but an object
- Any string-based rules no longer support incoming values created via
new String(...)
- Any number-based rules no longer support incoming values created via
new Number(...)
- Any boolean-based rules no longer support incoming values created via
new Boolean(...)
Fixed
- Rule: vEmail edge-case redos issue in regex behavior (found by CodeQL)
Removed
- Dev Dep: chai (in favor of native node test runner)
- Dev Dep: chai-as-promised (in favor of native node test runner)
- Dev Dep: eslint-plugin-mocha (in favor of native node test runner)
- Dev Dep: mocha
- Dev Dep: nyc
- Dev Dep: babel-plugin-check-es2015-constants (as not needed)
- Dev Dep: babel-plugin-transform-member-expression-literals (as not needed)
- Dev Dep: babel-plugin-transform-property-literals (as not needed)
3.11.0
Improved
- Dep: Upgrade @valkyriestudios/utils to 7.5.0
- Dep: Upgrade @babel/cli to 7.23.0
- Dep: Upgrade @babel/core to 7.23.2
- Dep: Upgrade @babel/preset-env to 7.23.2
- Dep: Upgrade @babel/register to 7.22.15
- Dep: Upgrade chai to 4.3.10
- Dep: Upgrade eslint to 8.52.0
- Dep: Upgrade eslint-plugin-mocha to 10.2.0
3.10.0
3.9.0
3.8.0
Improved
- Dep: Upgrade @valkyriestudios/utils to 7.2.0
- Dep: Upgrade @babel/cli to 7.22.5
- Dep: Upgrade @babel/core to 7.22.5
- Dep: Upgrade @babel/preset-env to 7.22.5
- Dep: Upgrade @babel/register to 7.22.5
- Dep: Upgrade eslint to 8.42.0
Fixed
- vEmail: Fixed an issue where ampersand characters in the username part of an email where seen as invalid (eg: 'me&you@mydomain.com')
3.7.0
Added
- Dep: @babel/cli
- Dep: babel-plugin-check-es2015-constants
- Dep: babel-plugin-transform-member-expression-literals
- Dep: babel-plugin-transform-minify-booleans
- Dep: babel-plugin-transform-property-literals
- Dep: babel-plugin-transform-remove-console
- .babelrc
- Switch to using babel-cli for transpiling build
Improved
- Dep: Upgrade @valkyriestudios/utils to 7.0.0
- Dep: Upgrade @babel/core to 7.21.8
- Dep: Upgrade eslint to 8.40.0
Removed
- Dep: gulp
- Dep: gulp-babel
- gulpfile