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

fix: cookie being reset on reload in ssg build #3087

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

BobbieGoede
Copy link
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Should resolve #3066, possibly #2984 too but needs testing. The issue seems to be caused by using the cookie by reference on mounted hook instead of value, causing it to use the updated/reset cookie value on load.

Adding tests for an SSG fixture took a while to figure out but it seems to be working, will need to merge this into v8 as well 😥

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

pkg-pr-new bot commented Sep 4, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@nuxtjs/i18n@3087

commit: dc94326

Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!
Thank you so much! 💚

@kazupon kazupon merged commit ec74f56 into nuxt-modules:main Sep 5, 2024
10 checks passed
BobbieGoede added a commit that referenced this pull request Sep 5, 2024
* fix: cookie being reset on reload in ssg build

* test: assert ssg cookie not being reset
antoinezanardi referenced this pull request in antoinezanardi/werewolves-assistant-web-next Sep 10, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@nuxtjs/i18n](https://i18n.nuxtjs.org)
([source](https://github.com/nuxt-community/i18n-module)) |
[`^8.4.0` ->
`^8.5.2`](https://renovatebot.com/diffs/npm/@nuxtjs%2fi18n/8.4.0/8.5.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@nuxtjs%2fi18n/8.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nuxtjs%2fi18n/8.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nuxtjs%2fi18n/8.4.0/8.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nuxtjs%2fi18n/8.4.0/8.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nuxt-community/i18n-module (@&#8203;nuxtjs/i18n)</summary>

###
[`v8.5.2`](https://github.com/nuxt-modules/i18n/releases/tag/v8.5.2)

[Compare
Source](https://github.com/nuxt-community/i18n-module/compare/v8.5.1...v8.5.2)

#####    🐞 Bug Fixes

- Cookie being reset on reload in ssg build  -  by
[@&#8203;BobbieGoede](https://github.com/BobbieGoede) in
[https://github.com/nuxt-modules/i18n/issues/3087](https://github.com/nuxt-modules/i18n/issues/3087)
[<samp>(7ccaf)</samp>](https://github.com/nuxt-modules/i18n/commit/7ccaf160)

#####     [View changes on
GitHub](https://github.com/nuxt-modules/i18n/compare/v8.5.1...v8.5.2)

###
[`v8.5.1`](https://github.com/nuxt-modules/i18n/releases/tag/v8.5.1)

[Compare
Source](https://github.com/nuxt-community/i18n-module/compare/v8.5.0...v8.5.1)

#####    🐞 Bug Fixes

- Resolve plugin type import conflicts by updating module builder  -  by
[@&#8203;danielroe](https://github.com/danielroe) in
[#&#8203;3071](https://github.com/nuxt-community/i18n-module/issues/3071)

#####     [View changes on
GitHub](https://github.com/nuxt-modules/i18n/compare/v8.5.0...v8.5.1)

###
[`v8.5.0`](https://github.com/nuxt-modules/i18n/releases/tag/v8.5.0)

[Compare
Source](https://github.com/nuxt-community/i18n-module/compare/v8.4.0...v8.5.0)

#####    🚀 Features

- Add support for multi domain locales  -  by
[@&#8203;DotwoodMedia](https://github.com/DotwoodMedia),
**Vincent de Vreede** and **DarthGigi** in
[https://github.com/nuxt-modules/i18n/issues/3065](https://github.com/nuxt-modules/i18n/issues/3065)
[<samp>(93d62)</samp>](https://github.com/nuxt-modules/i18n/commit/93d62226)

#####     [View changes on
GitHub](https://github.com/nuxt-modules/i18n/compare/v8.4.0...v8.5.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/antoinezanardi/werewolves-assistant-web-next).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Antoine ZANARDI <antoine.zanardi@epitech.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect browser language not working with strategy no_prefix with SSG
2 participants