]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/log
thirdparty/vuejs/pinia.git
3 years agochore: update readme [skip ci] v1
Eduardo San Martin Morote [Thu, 14 Oct 2021 13:15:28 +0000 (15:15 +0200)] 
chore: update readme [skip ci]

3 years agochore: up deps
Eduardo San Martin Morote [Fri, 20 Aug 2021 14:34:39 +0000 (16:34 +0200)] 
chore: up deps

3 years agorelease: v0.5.4 v0.5.4
Eduardo San Martin Morote [Mon, 16 Aug 2021 12:54:50 +0000 (14:54 +0200)] 
release: v0.5.4

3 years agofix(nuxt): make `$nuxt` non enumerable
Eduardo San Martin Morote [Mon, 16 Aug 2021 12:54:00 +0000 (14:54 +0200)] 
fix(nuxt): make `$nuxt` non enumerable

Fix #574

3 years agofeat(nuxt): resolve in mono repos
Eduardo San Martin Morote [Fri, 13 Aug 2021 13:30:03 +0000 (15:30 +0200)] 
feat(nuxt): resolve in mono repos

3 years agorelease: v0.5.3 v0.5.3
Eduardo San Martin Morote [Mon, 2 Aug 2021 14:01:25 +0000 (16:01 +0200)] 
release: v0.5.3

3 years agochore: add funding
Eduardo San Martin Morote [Mon, 2 Aug 2021 13:46:59 +0000 (15:46 +0200)] 
chore: add funding

3 years agochore: regen lock
Eduardo San Martin Morote [Mon, 2 Aug 2021 13:46:54 +0000 (15:46 +0200)] 
chore: regen lock

3 years agochore: up deps
Eduardo San Martin Morote [Mon, 2 Aug 2021 13:41:08 +0000 (15:41 +0200)] 
chore: up deps

4 years agotest: correct customization types
Eduardo San Martin Morote [Thu, 24 Jun 2021 14:13:14 +0000 (16:13 +0200)] 
test: correct customization types

4 years agofix(types): remove state properties from this
Eduardo San Martin Morote [Thu, 24 Jun 2021 14:14:08 +0000 (16:14 +0200)] 
fix(types): remove state properties from this

4 years agotest: fix them
Eduardo San Martin Morote [Thu, 24 Jun 2021 10:41:52 +0000 (12:41 +0200)] 
test: fix them

4 years agotest: fix type
Eduardo San Martin Morote [Thu, 24 Jun 2021 10:34:04 +0000 (12:34 +0200)] 
test: fix type

4 years agofix(types): forbid non existant access in getters and actions
Eduardo San Martin Morote [Thu, 24 Jun 2021 10:04:47 +0000 (12:04 +0200)] 
fix(types): forbid non existant access in getters and actions

4 years agofix(patch): avoid merging reactive objects
Eduardo San Martin Morote [Mon, 7 Jun 2021 21:16:52 +0000 (23:16 +0200)] 
fix(patch): avoid merging reactive objects

Fix #528

4 years agofix: markRaw on pinia
Eduardo San Martin Morote [Mon, 7 Jun 2021 21:17:42 +0000 (23:17 +0200)] 
fix: markRaw on pinia

4 years agorelease: v0.5.2 v0.5.2
Eduardo San Martin Morote [Thu, 3 Jun 2021 12:48:31 +0000 (14:48 +0200)] 
release: v0.5.2

4 years agofix(types): fix extension for TS 4.3
Eduardo San Martin Morote [Thu, 3 Jun 2021 09:20:23 +0000 (11:20 +0200)] 
fix(types): fix extension for TS 4.3

4 years agochore: up deps
Eduardo San Martin Morote [Thu, 3 Jun 2021 09:21:29 +0000 (11:21 +0200)] 
chore: up deps

4 years agotest: ref unwrapping
Eduardo San Martin Morote [Tue, 18 May 2021 08:27:29 +0000 (10:27 +0200)] 
test: ref unwrapping

4 years agorelease: v0.5.1 v0.5.1
Eduardo San Martin Morote [Mon, 17 May 2021 17:00:58 +0000 (19:00 +0200)] 
release: v0.5.1

4 years agofix(type): export forgotten types
Eduardo San Martin Morote [Mon, 17 May 2021 17:00:33 +0000 (19:00 +0200)] 
fix(type): export forgotten types

4 years agorefactor: add ts-expect-error
Eduardo San Martin Morote [Mon, 17 May 2021 16:58:58 +0000 (18:58 +0200)] 
refactor: add ts-expect-error

4 years agofix(types): correct subtype Store
Eduardo San Martin Morote [Mon, 17 May 2021 16:37:49 +0000 (18:37 +0200)] 
fix(types): correct subtype Store

Close #500

4 years agorelease: v0.5.0 v0.5.0
Eduardo San Martin Morote [Mon, 17 May 2021 09:07:07 +0000 (11:07 +0200)] 
release: v0.5.0

4 years agochore: use workspace ts
Eduardo San Martin Morote [Sat, 15 May 2021 18:23:08 +0000 (20:23 +0200)] 
chore: use workspace ts

4 years agofix(types): forbid non existants keys on store
Eduardo San Martin Morote [Sat, 15 May 2021 18:22:55 +0000 (20:22 +0200)] 
fix(types): forbid non existants keys on store

4 years agofeat(types): allow defining custom state properties
Eduardo San Martin Morote [Sat, 15 May 2021 15:15:02 +0000 (17:15 +0200)] 
feat(types): allow defining custom state properties

4 years agotest: test refs in plugins
Eduardo San Martin Morote [Sat, 15 May 2021 13:32:56 +0000 (15:32 +0200)] 
test: test refs in plugins

4 years agotest: activate unwrapping tests
Eduardo San Martin Morote [Sat, 15 May 2021 13:25:22 +0000 (15:25 +0200)] 
test: activate unwrapping tests

4 years agochore: refactor old examples
Eduardo San Martin Morote [Sat, 15 May 2021 12:00:16 +0000 (14:00 +0200)] 
chore: refactor old examples

4 years agorefactor: better types
Eduardo San Martin Morote [Sat, 15 May 2021 11:46:48 +0000 (13:46 +0200)] 
refactor: better types

4 years agorefactor: use set from composition-api instead of pinia.Vue
Eduardo San Martin Morote [Sat, 15 May 2021 11:39:41 +0000 (13:39 +0200)] 
refactor: use set from composition-api instead of pinia.Vue

This effectively remove the need to do pinia.Vue = Vue in tests, making it easier to test components using pinia, it also removes pinia.Vue which was internal even though it wasnt marked as

4 years agochore: regen lock
Eduardo San Martin Morote [Sat, 15 May 2021 10:14:58 +0000 (12:14 +0200)] 
chore: regen lock

4 years agorefactor: fix cherry picking
Eduardo San Martin Morote [Thu, 13 May 2021 11:36:33 +0000 (13:36 +0200)] 
refactor: fix cherry picking

4 years agorefactor(subscribe): better types
Eduardo San Martin Morote [Thu, 13 May 2021 09:37:18 +0000 (11:37 +0200)] 
refactor(subscribe): better types

4 years agorefactor(types): use Store with defaults, deprecate GenericStore
Eduardo San Martin Morote [Wed, 12 May 2021 14:33:31 +0000 (16:33 +0200)] 
refactor(types): use Store with defaults, deprecate GenericStore

4 years agotest: remove unused code
Eduardo San Martin Morote [Wed, 12 May 2021 12:19:49 +0000 (14:19 +0200)] 
test: remove unused code

4 years agotest: lifespan with ref
Eduardo San Martin Morote [Wed, 12 May 2021 12:19:08 +0000 (14:19 +0200)] 
test: lifespan with ref

4 years agorefactor: fix tests
Eduardo San Martin Morote [Thu, 13 May 2021 11:18:50 +0000 (13:18 +0200)] 
refactor: fix tests

4 years agotest(onAction): add tests
Eduardo San Martin Morote [Wed, 12 May 2021 10:06:57 +0000 (12:06 +0200)] 
test(onAction): add tests

4 years agorefactor: pass resolved value in types onAction
Eduardo San Martin Morote [Wed, 12 May 2021 09:30:05 +0000 (11:30 +0200)] 
refactor: pass resolved value in types onAction

4 years agofix(types): patch should unwrap refs
Eduardo San Martin Morote [Wed, 12 May 2021 09:29:07 +0000 (11:29 +0200)] 
fix(types): patch should unwrap refs

4 years agotest(state): test patch with ref
Eduardo San Martin Morote [Wed, 12 May 2021 09:28:31 +0000 (11:28 +0200)] 
test(state): test patch with ref

4 years agotest(actions): test rejects and throw
Eduardo San Martin Morote [Wed, 12 May 2021 09:27:26 +0000 (11:27 +0200)] 
test(actions): test rejects and throw

4 years agotest: refactor property name to avoid collisions
Eduardo San Martin Morote [Wed, 12 May 2021 09:27:55 +0000 (11:27 +0200)] 
test: refactor property name to avoid collisions

4 years agofix(types): unwrap refs passed to state
Eduardo San Martin Morote [Wed, 12 May 2021 07:52:22 +0000 (09:52 +0200)] 
fix(types): unwrap refs passed to state

Fix #491

4 years agofeat: subscribe to actions with `$onAction`
Eduardo San Martin Morote [Tue, 11 May 2021 20:21:02 +0000 (22:21 +0200)] 
feat: subscribe to actions with `$onAction`

Implements #240. In alpha, for testing first

4 years agorefactor(types): use isolatedModules
Eduardo San Martin Morote [Fri, 7 May 2021 13:41:39 +0000 (15:41 +0200)] 
refactor(types): use isolatedModules

this allows using the lib directly with vite

4 years agochore: remove tsd
Eduardo San Martin Morote [Thu, 13 May 2021 09:48:39 +0000 (11:48 +0200)] 
chore: remove tsd

4 years agochore: up deps
Eduardo San Martin Morote [Thu, 13 May 2021 09:48:12 +0000 (11:48 +0200)] 
chore: up deps

4 years agorelease: v0.4.1 v0.4.1
Eduardo San Martin Morote [Wed, 5 May 2021 11:51:27 +0000 (13:51 +0200)] 
release: v0.4.1

4 years agofix(nuxt): inject Vue before rendering
Eduardo San Martin Morote [Wed, 5 May 2021 11:50:40 +0000 (13:50 +0200)] 
fix(nuxt): inject Vue before rendering

Fix #473

4 years agorelease: v0.4.0 v0.4.0
Eduardo San Martin Morote [Mon, 3 May 2021 10:54:09 +0000 (12:54 +0200)] 
release: v0.4.0

4 years agorefactor(types): expose types
Eduardo San Martin Morote [Mon, 3 May 2021 10:51:34 +0000 (12:51 +0200)] 
refactor(types): expose types

4 years agorefactor(types): expose types as needed
Eduardo San Martin Morote [Mon, 3 May 2021 10:43:56 +0000 (12:43 +0200)] 
refactor(types): expose types as needed

4 years agorefactor: missing devtoolhook type
Eduardo San Martin Morote [Mon, 3 May 2021 10:21:23 +0000 (12:21 +0200)] 
refactor: missing devtoolhook type

4 years agotest: coverage
Eduardo San Martin Morote [Mon, 3 May 2021 09:43:13 +0000 (11:43 +0200)] 
test: coverage

4 years agotest: refactor plugin tests
Eduardo San Martin Morote [Mon, 3 May 2021 09:41:43 +0000 (11:41 +0200)] 
test: refactor plugin tests

4 years agoperf(store): reuse stores from parent to children components
Eduardo San Martin Morote [Mon, 3 May 2021 09:41:33 +0000 (11:41 +0200)] 
perf(store): reuse stores from parent to children components

4 years agotest: test warn mapStores
Eduardo San Martin Morote [Mon, 3 May 2021 09:21:17 +0000 (11:21 +0200)] 
test: test warn mapStores

4 years agochore: remove old code
Eduardo San Martin Morote [Mon, 3 May 2021 09:00:37 +0000 (11:00 +0200)] 
chore: remove old code

4 years agotest: adatp to new getters syntax
Eduardo San Martin Morote [Mon, 3 May 2021 09:00:09 +0000 (11:00 +0200)] 
test: adatp to new getters syntax

4 years agorefactor: correctly use DefineStoreOptions
Eduardo San Martin Morote [Mon, 3 May 2021 08:55:42 +0000 (10:55 +0200)] 
refactor: correctly use DefineStoreOptions

4 years agofeat(plugins): pass options to plugins
Eduardo San Martin Morote [Mon, 3 May 2021 08:39:32 +0000 (10:39 +0200)] 
feat(plugins): pass options to plugins

4 years agofeat(pinia): allow chaining pinia.use
Eduardo San Martin Morote [Mon, 3 May 2021 08:32:31 +0000 (10:32 +0200)] 
feat(pinia): allow chaining pinia.use

4 years agofeat(store): pass state to getters as first argument
Eduardo San Martin Morote [Mon, 3 May 2021 08:28:42 +0000 (10:28 +0200)] 
feat(store): pass state to getters as first argument

BREAKING CHANGE: getters now receive the state as their first argument and it's properly typed so you can write getters with arrow functions:

```js
defineStore({
  state: () => ({ n: 0 }),
  getters: {
    double: state => state.n * 2
  }
})
```

To access other getters, you must still use the syntax that uses `this` **but it is now necessary to explicitely type the getter return type**. The same limitation exists in Vue for computed properties and it's a known limitation in TypeScript:

```ts
defineStore({
  state: () => ({ n: 0 }),
  getters: {
    double: state => state.n * 2,
    // the `: number` is necessary when accessing `this` inside of
    // a getter
    doublePlusOne(state): number {
      return this.double + 1
    },
  }
})
```

For more information, refer to [the updated documentation for getters](https://pinia.esm.dev/core-concepts/getters.html).

4 years agoci: add renovate
Eduardo San Martin Morote [Sun, 2 May 2021 17:31:57 +0000 (19:31 +0200)] 
ci: add renovate

4 years agochore: up deps
Eduardo San Martin Morote [Sun, 2 May 2021 17:31:14 +0000 (19:31 +0200)] 
chore: up deps

4 years agofeat(plugins): pass a context object to plugins instead of app
Eduardo San Martin Morote [Tue, 27 Apr 2021 08:47:23 +0000 (10:47 +0200)] 
feat(plugins): pass a context object to plugins instead of app

BREAKING CHANGE: To improve the plugin api capabilities, `pinia.use()`
now receives a context object instead of just `pinia`:
```js
// replace
pinia.use((pinia) => {})
// with
pinia.use(({ pinia, store }) => {})
```

4 years agochore: up deps
Eduardo San Martin Morote [Tue, 27 Apr 2021 08:36:07 +0000 (10:36 +0200)] 
chore: up deps

4 years agotest: use @sucrase/jest instead of ts-jest
Eduardo San Martin Morote [Fri, 16 Apr 2021 11:02:37 +0000 (13:02 +0200)] 
test: use @sucrase/jest instead of ts-jest

4 years agoci: add release
Eduardo San Martin Morote [Sat, 10 Apr 2021 15:30:52 +0000 (17:30 +0200)] 
ci: add release

4 years agofeat(types): fail on async patch
Eduardo San Martin Morote [Fri, 9 Apr 2021 18:35:57 +0000 (20:35 +0200)] 
feat(types): fail on async patch

4 years agorelease: v0.3.1 v0.3.1
Eduardo San Martin Morote [Sat, 10 Apr 2021 15:28:03 +0000 (17:28 +0200)] 
release: v0.3.1

4 years agotest: ignore global.d.ts
Eduardo San Martin Morote [Sat, 10 Apr 2021 15:26:38 +0000 (17:26 +0200)] 
test: ignore global.d.ts

4 years agofix(subscribe): remove subscription when unmounted
Eduardo San Martin Morote [Sat, 10 Apr 2021 15:13:25 +0000 (17:13 +0200)] 
fix(subscribe): remove subscription when unmounted

4 years agostyle: const
Eduardo San Martin Morote [Fri, 9 Apr 2021 17:08:17 +0000 (19:08 +0200)] 
style: const

4 years agofix(store): avoid multiple subscriptions call
Eduardo San Martin Morote [Fri, 9 Apr 2021 17:06:27 +0000 (19:06 +0200)] 
fix(store): avoid multiple subscriptions call

Fix #429, Fix #430

4 years agorelease: v0.3.0 v0.3.0
Eduardo San Martin Morote [Fri, 9 Apr 2021 11:10:50 +0000 (13:10 +0200)] 
release: v0.3.0

4 years agochore: mark mapGetters as deprecated
Eduardo San Martin Morote [Fri, 9 Apr 2021 07:42:35 +0000 (09:42 +0200)] 
chore: mark mapGetters as deprecated

4 years agofeat: mapWritableState
Eduardo San Martin Morote [Thu, 8 Apr 2021 16:22:30 +0000 (18:22 +0200)] 
feat: mapWritableState

4 years agochore: comment [skip ci]
Eduardo San Martin Morote [Thu, 8 Apr 2021 12:51:50 +0000 (14:51 +0200)] 
chore: comment [skip ci]

4 years agofeat(mapState): accept functions
Eduardo San Martin Morote [Thu, 8 Apr 2021 12:46:16 +0000 (14:46 +0200)] 
feat(mapState): accept functions

4 years agofeat(mapStores): allow custom suffix
Eduardo San Martin Morote [Thu, 8 Apr 2021 11:43:35 +0000 (13:43 +0200)] 
feat(mapStores): allow custom suffix

4 years agofeat(types): allow extending mapStores suffix
Eduardo San Martin Morote [Thu, 8 Apr 2021 11:32:59 +0000 (13:32 +0200)] 
feat(types): allow extending mapStores suffix

4 years agotest: add dts tests
Eduardo San Martin Morote [Thu, 8 Apr 2021 10:01:20 +0000 (12:01 +0200)] 
test: add dts tests

4 years agodocs: mark pStores as internal [skip ci]
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:39:13 +0000 (11:39 +0200)] 
docs: mark pStores as internal [skip ci]

4 years agorefactor(types): mapState autocomplete
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:22:20 +0000 (11:22 +0200)] 
refactor(types): mapState autocomplete

4 years agorefactor(types): fix autocompletion
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:19:39 +0000 (11:19 +0200)] 
refactor(types): fix autocompletion

4 years agochore: coverage nuxt
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:12:56 +0000 (11:12 +0200)] 
chore: coverage nuxt

4 years agofix(types): enable autocomplete in object
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:12:21 +0000 (11:12 +0200)] 
fix(types): enable autocomplete in object

4 years agodocs: improve map helpers
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:02:17 +0000 (11:02 +0200)] 
docs: improve map helpers

4 years agofeat: add mapActions
Eduardo San Martin Morote [Thu, 8 Apr 2021 09:02:03 +0000 (11:02 +0200)] 
feat: add mapActions

4 years agochore: update readme badges
Eduardo San Martin Morote [Wed, 7 Apr 2021 14:36:15 +0000 (16:36 +0200)] 
chore: update readme badges

4 years agochore: update github files
Eduardo San Martin Morote [Wed, 7 Apr 2021 14:33:42 +0000 (16:33 +0200)] 
chore: update github files

4 years agorefactor: cache store create per instance
Eduardo San Martin Morote [Wed, 7 Apr 2021 14:31:56 +0000 (16:31 +0200)] 
refactor: cache store create per instance

4 years agofeat: mapState with object
Eduardo San Martin Morote [Tue, 6 Apr 2021 18:53:47 +0000 (20:53 +0200)] 
feat: mapState with object

4 years agofeat: mapState with array
Eduardo San Martin Morote [Tue, 6 Apr 2021 18:16:41 +0000 (20:16 +0200)] 
feat: mapState with array

4 years agotest: mapStores
Eduardo San Martin Morote [Tue, 6 Apr 2021 17:52:56 +0000 (19:52 +0200)] 
test: mapStores