express-list-endpoints
Advanced tools
Comparing version 6.0.0 to 7.0.0
@@ -17,3 +17,12 @@ # Changelog | ||
## v7.0.0 - 2024-04-06 | ||
### Added | ||
- Add support for NodeJS v18 and v20. | ||
- Add support for route param regexps. | ||
### Deprecated | ||
- **BREAKING CHANGE** Drop support for NodeJS v12, v14 and v16. | ||
## v6.0.0 - 2021-07-29 | ||
@@ -20,0 +29,0 @@ |
{ | ||
"name": "express-list-endpoints", | ||
"version": "6.0.0", | ||
"version": "7.0.0", | ||
"description": "A express package to list all registered endoints and its verbs", | ||
@@ -31,15 +31,15 @@ "main": "src/index.js", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=18" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.3.4", | ||
"chai": "^4.4.1", | ||
"changelog-version": "^2.0.0", | ||
"eslint": "^7.31.0", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint": "^8.57.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"express": "^4.17.1", | ||
"mocha": "^9.0.3" | ||
"eslint-plugin-promise": "^6.1.1", | ||
"express": "^4.19.2", | ||
"mocha": "^10.4.0" | ||
} | ||
} |
@@ -56,4 +56,13 @@ # Express List Endpoints | ||
## license | ||
## Contributing to express-list-endpoints | ||
MIT | ||
### Development | ||
Runnin test: | ||
```shell | ||
npm test | ||
``` | ||
## License | ||
Express List Endpoints is [MIT licensed](./LICENSE). |
@@ -1,4 +0,5 @@ | ||
const regExpToParseExpressPathRegExp = /^\/\^\\\/(?:(:?[\w\\.-]*(?:\\\/:?[\w\\.-]*)*)|(\(\?:\(\[\^\\\/]\+\?\)\)))\\\/.*/ | ||
const regExpToReplaceExpressPathRegExpParams = /\(\?:\(\[\^\\\/]\+\?\)\)/ | ||
const regexpExpressParamRegexp = /\(\?:\(\[\^\\\/]\+\?\)\)/g | ||
const regExpToParseExpressPathRegExp = /^\/\^\\\/(?:(:?[\w\\.-]*(?:\\\/:?[\w\\.-]*)*)|(\(\?:\([^)]+\)\)))\\\/.*/ | ||
const regExpToReplaceExpressPathRegExpParams = /\(\?:\([^)]+\)\)/ | ||
const regexpExpressParamRegexp = /\(\?:\([^)]+\)\)/g | ||
const regexpExpressPathParamRegexp = /(:[^)]+)\([^)]+\)/g | ||
@@ -65,3 +66,3 @@ const EXPRESS_ROOT_PATH_REGEXP_VALUE = '/^\\/?(?=\\/|$)/i' | ||
const endpoint = { | ||
path: completePath, | ||
path: completePath.replace(regexpExpressPathParamRegexp, '$1'), | ||
methods: getRouteMethods(route), | ||
@@ -68,0 +69,0 @@ middlewares: getRouteMiddlewares(route) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17488
9
166
68
0