feat: Add a PowerShell installer script and getting started documenta…#240
Merged
lc-cn merged 2 commits intozhinjs:mainfrom Feb 12, 2026
Merged
feat: Add a PowerShell installer script and getting started documenta…#240lc-cn merged 2 commits intozhinjs:mainfrom
lc-cn merged 2 commits intozhinjs:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="docs/public/install.ps1">
<violation number="1" location="docs/public/install.ps1:94">
P1: Node.js version gate incorrectly accepts 22.0.0–22.11.x. The else-if branch checks major -eq 20 OR major -ge 22, which causes Node 22.0.0-22.11.x to incorrectly pass when it should be rejected (requires >= 22.12.0). The condition should only allow major version 20 in this branch.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| elseif (Test-VersionGte $nodeVersionRaw "20.19.0") { | ||
| # 检查不是 21.x(因为 21 < 22.12) | ||
| $major = [int]($nodeVersionRaw.Split('.')[0]) | ||
| if ($major -eq 20 -or $major -ge 22) { |
Contributor
There was a problem hiding this comment.
P1: Node.js version gate incorrectly accepts 22.0.0–22.11.x. The else-if branch checks major -eq 20 OR major -ge 22, which causes Node 22.0.0-22.11.x to incorrectly pass when it should be rejected (requires >= 22.12.0). The condition should only allow major version 20 in this branch.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/public/install.ps1, line 94:
<comment>Node.js version gate incorrectly accepts 22.0.0–22.11.x. The else-if branch checks major -eq 20 OR major -ge 22, which causes Node 22.0.0-22.11.x to incorrectly pass when it should be rejected (requires >= 22.12.0). The condition should only allow major version 20 in this branch.</comment>
<file context>
@@ -0,0 +1,170 @@
+ elseif (Test-VersionGte $nodeVersionRaw "20.19.0") {
+ # 检查不是 21.x(因为 21 < 22.12)
+ $major = [int]($nodeVersionRaw.Split('.')[0])
+ if ($major -eq 20 -or $major -ge 22) {
+ Log-Success "Node.js v${nodeVersionRaw} ✓"
+ return
</file context>
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.
feat:add Powershell installer script
Summary by cubic
Add a Windows PowerShell installer and update Getting Started with a one‑line Windows setup. Also add @zhin.js/types to the CLI template for better TypeScript support.
Written for commit 4d62222. Summary will update on new commits.