Skip to content

Commit 6aa3fa4

Browse files
authored
Merge pull request #138 from arithmetric/support_node16
Support Node.js 16 runtime for AWS Lambda
2 parents a8c359e + 01a4b0f commit 6aa3fa4

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.github/workflows/lint-test.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches:
77
- master
88
- github_actions
9+
- support_node16
910
pull_request:
1011

1112
jobs:
@@ -15,7 +16,7 @@ jobs:
1516
strategy:
1617
fail-fast: false
1718
matrix:
18-
nodejs_version: [ "8.10", 10, 12 ]
19+
nodejs_version: [ "8.10", 10, 12, 14, 16, 18 ]
1920

2021
steps:
2122
- name: Checkout

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: node_js
22
node_js:
3-
- "8.10"
4-
- 10
53
- 12
4+
- 14
5+
- 16
66
matrix:
77
allow_failures:
8-
- node_js: "8.10"
8+
- node_js: "12"
99
script:
1010
- npm run lint
1111
- npm test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ the email forwarding mapping from original destinations to new destination.
5959
2. In AWS Lambda, add a new function and skip selecting a blueprint.
6060

6161
- Name the function "SesForwarder" and optionally give it a description. Ensure
62-
Runtime is set to Node.js 12.x. (Node.js 10.x is also supported.)
62+
Runtime is set to Node.js 18.x or Node.js 16.x.
6363

6464
- For the Lambda function code, either copy and paste the contents of
6565
`index.js` into the inline code editor or zip the contents of the repository

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,9 @@ exports.handler = function(event, context, callback, overrides) {
377377
Promise.series = function(promises, initValue) {
378378
return promises.reduce(function(chain, promise) {
379379
if (typeof promise !== 'function') {
380-
return Promise.reject(new Error("Error: Invalid promise item: " +
381-
promise));
380+
return chain.then(() => {
381+
throw new Error("Error: Invalid promise item: " + promise);
382+
});
382383
}
383384
return chain.then(promise);
384385
}, Promise.resolve(initValue));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "nyc --statements 100 -- mocha -- --check-leaks --timeout 3000"
1010
},
1111
"dependencies": {
12-
"aws-sdk": "~2.631.0"
12+
"aws-sdk": "~2.1083.0"
1313
},
1414
"devDependencies": {
1515
"coveralls": "^3.0.7",

test/handler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ describe('index.js', function() {
6161
var event = {};
6262
var context = {};
6363
var callback = function(err) {
64-
done(err ? null : true);
64+
if (err) assert.ok(true, "callback function received error");
65+
done();
6566
};
6667
var overrides = {
6768
steps: [

0 commit comments

Comments
 (0)