Skip to content
This repository was archived by the owner on Aug 14, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"globals": "^15.15.0",
"happy-dom": "^20.9.0",
"husky": "^9.1.7",
"lint-staged": "^15.5.2",
"lint-staged": "^17.0.5",

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 | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verificar especificações de versão do Node.js no repositório

echo "=== Verificando especificações de versão do Node.js ==="
echo ""

# Procurar por .nvmrc
if [ -f ".nvmrc" ]; then
  echo "📄 .nvmrc encontrado:"
  cat .nvmrc
  echo ""
fi

# Procurar por .node-version
if [ -f ".node-version" ]; then
  echo "📄 .node-version encontrado:"
  cat .node-version
  echo ""
fi

# Verificar configurações de CI
echo "=== Configurações de CI/CD ==="
fd -e yml -e yaml . .github/workflows --exec echo "📄 {}" \; --exec grep -H "node-version\|NODE_VERSION" {} \; 2>/dev/null || echo "Nenhum workflow do GitHub Actions encontrado com especificação de versão do Node.js"
echo ""

# Verificar Dockerfile
if [ -f "Dockerfile" ]; then
  echo "📄 Dockerfile encontrado, verificando imagem base do Node.js:"
  grep -n "FROM.*node" Dockerfile || echo "Nenhuma imagem Node.js encontrada"
  echo ""
fi

# Verificar outras configurações
fd -e json -e toml -e ini . -d 1 --exec grep -l "node.*version\|engine" {} \; 2>/dev/null | while read file; do
  echo "📄 $file pode conter especificação de versão"
done

echo ""
echo "⚠️  ATENÇÃO: lint-staged v17+ requer Node.js >= 22.22.1"

Repository: adm01-debug/zapp-web

Length of output: 654


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== package.json (engines + lint-staged + husky) ==="
if [ -f "package.json" ]; then
  rg -n '"engines"\s*:' package.json || true
  rg -n '"lint-staged"\s*:' package.json || true
  rg -n '"husky"' package.json || true
  rg -n 'lint-staged|husky' package.json || true

  echo "--- Contexto em torno do lint-staged ---"
  node -e 'const fs=require("fs");const s=fs.readFileSync("package.json","utf8").split("\n");let i=0;for(const [idx,line] of s.entries()){if(line.includes('"'"'"lint-staged"'"')){i=idx;break}}; console.log(s.slice(Math.max(0,i-10), i+20).map((l,ix)=>String(ix+Math.max(0,i-10)+1).padStart(4," ")+": "+l).join("\n"));'
else
  echo "package.json não encontrado"
fi

echo
echo "=== Workflows: setup-node e especificação de versão ==="
if [ -d ".github/workflows" ]; then
  fd -e yml -e yaml .github/workflows --exec echo "---- {} ----" \; --exec cat {} \; | rg -n "setup-node|node-version|node-version-file|NODE_VERSION" || true
else
  echo ".github/workflows não encontrado"
fi

echo
echo "=== Busca por Dockerfile(s) e imagens Node ==="
fd -e Dockerfile --type f . --exec sh -c 'echo "---- {} ----"; cat "{}" | rg -n "^FROM.*node" || true' \;
fd -e dockerfile --type f . --exec sh -c 'echo "---- {} ----"; cat "{}" | rg -n "^FROM.*node" || true' \; || true

Repository: adm01-debug/zapp-web

Length of output: 198


🌐 Web query:

lint-staged v17 minimum Node version 22.22.1 git >=2.32.0 requirement

💡 Result:

As of May 2026, lint-staged version 17 has the following minimum system requirements: Node.js: The minimum supported version is 22.22.1 [1][2]. Version 17 dropped support for Node.js v20 [1][3]. Git: The minimum supported version is 2.32.0 [4]. lint-staged now explicitly verifies this version and requires an upgrade if an older version is detected [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "=== Checar se há .nvmrc / node-version-file no repositório ==="
ls -la .nvmrc .node-version 2>/dev/null || true
fd -t f -e yml -e yaml .github/workflows --exec rg -n "node-version-file|\\.nvmrc" {} \; || true

Repository: adm01-debug/zapp-web

Length of output: 572


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "=== Husky/lint-staged executando no repo ==="
rg -n "pre-commit|lint-staged" -S .husky . 2>/dev/null || true
fd -t f . -g "*.husky*" -g ".husky/*" 2>/dev/null || true
ls -la .husky 2>/dev/null || true

Repository: adm01-debug/zapp-web

Length of output: 1705


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== package.json: engines + lint-staged (v17 bump) ==="
if [ -f "package.json" ]; then
  nl -ba package.json | sed -n '90,160p'
  echo
  echo "engines field present?"
  rg -n '"engines"\s*:' package.json || echo "NÃO"
else
  echo "package.json não encontrado"
fi

echo
echo "=== .husky/pre-commit ==="
if [ -f ".husky/pre-commit" ]; then
  nl -ba .husky/pre-commit
else
  echo ".husky/pre-commit não encontrado"
fi

echo
echo "=== Workflows: setup-node/node-version/node-version-file + bun install flags ==="
if [ -d ".github/workflows" ]; then
  fd -e yml -e yaml .github/workflows --exec sh -c 'echo "---- {} ----"; rg -n "setup-node|node-version|node-version-file|NODE_VERSION|actions/setup-node" "{}" || true' \; | sed -n '1,200p'
  fd -e yml -e yaml .github/workflows --exec sh -c 'echo "---- {} ----"; rg -n "bun install|--frozen-lockfile|--frozen|--lockfile-only|npm ci|yarn --frozen-lockfile" "{}" || true' \; | sed -n '1,200p'
else
  echo ".github/workflows não encontrado"
fi

echo
echo "=== Confere lockfile: bun.lock lint-staged ==="
if [ -f "bun.lockb" ]; then
  echo "bun.lockb existe (binário) — ignorado"
elif [ -f "bun.lock" ]; then
  rg -n '"lint-staged":\s*"\^\d' bun.lock || true
  rg -n 'lint-staged@' bun.lock | head -n 20 || true
else
  echo "bun.lock/bun.lockb não encontrado"
fi

echo
echo "=== .nvmrc ==="
cat .nvmrc 2>/dev/null || true

Repository: adm01-debug/zapp-web

Length of output: 180


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== package.json: engines + lint-staged ==="
rg -n '"engines"\s*:' package.json || true
rg -n '"lint-staged"\s*:' package.json || true
echo "--- engines section (if any) ---"
rg -n '"engines"\s*:' package.json -n -C 3 || true
echo "--- lint-staged around line ~111-135 ---"
sed -n '95,150p' package.json

echo
echo "=== .husky/pre-commit ==="
cat .husky/pre-commit

echo
echo "=== Workflows: setup-node / node-version ==="
ls -ლა .github/workflows 2>/dev/null || true
rg -n --glob '.github/workflows/*.yml' --glob '.github/workflows/*.yaml' \
  'actions/setup-node|node-version-file|node-version|NODE_VERSION' \
  .github/workflows || true

echo
echo "=== bun.lock* vs lint-staged v17 (instalado de fato) ==="
ls -la bun.lock* 2>/dev/null || true
if [ -f bun.lockb ]; then
  echo "bun.lockb existe (binário) — procurando no bun.lock (texto) só se houver."
fi
if [ -f bun.lock ]; then
  rg -n 'lint-staged@' bun.lock | head -n 50 || true
  rg -n '"lint-staged": "\^(15|16|17)\.' bun.lock || true
  rg -n 'lint-staged@17\.' bun.lock || true
fi

echo
echo "=== .nvmrc ==="
cat .nvmrc

Repository: adm01-debug/zapp-web

Length of output: 2607


Quebra operacional: lint-staged v17 exige Node.js >= 22.22.1 (repo está preso em Node 20)

  • package.json já está com lint-staged ^17.0.5, mas o repo usa .nvmrc = 20 → ao resolver/instalar o v17, o pre-commit deve falhar e bloquear commits.
  • O pre-commit roda .husky/pre-commit: bun run lint-staged; e hoje o bun.lock ainda lista lint-staged@15.5.2, então o break pode aparecer quando o lock for atualizado (ou se CI não estiver usando lock congelado).
  • Falta campo engines para impedir instalações incompatíveis; adicionar pelo menos node >= 22.22.1 (e git >= 2.32.0) é necessário.
🔧 Sugestão de constraint via `engines`
   "resolutions": {
     "csstype": "3.1.3"
-  }
+  },
+  "engines": {
+    "node": ">=22.22.1",
+    "git": ">=2.32.0"
+  }
 }
  • Ajustar também .nvmrc e/ou o Node do CI para >= 22.22.1, e atualizar o lockfile se a intenção é realmente subir para lint-staged v17.
🤖 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 135, The repo is pinned to Node 20 while package.json
declares "lint-staged": "^17.0.5" which requires Node >=22.22.1; add an engines
field in package.json (e.g., node >=22.22.1 and git >=2.32.0) to prevent
installing incompatible versions, and either update .nvmrc and CI to use Node
>=22.22.1 and regenerate bun.lock (if you intend to move to lint-staged v17) or
downgrade/lock lint-staged to the v15 range in package.json to remain on Node
20; also ensure .husky/pre-commit (runs `bun run lint-staged`) and bun.lock are
consistent with the chosen option.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: The .nvmrc specifies Node 20, but lint-staged 17.x requires Node >= 22.22.1, causing a runtime incompatibility in dev environments and CI that use nvm.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 135:

<comment>The .nvmrc specifies Node 20, but lint-staged 17.x requires Node >= 22.22.1, causing a runtime incompatibility in dev environments and CI that use nvm.</comment>

<file context>
@@ -132,7 +132,7 @@
     "happy-dom": "^20.9.0",
     "husky": "^9.1.7",
-    "lint-staged": "^15.5.2",
+    "lint-staged": "^17.0.5",
     "playwright": "^1.59.1",
     "postcss": "^8.5.6",
</file context>

"playwright": "^1.59.1",
"postcss": "^8.5.6",
"prettier": "^3.8.3",
Expand Down
Loading