@middy/do-not-wait-for-empty-event-loop 2.5.6 → 3.0.0-alpha.3

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2017-2021 Luciano Mammino, will Farrell and the [Middy team](https://github.com/middyjs/middy/graphs/contributors)
3
+ Copyright (c) 2017-2022 Luciano Mammino, will Farrell and the [Middy team](https://github.com/middyjs/middy/graphs/contributors)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -80,7 +80,7 @@ Everyone is very welcome to contribute to this repository. Feel free to [raise i
80
80
 
81
81
  ## License
82
82
 
83
- Licensed under [MIT License](LICENSE). Copyright (c) 2017-2021 Luciano Mammino, will Farrell, and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
83
+ Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 Luciano Mammino, will Farrell, and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
84
84
 
85
85
  <a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
86
86
  <img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
package/index.js CHANGED
@@ -1,10 +1,11 @@
1
- const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
2
- const defaults = {
3
- runOnBefore: true,
4
- runOnAfter: false,
5
- runOnError: false
6
- }
7
1
 
2
+ const defaults = {
3
+ runOnBefore: true,
4
+ runOnAfter: false,
5
+ runOnError: false
6
+ }
7
+
8
+ const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
8
9
  const options = { ...defaults, ...opts }
9
10
 
10
11
  const doNotWaitForEmptyEventLoop = async (request) => {
@@ -17,4 +18,4 @@ const doNotWaitForEmptyEventLoopMiddleware = (opts = {}) => {
17
18
  onError: options.runOnError ? doNotWaitForEmptyEventLoop : undefined
18
19
  }
19
20
  }
20
- module.exports = doNotWaitForEmptyEventLoopMiddleware
21
+ export default doNotWaitForEmptyEventLoopMiddleware
package/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "@middy/do-not-wait-for-empty-event-loop",
3
- "version": "2.5.6",
3
+ "version": "3.0.0-alpha.3",
4
4
  "description": "Middleware for the middy framework that allows to easily disable the wait for empty event loop in a Lambda function",
5
- "type": "commonjs",
5
+ "type": "module",
6
6
  "engines": {
7
- "node": ">=12"
7
+ "node": ">=14"
8
8
  },
9
9
  "engineStrict": true,
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "main": "index.js",
13
+ "exports": "./index.js",
14
14
  "types": "index.d.ts",
15
15
  "files": [
16
+ "index.js",
16
17
  "index.d.ts"
17
18
  ],
18
19
  "scripts": {
19
20
  "test": "npm run test:unit",
20
- "test:unit": "ava"
21
+ "test:unit": "ava",
22
+ "test:benchmark": "node __benchmarks__/index.js"
21
23
  },
22
24
  "license": "MIT",
23
25
  "keywords": [
@@ -43,9 +45,9 @@
43
45
  "url": "https://github.com/middyjs/middy/issues"
44
46
  },
45
47
  "homepage": "https://github.com/middyjs/middy#readme",
46
- "gitHead": "0c789f55b4adf691f977b0d9904d1a805bb3bb2b",
48
+ "gitHead": "1441158711580313765e6d156046ef0fade0d156",
47
49
  "devDependencies": {
48
- "@middy/core": "^2.5.6",
50
+ "@middy/core": "^3.0.0-alpha.3",
49
51
  "@types/aws-lambda": "^8.10.76"
50
52
  }
51
53
  }