Skip to content

Commit bb971b7

Browse files
feat: add nodejs8 runtime\n\nBREAKING CHANGE: default to nodejs8, overwrite with "runtime: nodejs6" in serverless.yml
1 parent 99f2b43 commit bb971b7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

shared/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
|| 'dev';
1010
this.options.region = _.get(this, 'options.region')
1111
|| 'us-central1';
12+
this.options.runtime = _.get(this, 'options.runtime')
13+
|| 'nodejs8';
1214

1315
return BbPromise.resolve();
1416
},

shared/utils.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ describe('Utils', () => {
2020
.setDefaults().then(() => {
2121
expect(googleCommand.options.stage).toEqual('dev');
2222
expect(googleCommand.options.region).toEqual('us-central1');
23+
expect(googleCommand.options.runtime).toEqual('nodejs8');
2324
}));
2425

2526
it('should set the options when they are provided', () => {
2627
googleCommand.options.stage = 'my-stage';
2728
googleCommand.options.region = 'my-region';
29+
googleCommand.options.runtime = 'nodejs6';
2830

2931
return googleCommand.setDefaults().then(() => {
3032
expect(googleCommand.options.stage).toEqual('my-stage');
3133
expect(googleCommand.options.region).toEqual('my-region');
34+
expect(googleCommand.options.runtime).toEqual('nodejs6');
3235
});
3336
});
3437
});

0 commit comments

Comments
 (0)