Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move react-scripts & node-sass to devDependencies
Last week, our builds started failing because of a vulnerability in `react-scripts` and `node-sass`, and we have a Danger rule to run `yarn audit` on the packages in the `dependencies` section. The vulnerabilities haven't been fixed yet, and so to allow us to merge PRs, we temporarily disabled the `checkYarnAudit` function in `dangerfile.ts`. While looking at the GitHub issues for these vulnerabilities that were linked in our SEV-4 incident Google Doc, I came across this [interesting comment](facebook/create-react-app#11092 (comment)) that says that in the `facebook/create-react-app` package, `react-scripts` should be listed in `devDependencies`, not `dependencies`. That got me thinking whether the packages in our `dependencies` section really belong there. AFAIK, sass is used in development and then gets compiled to CSS when the client is built. It doesn't get used at runtime. Similarly, `react-scripts` seems to be a development tool we use to run `yarn build | eject | start | test`. After putting both `node-sass` and `react-scripts` in `devDependencies`, I deployed the app using our review bot and everything seems fine. This allows us to turn the yarn audit check back on.
- Loading branch information