Skip to content

Commit 9084a99

Browse files
authored
Merge branch 'v3' into fix/devtools
2 parents 89ac583 + e3b5f6d commit 9084a99

File tree

150 files changed

+2688
-5979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+2688
-5979
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Question
4-
url: https://github.com/vuejs/pinia/discussions/new?category=Q-A
5-
about: Ask a question or discuss about Pinia
6-
- name: Paid consultation
3+
- name: 👨‍💻 Support
74
url: https://cal.com/posva/consultancy
85
about: Get direct help from the author of Pinia with your project
9-
- name: Ideas
6+
- name: 🔧 Vue 2 Official Support
7+
url: https://cal.com/posva/consultancy
8+
about: Is your project still on Vue 2? Get official support
9+
- name: ❓ Questions
10+
url: https://github.com/vuejs/pinia/discussions/new?category=Q-A
11+
about: Ask a question or discuss about Pinia
12+
- name: 💡 Ideas
1013
url: https://github.com/vuejs/pinia/discussions/new?category=Ideas
1114
about: Start a discussion to improve Pinia
12-
- name: GitHub Sponsors
15+
- name: 🌟 GitHub Sponsors
1316
url: https://github.com/sponsors/posva
1417
about: Like this project? Please consider supporting the author.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'packages/docs/**'
77
- 'packages/playground/**'
88
pull_request:
9-
branches: v2
9+
branches: [v2, v3]
1010
paths-ignore:
1111
- 'packages/docs/**'
1212
- 'packages/playground/**'

.github/workflows/pkg.pr.new.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@ name: Publish Any Commit
22

33
on:
44
pull_request:
5-
branches: v2
5+
branches: [v2, v3]
66
paths-ignore:
7-
- 'packages/docs/**'
8-
- 'packages/playground/**'
7+
- 'packages/docs/**'
8+
- 'packages/playground/**'
99

1010
push:
1111
branches:
12-
- '**'
12+
- '**'
1313
tags:
14-
- '!**'
14+
- '!**'
1515
paths-ignore:
16-
- 'packages/docs/**'
17-
- 'packages/playground/**'
16+
- 'packages/docs/**'
17+
- 'packages/playground/**'
1818

1919
jobs:
2020
build:
2121
runs-on: ubuntu-latest
2222

2323
steps:
24-
- name: Checkout code
25-
uses: actions/checkout@v4
26-
with:
27-
fetch-depth: 0
28-
- uses: pnpm/action-setup@v4
29-
- uses: actions/setup-node@v4
30-
with:
31-
node-version: lts/*
32-
cache: pnpm
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- uses: pnpm/action-setup@v4
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: lts/*
32+
cache: pnpm
3333

34-
- name: Install
35-
run: pnpm install --frozen-lockfile
34+
- name: Install
35+
run: pnpm install --frozen-lockfile
3636

37-
- name: Build
38-
run: pnpm build
37+
- name: Build
38+
run: pnpm build
3939

40-
- name: Release
41-
run: pnpm dlx pkg-pr-new publish --compact --pnpm './packages/*'
40+
- name: Release
41+
run: pnpm dlx pkg-pr-new publish --compact --pnpm './packages/*'

.github/workflows/release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
tags:
4-
- 'pinia@*' # Push events to matching v*, i.e. v1.0, v20.15.10
4+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
55

66
name: Create Release
77

README.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- 📦 Extremely light
2424
- ⛰️ Nuxt Module
2525

26-
Pinia works with both Vue 2 and Vue 3.
26+
The latest version of pinia works with Vue 3. See the branch [v2](https://github.com/vuejs/pinia/tree/v2) for a version that works with Vue 2.
2727

2828
Pinia is the most similar English pronunciation of the word _pineapple_ in Spanish: _piña_. A pineapple is in reality a group of individual flowers that join together to create a multiple fruit. Similar to stores, each one is born individually, but they are all connected at the end. It's also a delicious tropical fruit indigenous to South America.
2929

@@ -111,12 +111,6 @@ A few notes about the project and possible questions:
111111
npm install pinia
112112
```
113113

114-
If you are using Vue <2.7, make sure to install latest `@vue/composition-api`:
115-
116-
```bash
117-
npm install pinia @vue/composition-api
118-
```
119-
120114
## Usage
121115

122116
### Install the plugin
@@ -136,23 +130,6 @@ app.use(pinia)
136130
app.mount('#app')
137131
```
138132

139-
```js
140-
// Vue 2
141-
import { createPinia, PiniaVuePlugin } from 'pinia'
142-
143-
Vue.use(PiniaVuePlugin)
144-
const pinia = createPinia()
145-
146-
new Vue({
147-
el: '#app',
148-
// other options...
149-
// ...
150-
// note the same `pinia` instance can be used across multiple Vue apps on
151-
// the same page
152-
pinia,
153-
})
154-
```
155-
156133
For more detailed instructions, including [Nuxt configuration](https://pinia.vuejs.org/ssr/nuxt.html#nuxt-js), check the [Documentation](https://pinia.vuejs.org).
157134

158135
### Create a Store

SECURITY.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
This is the list of versions of Pinia which are
66
currently being supported with security updates.
77

8-
| Version | Supported |
9-
| ------------------ | ------------------ |
10-
| 2.1.x | :white_check_mark: |
11-
| &lt;2.1 | :x: |
8+
| Version | Supported |
9+
| --------- | ------------------ |
10+
| 2.2.x | :white_check_mark: |
11+
| &lt;2.2.0 | :x: |
1212

1313
## Reporting a Vulnerability
1414

15-
To report a vulnerability, please email the details to [email protected].
15+
To report a vulnerability, please email the details to <[email protected]>.
1616

1717
When a vulnerability is reported, it immediately becomes our top concern, with a full-time contributor dropping everything to work on it.
1818

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pinia/root",
3-
"packageManager": "pnpm@9.13.2",
3+
"packageManager": "pnpm@10.2.0",
44
"type": "module",
55
"private": true,
66
"workspaces": [
@@ -31,36 +31,36 @@
3131
"devDependencies": {
3232
"@posva/prompts": "^2.4.4",
3333
"@rollup/plugin-alias": "^5.1.0",
34-
"@rollup/plugin-commonjs": "^28.0.1",
35-
"@rollup/plugin-node-resolve": "^15.2.3",
36-
"@rollup/plugin-replace": "^6.0.1",
34+
"@rollup/plugin-commonjs": "^28.0.2",
35+
"@rollup/plugin-node-resolve": "^16.0.0",
36+
"@rollup/plugin-replace": "^6.0.2",
3737
"@rollup/plugin-terser": "^0.4.4",
3838
"@types/lodash.kebabcase": "^4.1.9",
39-
"@types/node": "^20.14.12",
40-
"@vitest/coverage-v8": "^2.1.5",
41-
"@vitest/ui": "^2.1.5",
39+
"@types/node": "^22.13.1",
40+
"@vitest/coverage-v8": "^3.0.5",
41+
"@vitest/ui": "^3.0.5",
4242
"@vue/compiler-sfc": "~3.5.13",
4343
"@vue/server-renderer": "~3.5.13",
44-
"chalk": "^5.3.0",
44+
"chalk": "^5.4.1",
4545
"conventional-changelog-cli": "^2.2.2",
46-
"execa": "^9.5.1",
46+
"execa": "^9.5.2",
4747
"globby": "^14.0.1",
48-
"happy-dom": "^15.11.6",
49-
"lint-staged": "^15.2.10",
48+
"happy-dom": "^16.8.1",
49+
"lint-staged": "^15.4.3",
5050
"lodash.kebabcase": "^4.1.1",
5151
"minimist": "^1.2.8",
5252
"p-series": "^3.0.0",
5353
"pascalcase": "^2.0.0",
54-
"prettier": "^3.3.3",
54+
"prettier": "^3.4.2",
5555
"rimraf": "^6.0.1",
56-
"rollup": "^4.22.5",
56+
"rollup": "^4.34.2",
5757
"rollup-plugin-typescript2": "^0.36.0",
58-
"semver": "^7.6.3",
58+
"semver": "^7.7.1",
5959
"simple-git-hooks": "^2.11.1",
60-
"typedoc": "^0.26.11",
61-
"typedoc-plugin-markdown": "^4.2.10",
62-
"typescript": "~5.6.3",
63-
"vitest": "^2.1.5",
60+
"typedoc": "^0.27.6",
61+
"typedoc-plugin-markdown": "~4.4.1",
62+
"typescript": "~5.7.3",
63+
"vitest": "^3.0.5",
6464
"vue": "~3.5.13"
6565
},
6666
"simple-git-hooks": {

packages/docs/.vitepress/config/en.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
2+
import typedocSidebar from '../../api/typedoc-sidebar.json'
23

34
export const META_URL = 'https://pinia.vuejs.org'
45
export const META_TITLE = 'Pinia 🍍'
@@ -48,23 +49,17 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4849
},
4950
],
5051
},
52+
{
53+
text: 'v3.x',
54+
items: [{ text: 'v2.x', link: 'https://v2.pinia.vuejs.org' }],
55+
},
5156
],
5257

5358
sidebar: {
5459
'/api/': [
5560
{
56-
text: 'packages',
57-
items: [
58-
{ text: 'pinia', link: '/api/pinia/' },
59-
{
60-
text: '@pinia/nuxt',
61-
link: '/api/@pinia/nuxt/',
62-
},
63-
{
64-
text: '@pinia/testing',
65-
link: '/api/@pinia/testing/',
66-
},
67-
],
61+
text: 'API',
62+
items: typedocSidebar,
6863
},
6964
],
7065
// catch-all fallback
@@ -141,6 +136,10 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
141136
text: 'VSCode Snippets',
142137
link: '/cookbook/vscode-snippets.html',
143138
},
139+
{
140+
text: 'Migration from v2 to v3',
141+
link: '/cookbook/migration-v2-v3.html',
142+
},
144143
{
145144
text: 'Migration from v0/v1 to v2',
146145
link: '/cookbook/migration-v1-v2.html',

packages/docs/.vitepress/config/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const sharedConfig = defineConfig({
128128
},
129129

130130
editLink: {
131-
pattern: 'https://github.com/vuejs/pinia/edit/v2/packages/docs/:path',
131+
pattern: 'https://github.com/vuejs/pinia/edit/v3/packages/docs/:path',
132132
text: 'Suggest changes',
133133
},
134134

packages/docs/.vitepress/config/zh.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
5858
},
5959
],
6060
},
61+
{
62+
text: 'v3.x',
63+
items: [{ text: 'v2.x', link: 'https://v2.pinia.vuejs.org' }],
64+
},
6165
],
6266
sidebar: {
6367
'/zh/api/': [

0 commit comments

Comments
 (0)