Reads the file, passes its content to the updater, and writes the result as
writePackageJson does. The updater changes the object in place or
returns a new one, so it can also remove keys or replace arrays.
Parameters
path: string
The path to the package.json file or its directory.
Updates an existing package.json file.
Reads the file, passes its content to the updater, and writes the result as writePackageJson does. The updater changes the object in place or returns a new one, so it can also remove keys or replace arrays.