Skip to content

Releases: ValkyrieStudios/validator

4.0.0

07 Dec 18:59
Compare
Choose a tag to compare

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

22 Oct 18:33
Compare
Choose a tag to compare

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

25 Jun 10:55
Compare
Choose a tag to compare

Added

  • Validation Rule: continent
  • Validation Rule: country
  • Validation Rule: country_alpha3

Improved

  • Dep: Upgrade @valkyriestudios/utils to 7.3.0

3.9.0

24 Jun 10:29
Compare
Choose a tag to compare

Added

  • Dep: eslint-plugin-mocha
  • Move .eslintrc.json into src
  • Add .eslintrc.json for test
  • Add lint_tests script
  • Validation Rule: time_zone

Improved

  • Dep: Upgrade eslint to 8.43.0

Removed

  • Dep: chai-spies as no longer in use

3.8.0

14 Jun 08:16
Compare
Choose a tag to compare

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

07 May 13:12
Compare
Choose a tag to compare

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

3.6.0

29 Apr 15:01
Compare
Choose a tag to compare

Improved

  • Dep: Upgrade @valkyriestudios/utils to 6.2.0
  • Dep: Upgrade @babel/core to 7.21.5
  • Dep: Upgrade @babel/preset-env to 7.21.5

3.5.0

23 Apr 09:29
Compare
Choose a tag to compare

Improved

  • Dep: Upgrade @valkyriestudios/utils to 6.1.0
  • Dep: Upgrade eslint to 8.39.0
  • Minor performance improvement due to internal direct-link rather than wrap link to utils lib functions
  • Reduce eventual bundle size for package

3.4.1

05 Apr 00:39
Compare
Choose a tag to compare

Fixed

  • vEmail: Fix issue where emails ending in dash for the local part of the email are treated as invalid

3.4.0

01 Apr 09:33
Compare
Choose a tag to compare

Improved

  • Dep: Upgrade @valkyriestudios/utils to 5.3.1
  • Dep: Upgrade @babel/core to 7.21.4
  • Dep: Upgrade @babel/preset-env to 7.21.4
  • Dep: Upgrade @babel/register to 7.21.0
  • Dep: Upgrade eslint to 8.37.0