Skip to content

Releases: TheEdoRan/next-safe-action

v7.1.0

20 Jun 15:07
Compare
Choose a tag to compare

7.1.0 (2024-06-20)

Features

  • support extending previous schemas inside schema method (dfd8ad3)
  • validation-errors: support throwing validation errors via init option (769a372)

v7.1.0-beta.2

20 Jun 14:58
4a4acd0
Compare
Choose a tag to compare
v7.1.0-beta.2 Pre-release
Pre-release

7.1.0-beta.2 (2024-06-20)

Features

  • validation-errors: support throwing validation errors via init option (8abcf33)

v7.1.0-beta.1

20 Jun 01:54
ff952c1
Compare
Choose a tag to compare
v7.1.0-beta.1 Pre-release
Pre-release

7.1.0-beta.1 (2024-06-20)

Features

  • support extending previous schemas inside schema method (79ec8eb)

v7.0.2

13 Jun 21:54
e59e917
Compare
Choose a tag to compare

7.0.2 (2024-06-13)

Refactors

  • add ctx and metadata props to action callbacks (#167) (e59e917)

v7.0.1

13 Jun 17:34
7389fb9
Compare
Choose a tag to compare

7.0.1 (2024-06-13)

Bug Fixes

  • hooks: export useStateAction hook from /stateful-hooks path (#166) (7389fb9)

v7.0.1-next.2

13 Jun 17:14
3955704
Compare
Choose a tag to compare
v7.0.1-next.2 Pre-release
Pre-release

7.0.1-next.2 (2024-06-13)

Refactors

  • hooks: move hooks utils to separate file (3955704)

v7.0.1-next.1

13 Jun 17:07
4ead815
Compare
Choose a tag to compare
v7.0.1-next.1 Pre-release
Pre-release

7.0.1-next.1 (2024-06-13)

Bug Fixes

  • hooks: export useStateAction hook from /stateful-hooks path (4ead815)

v7.0.0

13 Jun 14:50
b5a54f2
Compare
Choose a tag to compare

7.0.0 (2024-06-13)

Features

  • action-client: export a copy of safe action client from /zod path (#115) (20a2ef5)
  • add action execution callbacks (#161) (804a1cf)
  • add Next navigation props to onSuccess and onSettled action callbacks (9b37224)
  • allow direct use of action method, without schema call (3935e9f)
  • allow omitting schema argument in schema method (#102) (aa11577)
  • example: add nested schema example (e4a0346)
  • hooks: return executeAsync from useAction and useOptimisticAction hooks (#147) (e0f5c20), closes #137 #72 #94
  • hooks: return input from hooks (#118) (17935ad), closes #116
  • support binding additional arguments (#97) (f628dc7)
  • support generic metadata type (1e55068)
  • support generic server error (#93) (3d677bd)
  • support middleware chaining (#89) (714554d), closes #88
  • support nested validation errors (e6e4e44), closes #51
  • support passing schema via async function (#154) (4dcf742), closes #111
  • support setting default validation errors shape per instance (#152) (0565085)
  • support stateful actions via stateAction method and useStateAction hook (#110) (d060132)
  • validation-errors: support customization of validation errors format (#101) (66d4ea3), closes #98
  • validation-errors: support flattening via flattenValidationErrors function (#100) (9ae6764)
  • validation-errors: support setting validation errors in action's server code function (#52) (64fb643)

Bug Fixes

  • correctly handle internal framework errors (8596aab)
  • don't push middleware functions in safe client array in use method (054487c)
  • exported class expression ts error 4094 (#96) (f36392a)
  • hooks: useStateAction execution flow (16e5693)
  • hooks: form actions support (79e48b0)
  • make result optional to handle Next navigation events (68d8ed2)
  • prevent sharing metadata between actions (e8932bb)
  • remove unwanted exported private properties from action client (1fbe49c)
  • return proper results when handling framework navigation functions (c8496f7)
  • types: don't allow undefined results for stateful actions (ec95a10)
  • types: handle result undefined value at the action level (a9a2c8c)
  • validation errors type for optional nested schema objects (94843fd), closes #51
  • validation-errors: server validation errors were incorrectly processed by typeschema clients (cd567a2)

Refactors

  • action-builder: simplify try/catch block for middleware stack execution (f356709)
  • example: directly import homepage Server Action in Client Component (b1a0077)
  • example: reorganize examples, use Tailwind (#77) (6e73cae)
  • hooks: better useOptimisticAction variable names (131f8bf)
  • hooks: don't set empty result before throwing Next navigation errors (c3a4b40)
  • hooks: export EMPTY_HOOK_RESULT just from /hooks path (74c0dc8)
  • hooks: pass callbacks data in single object instead of multiple function args (14b1fbf)
  • hooks: return shorthand statuses from hooks (#131) (6319f07), closes #129
  • hooks: use separate type for server state in useOptimisticAction (#134) (c38dbe1), closes #127
  • improve internal code (#150) (8e19d94)
  • remove clone method (8dc2138)
  • rename define method to action (1617d22)
  • rename ServerValidationError class to ActionServerValidationError (54b0b52)
  • restructure monorepo (#104) (58373ab)
  • simpler buildValidationErrors implementation, move ValidationErrors type to index ([5d3f258](5d3f2581a9925d...
Read more

v7.0.0-next.60

13 Jun 12:05
2374944
Compare
Choose a tag to compare
v7.0.0-next.60 Pre-release
Pre-release

7.0.0-next.60 (2024-06-13)

Bug Fixes

  • hooks: form actions support (79e48b0)

v7.0.0-next.59

12 Jun 13:28
c3a4b40
Compare
Choose a tag to compare
v7.0.0-next.59 Pre-release
Pre-release

7.0.0-next.59 (2024-06-12)

Refactors

  • hooks: don't set empty result before throwing Next navigation errors (c3a4b40)