Skip to content

Releases: CodeDredd/pinia-orm

v1.10.0

26 Nov 17:07
fed277b
Compare
Choose a tag to compare

👀 Highlights

Now pinia-orm has finally all functions and relations from vuex-orm/core 🎈
Also i added the support for pinia setup store syntax. 💯 So now you are getting even more flexibility.

💊 Plugins fixed

I know the plugin system was still buggy. Either the types were wrong or the configs weren't working. It's finally doing well.
But the plugin regestration changed. Since it haven't worked well yet it should be not a big breaking change.

You now need to register plugins that way:

- const piniaOrm = createORM()
- piniaOrm().use(createPiniaOrmAxios({
-   axios,
- }))
+ const piniaOrm = createORM({
+    plugins: [
+       createPiniaOrmAxios({
+        axios,
+       }),
+    ],
+   })

🚀 Pina Setup Store Option

You can now also use the pina setup syntax in pinia-orm. You only need to change your piniaOrm options

createPiniaORM({ pinia: { storeType: 'setupStore' } })
class User extends Model {
      static entity = 'users'

      static piniaOptions = {
        newData: ref('1'),
      }

      static piniaExtend = {
        persist: true,
      }

      @Attr(0) declare id: number
      @Str('') declare name: string
      @Str('') declare username: string
    }

console.log(userRepo.piniaStore().newData) // 1

👉 Changelog

compare changes

🚀 Enhancements

  • pinia-orm: Add morphedByMany as relation (#1897)
  • pinia-orm: Add option for custom pivotKey for relations with pivot (#1907)
  • pinia-orm: Pinia setup store syntax support (#1905)

🩹 Fixes

  • pinia-orm: Change plugin registration to be still compatible with pinia types (#1902)
  • axios: Axios instance is not found (29a91b0)
  • pinia-orm: Data was wrong for belongsTo & hasOne with composite key (#1904)
  • pinia-orm: BelongsToMany relation returns a toplevel 'pivot' reation (#1909)
  • pinia-orm: pivot helper fields are not deleted or removed. (#1911)
  • pinia-orm: Model original data is overwritten by different namspace models with same ID (#1954)
  • pinia-orm: UID Decorator: Setting Custom Alphabet Results in "undefined" Instead of Characters in UIDs (#1956)
  • pinia-orm: Ordering sometimes wrong with Query.orderBy and UseCollect.sortBy (#1957)

💅 Refactors

  • pinia-orm: Replace relation.getKey with relation.getResolvedKey (ad91ce6)

📖 Documentation

  • pinia-orm: MorphToMany example Taggable is missing primaryKey (#1959)

🏡 Chore

  • Update sponsors (2eed564)
  • normalizr: Add missing types export for bundler usage (220b093)
  • pinia-orm: Move to moduleResolution bundler (#1906)
  • pinia-orm: Update WeakCache types for newest typescript version (dc9d711)
  • Add .eslintcache to gitignore (3d6c378)

✅ Tests

  • axios: Correct axios is not set test (93359fd)

❤️ Contributors

v1.9.2

10 Jul 06:40
ba65169
Compare
Choose a tag to compare

Again some bug fixes from last release

👉 Changelog

compare changes

🩹 Fixes

  • pinia-orm: Two same belongsToMany with inverse keys on same model are causing wrong saved data (#1860)
  • pinia-orm: .find returning type any when using useRepo (#1865)
  • pinia-orm: Avoid attr default value modification by reference (#1869)
  • pinia-orm: Serialization was wrong with custom cast with custom serialization (#1866)
  • pinia-orm: Export missing composable useSortBy (#1882)
  • pinia-orm: Namespace + BelongsToMany throws error on query (#1883)

💅 Refactors

  • pinia-orm: Returning type of find is still any (#1876)

❤️ Contributors

v1.9.1

17 May 07:28
4872cc7
Compare
Choose a tag to compare

Small bugfixes from 1.9.0 release

👉 Changelog

compare changes

🩹 Fixes

  • pinia-orm: Typings of useRepo with Repository are broken (#1848)
  • pinia-orm: Mutators/Casts on related models with belongsToMany were wrong (#1851)

🏡 Chore

  • Make release executable (3250493)
  • Correct release script (2d9db02)
  • Simplify PR template & update existing ones (fab5a76)

🤖 CI

  • Use correct auth token for release (040e51b)
  • Use correct auth token for release (37e7354)

❤️ Contributors

v1.9.0

08 May 12:45
Compare
Choose a tag to compare

👀 Highlights

This is possibly the second last minor release before pinia-orm v2, and so many bug fixes and some new nice features are inside! ✨

If you wonder why i skipped v1.8.0...well that happend because i now implemented an auto changelog gen and i didn't wanted to change my git history because of a simple mistake. 😄

💪 Typing improvements

Big thanks @dev1437 for his prework

First of all some type fixes were made so you shouldn't get any errors anymore. Along of this there some nice type support features now

Models throw an error if you try to accesss an not existing property

image

Autocomplete for with()

image

Autocomplete for where()

image

🚀 Edge Channel

There is now a edge channel so you don't have to wait to try out new merged commits. The edge builds are also made for the other packages axios, normalizr & nuxt

Opting into the edge channel

Update pinia-orm dependency inside package.json:

{
  "devDependencies": {
-   "pinia-orm": "^1.0.0"
+   "pinia-orm": "npm:pinia-orm-edge@latest"
  }
}

Remove lockfile (package-lock.json, yarn.lock, or pnpm-lock.yaml) and reinstall dependencies.

Opting out from the edge channel

Update pinia-orm dependency inside package.json:

{
  "devDependencies": {
-   "pinia-orm": "npm:pinia-orm-edge@latest"
+   "pinia-orm": "^1.0.0"
  }
}

Remove lockfile (package-lock.json, yarn.lock, or pnpm-lock.yaml) and reinstall dependencies.

👉 Changelog

[email protected]

compare changes

🚀 Enhancements

  • pinia-orm: Change orderBy execution (#1809)
  • pinia-orm: Improve DateCast & orderBy for Dates (#1825)
  • pinia-orm: Add where(Not)Null and (or)where(Not)In (#1831)
  • pinia-orm:: Attribute autocompletion in where and with (#816)
  • pinia-orm: Fallback added for not existing type prop in STI Models (#1835)

🩹 Fixes

  • pinia-orm: Export for "dist" is broken (a3c734e)
  • pinia-orm: Update vue 2 reactivity (#1773)
  • pinia-orm: Fix eager load relations with complex foreign/local keys (#1798)
  • nuxt: Import nuxt composables from #imports (#1729)
  • pinia-orm: Updates were wrong for hydrated cache for casts & mutators (#1823)
  • pinia-orm: Get mutators were wrong for updated models (#1824)
  • pinia-orm: saving, updating hooks second param had wrong values (#1826)
  • pinia-orm: Get mutator was called twice (#1827)
  • pinia-orm: Mutators still don't apply on update consistently (#1828)
  • pinia-orm: Relations don't use namespace to make/retrieve related model (#1834)
  • pinia-orm: $isDirty() in hooks on model had wrong state (4ecf93f)

💅 Refactors

  • pinia-orm: createORM() had wrong type (#1830)

📖 Documentation

  • pinia-orm: Fix typo on axios setup guide (#1797)
  • Add edge channel to documentation (0696a1a)
  • Axios setup example was wrong (8cb2648)
  • axios: Update docs and type descriptions for delete (#1838)

🏡 Chore

  • Add edge release (6a0d649)
  • Add changelogen config (401a35f)
  • Add bump and start 1.8.0 (ae3b7f2)
  • Trigger edge release only on packages changes (a8f07ca)
  • Update linting so it works again (11ee966)
  • axios: Build was failing cause of importing pinia (becc438)
  • axios: Linting (fc105f0)
  • Add changelog auto generation (67517dd)
  • Small fix changelog generation (89ad5c2)
  • Wrong rep owner for changelog gen (35880c8)
  • Change changelog gen condition (e0643e7)
  • Broken workflow (b8cabe3)
  • Add getContributors to utils (be51347)
  • Clean up playgrounds (b4b0a4f)
  • Renovate should also include pin and digest (45f87aa)
  • Post more info for changelog generation for debugging (6ff54cd)

✅ Tests

  • axios: Test were failing because pinia instance was not set (9c8f86d)
  • pinia-orm: Add belongsToMany self relation test (#1807)

🤖 CI

  • Fix workflow errors for cache (6b61206)
  • Fix cache issue in workflows (b812020)
  • Wrong versions (a7b864a)
  • Change branch master to main (ac1cc11)
  • Wrong tag release branch (dba5cda)
  • Change node version (3728fc5)
  • Add checkout (173a71c)
  • Fix build step in release ci (4a2ee8a)
  • Fix broken workflow (498b532)
  • Fix broken workflow (934a436)
  • Fix broken workflow (6d02a54)
  • Update permission (c1cf3e6)
  • Remove examples (db59d22)
  • Add changelogen (c95f4c8)
  • Update versions used for workflow (bbb8bab)
  • Fix changelog version check (4b0b95a)
  • Fix changeloggen currentPR not found (2ee4656)
  • Remove currenPR console log (3da6251)
  • Add release workflow (744fcaf)
  • Update changelog gen script to get the right PR (8ac3119)
  • Script update changelog is failing (5e6a2f0)
  • Ensure correct PR is found in changelog gen (de5a38e)

❤️ Contributors

[email protected]

18 Sep 12:05
Compare
Choose a tag to compare

v1.7.2

Hotfix release for v1.7.1 which broke imports for old "dist"

🩹 Fixes

  • pinia-orm: Proper exports for collection and uid helpers (a3c734e)

❤️ Contributors

[email protected]

18 Sep 10:28
Compare
Choose a tag to compare

v1.7.1

Hotfix release

🩹 Fixes

  • pinia-orm: Proper exports for collection and uid helpers (#1681)

❤️ Contributors

[email protected]

17 Sep 12:52
Compare
Choose a tag to compare

v1.7.0 - 🐦

This update is a huge one. I think the biggest change people always asked about is the axios plugin. It's fiinally there.
But most importantly now you are able to extend pinia-orm like you want with the plugin system.

🚀 Enhancements

  • pinia-orm: Add options for uid, nanoid/uid and uuid/uid (#1510)
  • pinia-orm: Allow composite key lookup (#1206)
  • pinia-orm: Add namespace option for the store (#1618)
  • pina-orm: Add plugin system (#1603)
  • axios: Create new plugin package for axios (#1603)
  • pinia-orm: Add setModel for Repository (d0cd5e6)
  • pinia-orm: Throw an error when trying to save a list into a 1:1 relationship (#1670)
  • pinia-orm: Add HMR support (dcbc02e)
  • pinia-orm: Composite primary key can now be used with destroy and onDelete (#1671)

🩹 Fixes

  • pinia-orm: Wrong behaviour of $getOriginal (#1576)
  • pinia-orm: Repository pinaStore instance was wrong on STI models (#1618)
  • pinia-orm: Uncaught TypeError: parent.$fields()[key] is undefied when inserting nested data with polymorphic relationships (#1648)

🔥 Performance

  • pinia-orm: Improve lookup performance for huge datasets (#1206)
  • pinia-orm: Improve performance by mutating the state (#1604)

💅 Refactors

  • pinia-orm: useRepo was having the wrong type for repositories (be3c4f4)
  • pinia-orm: Add correct operation for insert (25090ec)
  • pinia-orm: Make nanoid async uuid deprecated (4d1a21e)

📖 Documentation

  • Typo with vuex-orm instead of pinia-orm (#1577)
  • Removed duplicate Relationsihps > Getting Started > Loading Nested Relationship (#1369)
  • Couple of typos (#1183)
  • Typo in docs examples: form -> from (#1590)
  • Broken link or missing reference (#1596)
  • Fixed insert incorrect example (#1628)
  • Update dependencies & fix small display errors (#1627)
  • Adapt STI docs to be more correctly (7c5a23e)

🏡 Chore

  • Update lint rules & packages (be0ca45)
  • Remove lerna for building and just use pnpm (#1618)
  • Change renovate cycle (5284a7b)
  • Remove agolia workflow (43f0dcc)
  • Issue template improvement (#1636)

❤️ Contributors

[email protected]

28 Mar 18:15
Compare
Choose a tag to compare

v1.6.7

🩹 Fixes

  • pinia-orm: Build broken cause of missing files (ecaed0f)

❤️ Contributors

  • Gregor Becker

[email protected]

28 Mar 15:52
Compare
Choose a tag to compare

v1.6.6

🩹 Fixes

  • nuxt: Nuxt 3 throws error on build & dev (#1136)
  • nuxt: Types wrong exported (#1136)

❤️ Contributors

  • Gregor Becker

[email protected]

27 Mar 07:00
Compare
Choose a tag to compare

v1.6.5

🩹 Fixes

  • pinia-orm: Improve Date serialization in Model class (#1121)
  • pinia-orm: $refresh() is not working (#1125)

❤️ Contributors

  • Gregor Becker
  • sergerdn