refactor: minor changes follows #1348 by SukkaW · Pull Request #1365 · actions/setup-node

@SukkaW

- Only enable package cache when the cache feature is availiable
- We don't read "package.json" if previous version "cache" field is used

AI review requested due to automatic review settings

September 10, 2025 17:29

@SukkaW

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>