build: add Node.js engines constraint requirement in package.json#726
build: add Node.js engines constraint requirement in package.json#726Rish-2006 wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughThis PR adds a new ChangesPrettier format script
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@package.json`:
- Line 18: package.json's scripts.format references "prettier" but prettier is
not listed in dependencies/devDependencies; add prettier to devDependencies
(e.g., run `bun add -d prettier@latest` or add a "prettier": "<version>" entry
under devDependencies in package.json) so that `bun run format` succeeds; ensure
the package.json key affected is devDependencies and leave the existing "format"
script unchanged.
- Around line 20-22: The package.json contains a duplicate "engines" key; remove
the earlier/first "engines" declaration so only the complete "engines" object
(the one that includes both "bun" and "node" constraints) remains, ensuring
there is a single "engines" key in package.json.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| "bench": "bun packages/core/src/benchmark/render-loop.ts", | ||
| "clean": "turbo run clean && rm -rf node_modules" | ||
| "clean": "turbo run clean && rm -rf node_modules", | ||
| "format": "prettier --write \".\"" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if prettier is declared in package.json dependencies
cat package.json | jq -r '.devDependencies.prettier // .dependencies.prettier // "NOT_FOUND"'Repository: Karanjot786/TermUI
Length of output: 72
Add missing prettier dependency for bun run format
package.jsonreferencesprettierinscripts.format, butprettieris not declared in eitherdependenciesordevDependencies(jq result:NOT_FOUND), sobun run formatwill fail without it.
🤖 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 `@package.json` at line 18, package.json's scripts.format references "prettier"
but prettier is not listed in dependencies/devDependencies; add prettier to
devDependencies (e.g., run `bun add -d prettier@latest` or add a "prettier":
"<version>" entry under devDependencies in package.json) so that `bun run
format` succeeds; ensure the package.json key affected is devDependencies and
leave the existing "format" script unchanged.
| "engines": { | ||
| "node": ">=18.0.0" | ||
| }, |
There was a problem hiding this comment.
Remove duplicate engines key.
The engines field is declared twice in package.json (lines 20-22 and lines 33-36). JSON does not allow duplicate keys in the same object. Most parsers will use the last occurrence (lines 33-36), making this first declaration dead code.
🐛 Proposed fix: Remove the first engines block
- },
- "engines": {
- "node": ">=18.0.0"
},
"devDependencies": {The complete engines block at lines 33-36 already declares both bun and node constraints.
🧰 Tools
🪛 Biome (2.4.16)
[error] 20-20: The key engines was already declared.
(lint/suspicious/noDuplicateObjectKeys)
🤖 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 `@package.json` around lines 20 - 22, The package.json contains a duplicate
"engines" key; remove the earlier/first "engines" declaration so only the
complete "engines" object (the one that includes both "bun" and "node"
constraints) remains, ensuring there is a single "engines" key in package.json.
Review: prettier not declaredYour Add it to root package.json: "devDependencies": {
"prettier": "^3.3.0"
}Also remove the duplicate |
|
Closing — both the format script and the engines.node constraint are already on main (merged via #723 and a prior commit). No new changes remain. |
Closes #725
Summary by CodeRabbit