safe-regex2
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -15,3 +15,3 @@ 'use strict' | ||
try { re = parse(re) } catch (err) { return false } | ||
try { re = parse(re) } catch { return false } | ||
@@ -37,3 +37,3 @@ let reps = 0 | ||
} | ||
const stack = node.stack || (node.value && node.value.stack) | ||
const stack = node.stack || node.value?.stack | ||
if (!stack) return true | ||
@@ -40,0 +40,0 @@ |
{ | ||
"name": "safe-regex2", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "detect possibly catastrophic, exponential-time regular expressions", | ||
@@ -13,4 +13,5 @@ "main": "index.js", | ||
"@fastify/pre-commit": "^2.1.0", | ||
"c8": "^7.14.0", | ||
"standard": "^17.1.0", | ||
"c8": "^10.1.3", | ||
"eslint": "^9.17.0", | ||
"neostandard": "^0.12.0", | ||
"tape": "^5.7.5", | ||
@@ -20,3 +21,4 @@ "tsd": "^0.31.0" | ||
"scripts": { | ||
"lint": "standard", | ||
"lint": "eslint", | ||
"lint:fix": "eslint --fix", | ||
"test": "npm run test:unit && npm run test:typescript", | ||
@@ -28,5 +30,18 @@ "test:typescript": "tsd", | ||
"type": "git", | ||
"url": "git://github.com/fastify/safe-regex.git" | ||
"url": "git://github.com/fastify/safe-regex2.git" | ||
}, | ||
"homepage": "https://github.com/fastify/safe-regex", | ||
"bugs": { | ||
"url": "https://github.com/fastify/safe-regex2/issues" | ||
}, | ||
"homepage": "https://github.com/fastify/safe-regex2", | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/fastify" | ||
}, | ||
{ | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/fastify" | ||
} | ||
], | ||
"keywords": [ | ||
@@ -45,5 +60,22 @@ "catastrophic", | ||
"contributors": [ | ||
"Matteo Collina <hello@matteocollina.com>" | ||
{ | ||
"name": "Matteo Collina", | ||
"email": "hello@matteocollina.com" | ||
}, | ||
{ | ||
"name": "Gürgün Dayıoğlu", | ||
"email": "hey@gurgun.day", | ||
"url": "https://heyhey.to/G" | ||
}, | ||
{ | ||
"name": "James Sumners", | ||
"url": "https://james.sumners.info" | ||
}, | ||
{ | ||
"name": "Frazer Smith", | ||
"email": "frazer.dev@icloud.com", | ||
"url": "https://github.com/fdawgs" | ||
} | ||
], | ||
"license": "MIT" | ||
} |
@@ -8,3 +8,3 @@ type SafeRegex2 = (re: string | RegExp, opts?: { limit?: number }) => boolean | ||
declare function safeRegex(...params: Parameters<SafeRegex2>): ReturnType<SafeRegex2> | ||
declare function safeRegex (...params: Parameters<SafeRegex2>): ReturnType<SafeRegex2> | ||
export = safeRegex |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unstable ownership
Supply chain riskA new collaborator has begun publishing package versions. Package stability and security risk may be elevated.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
9186
13
113
0
63
1
6
1