Skip to content

Releases: vuex-orm/plugin-soft-delete

v1.2.1

30 Mar 13:28
Compare
Choose a tag to compare

Improvements

  • #8 Add relationship support. Please refer to the docs (the "Relationships" section) for more details.

v1.2.0

23 Mar 15:44
Compare
Choose a tag to compare

New Features

A brand new episode of the Vuex ORM Soft Delete plugin.

While the architecture and codebase has undergone a major transplant, the existing scope is left intact to serve existing users.

  • Global and model level option configurations.
    • softDeleteConfig can be defined on models to override global options/defaults.
  • Composite Primary Key support.
  • Single and batch delete models.
  • Restore deleted models.
  • Model state indicator through instance.$trashed().
    • A unified method edition of instance.$isDeleted since it's an interchangeable property.
  • User-defined mutator for the key attribute.
    • Intersect the date value passed as argument or simply return any value to be stored.
    • Global and per-model configuration.
  • Typescript support.
  • Comprehensive coverage tests.

Improvements

  • key attribute uses Date.now() instead of new Date.
    • Enables better conditional treatment over string representation and prevents an empty object persisting to the store.
  • Deleting instance updates reference.
    • Removes the habit of fetching the same record after it's trashed.
  • Allows forceful hydration after deleting and restoring.
  • Eloquent-esque naming conventions for query builder.
    • withTrashed and onlyTrashed are consistent with other ORM's.
  • Fixes model serializing that'd ceased functioning since it changed in @vuex-orm/core.
  • Compatible with recent releases of @vuex-orm/core.
  • Better alignment with @vuex-orm/core codebase and API.
  • Utilises some existing typings from @vuex-orm/core for consistency and support.

Deprecations

  • Query chain method onlyTrashed supersedes trashed.
  • Model instance method $softDelete supersedes softDelete.

All deprecations come with warnings outside production mode.

v1.1.0

16 Apr 12:17
Compare
Choose a tag to compare

The whole new version of soft delete plugin.