Skip to content

Commit 239aec5

Browse files
committed
feat: remove deprecated APIs
1 parent 5fbd0f0 commit 239aec5

File tree

8 files changed

+2
-48
lines changed

8 files changed

+2
-48
lines changed

__tests__/subscriptions.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('Subscriptions', () => {
2525
expect(spy).toHaveBeenCalledTimes(1)
2626
expect(spy).toHaveBeenCalledWith(
2727
expect.objectContaining({
28-
storeName: 'main',
2928
storeId: 'main',
3029
type: MutationType.direct,
3130
}),
@@ -44,7 +43,6 @@ describe('Subscriptions', () => {
4443
expect(spy).toHaveBeenCalledWith(
4544
expect.objectContaining({
4645
payload: patch,
47-
storeName: 'main',
4846
storeId: 'main',
4947
type: MutationType.patchObject,
5048
}),

docs/core-concepts/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { defineStore } from 'pinia'
88
// useStore could be anything like useUser, useCart
99
export const useStore = defineStore({
1010
// unique id of the store across your application
11-
id: 'storeName',
11+
id: 'storeId',
1212
})
1313
```
1414

docs/core-concepts/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The state is, most of the time, the central part of your store. People often sta
66
import { defineStore } from 'pinia'
77

88
const useStore = defineStore({
9-
id: 'storeName',
9+
id: 'storeId',
1010
// can also be defined with an arrow function if you prefer that syntax
1111
state() {
1212
return {

src/deprecated.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,3 @@ export type {
4949
_Spread,
5050
_StoreObject,
5151
} from './mapHelpers'
52-
53-
// TODO: remove in beta
54-
export { createStore } from './deprecated'

src/store.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ function initStore<
137137
partialStateOrMutator(pinia.state.value[$id] as UnwrapRef<S>)
138138
subscriptionMutation = {
139139
type: MutationType.patchFunction,
140-
storeName: $id,
141140
storeId: $id,
142141
events: debuggerEvents as DebuggerEvent[],
143142
}
@@ -146,7 +145,6 @@ function initStore<
146145
subscriptionMutation = {
147146
type: MutationType.patchObject,
148147
payload: partialStateOrMutator,
149-
storeName: $id,
150148
storeId: $id,
151149
events: debuggerEvents as DebuggerEvent[],
152150
}
@@ -188,7 +186,6 @@ function initStore<
188186
if (isListening) {
189187
callback(
190188
{
191-
storeName: $id,
192189
storeId: $id,
193190
type: MutationType.direct,
194191
events: debuggerEvents as DebuggerEvent,

src/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ export interface _SubscriptionCallbackMutationBase {
7070
*/
7171
type: MutationType
7272

73-
/**
74-
* @deprecated use `storeId` instead.
75-
*/
76-
storeName: string
77-
7873
/**
7974
* `id` of the store doing the mutation.
8075
*/

test-dts/deprecated.test-d.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)