Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cookie-universal-nuxt with a more generic library #11321

Closed
cnotv opened this issue Jul 1, 2024 · 4 comments · Fixed by #11354
Closed

Replace cookie-universal-nuxt with a more generic library #11321

cnotv opened this issue Jul 1, 2024 · 4 comments · Fixed by #11354
Assignees
Labels
Milestone

Comments

@cnotv
Copy link
Contributor

cnotv commented Jul 1, 2024

Description

Some logic has also been removed from a removal attempt of cookie-universal-nuxt (#11272).
As this creates several issues, we want to replace it with cookie-universal (found by @rak-phillip).

Logic replacement to be discussed/handled with #11392

@cnotv cnotv added the kind/tech-debt Technical debt label Jul 1, 2024
@cnotv cnotv added this to the v2.10.0 milestone Jul 1, 2024
@rak-phillip rak-phillip self-assigned this Jul 2, 2024
@rak-phillip
Copy link
Member

@cnotv can you expand on the issues that were observed with cookies-universal-nuxt so that I can better understand how to address this issue?

The underlying cookie-universal and others all appear to utilize a similar pattern when working with cookies (e.g. cookies.get(), cookies.set())123

Footnotes

  1. https://github.com/microcipcip/cookie-universal/tree/master/packages/cookie-universal#api

  2. https://github.com/js-cookie/js-cookie?tab=readme-ov-file#basic-usage

  3. https://github.com/bendotcodes/cookies/tree/main/packages/universal-cookie#browser-example

@cnotv
Copy link
Contributor Author

cnotv commented Jul 4, 2024

At the current state, I just found out that this library is set to keep cookies data updated into the global.
As you said, it should not be more than set/get.

@nwmac nwmac modified the milestones: v2.10.0, v2.11.0 Jul 4, 2024
@rak-phillip
Copy link
Member

@cnotv and I had an out of band discussion on this. The existing approach in #11354 should satisfy our need to remove nuxt dependencies, but we might want to follow-up in a separate PR to address using the inject pattern with cookies. The implementation in #11354 has been tested and confirmed to be working in Vue3, so a larger refactor away from the inject pattern shouldn't be required for the near-term.

@cnotv
Copy link
Contributor Author

cnotv commented Jul 9, 2024

I rephrase this issue to match to actual final implementation.

@cnotv cnotv changed the title Replace $cookies global and related logic Replace cookie-universal-nuxt with a more generic library Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants