From 37da6071d0fc7235feffd1b7407ae2798b082f2e Mon Sep 17 00:00:00 2001 From: Ivan Filho Date: Tue, 28 May 2024 10:08:20 -0300 Subject: [PATCH] chore: prepare to remove next as a dependency --- .gitignore | 2 +- package.json | 2 +- src/useForm.ts | 4 ++-- src/useFormAction.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4b74588..dee7bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies -/node_modules +node_modules /.pnp .pnp.js .yarn/install-state.gz diff --git a/package.json b/package.json index 4a2367e..bcf8162 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "safe-form", - "version": "0.11.1", + "version": "0.11.2", "description": "⚡️ End-to-end type-safety from client to server.", "main": "dist/safe-form.es.js", "types": "dist/index.d.ts", diff --git a/src/useForm.ts b/src/useForm.ts index 4fbc1a2..f3bea35 100644 --- a/src/useForm.ts +++ b/src/useForm.ts @@ -1,7 +1,5 @@ 'use client' -import { shallowEqual } from '@/helpers/shallowEqual' -import { useFormAction } from '@/useFormAction' import { FormHTMLAttributes, HTMLAttributes, @@ -17,7 +15,9 @@ import { import type { Schema } from 'zod' import { parseValueFromInput } from './helpers/parseValueFromInput' import { parseZodError } from './helpers/parseZodError' +import { shallowEqual } from './helpers/shallowEqual' import { FormAction, FormFieldErrors, FormInput, FormState } from './types' +import { useFormAction } from './useFormAction' type BindableField = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement diff --git a/src/useFormAction.ts b/src/useFormAction.ts index 7fbaab2..5c432f8 100644 --- a/src/useFormAction.ts +++ b/src/useFormAction.ts @@ -1,8 +1,8 @@ 'use client' -import { createFormData } from '@/helpers/serializer' import { useCallback, useEffect, useTransition } from 'react' import { useFormState } from 'react-dom' +import { createFormData } from './helpers/serializer' import { FormAction, FormFieldErrors, FormInput, FormState } from './types' type UseFormActionParams = {