diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..abab07f --- /dev/null +++ b/CHANGELOG.md @@ -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 + +*** + +_For changes prior to v4, please refer to the [GitHub Releases](https://github.com/prazdevs/pinia-plugin-persistedstate/releases)_ diff --git a/README.md b/README.md index 61ecab0..a97272a 100644 --- a/README.md +++ b/README.md @@ -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). -

@@ -15,7 +9,7 @@ Configurable persistence and rehydration of Pinia stores.

- npm + npm minizipped size license

@@ -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 diff --git a/package.json b/package.json index c5fb82b..025f0a7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pinia-plugin-persistedstate", "type": "module", - "version": "4.0.0-alpha.11", + "version": "4.0.0", "packageManager": "pnpm@9.9.0", "description": "Configurable persistence and rehydration of Pinia stores.", "author": "Sacha Bouillez (https://praz.dev)", @@ -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",