node-lambda 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/main.js +1 -1
- package/package.json +1 -1
- package/test/main.js +1 -1
- package/test/node-lambda.js +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -463,3 +463,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
463
463
|
|
|
464
464
|
### Bugfixes
|
|
465
465
|
- fix the bug in `excludeGlobs` in `_fileCopy` [#609](https://github.com/motdotla/node-lambda/pull/609)
|
|
466
|
+
|
|
467
|
+
## [1.2.0] - 2022-12-21
|
|
468
|
+
### Features
|
|
469
|
+
- Add support for nodejs18x [#616](https://github.com/motdotla/node-lambda/pull/616)
|
package/lib/main.js
CHANGED
|
@@ -52,7 +52,7 @@ event_sources.json and ${program.eventFile} files as needed.`)
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async run (program) {
|
|
55
|
-
if (!['nodejs14.x', 'nodejs16.x'].includes(program.runtime)) {
|
|
55
|
+
if (!['nodejs14.x', 'nodejs16.x', 'nodejs18.x'].includes(program.runtime)) {
|
|
56
56
|
console.error(`Runtime [${program.runtime}] is not supported.`)
|
|
57
57
|
process.exit(254)
|
|
58
58
|
}
|
package/package.json
CHANGED
package/test/main.js
CHANGED
package/test/node-lambda.js
CHANGED
|
@@ -171,6 +171,27 @@ describe('bin/node-lambda', () => {
|
|
|
171
171
|
})
|
|
172
172
|
})
|
|
173
173
|
|
|
174
|
+
describe('node-lambda run (Runtime nodejs18.x is supported)', () => {
|
|
175
|
+
const eventObj = {
|
|
176
|
+
asyncTest: false,
|
|
177
|
+
callbackWaitsForEmptyEventLoop: true // True is the default value of Lambda
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
before(() => {
|
|
181
|
+
process.env.AWS_RUNTIME = 'nodejs18.x'
|
|
182
|
+
})
|
|
183
|
+
after(() => {
|
|
184
|
+
process.env.AWS_RUNTIME = 'nodejs16.x'
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
it('`node-lambda run` exitCode is not `254` (callback(null))', (done) => {
|
|
188
|
+
_generateEventFile(Object.assign(eventObj, {
|
|
189
|
+
callbackCode: 'callback(null);'
|
|
190
|
+
}))
|
|
191
|
+
_testMain({ stdoutRegExp: /Success:$/, exitCode: 0 }, done)
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
|
|
174
195
|
describe('node-lambda run (Multiple events))', () => {
|
|
175
196
|
const eventObj = [{
|
|
176
197
|
asyncTest: false,
|