Skip to content

Commit

Permalink
chore(release): v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prazdevs committed Sep 4, 2024
1 parent 79b7338 commit 67f9664
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 10 deletions.
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

## v4.0.0

### 🚀 Enhancements

- Support excluding paths from persistence with `omit` option
- Support autocompletion for dot-notation paths in `pick` and `omit` options
- ⚠️ Rehydrate only picked/omitted paths (when specified) instead of the whole state
- ⚠️ Drop global `beforeRestore` and `afterRestore` options
- ⚠️ Drop `auto` mode
- **nuxt:** Include Nuxt module in the base package
- **nuxt:** Add global `key` option using template string

### 🔥 Performance

- Deserialize with `destr` instead of `JSON.parse`

### 🩹 Fixes

- **nuxt:** Improve SSR handling and store hdyration/persistence behavior in route middleware

### 💅 Refactors

- ⚠️ Rename `paths` option to `pick`
- ⚠️ Rename `beforeRestore` and `afterRestore` options to `beforeHydrate` and `afterHydrate`
- **nuxt:** ⚠️ Rename auto-imported storage object to `piniaPluginPersistedstate`
- **nuxt:** ⚠️ Rename Nuxt config option key to `piniaPluginPersistedstate`

### 📖 Documentation

- Rewrite documentation to match v4 API
- Add references and links to Nuxt-specific details and implementations

### 📦 Build

- Build standalone from Nuxt module's runtime

### 🎨 Styles

- Add a new identity and logo to the project

#### ⚠️ Breaking Changes

- ⚠️ Rehydrate only picked/omitted paths (when specified) instead of the whole state
- ⚠️ Drop global `beforeRestore` and `afterRestore` options
- ⚠️ Drop `auto` mode
- ⚠️ Rename `paths` option to `pick`
- ⚠️ Rename `beforeRestore` and `afterRestore` options to `beforeHydrate` and `afterHydrate`
- **nuxt:** ⚠️ Rename auto-imported storage object to `piniaPluginPersistedstate`
- **nuxt:** ⚠️ Rename Nuxt config option key to `piniaPluginPersistedstate`

### ❤️ Contributors

- Prazdevs <[email protected]>

***

_For changes prior to v4, please refer to the [GitHub Releases](https://github.com/prazdevs/pinia-plugin-persistedstate/releases)_
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
> [!IMPORTANT]
> With the upcoming v4, we are looking for contributors willing to help translate the documentation, especially Chinese, to improve developer experience! 🙏
> [!WARNING]
> You are currently viewing upcoming v4 of the package. If you are looking for v3, look into the [v3 branch](https://github.com/prazdevs/pinia-plugin-persistedstate/tree/v3).
<p align="center">
<img src="https://raw.githubusercontent.com/prazdevs/pinia-plugin-persistedstate/main/docs/public/logo-dark.svg" style="width: 100px">
</p>
Expand All @@ -15,7 +9,7 @@
Configurable persistence and rehydration of Pinia stores.
</p>
<p align="center">
<a href="https://npmjs.com/package/pinia-plugin-persistedstate"><img src="https://img.shields.io/npm/v/pinia-plugin-persistedstate/alpha?style=flat-square&labelColor=313244&color=cba6f7" alt="npm"></a>
<a href="https://npmjs.com/package/pinia-plugin-persistedstate"><img src="https://img.shields.io/npm/v/pinia-plugin-persistedstate?style=flat-square&labelColor=313244&color=cba6f7" alt="npm"></a>
<a href="https://bundlephobia.com/result?p=pinia-plugin-persistedstate"><img src="https://img.shields.io/bundlephobia/minzip/pinia-plugin-persistedstate?style=flat-square&labelColor=313244&color=cba6f7" alt="minizipped size"></a>
<a href="https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/LICENSE"><img src="https://img.shields.io/github/license/prazdevs/pinia-plugin-persistedstate?style=flat-square&labelColor=313244&color=cba6f7" alt="license"></a>
</p>
Expand All @@ -27,7 +21,7 @@

- Persist Pinia stores with a friendly API inspired by [`vuex-persistedstate`](https://github.com/robinvdvleuten/vuex-persistedstate).
- Highly customizable (storage, serializer, paths picking/omitting).
- Out of the box SSR-friendly support for [`nuxt`]().
- Out of the box SSR-friendly support for [`Nuxt`](#usage-with-nuxt).
- Very smol (<2kB minzipped).

## Quickstart
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pinia-plugin-persistedstate",
"type": "module",
"version": "4.0.0-alpha.11",
"version": "4.0.0",
"packageManager": "[email protected]",
"description": "Configurable persistence and rehydration of Pinia stores.",
"author": "Sacha Bouillez <[email protected]> (https://praz.dev)",
Expand Down Expand Up @@ -60,7 +60,7 @@
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
"release": "changelogen --release",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
Expand Down

0 comments on commit 67f9664

Please sign in to comment.