Skip to content

chore: bump Node target to 22#183

Merged
1bcMax merged 1 commit into
BlockRunAI:mainfrom
steipete:node22-target-2026-06-08
Jun 10, 2026
Merged

chore: bump Node target to 22#183
1bcMax merged 1 commit into
BlockRunAI:mainfrom
steipete:node22-target-2026-06-08

Conversation

@steipete

@steipete steipete commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Raise Node engine floor from 20 to 22.
  • Build bundled output with tsup target node22.
  • Refresh package-lock metadata to match package version and engine floor.

Validation

  • npm run typecheck
  • npm run test
  • npm run build

Summary by CodeRabbit

  • Chores
    • Updated minimum Node.js version requirement to 22

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR increments the minimum Node.js version from 20 to 22 across the project's package manifest and build configuration. Both the engines.node field and the tsup build target are updated in tandem to enforce and compile for the newer Node.js version.

Changes

Node.js version upgrade

Layer / File(s) Summary
Minimum Node.js version bump to 22
package.json, tsup.config.ts
Engine requirement and build target are updated from Node.js 20 to 22 to align the package manifest and compiler configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 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 clearly and concisely describes the main change: bumping the Node target version from 20 to 22, which aligns with all modifications in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch node22-target-2026-06-08

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tsup.config.ts`:
- Line 10: The tsup config currently sets target: "node22", which tsup@8.0.0 may
not accept because its esbuild lacks Node 22 support; either change the target
string in tsup.config.ts from "node22" to a supported runtime (e.g., "node20" or
"node18") or upgrade the tsup dependency to a newer release that bundles an
esbuild with Node 22 support, then run a reinstall and rebuild to verify; look
for the target property in tsup.config.ts and adjust or bump the tsup version in
package.json accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be8e1e49-a8df-421b-bb50-4291e4c2a079

📥 Commits

Reviewing files that changed from the base of the PR and between 6934160 and 9c160df.

⛔ Files ignored due to path filters (5)
  • dist/cli.js is excluded by !**/dist/**
  • dist/cli.js.map is excluded by !**/dist/**, !**/*.map
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • tsup.config.ts

Comment thread tsup.config.ts
clean: true,
sourcemap: true,
target: "node20",
target: "node22",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does tsup version 8.0.0 support "node22" as a target value?

💡 Result:

Tsup version 8.0.0 does not explicitly support "node22" as a target value [1][2]. Support for specific Node.js targets in tsup is inherited from esbuild, and at the time of the 8.0.0 release (November 2023), Node.js 22 had not yet been released. While you can specify strings for the target option, tsup relies on the underlying esbuild version to validate and process these targets [1][3]. Node.js 22 was released in April 2024, several months after the 8.0.0 release of tsup [2]. Therefore, version 8.0.0 is not designed to recognize "node22" as a valid target [2]. To use "node22" as a target, you would need to use a later version of tsup that includes an updated version of esbuild capable of recognizing it [4][3].

Citations:


Update tsup target for Node 22 compatibility

In tsup.config.ts, target: "node22", may not be accepted by tsup@8.0.0 because tsup’s target validation is delegated to the underlying esbuild, and Node.js 22 support wasn’t available at tsup 8.0.0 release time. Use a target value supported by your current tsup/esbuild, or upgrade tsup to a version with an updated esbuild.

target: "node22",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tsup.config.ts` at line 10, The tsup config currently sets target: "node22",
which tsup@8.0.0 may not accept because its esbuild lacks Node 22 support;
either change the target string in tsup.config.ts from "node22" to a supported
runtime (e.g., "node20" or "node18") or upgrade the tsup dependency to a newer
release that bundles an esbuild with Node 22 support, then run a reinstall and
rebuild to verify; look for the target property in tsup.config.ts and adjust or
bump the tsup version in package.json accordingly.

@1bcMax 1bcMax merged commit 231c896 into BlockRunAI:main Jun 10, 2026
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.

1 participant