dayhaysoos / use-shopping-cart

Shopping cart state and logic for Stripe
MIT License
907 stars 118 forks source link

migrated to pnpm, next-js example, fixed warning #310

Closed dayhaysoos closed 1 year ago

dayhaysoos commented 1 year ago

Overview

This is a PR that addresses quite a few things:

  1. The original purpose of this repo was to get rid of yarn in favor of pnpm for managing dependencies and workspaces.

There's definitely still some work to do. rollup -c -w command doesn't work as well anymore. This allowed me to make updates to the library and see the changes get reflected. Right now, I have to manually update the bundle myself with rollup -c and switch back and switch back to run the server again. Not sure how to fix this but I'll look into it.

  1. I finally addressed the warning that always got thrown in Next.js. Don't really need a review here because it was a one-liner that I sat on for about 2 years

  2. Added a nextjs example to the examples folder, shout outs to @lmac-1 for her amazing starter repo. I pretty much dropped it in there.

Concerns

Ripping out yarn and migrating to pnpm is kinda scary. I still have a lot of errors/warnings being thrown by pnpm. So far, things are working better than they did before so that's a great sign, but not sure if this is safe enough to merge into master (I need to change to main soon).

Any insight would be appreciated.

dayhaysoos commented 1 year ago

Right now the only thing that doesn't work is Gatsby but I'm okay with it for the time being.

gudatcomputers commented 1 year ago

getting some errors trying to run commands on this branch npm test and pnpm test produces

Screenshot 2023-03-05 at 10 19 21 PM

npm run dev:cra produces

Screenshot 2023-03-05 at 10 22 05 PM Screenshot 2023-03-05 at 10 22 12 PM
alec-bfa commented 1 year ago

Glad to see this merged. Will there be a new release soon @dayhaysoos ?

dayhaysoos commented 1 year ago

Hey @alec-bfa, I did the new release right after this merge!

alec-bfa commented 1 year ago

Oh I missed it since I saw the latest release in github was from 2021. Thanks!