From e9ce9c8ec098bde0f4ef10d81b3ea73207d58867 Mon Sep 17 00:00:00 2001
From: Eduardo San Martin Morote
Date: Thu, 30 Jan 2025 17:31:53 +0100
Subject: [PATCH 01/11] docs: update prop comment
Close #2899
---
packages/docs/core-concepts/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/docs/core-concepts/index.md b/packages/docs/core-concepts/index.md
index f3cc3eee92..06f73d3d41 100644
--- a/packages/docs/core-concepts/index.md
+++ b/packages/docs/core-concepts/index.md
@@ -129,7 +129,7 @@ You can define as many stores as you want and **you should define each store in
Once the store is instantiated, you can access any property defined in `state`, `getters`, and `actions` directly on the store. We will look at these in detail in the next pages but autocompletion will help you.
-Note that `store` is an object wrapped with `reactive`, meaning there is no need to write `.value` after getters but, like `props` in `setup`, **we cannot destructure it**:
+Note that `store` is an object wrapped with `reactive`, meaning there is no need to write `.value` after getters but, like any `reactive()` object in Vue, [**we lose reactivity when destructuring it**](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#limitations-of-reactive):
```vue
+
+
+
+
Count: {{ counter.$state.count }}
+
+
+
diff --git a/packages/nuxt/test/nuxt.spec.ts b/packages/nuxt/test/nuxt.spec.ts
index ac5e0b4da1..4ae0c720f9 100644
--- a/packages/nuxt/test/nuxt.spec.ts
+++ b/packages/nuxt/test/nuxt.spec.ts
@@ -37,4 +37,8 @@ describe('Nuxt', async () => {
it('can auto import from layers', async () => {
expect(await $fetch('/')).toContain('Layer store: 0')
})
+
+ it('throws an error server-side when the nuxt context is not available', async () => {
+ await expect($fetch('/usage-after-await')).rejects.toThrow()
+ })
})
From f14eb5666c4af786fe453a4aac39f9f563084a45 Mon Sep 17 00:00:00 2001
From: Paul Guilbert
Date: Fri, 13 Dec 2024 18:02:00 +0100
Subject: [PATCH 07/11] test: improve tests
---
packages/nuxt/playground/pages/usage-after-await.vue | 7 +++++++
packages/nuxt/test/nuxt.spec.ts | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/packages/nuxt/playground/pages/usage-after-await.vue b/packages/nuxt/playground/pages/usage-after-await.vue
index adc86268d0..64af35d2ed 100644
--- a/packages/nuxt/playground/pages/usage-after-await.vue
+++ b/packages/nuxt/playground/pages/usage-after-await.vue
@@ -6,6 +6,13 @@ const useFancyCounter = async () => {
return useCounter()
}
+const event = useRequestEvent()
+useNuxtApp().hook('vue:error', (error) => {
+ if (event) {
+ setResponseStatus(event, 500, String(error))
+ }
+})
+
const counter = await useFancyCounter()
diff --git a/packages/nuxt/test/nuxt.spec.ts b/packages/nuxt/test/nuxt.spec.ts
index 4ae0c720f9..6978977cd2 100644
--- a/packages/nuxt/test/nuxt.spec.ts
+++ b/packages/nuxt/test/nuxt.spec.ts
@@ -39,6 +39,8 @@ describe('Nuxt', async () => {
})
it('throws an error server-side when the nuxt context is not available', async () => {
- await expect($fetch('/usage-after-await')).rejects.toThrow()
+ await expect($fetch('/usage-after-await')).rejects.toThrowError(
+ '[nuxt] instance unavailable'
+ )
})
})
From dfe8589137cfec82de64334cd7f3ac87e240db52 Mon Sep 17 00:00:00 2001
From: Paul Guilbert
Date: Fri, 2 May 2025 15:18:52 +0200
Subject: [PATCH 08/11] feat: use pinia instance from nuxt only in dev mode
---
packages/nuxt/global.d.ts | 2 ++
packages/nuxt/tsconfig.json | 1 +
2 files changed, 3 insertions(+)
create mode 100644 packages/nuxt/global.d.ts
diff --git a/packages/nuxt/global.d.ts b/packages/nuxt/global.d.ts
new file mode 100644
index 0000000000..cc0c1cb92a
--- /dev/null
+++ b/packages/nuxt/global.d.ts
@@ -0,0 +1,2 @@
+// Global compile-time constants
+declare var __TEST__: boolean
diff --git a/packages/nuxt/tsconfig.json b/packages/nuxt/tsconfig.json
index 3666c452fc..9fc3ea221f 100644
--- a/packages/nuxt/tsconfig.json
+++ b/packages/nuxt/tsconfig.json
@@ -2,6 +2,7 @@
"extends": "./playground/.nuxt/tsconfig.json",
"include": [
"./shims.d.ts",
+ "./global.d.ts",
// missing in the playground
"./src"
]
From 068e5128a158e6f89e2e773ec488d850cb77dc10 Mon Sep 17 00:00:00 2001
From: Eduardo San Martin Morote
Date: Mon, 3 Nov 2025 14:33:07 +0100
Subject: [PATCH 09/11] chore: restore
---
README.md | 6 +++---
packages/docs/.vitepress/config/shared.ts | 9 +++++----
scripts/release.mjs | 3 ++-
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index a4bdb4f0a1..ad41fe2479 100644
--- a/README.md
+++ b/README.md
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/packages/docs/.vitepress/config/shared.ts b/packages/docs/.vitepress/config/shared.ts
index 4528cbe64a..c29b80f354 100644
--- a/packages/docs/.vitepress/config/shared.ts
+++ b/packages/docs/.vitepress/config/shared.ts
@@ -133,11 +133,12 @@ export const sharedConfig = defineConfig({
},
search: {
- provider: 'local',
+ provider: 'algolia',
options: {
- locales: {
- ...zhSearch,
- },
+ appId: '69Y3N7LHI2',
+ apiKey: '45441f4b65a2f80329fd45c7cb371fea',
+ indexName: 'pinia',
+ locales: { ...zhSearch },
},
},
diff --git a/scripts/release.mjs b/scripts/release.mjs
index 501141d785..bb41954f0f 100644
--- a/scripts/release.mjs
+++ b/scripts/release.mjs
@@ -8,6 +8,7 @@ import semver from 'semver'
import prompts from '@posva/prompts'
import { execa } from 'execa'
import pSeries from 'p-series'
+import { globby } from 'globby'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
@@ -15,7 +16,7 @@ const __dirname = dirname(__filename)
const args = minimist(process.argv.slice(2))
const {
skipBuild,
- tag: optionTag = 'legacy',
+ tag: optionTag,
dry: isDryRun,
skipCleanCheck: skipCleanGitCheck,
noDepsUpdate,
From 5e742480fd74b37c60705ce5e4119bd42a74923b Mon Sep 17 00:00:00 2001
From: Eduardo San Martin Morote
Date: Mon, 3 Nov 2025 14:33:47 +0100
Subject: [PATCH 10/11] chore: restore
---
packages/docs/core-concepts/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/docs/core-concepts/index.md b/packages/docs/core-concepts/index.md
index 06f73d3d41..f3cc3eee92 100644
--- a/packages/docs/core-concepts/index.md
+++ b/packages/docs/core-concepts/index.md
@@ -129,7 +129,7 @@ You can define as many stores as you want and **you should define each store in
Once the store is instantiated, you can access any property defined in `state`, `getters`, and `actions` directly on the store. We will look at these in detail in the next pages but autocompletion will help you.
-Note that `store` is an object wrapped with `reactive`, meaning there is no need to write `.value` after getters but, like any `reactive()` object in Vue, [**we lose reactivity when destructuring it**](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#limitations-of-reactive):
+Note that `store` is an object wrapped with `reactive`, meaning there is no need to write `.value` after getters but, like `props` in `setup`, **we cannot destructure it**:
```vue