Skip to content

resolver: throw ERR_INVALID_PACKAGE_CONFIG for malformed package.json - #33890

Closed
robobun wants to merge 12 commits into
mainfrom
farm/7f9b0215/invalid-package-config
Closed

robobun wants to merge 12 commits into
mainfrom
farm/7f9b0215/invalid-package-config

ci: retrigger

e3af988
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 10, 2026 in 19m 45s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/jsc_hooks.rs:3925 nearest_package_json at :3925 also feeds pkg_name for ALWAYS_SYNC_MODULES, not just module_type

Annotations

Check warning on line 3925 in src/runtime/jsc_hooks.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

nearest_package_json at :3925 also feeds pkg_name for ALWAYS_SYNC_MODULES, not just module_type

Nit / for the record: `lr.package_json` populated here also feeds `pkg_name` at :4185-4187 → the `ALWAYS_SYNC_MODULES` check at :4217, not just `module_type` — so with `nearest_package_json`, a nameless intermediate (e.g. `dist/package.json`=`{"type":"commonjs"}`) between the file and the named package root now yields `pkg_name = None` for files in subdirectories beneath it. No observable effect today (only entry is `reflect-metadata`, whose layout is flat), and arguably this makes `pkg_name` *m