fix(npm): match peer fallbacks when checking peer resolution cache (#36607)