Call-for-Code-for-Racial-Justice / Five-Fifths-Voter

Five Fifths Voter is a web application tool designed to enable and empower Black people and others to exercise their right to vote by ensuring their voice is heard
Apache License 2.0
67 stars 37 forks source link

Improving project #297

Closed dennybiasiolli closed 2 years ago

dennybiasiolli commented 2 years ago

What did you do?

Updated projects who were using node dependencies.

Why did you do it?

Keeping up-to-date all dependencies and removing error/warnings with deprecated/critical dependencies.

How have you tested it?

I've tested it running all test/build/lint scripts inside package.json files.

Were docs updated if needed?

Type of change

Checklist:

davidnixon commented 2 years ago

yarn: removing all .yarnrc and yarn*.cjs files

Not useful and/or used in the project, it's better to use the official yarn package installed in the system.

https://yarnpkg.com/configuration/yarnrc/#yarnPath

Currently the project is running with yarn 1.x and not 2.x. These files are used to explicitly set the yarn version to yarn-1.22.11.

I would like to upgrade to yarn 2 and use the monorepo support but I have not opened and issue for that either.

davidnixon commented 2 years ago

I don't understand why prettier made changes. When I run the lint check locally I see no issues.

localhost:~/projects/Five-Fifths-Voter/ui$ yarn ci-check yarn run v1.22.11 $ yarn format:diff $ prettier --list-different "src/*/.{js,vue,scss}" ✨ Done in 3.31s.

checking further ...

davidnixon commented 2 years ago

Hmmm the prettier config issue is strange and I had not noticed before some inconsistencies. with a clean repo from the ui dir

localhost:~/projects/Five-Fifths-Voter/ui$ yarn ci-check
yarn run v1.22.11 $ yarn format:diff $ prettier --list-different "src/*/.{js,vue,scss}" ✨ Done in 2.70s

But if I run prettier outside of yarn

localhost:~/projects/Five-Fifths-Voter/ui$ prettier --list-different "src/*/.{js,vue,scss}"
src/components/Absentee/Absentee.vue src/components/AppHeader/AppHeader.vue src/components/BallotReturn/BallotReturn.vue src/components/Countdown/Countdown.vue src/components/EarlyVoting/EarlyVoting.vue src/components/Hero/Hero.vue src/components/MainContent/MainContent.vue src/components/Maps/constants/mapSettings.js src/components/Maps/GoogleMap.vue src/components/Maps/GoogleMapLoader.vue src/components/Maps/GoogleMapMarker.vue src/components/MarkDown/MarkDown.vue src/components/PageLayout/PageLayout.vue src/components/Register/Register.vue src/components/TwitterChatter/TwitterChatter.vue src/components/VoteNow/VoteNow.vue src/main.js src/plugins/i18n.js src/router.js src/views/ConnectPage/ConnectPage.vue src/views/JourneyPage/JourneyPage.vue src/views/LandingPage/LandingPage.vue src/views/NotFoundPage/NotFoundPage.vue src/views/RatePage/RatePage.vue src/views/SupportPage/SupportPage.vue src/views/WhyVotePage/WhyVotePage.vue

I'm not sure what is happening here but checking ...

dennybiasiolli commented 2 years ago

Hmmm the prettier config issue is strange and I had not noticed before some inconsistencies. with a clean repo from the ui dir

localhost:~/projects/Five-Fifths-Voter/ui$ yarn ci-check ...

But if I run prettier outside of yarn

... I'm not sure what is happening here but checking ...

Yarn executes the local version of prettier (inside node_modules) if present, running the prettier command will use the globally installed version. Maybe they are different, this is the reason I never use globally installed packages.

For other changes, I'll make the required changes tomorrow 😉

dennybiasiolli commented 2 years ago

Currently the project is running with yarn 1.x and not 2.x. These files are used to explicitly set the yarn version to yarn-1.22.11.

Yes, but it's strange that in the repo there are four copies of yarn-1.22.11.cjs file, 4.9MB each. I solved with a commit referencing to the root yarn-1.22.11.cjs file instead of duplicating each one. We can also update to yarn-1.22.11.cjs launching yarn set version 1 in the root directory.