-
Notifications
You must be signed in to change notification settings - Fork 9
Upgrade embedded wallet lambda to node 22 #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughUpdated Lambda runtime to Node.js 22, raised esbuild/TypeScript targets to ES2022, added the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 5.76 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI Agents
In @lambda/template.yaml:
- Line 41: The esbuild version used must be upgraded to a Node.js 22–compatible
release: update your project dependency (e.g., package.json or package-lock) to
use esbuild ^0.21.0 (or later) and ensure the deployment uses the nodejs22.x
runtime while keeping the build target set to "Target: es2022" in template.yaml;
locate the esbuild entry in your dependency list (package.json) and bump the
version specifier to ^0.21.0, then run a fresh install and rebuild to verify
compatibility before deploying.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
lambda/template.yamllambda/tsconfig.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-01T13:01:33.771Z
Learnt from: CR
Repo: vechain/vechain-kit PR: 0
File: .cursor/rules/migration-guide-to-v2.mdc:0-0
Timestamp: 2025-12-01T13:01:33.771Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript `as const` assertions for method names and `as `0x${string}`` assertions for Ethereum addresses to ensure type safety in contract interactions
Applied to files:
lambda/tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-size-check
- GitHub Check: Lint & Build
🔇 Additional comments (2)
lambda/tsconfig.json (1)
3-3: LGTM! TypeScript configuration aligns with Node.js 22.The upgrade to ES2022 target and lib is appropriate for Node.js 22 and aligns with the esbuild target in template.yaml.
Also applies to: 5-5
lambda/template.yaml (1)
25-25: Node.js 22.x runtime is supported in AWS Lambda.The
nodejs22.xruntime is available across all AWS regions (commercial, China, and GovCloud) with an announced end-of-life date of April 30, 2027. The update is safe to proceed with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lambda/package.json (1)
28-28: Update @types/node to match Node.js 22 runtime.The
@types/nodepackage is currently set to^20.11.19, but the PR upgrades the Lambda runtime to Node.js 22. This mismatch means TypeScript will use type definitions for Node 20 APIs while the code runs on Node 22, potentially hiding type errors or missing new Node 22 features.🔎 Proposed fix
- "@types/node": "^20.11.19", + "@types/node": "^22.0.0",
🤖 Fix all issues with AI Agents
In @lambda/package.json:
- Line 21: The package.json currently pins "esbuild": "^0.21", which is
vulnerable; update the esbuild dependency to a patched latest release (e.g.,
bump to a current >=0.24.3 or the latest stable) and run your lockfile update
(npm install / npm update) to regenerate package-lock.json or yarn.lock; also
bump "@types/node" to "^22" to match Node 22 runtime so type coverage is
correct, then run the test/build pipeline to verify no breakages.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (1)
lambda/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-size-check
- GitHub Check: Lint & Build
- GitHub Check: deploy
Upgrading node version and lib as no new security patches will be applied for node 20 runtimes from 30 April 2026
Closes #579
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.