Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add plugin system & axios plugin #1603

Merged
merged 22 commits into from Sep 16, 2023
Merged

feat: Add plugin system & axios plugin #1603

merged 22 commits into from Sep 16, 2023

Conversation

CodeDredd
Copy link
Owner

@CodeDredd CodeDredd commented Sep 4, 2023

πŸ”— Linked issue

related #1385

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This package is based on https://github.com/vuex-orm/plugin-axios.
The only difference is the setup and the save functions.

ToDos:

  • Port code and adapt it
  • Make a plugin system for pinia-orm
  • Add tests
  • Add docs for axios
  • Add docs for plugin-system

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@CodeDredd CodeDredd added the enhancement New feature or request label Sep 4, 2023
@CodeDredd CodeDredd changed the title feat: Create package for easy use of axios feat: Create axios plugin as composable Sep 4, 2023
@CodeDredd CodeDredd changed the title feat: Create axios plugin as composable feat: Create axios plugin Sep 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2023

Codecov Report

❗ No coverage uploaded for pull request base (v1.7.0@5a152c8). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             v1.7.0    #1603   +/-   ##
=========================================
  Coverage          ?   99.67%           
=========================================
  Files             ?       89           
  Lines             ?     5932           
  Branches          ?      503           
=========================================
  Hits              ?     5913           
  Misses            ?       17           
  Partials          ?        2           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@CodeDredd CodeDredd changed the title feat: Create axios plugin feat: Add plugin system & axios plugin Sep 15, 2023
@CodeDredd CodeDredd merged commit c4eb2e4 into v1.7.0 Sep 16, 2023
9 checks passed
@CodeDredd CodeDredd deleted the axios-package branch September 16, 2023 15:42
@CodeDredd CodeDredd mentioned this pull request Sep 16, 2023
CodeDredd added a commit that referenced this pull request Sep 17, 2023
* fix(pinia-orm-1569): Wrong behaviour of `$getOriginal` (#1576)

* fix(pinia-orm-1569): Wrong behaviour of `$getOriginal`

* refactor(pinia-orm-1569): fix build error

* refactor(pinia-orm-1569): fix test

* refactor(pinia-orm-1569): add clearing

closes #1576

* docs(pinia-orm-1382): Typo in docs examples: form -> from (#1590)

closes #1382

* docs(pinia-orm): Broken link or missing reference (#1596)

* docs(pinia-orm-1333): Broken link or missing reference

* docs(pinia-orm): update note display

* docs(pinia-orm): wrong closing

closes #1333

* feat: Add options for uid, nanoid/uid and uuid/uid (#1510)

* feat: uid options

* feat: uid options - nanoid custom alphabet support

* feat: uid options - update docs

* feat: uid options - fix tests

* refactor(pinia-orm): linting

* refactor(pinia-orm): fix rules correctly

* refactor(pinia-orm): Add better types & test coverage

* refactor(pinia-orm): linting

---------

closes #1509 

Co-authored-by: Sergey Danilchenko <s.danilchenko@ttbooking.ru>
Co-authored-by: Gregor Becker <gregor.becker@bpcs-consult.com>

* feat: improve lookup performance and allow composite key lookup (#1206)

* feat: improve lookup performance and allow composite key lookup

* test(pinia-orm): add find composite key test

closes #1205 

---------

Co-authored-by: Gregor Becker <gregor@codedredd.de>
Co-authored-by: Gregor Becker <gregor.becker@bpcs-consult.com>

* chore(pinia-orm): linting

* refactor(pinia-orm): `useRepo` was having the wrong types for repositories

* refactor(pinia-orm): revert some type changes

* feat: improve performance by mutating the state (#1604)

* chore(deps): update devdependency @types/node to ^18.17.13

* chore(deps): update devdependency @types/node to ^18.17.13

* chore(deps): update devdependency @iconify/json to ^2.2.110

* chore: update sponsors

* chore(deps): update all non-major dependencies

* chore(deps): update devdependency @types/node to ^18.17.14

* chore(deps): update devdependency unplugin-icons to ^0.17.0

* chore(deps): update devdependency @typescript-eslint/parser to ^6.5.1-alpha.18

* chore(deps): update devdependency @typescript-eslint/parser to ^6.5.1-alpha.19

* chore(deps): update devdependency @typescript-eslint/parser to ^6.5.1-alpha.20

* chore(deps): update devdependency @typescript-eslint/parser to ^6.5.1-alpha.21

* chore(deps): update devdependency @iconify/json to ^2.2.111

* chore(deps): update devdependency @typescript-eslint/parser to ^6.5.1-alpha.22

* chore(deps): update actions/checkout action to v4

* chore(deps): update devdependency @typescript-eslint/parser to ^6.6.0

* feat: improve performance by mutating the state

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gregor Becker <gregor@codedredd.de>

* refactor(pinia-orm): Move away from js files and use cjs extension. Also some code refactorings.

* refactor(pinia-orm): Add correct operation for `insert`

* chore: Change renovate cycle

* chore: Add pnpm default install strategy

* feat(pinia-orm): Add namespace option for the store (#1618)

* feat(pinia-orm-1437): Add namespace option for the store

* refactor(pinia-orm): change build command & fix small typo

* ci(pinia-orm): change build:ci to build

* ci(pinia-orm): change ci build steps

* ci(pinia-orm): add stub build

* ci(pinia-orm): fix build stub command

* ci(pinia-orm): fix build prepare command

* ci(pinia-orm): fix other commands

* ci(pinia-orm): change size command

* refactor(pinia-orm): linting

closes #1437

* docs: add Compositekey lookup (#1621)

* fixed vuex orm typo in the docs

* added docs for composite primary key lookups

* fix(pinia-orm): `Uncaught TypeError: parent.$fields()[key] is undefied` when inserting nested data with polymorphic relationships (#1648)

* fix(pinia-orm): `Uncaught TypeError: parent.$fields()[key] is undefined` when inserting nested data with polymorphic relationships

* refactor(pinia-orm): linting

* refactor(pinia-orm): remove comment

closes #1635

* docs: Update depencies & fix small display errors (#1627)

* docs: upgrade dependencies & improve styling

* docs: fix search api & update index

* docs: update yarn lock

* feat: Add plugin system & axios plugin (#1603)

* feat(axios): Create package

* feat(axios): Create package

* refactor(axios): update working axios plugin

* feat(axios): add composables & axios repository

* refactor(axios): make build work & correct typings

* refactor(axios): update config

* feat(pinia-orm): add plugins option

* feat(pinia-orm): finish add plugin feature

* test(axios): make tests work

* refactor(pinia-orm): cleanup types

* refactor(pinia-orm): linting

* refactor(pinia-orm): fix build typings

* refactor(pinia-orm): adjust size

* refactor(axios): linting

* test(axios): add test for extending repository

* feat(axios): add first docs & add `define` function for plugins

* docs(axios): continue writing

* docs(axios): port more docs from vuex-orm axios

* refactor(axios): linting

* refactor(axios): vuex typos

* docs: : Update correct size

* docs: : Update nuxt dependencies

* refactor(pinia-orm): Make nanoid async uuid deprecated

* chore: Remove agolia workflow

* chore: Use codecov v3

* feat(pinia-orm): Add `setModel` for Repository

This is handy if you want to create a custom `useRepo` composable

* refactor(pinia-orm): linting

* feat(pinia-orm): Throw an error when trying to save a list into a one to one relationship (#1670)

closes #1634

* docs(pinia-orm): adapt STI docs to be more correctly

resolves #1629, resolves #1630, resolves #1631

* chore: Issue template improvement (#1636)

* Added pinia-orm playground to reproduction links

* Removed confusing Could this feature be implemented as a module in feature request template. It is from nuxt and doesn't make sense in the pinia-orm repo

* Added playground suggestion to enviroment in bug report template and made it optional because somethings it is just not needed

* feat(pinia-orm): Add HMR support

resolves #1645

* chore: Change ci workflow for build

* chore: Change ci workflow for build

* chore: Change ci workflow for build

* chore(nuxt): remove type module

* chore: change ci build

* feat(pinia-orm): Composite primary key can now be used with `destroy` and `onDelete` (#1671)

resolves #1620

---------

Co-authored-by: Sergey Danilchenko <daniser@mail.ru>
Co-authored-by: Sergey Danilchenko <s.danilchenko@ttbooking.ru>
Co-authored-by: Eduardo Speroni <edusperoni@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tintin10q <tintin10q@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants