Skip to content

Fix NotificationHandler for Node 24 Lambda runtime (v8.0.1)#62

Merged
mckalexee merged 2 commits into
mainfrom
fix-notification-handler-node24
Apr 20, 2026
Merged

Fix NotificationHandler for Node 24 Lambda runtime (v8.0.1)#62
mckalexee merged 2 commits into
mainfrom
fix-notification-handler-node24

Conversation

@mckalexee

Copy link
Copy Markdown
Contributor

Summary

  • Fixes NotificationHandler breaks on Node.js 24 Lambda runtime (Runtime.CallbackHandlerDeprecated) #58NotificationHandler wrapped an SNS handler with a 3-argument (event, context, callback) signature. Node 24's Lambda runtime rejects callback-style handlers at init with Runtime.CallbackHandlerDeprecated, even when the callback is never invoked, so any function built with NotificationHandler fails immediately on nodejs24.x.
  • Drops the callback parameter and lets promise rejection propagate naturally — the pattern the other wrappers (QueueHandler, EventHandler, etc.) already use.
  • Bumps version to 8.0.1.

Test plan

  • Merge (squash).
  • Tag the merge commit on main: git checkout main && git pull && git tag v8.0.1 && git push origin v8.0.1.
  • Watch Publish workflow. Confirm npm view @faceteer/cdk dist-tags shows latest: 8.0.1 and alpha: 8.0.1-alpha.1.
  • Confirm provenance badge on npmjs.com.
  • In a consumer project using NotificationHandler, pin @faceteer/cdk@8.0.1, deploy a Lambda on nodejs24.x, and confirm cold start succeeds and SNS messages are processed.

The wrapped SNS handler declared a 3-argument `(event, context, callback)`
signature. Node 24's Lambda runtime rejects callback-style handlers at
init with `Runtime.CallbackHandlerDeprecated`, even when the callback is
never invoked.

Drop the callback parameter and let promise rejection propagate, which
matches what the other handler wrappers in this package already do.

Fixes #58.
@github-actions

Copy link
Copy Markdown

Test Results

 1 files  ±0   9 suites  ±0   11s ⏱️ +3s
33 tests ±0  33 ✅ ±0  0 💤 ±0  0 ❌ ±0 
34 runs  ±0  34 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit caf82b5. ± Comparison against base commit 6365ae1.

@github-actions

github-actions Bot commented Apr 20, 2026

Copy link
Copy Markdown

Test Results

 1 files  ±0   9 suites  ±0   12s ⏱️ +4s
33 tests ±0  33 ✅ ±0  0 💤 ±0  0 ❌ ±0 
34 runs  ±0  34 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit caf82b5. ± Comparison against base commit 6365ae1.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.14%. Comparing base (6365ae1) to head (caf82b5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
handlers/notification-handler.ts 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   82.88%   83.14%   +0.26%     
==========================================
  Files          24       24              
  Lines         625      623       -2     
  Branches      148      148              
==========================================
  Hits          518      518              
+ Misses        105      103       -2     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckalexee mckalexee merged commit 770f863 into main Apr 20, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NotificationHandler breaks on Node.js 24 Lambda runtime (Runtime.CallbackHandlerDeprecated)

1 participant