Skip to content
Open
Show file tree
Hide file tree
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 @@ -77,7 +77,7 @@
"open": "^11.0.0",
"p-retry": "^7.1.1",
"prettier": "3.8.3",
"puppeteer": "^24.43.1",
"puppeteer": "^25.1.0",

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

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Root engine declaration =="
jq -r '.engines.node' package.json

echo
echo "== Puppeteer engine requirements from lockfile =="
rg -n -A2 -B1 'puppeteer(@|-)25\.1\.0|engines:\s*\{node:\s*' pnpm-lock.yaml

echo
echo "== Test scripts that require Puppeteer =="
jq -r '.scripts | to_entries[] | select(.key|test("test")) | "\(.key): \(.value)"' package.json

echo
echo "== CI/workflow node-version references (if present) =="
fd -HI '.*\.(yml|yaml)$' .github/workflows 2>/dev/null \
  | xargs -r rg -n -C2 'setup-node|node-version|matrix'

Repository: rstackjs/rspack-dev-server

Length of output: 36815


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json (around engines + dependency section) =="
nl -ba package.json | sed -n '60,120p'

echo
echo "== scripts/install-puppeteer-browser.mjs (imports/usage) =="
if [ -f scripts/install-puppeteer-browser.mjs ]; then
  nl -ba scripts/install-puppeteer-browser.mjs | sed -n '1,200p'
else
  echo "Missing scripts/install-puppeteer-browser.mjs"
fi

echo
echo "== CI workflows (node-version references) =="
fd -HI '.*\.(yml|yaml)$' .github/workflows \
  | xargs -r rg -n -C1 'setup-node|node-version|matrix'

echo
echo "== engine-strict config (npm/pnpm/yarn) =="
ls -la | rg -n '\.npmrc|\.pnpmrc|\.yarnrc|packageManager\.yml' || true
for f in .npmrc .pnpmrc .yarnrc .yarnrc.yml packageManager.yml; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    cat -n "$f"
  fi
done

Repository: rstackjs/rspack-dev-server

Length of output: 188


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json (around engines + dependency section) =="
sed -n '1,140p' package.json | cat -n

echo
echo "== scripts/install-puppeteer-browser.mjs (imports/usage) =="
if [ -f scripts/install-puppeteer-browser.mjs ]; then
  sed -n '1,220p' scripts/install-puppeteer-browser.mjs | cat -n
else
  echo "Missing scripts/install-puppeteer-browser.mjs"
fi

echo
echo "== CI workflows (node-version references) =="
fd -HI '.*\.(yml|yaml)$' .github/workflows \
  | xargs -r rg -n -C1 'setup-node|node-version|matrix' || true

echo
echo "== engine-strict config (.npmrc/.pnpmrc/.yarnrc) =="
for f in .npmrc .pnpmrc .yarnrc .yarnrc.yml packageManager.yml; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    sed -n '1,120p' "$f" | cat -n
  fi
done

Repository: rstackjs/rspack-dev-server

Length of output: 8497


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for engine-strict / engines enforcement =="
rg -n --hidden --glob '!.git' 'engine-strict|engine strict|enginesStrict|pnpm.*engine|npm.*engine' .

echo
echo "== Check if README/docs mention supported Node versions =="
rg -n --hidden --glob '!.git' 'Node (>=|js )?(20|22)|node-version|engines\.node|supported Node' README* docs* . || true

Repository: rstackjs/rspack-dev-server

Length of output: 123


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for engine-strict enforcement knobs =="
rg -n --hidden --glob '!.git' 'engine-strict|engineStrict|ENGINES_STRICT' .

echo
echo "== Search for pnpm config section mentioning engines =="
rg -n --hidden --glob '!.git' 'engines' .npmrc .pnpmrc pnpm-workspace.yaml package.json 2>/dev/null || true

Repository: rstackjs/rspack-dev-server

Length of output: 119


Fix Puppeteer/Node engine contract mismatch

package.json declares Node support ^20.19.0 || >=22.12.0 (line 100), but bumping puppeteer to ^25.1.0 (line 80) pulls puppeteer@25.1.0 / puppeteer-core@25.1.0 which require node >=22.12.0 (pnpm-lock.yaml). This repo’s pnpm test runs test:install β†’ scripts/install-puppeteer-browser.mjs, which imports Puppeteer and installs Chrome, so Node 20 contributors are likely to hit install/runtime failures. CI is already pinned to Node 24.16.0 in .github/workflows/test.yml, so the mismatch is primarily for local Node 20 runs.

Remediation options:

  • Pin Puppeteer to a version that supports Node 20 while keeping the current engines.node, or
  • Raise package.json#engines.node to >=22.12.0 (and align any docs/automation) so the declared support matches test/runtime tooling.
πŸ€– 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 80, The puppeteer bump in package.json (the "puppeteer"
dependency) conflicts with the declared engines.node range (engines.node)
because puppeteer@25 requires node >=22.12.0 and our test/install script
(scripts/install-puppeteer-browser.mjs) imports Puppeteer at install time; fix
by either 1) pinning "puppeteer" in package.json to a version that still
supports Node 20 (choose a 24.x release known to support Node 20) so the current
engines.node range remains valid, or 2) raising package.json's engines.node to
">=22.12.0" (and update docs/automation and any developer notes and ensure
.github/workflows/test.yml / CI Node versions align) so the declared node
support matches puppeteer@25; apply only one of these fixes and update
pnpm-lock.yaml by reinstalling dependencies.

"react-refresh": "0.18.0",
"require-from-string": "^2.0.2",
"selfsigned": "^5.5.0",
Expand Down
Loading
Loading