Skip to content

Releases: rutbergphilip/nuxt-safe-action

v0.5.0

25 Feb 22:50

Choose a tag to compare

What's Changed

Detached mode for navigation-safe fetches — New detached option for useAction that keeps requests alive even when the calling component unmounts or the user navigates away. Perfect for fire-and-forget operations like analytics, logging, or background saves.

  • Add detached option to useAction composable
  • Requests continue running independently of component lifecycle
  • Documentation added to guide and API reference

Docs & fixes

  • Fix double-spaced code blocks on landing page
  • Fix Nuxt UI display:block override on Shiki .line spans
  • Update hero badge text for v0.5.0

Full Changelog: v0.4.1...v0.5.0

v0.4.1

17 Feb 18:36
e52a34c

Choose a tag to compare

What's Changed

SEO & discoverability improvements — Better visibility across npm, GitHub, and search engines.

  • Point homepage to docs site for npm canonical link
  • Add keywords to package.json (nuxt3, nuxt4, vue3, typescript, etc.)
  • Add GitHub topics for search visibility
  • Expand Open Graph and Twitter Card meta on docs landing page
  • Add site.url for proper sitemap and canonical tag generation
  • Add robots.txt with sitemap reference
  • Enrich all docs page descriptions for better meta tags

README comparison table fix — Acknowledge useFetch, file-based server routes, and output type inference in the $fetch column. Reframe the "Why" section around genuine differentiators: input type safety, per-action middleware, and field-level validation errors.

Docs polish — New shield logo SVG, favicon, updated social card banner and layout.

Full Changelog: v0.4.0...v0.4.1

v0.4.0 — Zod v4 support

15 Feb 12:00

Choose a tag to compare

What's New

Zod v4 peer dependency supportnuxt-safe-action now accepts both Zod v3 and Zod v4 as peer dependencies.

"peerDependencies": {
  "zod": "^3.20.0 || ^4.0.0"
}
  • No code changes required — existing actions work with both Zod v3 and v4
  • Zod remains an optional peer dependency
  • All existing schemas, validation errors, and output validation continue to work identically

Full Changelog: v0.3.0...v0.4.0

v0.3.0 — HTTP method support

13 Feb 20:32
b59c888

Choose a tag to compare

What's New

HTTP method suffixes for action files — matching the Nuxt server/api/ convention:

File Method Route
server/actions/create-post.ts POST (default) /api/_actions/create-post
server/actions/get-user.get.ts GET /api/_actions/get-user
server/actions/update-user.put.ts PUT /api/_actions/update-user
server/actions/remove-item.delete.ts DELETE /api/_actions/remove-item
  • GET actions serialize input as ?input=... query params
  • POST/PUT/PATCH/DELETE actions use the request body
  • useAction handles method and serialization automatically
  • Non-breaking: files without a suffix continue to use POST

Other Changes

  • Removed redundant section banner comments across codebase
  • Updated docs with HTTP method suffix guide and examples
  • Added playground GET action example

v0.2.1

12 Feb 20:20

Choose a tag to compare

Bug Fixes

  • Fix npx nuxt module add failing with ERR_PACKAGE_PATH_NOT_EXPORTED — Added default export condition to the package exports map so the module can be resolved in both ESM and CJS contexts.

v0.2.0

11 Feb 22:41

Choose a tag to compare

Nuxt 3 Support, Comprehensive Tests, Bug Fixes

New

  • Nuxt 3 compatibility - The module now works with Nuxt 3 (>=3.0.0) in addition to Nuxt 4. Tested against both Nuxt 3.21 and Nuxt 4.3.
  • Comprehensive test suite - 33 tests covering all major features: input validation, ActionError, returnValidationErrors, handleServerError, output schema validation, middleware chaining, metadata, nested directory actions, and route generation.

Fixed

  • Middleware next() enforcement - Middleware that forgets to call next() now throws a descriptive error instead of silently failing.

Improved

  • CI now runs a test matrix against both Nuxt 3 and Nuxt 4.
  • Added engines field (node >= 18) to package.json.
  • Tightened zod peer dependency to ^3.20.0.
  • README rewritten for clarity.

v0.1.1

11 Feb 21:47

Choose a tag to compare

🚀 Enhancements

  • Initial nuxt-safe-action module (1cc1719)

❤️ Contributors