Return an empty object when no `package.json` is found

This prevents the warning to be reprted everytime `cfg.post` is
called; only the first time is reported.