Skip to content

Commit

Permalink
chore(deps): update to @tanstack/config 0.13.1 (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins authored Aug 30, 2024
1 parent df3359a commit 89cb672
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 40 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.12.3",
"@solidjs/testing-library": "^0.8.9",
"@tanstack/config": "^0.13.0",
"@tanstack/config": "^0.13.1",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/angular-form/src/inject-form.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FormApi, type FormOptions, type Validator } from '@tanstack/form-core'
import { FormApi } from '@tanstack/form-core'
import { injectStore } from '@tanstack/angular-store'
import type { FormOptions, Validator } from '@tanstack/form-core'

export function injectForm<
TFormData,
Expand Down
23 changes: 10 additions & 13 deletions packages/angular-form/src/tanstack-field.directive.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import {
Directive,
Input,
type OnChanges,
type OnDestroy,
type OnInit,
booleanAttribute,
numberAttribute,
} from '@angular/core'
import {
type DeepKeys,
type DeepValue,
FieldApi,
type FieldMeta,
type FieldOptions,
type FieldValidators,
FormApi,
type NoInfer as NoInferHack,
type Validator,
import { FieldApi, FormApi } from '@tanstack/form-core'
import type { OnChanges, OnDestroy, OnInit } from '@angular/core'
import type {
DeepKeys,
DeepValue,
FieldMeta,
FieldOptions,
FieldValidators,
NoInfer as NoInferHack,
Validator,
} from '@tanstack/form-core'

@Directive({
Expand Down
2 changes: 1 addition & 1 deletion packages/form-core/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type DeepKeys } from './util-types'
import type { DeepKeys } from './util-types'

export type ValidationError = undefined | false | null | string

Expand Down
3 changes: 2 additions & 1 deletion packages/react-form/src/useField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { type FunctionComponent, useState } from 'react'
import React, { useState } from 'react'
import { useStore } from '@tanstack/react-store'
import { FieldApi, functionalUpdate } from '@tanstack/form-core'
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'
import type { FunctionComponent } from 'react'
import type { NodeType, UseFieldOptions } from './types'
import type { DeepKeys, DeepValue, Validator } from '@tanstack/form-core'

Expand Down
3 changes: 2 additions & 1 deletion packages/react-form/src/useForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { FormApi, functionalUpdate } from '@tanstack/form-core'
import { useStore } from '@tanstack/react-store'
import React, { useState } from 'react'
import { Field, type FieldComponent, type UseField, useField } from './useField'
import { Field, useField } from './useField'
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'
import type { FieldComponent, UseField } from './useField'
import type { NoInfer } from '@tanstack/react-store'
import type { FormOptions, FormState, Validator } from '@tanstack/form-core'
import type { NodeType } from './types'
Expand Down
1 change: 0 additions & 1 deletion packages/react-form/tests/useField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ describe('useField', () => {
firstName: '',
lastName: '',
},
// eslint-disable-next-line @typescript-eslint/no-empty-function
onSubmit: async () => {},
})

Expand Down
2 changes: 1 addition & 1 deletion packages/react-form/tests/useTransform.test-d.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertType, it } from 'vitest'
import { formOptions, mergeForm, useForm, useTransform } from '../src'
import { type ServerFormState } from '../src/nextjs/types'
import type { ServerFormState } from '../src/nextjs/types'

it('should maintain the type of the form', () => {
const state = {} as ServerFormState<any>
Expand Down
11 changes: 4 additions & 7 deletions packages/solid-form/src/createForm.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { FormApi, functionalUpdate } from '@tanstack/form-core'
import { type JSXElement, createComputed, onMount } from 'solid-js'
import { createComputed, onMount } from 'solid-js'
import { useStore } from '@tanstack/solid-store'
import {
type CreateField,
Field,
type FieldComponent,
createField,
} from './createField'
import { Field, createField } from './createField'
import type { JSXElement } from 'solid-js'
import type { CreateField, FieldComponent } from './createField'
import type { FormOptions, FormState, Validator } from '@tanstack/form-core'

type NoInfer<T> = [T][T extends any ? 0 : never]
Expand Down
9 changes: 2 additions & 7 deletions packages/valibot-form-adapter/src/validator.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import {
type GenericIssue,
type GenericSchema,
type GenericSchemaAsync,
safeParse,
safeParseAsync,
} from 'valibot'
import { safeParse, safeParseAsync } from 'valibot'
import type { GenericIssue, GenericSchema, GenericSchemaAsync } from 'valibot'
import type { Validator, ValidatorAdapterParams } from '@tanstack/form-core'

type Params = ValidatorAdapterParams<GenericIssue>
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 89cb672

Please # to comment.