Skip to content

Commit 47a0bcc

Browse files
authored
Merge pull request #18 from kingsmendv/middy-as-peer-dep
Middy as peer dep
2 parents 2cf1d4c + bc1d44b commit 47a0bcc

File tree

3 files changed

+59
-27
lines changed

3 files changed

+59
-27
lines changed

docs/source/lambda_utils.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,23 @@ Not all Middy middlewares are in this implementation, only common ones that are
3939
APIs. You may extend LambdaUtils's ``wrapApiHandler()`` function in your projects,
4040
or use it as an example to write your own, to add more middleware!
4141

42+
**WARNING**: Middy has, historically, introduced some `breaking changes <https://github.com/onicagroup/sailplane/issues/16>`_
43+
in previous minor version bumps. LambdaUtils has been built and tested with Middy
44+
0.29.0, and should continue to work with future versions, but bumping your
45+
Middy version beyond 0.29.0 may produce some weird errors.
4246

43-
``LambdaUtils`` depends on one other utility to work:
47+
48+
``LambdaUtils`` depends on two other utilities to work:
4449

4550
- :doc:`logger`
51+
- `Middy <https://middy.js.org>`_
4652

4753
Install
4854
^^^^^^^
4955

5056
.. code-block:: shell
5157
52-
npm install @sailplane/lambda-utils @sailplane/logger
58+
npm install @sailplane/lambda-utils @sailplane/logger middy
5359
5460
Examples
5561
^^^^^^^^

lambda-utils/package-lock.json

+47-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lambda-utils/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sailplane/lambda-utils",
3-
"version": "1.1.1",
3+
"version": "2.0.0",
44
"description": "Use middleware to remove redundancy in AWS Lambda handlers.",
55
"keywords": [
66
"aws",
@@ -31,18 +31,17 @@
3131
"@types/node": "^8.10.10",
3232
"aws-sdk": "^2.358.0",
3333
"http-errors": "^1.7.1",
34+
"middy": "0.29.x",
3435
"jest": "^23.6.0",
3536
"ts-jest": "^23.10.2",
3637
"ts-loader": "^2.3.7",
3738
"ts-node": "^5.0.1",
3839
"typescript": "^2.9.2"
3940
},
40-
"dependencies": {
41-
"middy": "^0.29.0"
42-
},
4341
"peerDependencies": {
4442
"@sailplane/logger": "2.x.x",
45-
"aws-sdk": "2.x.x"
43+
"aws-sdk": "2.x.x",
44+
"middy": "0.x.x"
4645
},
4746
"main": "dist/lambda-utils.js",
4847
"files": [

0 commit comments

Comments
 (0)