Skip to content

Commit 58b86c0

Browse files
authored
Merge pull request #637 from serverless-heaven/upgrade-deps
Upgrade deps
2 parents 4534c12 + e708823 commit 58b86c0

File tree

24 files changed

+6639
-3600
lines changed

24 files changed

+6639
-3600
lines changed

examples/babel-multiple-statically-entries/first.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export const hello = (event, context, cb) => {
22
const p = new Promise((resolve, reject) => {
33
resolve('success');
44
});
5-
p
6-
.then(r => cb(null, {
5+
p.then(r =>
6+
cb(null, {
77
message: 'Go Serverless Webpack (Babel) v1.0! First module!',
8-
event,
9-
}))
10-
.catch(e => cb(e));
8+
event
9+
})
10+
).catch(e => cb(e));
1111
};

examples/babel-multiple-statically-entries/second.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export const hello = (event, context, cb) => {
22
const p = new Promise((resolve, reject) => {
33
resolve('success');
44
});
5-
p
6-
.then(r => cb(null, {
5+
p.then(r =>
6+
cb(null, {
77
message: 'Go Serverless Webpack (Babel) v1.0! Second module!',
8-
event,
9-
}))
10-
.catch(e => cb(e));
8+
event
9+
})
10+
).catch(e => cb(e));
1111
};

examples/babel-multiple-statically-entries/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
second: ['./second.js']
88
},
99
target: 'node',
10-
mode: slsw.lib.webpack.isLocal ? 'development': 'production',
10+
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
1111
module: {
1212
rules: [
1313
{
@@ -18,7 +18,7 @@ module.exports = {
1818
{
1919
loader: 'babel-loader'
2020
}
21-
],
21+
]
2222
}
2323
]
2424
},

examples/babel-webpack-4/handlers/first.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ export const hello = (event, context, cb) => {
55

66
// Do not return the promise as we use the callback
77
// This resolved promise would be be in the application library code in a real-world application and provide the results
8-
App.handleFirst(event) // eslint-disable-line promise/catch-or-return
9-
.then(result => ({
10-
statusCode: 200,
11-
headers: {
12-
'Content-Type': 'application/json;charset=utf-8'
13-
},
14-
body: JSON.stringify(result)
15-
}))
16-
.asCallback(cb);
8+
App.handleFirst(event) // eslint-disable-line promise/catch-or-return
9+
.then(result => ({
10+
statusCode: 200,
11+
headers: {
12+
'Content-Type': 'application/json;charset=utf-8'
13+
},
14+
body: JSON.stringify(result)
15+
}))
16+
.asCallback(cb);
1717

1818
return;
1919
};

examples/babel-webpack-4/handlers/second.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ export const hello = (event, context, cb) => {
55

66
// Do not return the promise as we use the callback
77
// This resolved promise would be be in the application library code in a real-world application and provide the results
8-
App.handleSecond(event) // eslint-disable-line promise/catch-or-return
9-
.then(result => ({
10-
statusCode: 200,
11-
headers: {
12-
'Content-Type': 'application/json;charset=utf-8'
13-
},
14-
body: JSON.stringify(result)
15-
}))
16-
.asCallback(cb);
8+
App.handleSecond(event) // eslint-disable-line promise/catch-or-return
9+
.then(result => ({
10+
statusCode: 200,
11+
headers: {
12+
'Content-Type': 'application/json;charset=utf-8'
13+
},
14+
body: JSON.stringify(result)
15+
}))
16+
.asCallback(cb);
1717

1818
return;
1919
};

examples/babel-webpack-4/lib/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class App {
99
from: 'First lambda ;-)',
1010
event
1111
};
12-
12+
1313
return BbPromise.resolve(myDemoResult);
1414
}
1515

@@ -19,7 +19,7 @@ export class App {
1919
from: 'Second lambda ;-)',
2020
event
2121
};
22-
22+
2323
return BbPromise.resolve(myDemoResult);
2424
}
25-
}
25+
}

examples/babel-webpack-4/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const nodeExternals = require('webpack-node-externals');
55
module.exports = {
66
entry: slsw.lib.entries,
77
target: 'node',
8-
mode: slsw.lib.webpack.isLocal ? 'development': 'production',
8+
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
99
optimization: {
1010
// We no not want to minimize our code.
1111
minimize: false
@@ -25,7 +25,7 @@ module.exports = {
2525
{
2626
loader: 'babel-loader'
2727
}
28-
],
28+
]
2929
}
3030
]
3131
},
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var AWS = require('aws-sdk');
4-
var fbgraph = require('fbgraph');
3+
const AWS = require('aws-sdk');
4+
const fbgraph = require('fbgraph');
55

66
module.exports.hello = function (event, context, cb) {
7-
cb(null, { message: 'hello fb & aws', event });
8-
}
7+
cb(null, { message: 'hello fb & aws', event });
8+
};

examples/include-external-npm-packages/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const nodeExternals = require('webpack-node-externals');
33

44
module.exports = {
55
entry: slsw.lib.entries,
6-
mode: slsw.lib.webpack.isLocal ? 'development': 'production',
6+
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
77
target: 'node',
88
externals: [nodeExternals()] // exclude external modules
99
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports.hello = function (event, context, cb) {
4-
cb(null, { message: 'First module', event });
5-
}
4+
cb(null, { message: 'First module', event });
5+
};

0 commit comments

Comments
 (0)