@middy/http-router 6.3.2 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +7 -4
package/index.js CHANGED
@@ -61,15 +61,15 @@ const httpRouteHandler = (opts = {}) => {
61
61
 
62
62
  // Static
63
63
  if (
64
- Object.hasOwnProperty.call(routesStatic, method) &&
65
- Object.hasOwnProperty.call(routesStatic[method], path)
64
+ Object.hasOwn(routesStatic, method) &&
65
+ Object.hasOwn(routesStatic[method], path)
66
66
  ) {
67
67
  const handler = routesStatic[method][path];
68
68
  return handler(event, context, abort);
69
69
  }
70
70
 
71
71
  // Dynamic
72
- if (Object.hasOwnProperty.call(routesDynamic, method)) {
72
+ if (Object.hasOwn(routesDynamic, method)) {
73
73
  for (const route of routesDynamic[method] ?? []) {
74
74
  const match = path.match(route.path);
75
75
  if (match) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-router",
3
- "version": "6.3.2",
3
+ "version": "6.4.1",
4
4
  "description": "HTTP event router for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -23,7 +23,10 @@
23
23
  }
24
24
  },
25
25
  "types": "index.d.ts",
26
- "files": ["index.js", "index.d.ts"],
26
+ "files": [
27
+ "index.js",
28
+ "index.d.ts"
29
+ ],
27
30
  "scripts": {
28
31
  "test": "npm run test:unit && npm run test:fuzz",
29
32
  "test:unit": "node --test",
@@ -61,10 +64,10 @@
61
64
  "url": "https://github.com/sponsors/willfarrell"
62
65
  },
63
66
  "dependencies": {
64
- "@middy/util": "6.3.2"
67
+ "@middy/util": "6.4.1"
65
68
  },
66
69
  "devDependencies": {
67
- "@middy/core": "6.3.2",
70
+ "@middy/core": "6.4.1",
68
71
  "@types/aws-lambda": "^8.10.97"
69
72
  },
70
73
  "gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"