From cf08e2836c81b4b7c9a4a908ac7b35c17f47ffe0 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Tue, 12 Apr 2016 13:26:12 +0200 Subject: [PATCH 1/5] Runhandler: Hotfixes --- lib/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index ce273096..c0f367d9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -52,7 +52,7 @@ Lambda.prototype._runHandler = function (handler, event, runtime) { var callback = function (err, result) { if (err) { - console.log('Error: ' + error); + console.log('Error: ' + err); process.exit(-1); } else { @@ -67,19 +67,19 @@ Lambda.prototype._runHandler = function (handler, event, runtime) { var context = { isNode43: runtime === "nodejs4.3", succeed: function (result) { - if (isNode43) { + if (this.isNode43) { console.log('context.succeed() is deprecated with Node.js 4.3 runtime'); } callback(null, result); }, fail: function (error) { - if (isNode43) { + if (this.isNode43) { console.log('context.fail() is deprecated with Node.js 4.3 runtime'); } callback(error); }, done: function () { - if (isNode43) { + if (this.isNode43) { console.log('context.done() is deprecated with Node.js 4.3 runtime'); } callback(); From fdbbe605dbe0abf6dabe304acb05efde05466319 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Mon, 18 Apr 2016 13:17:47 +0200 Subject: [PATCH 2/5] Remove AWS_MODE --- lib/.env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/.env.example b/lib/.env.example index 66f81f71..a5a22808 100644 --- a/lib/.env.example +++ b/lib/.env.example @@ -6,7 +6,6 @@ AWS_ROLE_ARN=your_amazon_role AWS_REGION=us-east-1 AWS_FUNCTION_NAME= AWS_HANDLER=index.handler -AWS_MODE=event AWS_MEMORY_SIZE=128 AWS_TIMEOUT=3 AWS_DESCRIPTION= From 9c94a46acc15dbccc4e0307bff0a41dffbcd6616 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Mon, 18 Apr 2016 13:20:37 +0200 Subject: [PATCH 3/5] Set nodejs4.3 as default --- lib/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/.env.example b/lib/.env.example index a5a22808..1fd0bcd2 100644 --- a/lib/.env.example +++ b/lib/.env.example @@ -9,7 +9,7 @@ AWS_HANDLER=index.handler AWS_MEMORY_SIZE=128 AWS_TIMEOUT=3 AWS_DESCRIPTION= -AWS_RUNTIME=nodejs +AWS_RUNTIME=nodejs4.3 AWS_VPC_SUBNETS= AWS_VPC_SECURITY_GROUPS= EXCLUDE_GLOBS="event.json" From 8a43b511bd9fb084bf523b737897568840f11888 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Fri, 22 Apr 2016 23:57:36 +0200 Subject: [PATCH 4/5] Bump version to 0.8.1, update changelog --- CHANGELOG.md | 7 +++++++ package.json | 2 +- test/main.js | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d161f7..6c319e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added support for `post install scripts`, this `post_install.sh` file will be triggered after `npm install --production` in case you want to run any code on your application before zipping - Added `-x` / `--excludeGlobs` to allow custom file exclusion - Excluding `*.swp`, `deploy.env` by default now + +## [0.8.1] - 2016-04-22 +### Bugfixes +- Resolved a problem with excludes not being set [#91](https://github.com/motdotla/node-lambda/pull/91) +- Resolved a problem with the package command and a custom config file [#90](https://github.com/motdotla/node-lambda/pull/90) +- Allow `use strict` [#86](https://github.com/motdotla/node-lambda/pull/86) +- Updated the `env.example` file to set the default (and by AWS recommended) runtime to `nodejs4.3` [#84](https://github.com/motdotla/node-lambda/pull/84) diff --git a/package.json b/package.json index 303789cf..479e1503 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-lambda", - "version": "0.8.0", + "version": "0.8.1", "description": "Command line tool for locally running and remotely deploying your node.js applications to Amazon Lambda.", "main": "lib/main.js", "directories": { diff --git a/test/main.js b/test/main.js index ab81152f..721a2c56 100644 --- a/test/main.js +++ b/test/main.js @@ -32,7 +32,7 @@ describe('node-lambda', function () { }); it('version should be set', function () { - assert.equal(lambda.version, '0.8.0'); + assert.equal(lambda.version, '0.8.1'); }); describe('_params', function () { From 7685b821cac6377ceeb08b41839c705267636da7 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Fri, 22 Apr 2016 23:58:22 +0200 Subject: [PATCH 5/5] Ignore node_modules because we are running npm install ourselves anyway --- lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index db0ba6f7..a7ac5141 100644 --- a/lib/main.js +++ b/lib/main.js @@ -138,7 +138,7 @@ Lambda.prototype._zipfileTmpPath = function (program) { }; Lambda.prototype._rsync = function (program, codeDirectory, callback) { - var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', 'build/'], + var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', 'build/', 'node_modules'], excludeGlobs = []; if (program.excludeGlobs) { excludeGlobs = program.excludeGlobs.split(' ');