RefugeRestrooms / refugerestrooms

REFUGE restrooms indexes and maps safe restroom locations for trans, intersex, and gender nonconforming individuals.
http://www.refugerestrooms.org
GNU Affero General Public License v3.0
893 stars 261 forks source link

Finish Upgrading Webpacker to v5 #637

Closed DeeDeeG closed 4 years ago

DeeDeeG commented 4 years ago

Context

Summary of Changes

Checklist

DeeDeeG commented 4 years ago

Planning to merge this today, and then re-work #636 on top of this.

This Pull Request incidentally makes sure we can install JS dependencies with custom resolutions (a Yarn feature). Which will be helpful for #636.

(Without that, and taking advantage of the custom Yarn dependency resolutions, we would be unable to run Refuge locally/in Docker under the development Rails environment setting. There would be a complaint about "Your Yarn packages are out of date! Please run yarn install to update."

The "integrity check" is something the Yarn developers advocate not doing, because it's old, deprecated code, and the checks it does aren't really necessary. It's dropped from the next major version of Yarn, Yarn 2.0. If you have a lockfile, as we do at this repository, the proper way to do this would be yarn install --frozen-lockfile. For more details about why webpacker dropped the dubious "integrity check", see: https://github.com/rails/webpacker/pull/2518)

DeeDeeG commented 4 years ago

Also commenting this for the record:

There is a proper process to upgrade Webpacker (as others have done before at this repo). For the sake of documenting this, the proper process is: