@tinyhttp/app
Advanced tools
Comparing version 1.3.6 to 1.3.7
@@ -9,3 +9,3 @@ import { STATUS_CODES, createServer } from 'http'; | ||
import { getResponseHeader, setHeader, send, json, status, sendStatus, sendFile, setContentType, setLocationHeader, setLinksHeader, setVaryHeader, setCookie, clearCookie, formatResponse, redirect, attachment, download, append } from '@tinyhttp/res'; | ||
import rg from 'regexparam'; | ||
import { parse } from 'regexparam'; | ||
@@ -239,3 +239,3 @@ const trustRemoteAddress = ({ connection }) => { | ||
if (fn instanceof App) { | ||
regex = rg(path, true); | ||
regex = parse(path, true); | ||
fn.mountpath = path; | ||
@@ -284,6 +284,6 @@ this.apps[path] = fn; | ||
return this.middleware.filter((m) => { | ||
m.regex = m.regex || rg(m.path, m.type === 'mw'); | ||
m.regex = m.regex || parse(m.path, m.type === 'mw'); | ||
let fullPathRegex; | ||
m.fullPath && typeof m.fullPath === 'string' | ||
? (fullPathRegex = rg(m.fullPath, m.type === 'mw')) | ||
? (fullPathRegex = parse(m.fullPath, m.type === 'mw')) | ||
: (fullPathRegex = null); | ||
@@ -290,0 +290,0 @@ return m.regex.pattern.test(url) && (m.type === 'mw' && fullPathRegex ? fullPathRegex.pattern.test(url) : true); |
{ | ||
"name": "@tinyhttp/app", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"description": "0-legacy, tiny & fast web framework as a replacement of Express", | ||
@@ -49,3 +49,3 @@ "type": "module", | ||
"@tinyhttp/router": "1.3.3", | ||
"regexparam": "^1.3.0" | ||
"regexparam": "^2.0.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "scripts": { |
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
40379
970
+ Addedregexparam@2.0.2(transitive)
- Removedregexparam@1.3.0(transitive)
Updatedregexparam@^2.0.0