Skip to content

Conversation

@mikeredmond
Copy link
Member

@mikeredmond mikeredmond commented Jan 6, 2026

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

  • Chores
    • Updated Node.js runtime to 22.x for improved performance and compatibility.
    • Updated build and TypeScript targets to ES2022 to enable newer language features.
    • Added the lambda package to the workspace configuration so it’s included in the monorepo.
    • Upgraded the lambda build tool (esbuild) to a newer major version for build improvements.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Updated Lambda runtime to Node.js 22, raised esbuild/TypeScript targets to ES2022, added the lambda workspace entry, and upgraded the lambda package's esbuild dependency. No changes to exported/public APIs or runtime logic.

Changes

Cohort / File(s) Summary
SAM template & build target
lambda/template.yaml
Changed Lambda runtime from nodejs20.x to nodejs22.x; updated esbuild BuildProperties Target from es2020 to es2022.
TypeScript config
lambda/tsconfig.json
Set TS target to ES2022; added ES2022 to lib.
Repo workspaces manifest
package.json
Added "lambda" to the repository workspaces array.
Lambda package tooling
lambda/package.json
Bumped esbuild dependency from ^0.14.14 to ^0.25.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through configs, clean and spry,
Pushed Node to twenty-two beneath the sky,
ES2022 in tow, build tools tuned anew,
A workspace joined the nest — a tiny hop, it's true!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Upgrade embedded wallet lambda to node 22' directly and clearly summarizes the main change in the pull request.
Linked Issues check ✅ Passed The PR successfully upgrades the embedded wallet lambda to Node.js 22, fulfilling the core requirement from issue #579.
Out of Scope Changes check ✅ Passed All changes (Node.js runtime upgrade, TypeScript config update, esbuild upgrade, and workspace configuration) are directly related to the Node.js 22 upgrade objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02fe569 and 8dd7154.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • lambda/package.json
  • package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • lambda/package.json
  • 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: deploy
  • GitHub Check: build-size-check
  • GitHub Check: Lint & Build

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Size Change: 0 B

Total Size: 5.76 MB

ℹ️ View Unchanged
Filename Size
packages/vechain-kit/dist/assets 4.1 kB
packages/vechain-kit/dist/assets-aAdDxPJu.mjs 50.1 kB
packages/vechain-kit/dist/assets-aAdDxPJu.mjs.map 70.2 kB
packages/vechain-kit/dist/assets-DXVXPy3w.cjs 54.8 kB
packages/vechain-kit/dist/assets-DXVXPy3w.cjs.map 71.6 kB
packages/vechain-kit/dist/assets/index.cjs 716 B
packages/vechain-kit/dist/assets/index.d.cts 973 B
packages/vechain-kit/dist/assets/index.d.mts 973 B
packages/vechain-kit/dist/assets/index.mjs 718 B
packages/vechain-kit/dist/index-CAul3uw4.d.cts 151 kB
packages/vechain-kit/dist/index-CAul3uw4.d.cts.map 43.8 kB
packages/vechain-kit/dist/index-CWViOs1U.d.mts 5.63 kB
packages/vechain-kit/dist/index-CWViOs1U.d.mts.map 2.99 kB
packages/vechain-kit/dist/index-Dsdfx6uw.d.mts 151 kB
packages/vechain-kit/dist/index-Dsdfx6uw.d.mts.map 43.8 kB
packages/vechain-kit/dist/index-DSMUkHcK.d.cts 5.63 kB
packages/vechain-kit/dist/index-DSMUkHcK.d.cts.map 2.99 kB
packages/vechain-kit/dist/index.cjs 612 kB
packages/vechain-kit/dist/index.cjs.map 1.86 MB
packages/vechain-kit/dist/index.d.cts 20.5 kB
packages/vechain-kit/dist/index.d.mts 20.5 kB
packages/vechain-kit/dist/index.mjs 578 kB
packages/vechain-kit/dist/index.mjs.map 1.81 MB
packages/vechain-kit/dist/utils 4.1 kB
packages/vechain-kit/dist/utils-CNYVq6tT.mjs 21.2 kB
packages/vechain-kit/dist/utils-CNYVq6tT.mjs.map 63.4 kB
packages/vechain-kit/dist/utils-DcAJej3n.cjs 26.4 kB
packages/vechain-kit/dist/utils-DcAJej3n.cjs.map 63.7 kB
packages/vechain-kit/dist/utils/index.cjs 1.94 kB
packages/vechain-kit/dist/utils/index.d.cts 2.97 kB
packages/vechain-kit/dist/utils/index.d.mts 2.97 kB
packages/vechain-kit/dist/utils/index.mjs 1.96 kB

compressed-size-action

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between cb2990f and 56da148.

📒 Files selected for processing (2)
  • lambda/template.yaml
  • lambda/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.x runtime 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.

Copy link

@coderabbitai coderabbitai bot left a 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/node package 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

📥 Commits

Reviewing files that changed from the base of the PR and between fa7b4a8 and 02fe569.

⛔ Files ignored due to path filters (1)
  • yarn.lock is 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

@mikeredmond mikeredmond merged commit 5b28972 into main Jan 7, 2026
7 checks passed
@mikeredmond mikeredmond deleted the mike/upgrade-lambda-node branch January 7, 2026 15:13
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.

Upgrade node version for lambda

2 participants