From 2508a83e6d2936d15c210b9dee41098131ed6aff Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 29 May 2024 07:12:49 -0700 Subject: [PATCH] deps: is-cidr@5.1.0 --- node_modules/cidr-regex/dist/index.js | 15 ++++++++++++ node_modules/cidr-regex/index.js | 15 ------------ node_modules/cidr-regex/package.json | 31 +++++++++++++++---------- node_modules/is-cidr/dist/index.js | 11 +++++++++ node_modules/is-cidr/index.js | 9 -------- node_modules/is-cidr/package.json | 33 ++++++++++++++++----------- package-lock.json | 19 ++++++++------- package.json | 2 +- 8 files changed, 77 insertions(+), 58 deletions(-) create mode 100644 node_modules/cidr-regex/dist/index.js delete mode 100644 node_modules/cidr-regex/index.js create mode 100644 node_modules/is-cidr/dist/index.js delete mode 100644 node_modules/is-cidr/index.js diff --git a/node_modules/cidr-regex/dist/index.js b/node_modules/cidr-regex/dist/index.js new file mode 100644 index 0000000000000..2817f65eeb3cb --- /dev/null +++ b/node_modules/cidr-regex/dist/index.js @@ -0,0 +1,15 @@ +import ipRegex from "ip-regex"; +const defaultOpts = { exact: false }; +const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; +const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; +const v4exact = new RegExp(`^${v4str}$`); +const v6exact = new RegExp(`^${v6str}$`); +const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); +const cidrRegex = ({ exact } = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); +const v4 = cidrRegex.v4 = ({ exact } = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); +const v6 = cidrRegex.v6 = ({ exact } = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); +export { + cidrRegex as default, + v4, + v6 +}; diff --git a/node_modules/cidr-regex/index.js b/node_modules/cidr-regex/index.js deleted file mode 100644 index 61597c62532aa..0000000000000 --- a/node_modules/cidr-regex/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import ipRegex from "ip-regex"; - -const defaultOpts = {exact: false}; -const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; -const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; - -// pre-compile only the exact regexes as global flag makes regex objects stateful -const v4exact = new RegExp(`^${v4str}$`); -const v6exact = new RegExp(`^${v6str}$`); -const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); - -const cidrRegex = ({exact} = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); -export const v4 = cidrRegex.v4 = ({exact} = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); -export const v6 = cidrRegex.v6 = ({exact} = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); -export default cidrRegex; diff --git a/node_modules/cidr-regex/package.json b/node_modules/cidr-regex/package.json index 262da56e2ee67..88b8297b02473 100644 --- a/node_modules/cidr-regex/package.json +++ b/node_modules/cidr-regex/package.json @@ -1,6 +1,6 @@ { "name": "cidr-regex", - "version": "4.0.5", + "version": "4.1.1", "description": "Regular expression for matching IP addresses in CIDR notation", "author": "silverwind ", "contributors": [ @@ -9,25 +9,32 @@ "repository": "silverwind/cidr-regex", "license": "BSD-2-Clause", "type": "module", - "exports": "./index.js", "sideEffects": false, + "main": "./dist/index.js", + "exports": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "engines": { "node": ">=14" }, - "files": [ - "index.js", - "index.d.ts" - ], "dependencies": { "ip-regex": "^5.0.0" }, "devDependencies": { + "@types/node": "20.12.12", "eslint": "8.57.0", - "eslint-config-silverwind": "83.0.1", - "tsd": "0.31.0", - "updates": "16.0.0", - "versions": "12.0.1", - "vitest": "1.4.0", - "vitest-config-silverwind": "7.0.3" + "eslint-config-silverwind": "85.1.4", + "eslint-config-silverwind-typescript": "3.2.7", + "typescript": "5.4.5", + "typescript-config-silverwind": "4.3.2", + "updates": "16.1.1", + "versions": "12.0.2", + "vite": "5.2.11", + "vite-config-silverwind": "1.1.2", + "vite-plugin-dts": "3.9.1", + "vitest": "1.6.0", + "vitest-config-silverwind": "9.0.6" } } diff --git a/node_modules/is-cidr/dist/index.js b/node_modules/is-cidr/dist/index.js new file mode 100644 index 0000000000000..35fba31c48c66 --- /dev/null +++ b/node_modules/is-cidr/dist/index.js @@ -0,0 +1,11 @@ +import { v4 as v4$1, v6 as v6$1 } from "cidr-regex"; +const re4 = v4$1({ exact: true }); +const re6 = v6$1({ exact: true }); +const isCidr = (str) => re4.test(str) ? 4 : re6.test(str) ? 6 : 0; +const v4 = isCidr.v4 = (str) => re4.test(str); +const v6 = isCidr.v6 = (str) => re6.test(str); +export { + isCidr as default, + v4, + v6 +}; diff --git a/node_modules/is-cidr/index.js b/node_modules/is-cidr/index.js deleted file mode 100644 index ed7f152c1163e..0000000000000 --- a/node_modules/is-cidr/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import {v4 as v4Re, v6 as v6Re} from "cidr-regex"; - -const re4 = v4Re({exact: true}); -const re6 = v6Re({exact: true}); - -const isCidr = str => re4.test(str) ? 4 : (re6.test(str) ? 6 : 0); -export const v4 = isCidr.v4 = str => re4.test(str); -export const v6 = isCidr.v6 = str => re6.test(str); -export default isCidr; diff --git a/node_modules/is-cidr/package.json b/node_modules/is-cidr/package.json index baf6fa55fe452..4b0e95b9c78c7 100644 --- a/node_modules/is-cidr/package.json +++ b/node_modules/is-cidr/package.json @@ -1,6 +1,6 @@ { "name": "is-cidr", - "version": "5.0.5", + "version": "5.1.0", "description": "Check if a string is an IP address in CIDR notation", "author": "silverwind ", "contributors": [ @@ -9,25 +9,32 @@ "repository": "silverwind/is-cidr", "license": "BSD-2-Clause", "type": "module", - "exports": "./index.js", "sideEffects": false, + "main": "./dist/index.js", + "exports": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "engines": { "node": ">=14" }, - "files": [ - "index.js", - "index.d.ts" - ], "dependencies": { - "cidr-regex": "^4.0.4" + "cidr-regex": "^4.1.1" }, "devDependencies": { + "@types/node": "20.12.12", "eslint": "8.57.0", - "eslint-config-silverwind": "83.0.1", - "tsd": "0.31.0", - "updates": "16.0.0", - "versions": "12.0.1", - "vitest": "1.4.0", - "vitest-config-silverwind": "7.0.3" + "eslint-config-silverwind": "85.1.4", + "eslint-config-silverwind-typescript": "3.2.7", + "typescript": "5.4.5", + "typescript-config-silverwind": "4.3.2", + "updates": "16.1.1", + "versions": "12.0.2", + "vite": "5.2.11", + "vite-config-silverwind": "1.1.2", + "vite-plugin-dts": "3.9.1", + "vitest": "1.6.0", + "vitest-config-silverwind": "9.0.6" } } diff --git a/package-lock.json b/package-lock.json index 9086d74b8ded2..c0ba79f6c6282 100644 --- a/package-lock.json +++ b/package-lock.json @@ -109,7 +109,7 @@ "hosted-git-info": "^7.0.2", "ini": "^4.1.3", "init-package-json": "^6.0.3", - "is-cidr": "^5.0.5", + "is-cidr": "^5.1.0", "json-parse-even-better-errors": "^3.0.2", "libnpmaccess": "^8.0.6", "libnpmdiff": "^6.1.2", @@ -3056,10 +3056,11 @@ } }, "node_modules/cidr-regex": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-4.0.5.tgz", - "integrity": "sha512-gljhROSwEnEvC+2lKqfkv1dU2v46h8Cwob19LlfGeGRMDLuwFD5+3D6+/vaa9/QrVLDASiSQ2OYQwzzjQ5I57A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-4.1.1.tgz", + "integrity": "sha512-ekKcVp+iRB9zlKFXyx7io7nINgb0oRjgRdXNEodp1OuxRui8FXr/CA40Tz1voWUp9DPPrMyQKy01vJhDo4N1lw==", "inBundle": true, + "license": "BSD-2-Clause", "dependencies": { "ip-regex": "^5.0.0" }, @@ -6151,6 +6152,7 @@ "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz", "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==", "inBundle": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -6260,12 +6262,13 @@ } }, "node_modules/is-cidr": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-5.0.5.tgz", - "integrity": "sha512-zDlCvz2v8dBpumuGD4/fc7wzFKY6UYOvFW29JWSstdJoByGN3TKwS0tFA9VWc7DM01VOVOn/DaR84D8Mihp9Rg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-5.1.0.tgz", + "integrity": "sha512-OkVS+Ht2ssF27d48gZdB+ho1yND1VbkJRKKS6Pc1/Cw7uqkd9IOJg8/bTwBDQL6tfBhSdguPRnlGiE8pU/X5NQ==", "inBundle": true, + "license": "BSD-2-Clause", "dependencies": { - "cidr-regex": "^4.0.4" + "cidr-regex": "^4.1.1" }, "engines": { "node": ">=14" diff --git a/package.json b/package.json index e7ded6a5202a8..3e7c9eddc302a 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "hosted-git-info": "^7.0.2", "ini": "^4.1.3", "init-package-json": "^6.0.3", - "is-cidr": "^5.0.5", + "is-cidr": "^5.1.0", "json-parse-even-better-errors": "^3.0.2", "libnpmaccess": "^8.0.6", "libnpmdiff": "^6.1.2",