Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESM Compliance] Add import file extensions #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/solid/src/adapters/valiField.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BaseSchema, BaseSchemaAsync } from 'valibot';
import type { FieldValue, ValidateField, Maybe } from '../types';
import type { FieldValue, ValidateField, Maybe } from '../types/index.js';

/**
* Creates a validation functions that parses the Valibot schema of a field.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/adapters/valiForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
ValidateForm,
PartialValues,
FormErrors,
} from '../types';
} from '../types/index.js';

/**
* Creates a validation functions that parses the Valibot schema of a form.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/adapters/zodField.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ZodType } from 'zod';
import type { FieldValue, ValidateField, Maybe } from '../types';
import type { FieldValue, ValidateField, Maybe } from '../types/index.js';

/**
* Creates a validation functions that parses the Zod schema of a field.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/adapters/zodForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
ValidateForm,
PartialValues,
FormErrors,
} from '../types';
} from '../types/index.js';

/**
* Creates a validation functions that parses the Zod schema of a form.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/components/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
ResponseData,
TransformField,
ValidateField,
} from '../types';
} from '../types/index.js';
import {
getElementInput,
handleFieldEvent,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/components/FieldArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
MaybeArray,
ResponseData,
ValidateFieldArray,
} from '../types';
} from '../types/index.js';
import { initializeFieldArrayStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
Maybe,
MaybePromise,
ResponseData,
} from '../types';
} from '../types/index.js';

/**
* Value type of the submit event object.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/exceptions/FormError.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FieldValues, FormErrors, Maybe } from '../types';
import type { FieldValues, FormErrors, Maybe } from '../types/index.js';

/**
* An explicit form error with useful information for the user.
Expand Down
16 changes: 8 additions & 8 deletions packages/solid/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export * from './adapters';
export * from './components';
export * from './exceptions';
export * from './methods';
export { createForm, createFormStore } from './primitives';
export * from './transformation';
export * from './types';
export * from './validation';
export * from './adapters/index.js';
export * from './components/index.js';
export * from './exceptions/index.js';
export * from './methods/index.js';
export { createForm, createFormStore } from './primitives/index.js';
export * from './transformation/index.js';
export * from './types/index.js';
export * from './validation/index.js';
2 changes: 1 addition & 1 deletion packages/solid/src/methods/clearError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FieldPath,
FieldArrayPath,
Maybe,
} from '../types';
} from '../types/index.js';
import { setError, type SetErrorOptions } from './setError';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/clearResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FieldValues, FormStore, ResponseData } from '../types';
import type { FieldValues, FormStore, ResponseData } from '../types/index.js';

/**
* Clears the response of the form.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/focus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { untrack } from 'solid-js';
import type { FieldPath, FieldValues, FormStore, ResponseData } from '../types';
import type { FieldPath, FieldValues, FormStore, ResponseData } from '../types/index.js';
import { getFieldStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/getError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getFieldStore, getFieldArrayStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/getErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayStore,
getFieldStore,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/getValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import { initializeFieldStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/getValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
Maybe,
PartialValues,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayStore,
getFieldStore,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/hasField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getFieldStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/hasFieldArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getFieldArrayStore } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayStore,
getFieldArrayState,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
RawFieldArrayState,
RawFieldState,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayNames,
getFieldArrayState,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
FieldValues,
FormStore,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayNames,
getFieldArrayState,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FieldValues,
FormStore,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getFieldArrayStore, getUniqueId, setFieldArrayValue } from '../utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
Maybe,
FieldArrayPath,
PartialValues,
} from '../types';
} from '../types/index.js';
import {
getFilteredNames,
getOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/setError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
FieldPath,
FieldArrayPath,
Maybe,
} from '../types';
} from '../types/index.js';
import { getFieldArrayStore, getFieldStore, updateFormInvalid } from '../utils';
import { focus } from './focus';

Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/setResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';

/**
* Value type of the set response options.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/setValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
initializeFieldStore,
updateFieldDirty,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/setValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
Maybe,
PartialValues,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getUniqueId, initializeFieldArrayStore } from '../utils';
import { setValue } from './setValue';
import { validate } from './validate';
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/submit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { untrack } from 'solid-js';
import type { FieldValues, FormStore, ResponseData } from '../types';
import type { FieldValues, FormStore, ResponseData } from '../types/index.js';

/**
* Validates and submits the form.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
RawFieldArrayState,
RawFieldState,
ResponseData,
} from '../types';
} from '../types/index.js';
import {
getFieldArrayNames,
getFieldArrayState,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/methods/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
FieldPath,
FieldArrayPath,
FormErrors,
} from '../types';
} from '../types/index.js';
import {
getFilteredNames,
getOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/primitives/createForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
MaybeValue,
PartialKey,
ResponseData,
} from '../types';
} from '../types/index.js';
import { createFormStore } from './createFormStore';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/primitives/createFormStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
FormStore,
PartialValues,
ResponseData,
} from '../types';
} from '../types/index.js';
import { createSignal } from './createSignal';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/primitives/createLifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
TransformField,
ValidateField,
ValidateFieldArray,
} from '../types';
} from '../types/index.js';
import { getUniqueId, updateFormState } from '../utils';

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/solid/src/primitives/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './createForm';
export * from './createFormStore';
export * from './createLifecycle';
export * from './createSignal';
export * from './createForm.js';
export * from './createFormStore.js';
export * from './createLifecycle.js';
export * from './createSignal.js';
8 changes: 4 additions & 4 deletions packages/solid/src/transformation/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './toCustom';
export * from './toLowerCase';
export * from './toTrimmed';
export * from './toUpperCase';
export * from './toCustom.js';
export * from './toLowerCase.js';
export * from './toTrimmed.js';
export * from './toUpperCase.js';
2 changes: 1 addition & 1 deletion packages/solid/src/transformation/toCustom.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FieldEvent, FieldValue, Maybe, TransformField } from '../types';
import type { FieldEvent, FieldValue, Maybe, TransformField } from '../types/index.js';

/**
* Value type of the transform mode.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/transformation/toLowerCase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Maybe, MaybeValue, TransformField } from '../types';
import type { Maybe, MaybeValue, TransformField } from '../types/index.js';
import { toCustom, type TransformOptions } from './toCustom';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/transformation/toTrimmed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Maybe, MaybeValue, TransformField } from '../types';
import type { Maybe, MaybeValue, TransformField } from '../types/index.js';
import { toCustom, type TransformOptions } from './toCustom';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/transformation/toUpperCase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Maybe, MaybeValue, TransformField } from '../types';
import type { Maybe, MaybeValue, TransformField } from '../types/index.js';
import { toCustom, type TransformOptions } from './toCustom';

/**
Expand Down
10 changes: 5 additions & 5 deletions packages/solid/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './field';
export * from './fieldArray';
export * from './form';
export * from './path';
export * from './utils';
export * from './field.js';
export * from './fieldArray.js';
export * from './form.js';
export * from './path.js';
export * from './utils.js';
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getElementInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
FieldValues,
InternalFieldStore,
Maybe,
} from '../types';
} from '../types/index.js';

/**
* Returns the current input of the element.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getFieldAndArrayStores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
InternalFieldArrayStore,
InternalFieldStore,
ResponseData,
} from '../types';
} from '../types/index.js';

/**
* Returns a tuple with all field and field array stores of a form.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getFieldArrayNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FieldArrayPath,
FormStore,
Maybe,
} from '../types';
} from '../types/index.js';
import { removeInvalidNames } from './removeInvalidNames';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getFieldArrayState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
Maybe,
RawFieldArrayState,
ResponseData,
} from '../types';
} from '../types/index.js';
import { getFieldArrayStore } from './getFieldArrayStore';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getFieldArrayStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
InternalFieldArrayStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';

/**
* Returns the store of a field array.
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/src/utils/getFieldNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
FormStore,
Maybe,
ResponseData,
} from '../types';
} from '../types/index.js';
import { removeInvalidNames } from './removeInvalidNames';

/**
Expand Down
Loading