diff --git a/README.md b/README.md index 6e265dde01..8ea15a8f14 100644 --- a/README.md +++ b/README.md @@ -824,8 +824,8 @@ isBoolean(value); | **String validation decorators** | | | `@Contains(seed: string)` | Checks if the string contains the seed. | | `@NotContains(seed: string)` | Checks if the string not contains the seed. | -| `@IsAlpha()` | Checks if the string contains only letters (a-zA-Z). | -| `@IsAlphanumeric()` | Checks if the string contains only letters and numbers. | +| `@IsAlpha(locale?: string, options?: IsAlphaOptions)` | Checks if the string contains only letters (a-zA-Z). | +| `@IsAlphanumeric(locale?: string, options?: IsAlphanumericOptions)` | Checks if the string contains only letters and numbers. | | `@IsDecimal(options?: IsDecimalOptions)` | Checks if the string is a valid decimal value. Default IsDecimalOptions are `force_decimal=False`, `decimal_digits: '1,'`, `locale: 'en-US'` | | `@IsAscii()` | Checks if the string contains ASCII chars only. | | `@IsBase32()` | Checks if a string is base32 encoded. | diff --git a/package-lock.json b/package-lock.json index f6c105f5e7..5da78c3065 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,31 +9,31 @@ "version": "0.13.2", "license": "MIT", "dependencies": { - "libphonenumber-js": "^1.9.43", + "libphonenumber-js": "^1.9.49", "validator": "^13.7.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.0.6", - "@types/jest": "^27.0.3", - "@types/node": "^16.11.9", - "@types/validator": "^13.7.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "@types/jest": "^27.4.0", + "@types/node": "^17.0.17", + "@types/validator": "^13.7.1", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jest": "^25.2.4", + "eslint-plugin-jest": "^26.1.0", "husky": "^4.3.8", "jest": "^26.6.3", - "lint-staged": "^12.0.3", - "prettier": "^2.2.1", + "lint-staged": "^12.3.4", + "prettier": "^2.5.1", "reflect-metadata": "0.1.13", "rimraf": "3.0.2", - "rollup": "^2.60.0", + "rollup": "^2.67.2", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^26.5.6", - "ts-node": "^10.4.0", - "typescript": "^4.2.4" + "ts-node": "^10.5.0", + "typescript": "^4.5.5" } }, "node_modules/@babel/code-frame": { @@ -1071,9 +1071,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", - "integrity": "sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1245,9 +1245,9 @@ } }, "node_modules/@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", + "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", "dev": true, "dependencies": { "jest-diff": "^27.0.0", @@ -1261,9 +1261,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", - "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==", + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz", + "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -1300,9 +1300,9 @@ "dev": true }, "node_modules/@types/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-+jBxVvXVuggZOrm04NR8z+5+bgoW4VZyLzUO+hmPPW1mVFL/HaitLAkizfv4yg9TbG8lkfHWVMQ11yDqrVVCzA==", + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.1.tgz", + "integrity": "sha512-I6OUIZ5cYRk5lp14xSOAiXjWrfVoMZVjDuevBYgQDYzZIjsf2CAISpEcXOkFAtpAHbmWIDLcZObejqny/9xq5Q==", "dev": true }, "node_modules/@types/yargs": { @@ -2262,15 +2262,6 @@ "node": ">=8" } }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2462,9 +2453,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2838,18 +2829,18 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "25.2.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.4.tgz", - "integrity": "sha512-HRyinpgmEdkVr7pNPaYPHCoGqEzpgk79X8pg/xCeoAdurbyQjntJQ4pTzHl7BiVEBlam/F1Qsn+Dk0HtJO7Aaw==", + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.0.tgz", + "integrity": "sha512-vjF6RvcKm4xZSJgCmXb9fXmhzTva+I9jtj9Qv5JeZQTRocU7WT1g3Kx0cZ+00SekPe2DtSWDawHtSj4RaxFhXQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "^5.0.0" + "@typescript-eslint/utils": "^5.10.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0", + "@typescript-eslint/eslint-plugin": "^5.0.0", "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { @@ -2861,38 +2852,14 @@ } } }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.1.tgz", + "integrity": "sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/visitor-keys": "5.10.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2903,9 +2870,9 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.1.tgz", + "integrity": "sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2916,13 +2883,13 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.1.tgz", + "integrity": "sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/visitor-keys": "5.10.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2942,13 +2909,37 @@ } } }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.1.tgz", + "integrity": "sha512-RRmlITiUbLuTRtn/gcPRi4202niF+q7ylFLCKu4c+O/PcpRvZ/nAUwQ2G00bZgpWkhrNLNnvhZLbDn8Ml0qsQw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.1", + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/typescript-estree": "5.10.1", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.1.tgz", + "integrity": "sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.10.1", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2960,9 +2951,9 @@ } }, "node_modules/eslint-plugin-jest/node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5203,9 +5194,18 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.9.43", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.43.tgz", - "integrity": "sha512-tNB87ZutAiAkl3DE/Bo0Mxqn/XZbNxhPg4v9bYBwQQW4dlhBGqXl1vtmPxeDWbrijzwOA9vRjOOFm5V9SK/W3w==" + "version": "1.9.49", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.49.tgz", + "integrity": "sha512-/wEOIONcVboFky+lWlCaF7glm1FhBz11M5PHeCApA+xDdVfmhKjHktHS8KjyGxouV5CSXIr4f3GvLSpJa4qMSg==" + }, + "node_modules/lilconfig": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz", + "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==", + "dev": true, + "engines": { + "node": ">=10" + } }, "node_modules/lines-and-columns": { "version": "1.1.6", @@ -5214,24 +5214,24 @@ "dev": true }, "node_modules/lint-staged": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.0.3.tgz", - "integrity": "sha512-/NwNQjrhqz+AjV+e0URbtphvpHNcNdR/W6p9GxO+qIg7cxCxy0uKYO0xORQhZamp1BPjIhRUWsjbLnwEIiPHgQ==", + "version": "12.3.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.4.tgz", + "integrity": "sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", "colorette": "^2.0.16", "commander": "^8.3.0", - "cosmiconfig": "^7.0.1", - "debug": "^4.3.2", - "enquirer": "^2.3.6", + "debug": "^4.3.3", "execa": "^5.1.1", - "listr2": "^3.13.3", + "lilconfig": "2.0.4", + "listr2": "^4.0.1", "micromatch": "^4.0.4", "normalize-path": "^3.0.0", - "object-inspect": "^1.11.0", + "object-inspect": "^1.12.0", "string-argv": "^0.3.1", - "supports-color": "^9.0.2" + "supports-color": "^9.2.1", + "yaml": "^1.10.2" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -5288,9 +5288,9 @@ } }, "node_modules/lint-staged/node_modules/supports-color": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.1.0.tgz", - "integrity": "sha512-lOCGOTmBSN54zKAoPWhHkjoqVQ0MqgzPE5iirtoSixhr0ZieR/6l7WZ32V53cvy9+1qghFnIk7k52p991lKd6g==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.1.tgz", + "integrity": "sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ==", "dev": true, "engines": { "node": ">=12" @@ -5300,22 +5300,22 @@ } }, "node_modules/listr2": { - "version": "3.13.4", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.13.4.tgz", - "integrity": "sha512-lZ1Rut1DSIRwbxQbI8qaUBfOWJ1jEYRgltIM97j6kKOCI2pHVWMyxZvkU/JKmRBWcIYgDS2PK+yDgVqm7u3crw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.1.tgz", + "integrity": "sha512-D65Nl+zyYHL2jQBGmxtH/pU8koPZo5C8iCNE8EoB04RwPgQG1wuaKwVbeZv9LJpiH4Nxs0FCp+nNcG8OqpniiA==", "dev": true, "dependencies": { "cli-truncate": "^2.1.0", - "clone": "^2.1.2", "colorette": "^2.0.16", "log-update": "^4.0.0", "p-map": "^4.0.0", - "rxjs": "^7.4.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.2", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=12" }, "peerDependencies": { "enquirer": ">= 2.3.0 < 3" @@ -5885,9 +5885,9 @@ } }, "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6257,9 +6257,9 @@ } }, "node_modules/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -6613,6 +6613,12 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6629,9 +6635,9 @@ } }, "node_modules/rollup": { - "version": "2.60.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.0.tgz", - "integrity": "sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ==", + "version": "2.67.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz", + "integrity": "sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6745,12 +6751,12 @@ } }, "node_modules/rxjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.4.0.tgz", - "integrity": "sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.2.tgz", + "integrity": "sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==", "dev": true, "dependencies": { - "tslib": "~2.1.0" + "tslib": "^2.1.0" } }, "node_modules/safe-buffer": { @@ -8050,9 +8056,9 @@ } }, "node_modules/ts-node": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", - "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", + "integrity": "sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "0.7.0", @@ -8066,6 +8072,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", "yn": "3.1.1" }, "bin": { @@ -8112,9 +8119,9 @@ } }, "node_modules/tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true }, "node_modules/tsutils": { @@ -8181,9 +8188,9 @@ } }, "node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -8315,6 +8322,12 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", + "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", @@ -9488,9 +9501,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", - "integrity": "sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9649,9 +9662,9 @@ } }, "@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", + "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", "dev": true, "requires": { "jest-diff": "^27.0.0", @@ -9665,9 +9678,9 @@ "dev": true }, "@types/node": { - "version": "16.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", - "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==", + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz", + "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==", "dev": true }, "@types/normalize-package-data": { @@ -9704,9 +9717,9 @@ "dev": true }, "@types/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-+jBxVvXVuggZOrm04NR8z+5+bgoW4VZyLzUO+hmPPW1mVFL/HaitLAkizfv4yg9TbG8lkfHWVMQ11yDqrVVCzA==", + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.1.tgz", + "integrity": "sha512-I6OUIZ5cYRk5lp14xSOAiXjWrfVoMZVjDuevBYgQDYzZIjsf2CAISpEcXOkFAtpAHbmWIDLcZObejqny/9xq5Q==", "dev": true }, "@types/yargs": { @@ -10406,12 +10419,6 @@ } } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -10574,9 +10581,9 @@ } }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -10879,52 +10886,38 @@ "requires": {} }, "eslint-plugin-jest": { - "version": "25.2.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.4.tgz", - "integrity": "sha512-HRyinpgmEdkVr7pNPaYPHCoGqEzpgk79X8pg/xCeoAdurbyQjntJQ4pTzHl7BiVEBlam/F1Qsn+Dk0HtJO7Aaw==", + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.0.tgz", + "integrity": "sha512-vjF6RvcKm4xZSJgCmXb9fXmhzTva+I9jtj9Qv5JeZQTRocU7WT1g3Kx0cZ+00SekPe2DtSWDawHtSj4RaxFhXQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "^5.0.0" + "@typescript-eslint/utils": "^5.10.0" }, "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, "@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.1.tgz", + "integrity": "sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/visitor-keys": "5.10.1" } }, "@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.1.tgz", + "integrity": "sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.1.tgz", + "integrity": "sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/visitor-keys": "5.10.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -10932,20 +10925,34 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.1.tgz", + "integrity": "sha512-RRmlITiUbLuTRtn/gcPRi4202niF+q7ylFLCKu4c+O/PcpRvZ/nAUwQ2G00bZgpWkhrNLNnvhZLbDn8Ml0qsQw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.1", + "@typescript-eslint/types": "5.10.1", + "@typescript-eslint/typescript-estree": "5.10.1", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, "@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.1.tgz", + "integrity": "sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.10.1", "eslint-visitor-keys": "^3.0.0" } }, "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true } } @@ -12663,9 +12670,15 @@ } }, "libphonenumber-js": { - "version": "1.9.43", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.43.tgz", - "integrity": "sha512-tNB87ZutAiAkl3DE/Bo0Mxqn/XZbNxhPg4v9bYBwQQW4dlhBGqXl1vtmPxeDWbrijzwOA9vRjOOFm5V9SK/W3w==" + "version": "1.9.49", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.49.tgz", + "integrity": "sha512-/wEOIONcVboFky+lWlCaF7glm1FhBz11M5PHeCApA+xDdVfmhKjHktHS8KjyGxouV5CSXIr4f3GvLSpJa4qMSg==" + }, + "lilconfig": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz", + "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==", + "dev": true }, "lines-and-columns": { "version": "1.1.6", @@ -12674,24 +12687,24 @@ "dev": true }, "lint-staged": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.0.3.tgz", - "integrity": "sha512-/NwNQjrhqz+AjV+e0URbtphvpHNcNdR/W6p9GxO+qIg7cxCxy0uKYO0xORQhZamp1BPjIhRUWsjbLnwEIiPHgQ==", + "version": "12.3.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.4.tgz", + "integrity": "sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==", "dev": true, "requires": { "cli-truncate": "^3.1.0", "colorette": "^2.0.16", "commander": "^8.3.0", - "cosmiconfig": "^7.0.1", - "debug": "^4.3.2", - "enquirer": "^2.3.6", + "debug": "^4.3.3", "execa": "^5.1.1", - "listr2": "^3.13.3", + "lilconfig": "2.0.4", + "listr2": "^4.0.1", "micromatch": "^4.0.4", "normalize-path": "^3.0.0", - "object-inspect": "^1.11.0", + "object-inspect": "^1.12.0", "string-argv": "^0.3.1", - "supports-color": "^9.0.2" + "supports-color": "^9.2.1", + "yaml": "^1.10.2" }, "dependencies": { "execa": { @@ -12724,25 +12737,25 @@ "dev": true }, "supports-color": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.1.0.tgz", - "integrity": "sha512-lOCGOTmBSN54zKAoPWhHkjoqVQ0MqgzPE5iirtoSixhr0ZieR/6l7WZ32V53cvy9+1qghFnIk7k52p991lKd6g==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.1.tgz", + "integrity": "sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ==", "dev": true } } }, "listr2": { - "version": "3.13.4", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.13.4.tgz", - "integrity": "sha512-lZ1Rut1DSIRwbxQbI8qaUBfOWJ1jEYRgltIM97j6kKOCI2pHVWMyxZvkU/JKmRBWcIYgDS2PK+yDgVqm7u3crw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.1.tgz", + "integrity": "sha512-D65Nl+zyYHL2jQBGmxtH/pU8koPZo5C8iCNE8EoB04RwPgQG1wuaKwVbeZv9LJpiH4Nxs0FCp+nNcG8OqpniiA==", "dev": true, "requires": { "cli-truncate": "^2.1.0", - "clone": "^2.1.2", "colorette": "^2.0.16", "log-update": "^4.0.0", "p-map": "^4.0.0", - "rxjs": "^7.4.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.2", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, @@ -13198,9 +13211,9 @@ } }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, "object-visit": { @@ -13458,9 +13471,9 @@ "dev": true }, "prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true }, "pretty-format": { @@ -13722,6 +13735,12 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -13732,9 +13751,9 @@ } }, "rollup": { - "version": "2.60.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.0.tgz", - "integrity": "sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ==", + "version": "2.67.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz", + "integrity": "sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -13801,12 +13820,12 @@ } }, "rxjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.4.0.tgz", - "integrity": "sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.2.tgz", + "integrity": "sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==", "dev": true, "requires": { - "tslib": "~2.1.0" + "tslib": "^2.1.0" } }, "safe-buffer": { @@ -14842,9 +14861,9 @@ } }, "ts-node": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", - "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", + "integrity": "sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==", "dev": true, "requires": { "@cspotcode/source-map-support": "0.7.0", @@ -14858,6 +14877,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", "yn": "3.1.1" }, "dependencies": { @@ -14876,9 +14896,9 @@ } }, "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true }, "tsutils": { @@ -14929,9 +14949,9 @@ } }, "typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "union-value": { @@ -15034,6 +15054,12 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", + "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", + "dev": true + }, "v8-to-istanbul": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", diff --git a/package.json b/package.json index a3fbbb8cf2..d668225aa6 100644 --- a/package.json +++ b/package.json @@ -36,30 +36,30 @@ "test:ci": "jest --runInBand --no-cache --coverage --verbose" }, "dependencies": { - "libphonenumber-js": "^1.9.43", + "libphonenumber-js": "^1.9.49", "validator": "^13.7.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.0.6", - "@types/jest": "^27.0.3", - "@types/node": "^16.11.9", - "@types/validator": "^13.7.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "@types/jest": "^27.4.0", + "@types/node": "^17.0.17", + "@types/validator": "^13.7.1", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jest": "^25.2.4", + "eslint-plugin-jest": "^26.1.0", "husky": "^4.3.8", "jest": "^26.6.3", - "lint-staged": "^12.0.3", - "prettier": "^2.2.1", + "lint-staged": "^12.3.4", + "prettier": "^2.5.1", "reflect-metadata": "0.1.13", "rimraf": "3.0.2", - "rollup": "^2.60.0", + "rollup": "^2.67.2", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^26.5.6", - "ts-node": "^10.4.0", - "typescript": "^4.2.4" + "ts-node": "^10.5.0", + "typescript": "^4.5.5" } } diff --git a/src/decorator/string/IsAlpha.ts b/src/decorator/string/IsAlpha.ts index 2e75f33f0e..b803a1a38c 100644 --- a/src/decorator/string/IsAlpha.ts +++ b/src/decorator/string/IsAlpha.ts @@ -9,21 +9,29 @@ export const IS_ALPHA = 'isAlpha'; * Checks if the string contains only letters (a-zA-Z). * If given value is not a string, then it returns false. */ -export function isAlpha(value: unknown, locale?: ValidatorJS.AlphaLocale): boolean { - return typeof value === 'string' && isAlphaValidator(value, locale); +export function isAlpha( + value: unknown, + locale?: ValidatorJS.AlphaLocale, + options?: ValidatorJS.IsAlphaOptions +): boolean { + return typeof value === 'string' && isAlphaValidator(value, locale, options); } /** * Checks if the string contains only letters (a-zA-Z). * If given value is not a string, then it returns false. */ -export function IsAlpha(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator { +export function IsAlpha( + locale?: string, + validationOptions?: ValidationOptions, + options?: ValidatorJS.IsAlphaOptions +): PropertyDecorator { return ValidateBy( { name: IS_ALPHA, - constraints: [locale], + constraints: [locale, options], validator: { - validate: (value, args): boolean => isAlpha(value, args.constraints[0]), + validate: (value, args): boolean => isAlpha(value, args.constraints[0], args.constraints[1]), defaultMessage: buildMessage( eachPrefix => eachPrefix + '$property must contain only letters (a-zA-Z)', validationOptions diff --git a/src/decorator/string/IsAlphanumeric.ts b/src/decorator/string/IsAlphanumeric.ts index 2447b0310e..694dac5416 100644 --- a/src/decorator/string/IsAlphanumeric.ts +++ b/src/decorator/string/IsAlphanumeric.ts @@ -9,21 +9,29 @@ export const IS_ALPHANUMERIC = 'isAlphanumeric'; * Checks if the string contains only letters and numbers. * If given value is not a string, then it returns false. */ -export function isAlphanumeric(value: unknown, locale?: ValidatorJS.AlphanumericLocale): boolean { - return typeof value === 'string' && isAlphanumericValidator(value, locale); +export function isAlphanumeric( + value: unknown, + locale?: ValidatorJS.AlphanumericLocale, + options?: ValidatorJS.IsAlphanumericOptions +): boolean { + return typeof value === 'string' && isAlphanumericValidator(value, locale, options); } /** * Checks if the string contains only letters and numbers. * If given value is not a string, then it returns false. */ -export function IsAlphanumeric(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator { +export function IsAlphanumeric( + locale?: string, + validationOptions?: ValidationOptions, + options?: ValidatorJS.IsAlphanumericOptions +): PropertyDecorator { return ValidateBy( { name: IS_ALPHANUMERIC, - constraints: [locale], + constraints: [locale, options], validator: { - validate: (value, args): boolean => isAlphanumeric(value, args.constraints[0]), + validate: (value, args): boolean => isAlphanumeric(value, args.constraints[0], args.constraints[1]), defaultMessage: buildMessage( eachPrefix => eachPrefix + '$property must contain only letters and numbers', validationOptions diff --git a/test/functional/validation-functions-and-decorators.spec.ts b/test/functional/validation-functions-and-decorators.spec.ts index 33fe17f470..ae77ebeca9 100644 --- a/test/functional/validation-functions-and-decorators.spec.ts +++ b/test/functional/validation-functions-and-decorators.spec.ts @@ -1342,11 +1342,13 @@ describe('NotContains', () => { describe('IsAlpha', () => { const constraint = 'en-GB'; - const validValues = ['hellomynameisalex']; + const constraint2 = null; + const constraint3 = { ignore: ' ' }; + const validValues = ['hellomynameisalex', 'hello my name is alex']; const invalidValues = [null, undefined, 'hello1mynameisalex']; class MyClass { - @IsAlpha() + @IsAlpha(constraint, constraint2, constraint3) someProperty: string; } @@ -1359,11 +1361,11 @@ describe('IsAlpha', () => { }); it('should not fail if method in validator said that its valid', () => { - validValues.forEach(value => expect(isAlpha(value, constraint)).toBeTruthy()); + validValues.forEach(value => expect(isAlpha(value, constraint, constraint3)).toBeTruthy()); }); it('should fail if method in validator said that its invalid', () => { - invalidValues.forEach(value => expect(isAlpha(value, constraint)).toBeFalsy()); + invalidValues.forEach(value => expect(isAlpha(value, constraint, constraint3)).toBeFalsy()); }); it('should return error object with proper data', () => { @@ -1374,12 +1376,14 @@ describe('IsAlpha', () => { }); describe('IsAlphanumeric', () => { - const constraint = ''; - const validValues = ['hellomyname1salex']; + const constraint = 'en-GB'; + const constraint2 = null; + const constraint3 = { ignore: ' ' }; + const validValues = ['hellomyname1salex', 'hello my name 1s alex']; const invalidValues = [null, undefined, 'hell*mynameisalex']; class MyClass { - @IsAlphanumeric() + @IsAlphanumeric(constraint, constraint2, constraint3) someProperty: string; } @@ -1392,11 +1396,11 @@ describe('IsAlphanumeric', () => { }); it('should not fail if method in validator said that its valid', () => { - validValues.forEach(value => expect(isAlphanumeric(value)).toBeTruthy()); + validValues.forEach(value => expect(isAlphanumeric(value, constraint, constraint3)).toBeTruthy()); }); it('should fail if method in validator said that its invalid', () => { - invalidValues.forEach(value => expect(isAlphanumeric(value)).toBeFalsy()); + invalidValues.forEach(value => expect(isAlphanumeric(value, constraint, constraint3)).toBeFalsy()); }); it('should return error object with proper data', () => {