allow-methods
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -18,10 +18,4 @@ { | ||
}, | ||
"exclude": [ | ||
"coverage", | ||
"node_modules", | ||
"test" | ||
], | ||
"include": [ | ||
"**/*.js" | ||
] | ||
} | ||
"exclude": ["coverage", "node_modules", "test"], | ||
"include": ["**/*.js"] | ||
} |
'use strict'; | ||
class MethodNotAllowedError extends Error { | ||
/** @type {string} */ | ||
@@ -13,3 +12,2 @@ name = 'MethodNotAllowedError'; | ||
statusCode = 405; | ||
} | ||
@@ -53,4 +51,4 @@ | ||
return methods | ||
.filter(method => typeof method === 'string') | ||
.map(method => method.toUpperCase()); | ||
.filter((method) => typeof method === 'string') | ||
.map((method) => method.toUpperCase()); | ||
} | ||
@@ -57,0 +55,0 @@ |
{ | ||
"name": "allow-methods", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "Express/connect middleware to handle 405 errors", | ||
@@ -22,17 +22,14 @@ "keywords": [ | ||
"engines": { | ||
"node": "18.x || 20.x", | ||
"npm": "8.x || 9.x || 10.x" | ||
"node": "18.x || 20.x || 22.x" | ||
}, | ||
"scripts": { | ||
"verify": "npm run verify:biome && npm run verify:types", | ||
"verify:biome": "biome check", | ||
"build": "npm run build:types", | ||
"build:types": "tsc --noEmit false --emitDeclarationOnly --project ./jsconfig.json", | ||
"verify": "npm run verify:eslint && npm run verify:types", | ||
"verify:eslint": "eslint .", | ||
"verify:types": "tsc --noEmit --project ./jsconfig.json", | ||
"test": "npm run test:coverage && npm run test:integration", | ||
"test:unit": "node --test test/unit", | ||
"test:unit": "cd test/unit && node --test", | ||
"test:coverage": "nyc npm run test:unit", | ||
"test:integration": "node --test test/integration", | ||
"project:verify": "npx --yes @rowanmanning/validate-project@3 --type git node-library", | ||
"project:fix": "npx --yes @rowanmanning/validate-project@3 --type git node-library --fix", | ||
"test:integration": "cd test/integration && node --test", | ||
"prepare": "husky" | ||
@@ -43,5 +40,4 @@ }, | ||
"@commitlint/config-conventional": "^18.4.2", | ||
"@rowanmanning/eslint-config": "^8.0.0", | ||
"@rowanmanning/biome-config": "^1.2.0", | ||
"@types/express": "^4.17.13", | ||
"eslint": "^8.9.0", | ||
"express4": "npm:express@^4.17.3", | ||
@@ -48,0 +44,0 @@ "express5": "npm:express@^5.0.0-beta.1", |
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
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
9
7196
77