diff --git a/lib/validators/index.js b/lib/validators/index.js index b3ff6b69..dfcf133a 100644 --- a/lib/validators/index.js +++ b/lib/validators/index.js @@ -3,8 +3,9 @@ const semver = require('semver'); const npmPkg = require('validate-npm-package-name'); +const urlIsh = /^https?:\/\/[a-zA-Z0-9-_./]+(:[0-9]+)?/; const origin = (value) => { - if (new RegExp('^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?').test(value)) { + if (urlIsh.test(value)) { return value.toLowerCase(); } throw new Error('Parameter "origin" is not valid'); diff --git a/package.json b/package.json index c4425ae0..22ec4547 100644 --- a/package.json +++ b/package.json @@ -47,15 +47,15 @@ "@hapi/hapi": "20.3.0", "@semantic-release/changelog": "6.0.3", "@semantic-release/git": "10.0.1", - "eslint": "7.32.0", - "eslint-config-airbnb-base": "14.2.1", - "eslint-config-prettier": "8.10.0", + "eslint": "8.57.0", + "eslint-config-airbnb-base": "15.0.0", + "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.28.1", - "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-prettier": "5.1.3", "express": "4.18.2", "fastify": "4.22.1", "json-schema-to-typescript": "10.1.5", - "prettier": "2.8.8", + "prettier": "3.2.5", "semantic-release": "23.0.2", "stoppable": "1.1.0", "tap": "18.7.0",