Setup NPM properly
Setup NPM properly

Our npm publishing was not working because it was skipping the
lifecycle hooks like `prepare`, `prepack`, `prepublish`, etc... This
was happening because the github actions are running as root on the
docker container, but `npm` opts out of lifecycle hooks when running
as root for security reasons.

This change sets the `unsafe-perm` npm configuration parameter which
opts in to potentially dangerous operations like lifecycle hooks when
running as root.

This actually uncovered a separate problem where we were not
installing dependencies needed to actually run the lifecycle
hooks. For example, the `prepack` hook for microstates does an `npm
build`, but the build requires rollup.

As a result, an npm install is performed before all npm operations.

cowboyd/microstates.js