Skip to content

Commit 3a2f32a

Browse files
committed
fix: add missing timer cb provided args when restoring execution context
chore: upgrade deps
1 parent 5f275bb commit 3a2f32a

File tree

4 files changed

+868
-874
lines changed

4 files changed

+868
-874
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-aws-lambda",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "AWS Application Load Balancer and API Gateway - Lambda dev tool for Serverless. Allows Express synthax in handlers. Supports packaging, local invoking and offline ALB, APG, S3, SNS, SQS, DynamoDB Stream server mocking.",
55
"author": "Inqnuam",
66
"license": "MIT",
@@ -63,23 +63,23 @@
6363
}
6464
},
6565
"dependencies": {
66-
"@aws-sdk/client-sqs": "^3.682.0",
67-
"@smithy/eventstream-codec": "^3.1.7",
66+
"@aws-sdk/client-sqs": "^3.726.1",
67+
"@smithy/eventstream-codec": "^4.0.1",
6868
"@types/serverless": "^3.12.22",
6969
"ajv": "^8.17.1",
7070
"ajv-formats": "^3.0.1",
7171
"archiver": "^5.3.1",
72-
"esbuild": "0.24.0",
73-
"fast-xml-parser": "^4.5.0",
72+
"esbuild": "0.24.2",
73+
"fast-xml-parser": "^4.5.1",
7474
"local-aws-sqs": "^1.0.2",
75-
"serve-static": "^1.15.0"
75+
"serve-static": "^1.16.2"
7676
},
7777
"devDependencies": {
7878
"@types/archiver": "^5.3.2",
7979
"@types/node": "^14.14.31",
8080
"@types/serve-static": "^1.15.5",
81-
"typescript": "^5.6.3",
82-
"vitest": "^2.1.4"
81+
"typescript": "^5.7.3",
82+
"vitest": "^2.1.8"
8383
},
8484
"keywords": [
8585
"aws",

src/lib/runtime/runners/node/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ interface IEventQueueContext {
138138
}
139139

140140
export class EventQueue extends Map {
141+
private static readonly EMPTY_ARGS = [];
141142
static IGNORE = ["PROMISE", "RANDOMBYTESREQUEST", "PerformanceObserver", "TIMERWRAP"];
142143
onEmpty?: () => void;
143144
requestId: string;
@@ -249,9 +250,10 @@ export class EventQueue extends Map {
249250
const timmerTime = resource._repeat ? "setInterval" : "setTimeout";
250251
const fnString = resource._onTimeout.toString();
251252
const org = resource._onTimeout.bind(resource._onTimeout);
253+
const cbArgs = resource._timerArgs ?? EventQueue.EMPTY_ARGS;
252254
resource._onTimeout = () => {
253255
try {
254-
org();
256+
org(...cbArgs);
255257
} catch (error) {
256258
const data = genResponsePayload(error);
257259
const solution = genSolution(fnString);

templates/simple/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"type": "module",
55
"devDependencies": {
66
"prettier": "3.2.5",
7-
"serverless": "^3.38.0",
8-
"serverless-aws-lambda": "^5.0.0",
7+
"serverless": "^3.40.0",
8+
"serverless-aws-lambda": "^5.0.1",
99
"serverless-aws-lambda-vitest": "^3.0.2",
10-
"typescript": "^5.6.3"
10+
"typescript": "^5.7.3"
1111
},
1212
"scripts": {
1313
"sls": "sls",

0 commit comments

Comments
 (0)