@middy/cloudformation-router 6.3.1 → 6.4.0

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 +2 -5
  2. package/package.json +6 -3
package/index.js CHANGED
@@ -34,10 +34,7 @@ const cloudformationCustomResourceRouteHandler = (opts = {}) => {
34
34
  };
35
35
  return (event, context, abort) => {
36
36
  const { RequestType: requestType } = event;
37
- if (
38
- !requestType ||
39
- !Object.hasOwnProperty.call(requestTypes, requestType)
40
- ) {
37
+ if (!requestType || !Object.hasOwn(requestTypes, requestType)) {
41
38
  throw new Error("Unknown CloudFormation Custom Response event format", {
42
39
  cause: {
43
40
  package: "@middy/cloudformation-router",
@@ -47,7 +44,7 @@ const cloudformationCustomResourceRouteHandler = (opts = {}) => {
47
44
  }
48
45
 
49
46
  // Static
50
- if (Object.hasOwnProperty.call(routesStatic, requestType)) {
47
+ if (Object.hasOwn(routesStatic, requestType)) {
51
48
  const handler = routesStatic[requestType];
52
49
  return handler(event, context, abort);
53
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/cloudformation-router",
3
- "version": "6.3.1",
3
+ "version": "6.4.0",
4
4
  "description": "CloudFormation Custom Response 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",
29
32
  "test:unit": "node --test",
@@ -60,7 +63,7 @@
60
63
  "url": "https://github.com/sponsors/willfarrell"
61
64
  },
62
65
  "devDependencies": {
63
- "@middy/core": "6.3.1",
66
+ "@middy/core": "6.4.0",
64
67
  "@types/aws-lambda": "^8.10.100"
65
68
  },
66
69
  "gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"