Skip to content

feat(pinia-orm)!: Move casts and uid to seperate bundles#215

Merged
CodeDredd merged 5 commits intonext-releasefrom
uid-casting
Aug 19, 2022
Merged

feat(pinia-orm)!: Move casts and uid to seperate bundles#215
CodeDredd merged 5 commits intonext-releasefrom
uid-casting

Conversation

@CodeDredd
Copy link
Copy Markdown
Owner

@CodeDredd CodeDredd commented Aug 18, 2022

Thoughts

It makes total sense that the user should be able to decide which unique libaray or function he wants to use. So the uid function is moveing into seperate bundles with its decorators.

⚠️ Removed string casting like:

static casts {
    return {
        name: 'string'
    }
}

for all implemented strings array, number, boolean and string.
You need to use now the cast classes.

import { StringCast } from 'pinia-orm/dist/casts'

static casts {
    return {
        name: StringCast
    }
}

Tickets

#210

ToDos

  • Functionality
  • Docs
  • Tests

You need now to use `import { ArrayCast } from 'pinia-orm/casts'` for default casts.
For Uid there a different separate Casts. The one using `nanoid`, the other `uuid` package.

BREAKING-CHANGE: `@Uid` and `this.uid()` is removed. Also removed casts by string e.g. `string`.
@CodeDredd CodeDredd added bug Something isn't working enhancement New feature or request breaking-changes Introducing new BREAKING CHANGES labels Aug 18, 2022
@CodeDredd CodeDredd changed the title feat(pinia-orm)!: Move uid to seperate package bundles for nanoid & uuid feat(pinia-orm)!: Move casts and uid to seperate bundles Aug 18, 2022
@CodeDredd CodeDredd merged commit f0f5854 into next-release Aug 19, 2022
@CodeDredd CodeDredd deleted the uid-casting branch August 19, 2022 15:07
@CodeDredd CodeDredd mentioned this pull request Aug 19, 2022
CodeDredd added a commit that referenced this pull request Aug 20, 2022
* refactor(pinia-orm)!:  code split decorators and helpers (#185)

* refactor(pinia-orm):  code split decorators and helpers

* test: change hook tests

* refactor: helpers splitting not yet

* test: fix all with new decorators code splitting

Moved decorators to `pinia-orm/decorators` and removed them from `pinia-orm`

* refactor: linting

* docs: update to code splitting

BREAKING-CHANGE: Moved decorators to `pinia-orm/decorators` and removed them from `pinia-orm`

* build(pinia-orm): move from `normalizr` to `@pinia-orm/normalizr` (#192)

* chore(deps): update devdependency eslint to ^8.22.0 (#187)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update devdependency eslint to ^8.22.0 (#186)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* build(normalizr): create own `normalizr` package (#191)

* feat(normalizr): First release
Reduced version of `normalizr`

* chore(normalizr): update deps

* chore(normalizr): update deps

* chore(normalizr): remove custom release notes for every package

* build(pinia-orm): move from `normalizr` to `@pinia-orm/normalizr`

* build(normalizr): fix exports

* refactor(pinia-orm): update deps

* refactor(pinia-orm): fix local packge lock file

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(pinia-orm): improve typings for `piniaOptions`, `useDataStore`, `useStoreActions` and `piniaStore` (#204)

* chore(pinia-orm): improve typings for `piniaOptions`, `useDataStore`, `useStoreActions` and `piniaStore`

* refactor(pinia-orm): linting

* refactor(pinia-orm): change import so other packages can resolve it

* refactor(pinia-orm): fix dynamic type import

* refactor(pinia-orm): set normalizr to workspace

* feat(pinia-orm): add `groupBy` method to query (#213)

* feat(pinia-orm): add `groupBy` method to query

* chore: fix ci workflow with used local packages

* chore: fix ci workflow with used local packages

* docs: add documentation for `groupBy`

* chore: switch from lerna to lerna-lite for workspace support

* chore: add shamefully hoist for now

* chore: update ci

* chore: add workspace to nuxt package

* chore: change nuxt build

* chore: change nuxt build to fix ci

* chore: change nuxt build to fix ci

* chore: change root build to fix ci

* chore: change build to fix ci

* chore: change build to fix ci

* chore: change build to fix ci

* chore: update lock

* chore: add workspace again

* chore: change build back again

* feat(pinia-orm)!: Move casts to seperate bundle & create uid packages (#215)

* feat(pinia-orm): Move Uid & casts to seperate bundles to import

You need now to use `import { ArrayCast } from 'pinia-orm/casts'` for default casts.
For Uid there a different separate Casts. The one using `nanoid`, the other `uuid` package.

BREAKING-CHANGE: Removed casts by string e.g. `string`.

* feat(pinia-orm): Add working uuid & nanoid packages

* docs(pinia-orm): Update docs

* docs(pinia-orm): Update cast docs

* refactor(pinia-orm): linting

* chore: update deps

* fix(pinia-orm): find a way running it in nuxt2

* fix(pinia-orm): change build so `cjs` files are now `js`
- Nuxt 2 somehow doesnt run babel with `cjs` files and therefor features like "nullish coalescing operator" are not working. As a workaround the files are renamed to 'js'
- Also fixed the new uid decorators not working correctly
- Added an option to pass `pinia` to the store instance to be able to use it outside of `setup`

* docs(pinia-orm): Update correctly

* docs: fix small typo

* feat(pinia-orm): make fields as default nullable (#229)

BREAKING-CHANGE: Removed `nullable` and added `notNullable`. Fields are per default now null.

* docs: add some install notes

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-changes Introducing new BREAKING CHANGES bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant