This function will be much simpler once we merge in the read-package-json/normalize-package-data stuff that @meryn is working on.