[CLEAN] Synthetic Benchmark PR #30803 - refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0#332
Open
ofir-frd wants to merge 2 commits intobase_pr_30803_20260120_8229from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR langgenius#30803
Type: Clean (correct implementation)
Original PR Title: refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0
Original PR Description: ## Summary
isServer/isClientutility at/web/utils/client.tstypeof window === 'undefined'across 9 files to use the new utilityWhy not use TanStack Query's
isServer?TanStack Query exports:
We don't need Deno detection because:
Changes
New File
web/utils/client.ts- ExportsisServerandisClientboolean constantsMigrated Files
featured-tools.tsxfeatured-triggers.tsxrag-tool-recommendations/index.tsxembedded-chatbot/header/index.tsxquery-client.tsxuse-trigger-events-limit-modal.tslist.tsxgtag.tsuse-query-params.tsNode.js Version Update
.nvmrc22.11.0→22.20.0web/package.jsonengines>=v22.11.0→>=22.12.0This fixes jsdom 27.3.0 + parse5 8.0.0 ESM compatibility. Node.js 22.12.0+ has
require(esm)enabled by default.Benefits
if (isServer)is clearer thanif (typeof window === 'undefined')'undefined'Test plan
pnpm lint:fixpassespnpm type-check:tsgopassespnpm testpasses (27/27 tests)Closes langgenius#30802
Closes langgenius#30807
Original PR URL: langgenius#30803