- Zod v4 support — Added
zod@^4.0.0as an accepted peer dependency alongsidezod@^3.20.0. Both versions work out of the box with no code changes required.
-
HTTP method suffixes for action files — matching the Nuxt
server/api/convention:File Method Route server/actions/create-post.tsPOST (default) /api/_actions/create-postserver/actions/get-user.get.tsGET /api/_actions/get-userserver/actions/update-user.put.tsPUT /api/_actions/update-userserver/actions/remove-item.delete.tsDELETE /api/_actions/remove-item -
GET actions serialize input as
?input=...query params -
POST/PUT/PATCH/DELETE actions use the request body
-
useActionhandles method and serialization automatically -
Non-breaking: files without a suffix continue to use POST
- Removed redundant section banner comments across codebase
- Updated docs with HTTP method suffix guide and examples
- Added playground GET action example
- Fix
npx nuxt module addfailing withERR_PACKAGE_PATH_NOT_EXPORTED— Addeddefaultexport condition to the package exports map so the module can be resolved in both ESM and CJS contexts.
- 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.
- Middleware next() enforcement — Middleware that forgets to call
next()now throws a descriptive error instead of silently failing.
- CI now runs a test matrix against both Nuxt 3 and Nuxt 4.
- Added
enginesfield (node >= 18) to package.json. - Tightened zod peer dependency to
^3.20.0. - README rewritten for clarity.
- Initial nuxt-safe-action module (1cc1719)
- Philip Rutberg (@rutbergphilip)