pinia-plugin-subscription 0.1.7-beta.1 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/README.md +1 -7
- package/dist/chunks/{index-ByASkYCc.js → index-B-zO0yrr.js} +1 -1
- package/dist/{plugins/pluginSubscriber.d.ts → core/PluginSubscriber.d.ts} +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers.js +1 -1
- package/dist/lib/main.d.ts +2 -2
- package/dist/pinia-plugin-subscription.js +4 -4
- package/dist/types/plugin.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/{plugins/pluginSubscription.d.ts → core/PluginSubscription.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.8]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Added `onError` parameter to `storeOnActionSubscription` method
|
|
12
|
+
- Added `onError` property to `StoreOnActionCallbackParameters` interface
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Changing the directory structure
|
|
16
|
+
|
|
8
17
|
## [0.1.7]
|
|
9
18
|
|
|
10
19
|
### Changed
|
|
@@ -14,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
23
|
- Tightened internal store checks to avoid `hasOwnProperty` collisions.
|
|
15
24
|
- Reduced library bundle overhead by stripping the Vue plugin from the library build and treeshaking the published bundle more aggressively.
|
|
16
25
|
- Added additive sub-exports for helper-only imports and a strict type-only public surface to keep the core API stable while improving bundle clarity.
|
|
17
|
-
- Added a real bundle-size check command to measure the emitted output before deciding whether a heavier split is justified
|
|
26
|
+
- Added a real bundle-size check command to measure the emitted output before deciding whether a heavier split is justified : `npm run bundle:check`.
|
|
18
27
|
- Documented Nuxt / SSR best practices for `hydration: 'defer'`, `runtimeEnvironment`, and browser-only access in hydrated stores.
|
|
19
28
|
|
|
20
29
|
## [0.1.6]
|
package/README.md
CHANGED
|
@@ -28,12 +28,6 @@ For type-only imports, prefer the dedicated public types entry:
|
|
|
28
28
|
import type { PluginSubscriptionOptions } from 'pinia-plugin-subscription/types'
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
The project also includes a bundle check command to measure the real output size before introducing a heavier split strategy:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm run bundle:check
|
|
35
|
-
```
|
|
36
|
-
|
|
37
31
|
```typescript
|
|
38
32
|
import { createApp } from 'vue'
|
|
39
33
|
import { createPinia } from 'pinia'
|
|
@@ -251,7 +245,7 @@ An object with at least an `invoke(context: PiniaPluginContext, debug?: boolean)
|
|
|
251
245
|
|
|
252
246
|
## The `PluginSubscriber` Abstract Class
|
|
253
247
|
|
|
254
|
-
The project provides an abstract `PluginSubscriber` implementation (see [src/
|
|
248
|
+
The project provides an abstract `PluginSubscriber` implementation (see [src/core/PluginSubscriber.ts](src/core/PluginSubscriber.ts)) to simplify creating reusable subscribers.
|
|
255
249
|
|
|
256
250
|
**Typical usage:**
|
|
257
251
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Store from "
|
|
1
|
+
import Store from "./Store";
|
|
2
2
|
import type { PiniaPluginContext, Store as PiniaStore } from "pinia";
|
|
3
3
|
import type { AnyObject } from "../types";
|
|
4
4
|
import type { PluginExecutionOptions, PluginHydrationScheduler, PluginSubscriber as PluginSubscriberInterface, PluginSubscriptions, StoreMutationSubscription, StoreOnActionSubscription } from "../types/plugin";
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as PluginSubscriber } from '../
|
|
1
|
+
export { default as PluginSubscriber } from '../core/PluginSubscriber';
|
|
2
2
|
export { default as Store } from '../core/Store';
|
|
3
3
|
export { CustomConsole } from '../system/log';
|
|
4
4
|
export { isEmpty } from '../utils/validation';
|
package/dist/helpers.js
CHANGED
package/dist/lib/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PluginSubscriber from '../
|
|
2
|
-
import PluginSubscription from '../
|
|
1
|
+
import PluginSubscriber from '../core/PluginSubscriber';
|
|
2
|
+
import PluginSubscription from '../core/PluginSubscription';
|
|
3
3
|
import Store from '../core/Store';
|
|
4
4
|
export { createPlugin } from "../plugins/createPlugin";
|
|
5
5
|
export { createHydrationPlugin } from "../plugins/createHydrationPlugin";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var S = Object.defineProperty;
|
|
2
2
|
var y = (r, o, e) => o in r ? S(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
3
3
|
var c = (r, o, e) => y(r, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { D as g, i as l, P as _ } from "./chunks/index-
|
|
5
|
-
import { C as w, p as O, a as j, S as x, d as H, b as K, g as R, c as M, e as L, s as T } from "./chunks/index-
|
|
4
|
+
import { D as g, i as l, P as _ } from "./chunks/index-B-zO0yrr.js";
|
|
5
|
+
import { C as w, p as O, a as j, S as x, d as H, b as K, g as R, c as M, e as L, s as T } from "./chunks/index-B-zO0yrr.js";
|
|
6
6
|
const f = "PluginSubscription", m = {
|
|
7
7
|
environment: "both",
|
|
8
8
|
hydration: "immediate"
|
|
@@ -193,8 +193,8 @@ class p extends g {
|
|
|
193
193
|
}
|
|
194
194
|
storeOnActionSubscription(e) {
|
|
195
195
|
const { store: i, callback: t } = e();
|
|
196
|
-
i.$onAction(({ after: s, args: n, name: d }) => {
|
|
197
|
-
this.debugLog(`storeOnActionSubscription ${i.$id}`, { after: s, args: n, name: d, store: i }), t({ after: s, args: n, name: d });
|
|
196
|
+
i.$onAction(({ after: s, args: n, name: d, onError: u }) => {
|
|
197
|
+
this.debugLog(`storeOnActionSubscription ${i.$id}`, { after: s, args: n, name: d, store: i }), t({ after: s, args: n, name: d, onError: u });
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
storeMutationSubscription(e) {
|
package/dist/types/plugin.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinia-plugin-subscription",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Pinia plugin for Vue.js that helps building Pinia plugins by centralizing subscriber registration and providing a Store base class for store helpers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
File without changes
|