Skip to content

Commit

Permalink
deps: is-cidr@5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed May 29, 2024
1 parent 6278fe4 commit 2508a83
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 58 deletions.
15 changes: 15 additions & 0 deletions node_modules/cidr-regex/dist/index.js
Original file line number Diff line number Diff line change
@@ -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
};
15 changes: 0 additions & 15 deletions node_modules/cidr-regex/index.js

This file was deleted.

31 changes: 19 additions & 12 deletions node_modules/cidr-regex/package.json
Original file line number Diff line number Diff line change
@@ -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 <me@silverwind.io>",
"contributors": [
Expand All @@ -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"
}
}
11 changes: 11 additions & 0 deletions node_modules/is-cidr/dist/index.js
Original file line number Diff line number Diff line change
@@ -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
};
9 changes: 0 additions & 9 deletions node_modules/is-cidr/index.js

This file was deleted.

33 changes: 20 additions & 13 deletions node_modules/is-cidr/package.json
Original file line number Diff line number Diff line change
@@ -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 <me@silverwind.io>",
"contributors": [
Expand All @@ -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"
}
}
19 changes: 11 additions & 8 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2508a83

Please sign in to comment.