Skip to content

Commit

Permalink
chore(deps): use react 19 stable, fix JSX resolution (#1113)
Browse files Browse the repository at this point in the history
* chore(deps): use react 19 stable, fix JSX resolution

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
lachlancollins and autofix-ci[bot] authored Jan 13, 2025
1 parent 58628f7 commit b60264c
Show file tree
Hide file tree
Showing 22 changed files with 347 additions and 432 deletions.
4 changes: 2 additions & 2 deletions docs/framework/react/reference/functions/usestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: useStore
function useStore<TState, TSelected>(store, selector?): TSelected
```

Defined in: node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@18.3.1\_react@18.3.1\_\_react@18.3.1/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:7
Defined in: node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@19.0.0\_react@19.0.0\_\_react@19.0.0/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:7

### Type Parameters

Expand Down Expand Up @@ -39,7 +39,7 @@ Defined in: node\_modules/.pnpm/@[email protected]\[email protected]\_r
function useStore<TState, TSelected>(store, selector?): TSelected
```

Defined in: node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@18.3.1\_react@18.3.1\_\_react@18.3.1/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:8
Defined in: node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@19.0.0\_react@19.0.0\_\_react@19.0.0/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:8

### Type Parameters

Expand Down
8 changes: 4 additions & 4 deletions examples/react/array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
12 changes: 4 additions & 8 deletions examples/react/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@
},
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"react": "^19.0.0-rc.1",
"react-dom": "^19.0.0-rc.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"babel-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
"eslint-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
"vite": "^5.4.11"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/field-errors-from-form-validators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"jsx": "react",
"jsx": "react-jsx",
"noEmit": true,
"strict": true,
"esModuleInterop": true,
Expand Down
8 changes: 2 additions & 6 deletions examples/react/next-server-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "5.6.3"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
}
}
8 changes: 4 additions & 4 deletions examples/react/query-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"@tanstack/react-query": "^5.59.20",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"@tanstack/react-form": "^0.41.1",
"@tanstack/react-store": "^0.7.0",
"isbot": "^5.1.17",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@remix-run/dev": "^2.15.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "5.6.3",
"vite": "^5.4.11",
"vite-tsconfig-paths": "^5.1.2"
Expand Down
8 changes: 4 additions & 4 deletions examples/react/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/standard-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"arktype": "2.0.0-rc.23",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"valibot": "^1.0.0-beta.9",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@tanstack/react-router": "^1.81.1",
"@tanstack/react-store": "^0.7.0",
"@tanstack/start": "^1.81.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vinxi": "^0.4.3"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"typescript": "5.6.3",
"vite": "^5.4.11",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/ui-libraries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"postcss": "8.4.48",
"postcss-preset-mantine": "1.17.0",
"postcss-simple-vars": "7.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@vitejs/plugin-react-swc": "^3.7.1",
"typescript": "5.6.3",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/valibot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"@tanstack/valibot-form-adapter": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"valibot": "^1.0.0-beta.9"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/yup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"@tanstack/yup-form-adapter": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"yup": "^1.5.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/zod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"dependencies": {
"@tanstack/react-form": "^0.41.1",
"@tanstack/zod-form-adapter": "^0.41.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"vite": "^5.4.11"
},
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
"@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.1.0",
"@types/node": "^22.10.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitest/coverage-istanbul": "^2.1.4",
"@vitest/coverage-istanbul": "^2.1.8",
"eslint": "^9.16.0",
"eslint-plugin-react-hooks": "^5.1.0",
"jsdom": "^25.0.1",
Expand All @@ -57,18 +55,14 @@
"premove": "^4.0.0",
"prettier": "^3.4.2",
"publint": "^0.2.12",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sherif": "^1.0.2",
"solid-js": "^1.9.3",
"typescript": "5.6.3",
"typescript51": "npm:[email protected]",
"typescript52": "npm:[email protected]",
"typescript53": "npm:[email protected]",
"typescript54": "npm:[email protected]",
"typescript55": "npm:[email protected]",
"vite": "^5.4.11",
"vitest": "^2.1.8",
"vue": "^3.5.12"
"vitest": "^2.1.8"
}
}
8 changes: 4 additions & 4 deletions packages/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
},
"devDependencies": {
"@tanstack/start": "^1.81.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"eslint-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vite": "^5.4.11"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/react-form/tests/useField.test-d.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react'
import { assertType, it } from 'vitest'
import { useForm } from '../src/index'

Expand Down
13 changes: 6 additions & 7 deletions packages/react-form/tests/useField.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as React from 'react'
import { describe, expect, it, vi } from 'vitest'
import { render, waitFor } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import { StrictMode } from 'react'
import { StrictMode, useState } from 'react'
import { useStore } from '@tanstack/react-store'
import { useForm } from '../src/index'
import { sleep } from './utils'
Expand Down Expand Up @@ -509,7 +508,7 @@ describe('useField', () => {
}

function Comp() {
const [showField, setShowField] = React.useState(true)
const [showField, setShowField] = useState(true)

const form = useForm({
defaultValues: {
Expand Down Expand Up @@ -589,9 +588,9 @@ describe('useField', () => {
}

const { getByText, findByText, queryByText } = render(
<React.StrictMode>
<StrictMode>
<Comp />
</React.StrictMode>,
</StrictMode>,
)

await user.click(getByText('Submit'))
Expand Down Expand Up @@ -885,9 +884,9 @@ describe('useField', () => {
}

const { queryByText, findByText } = render(
<React.StrictMode>
<StrictMode>
<Comp />
</React.StrictMode>,
</StrictMode>,
)

expect(queryByText('Test')).not.toBeInTheDocument()
Expand Down
9 changes: 4 additions & 5 deletions packages/react-form/tests/useForm.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as React from 'react'
import { describe, expect, it, vi } from 'vitest'
import { render, waitFor } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import { useStore } from '@tanstack/react-store'
import { useEffect } from 'react'
import { useEffect, useState } from 'react'
import { useForm } from '../src/index'
import { sleep } from './utils'

Expand Down Expand Up @@ -79,7 +78,7 @@ describe('useForm', () => {

it('should handle submitting properly', async () => {
function Comp() {
const [submittedData, setSubmittedData] = React.useState<{
const [submittedData, setSubmittedData] = useState<{
firstName: string
} | null>(null)

Expand Down Expand Up @@ -125,8 +124,8 @@ describe('useForm', () => {

it('should run on form mount', async () => {
function Comp() {
const [formMounted, setFormMounted] = React.useState(false)
const [mountForm, setMountForm] = React.useState(false)
const [formMounted, setFormMounted] = useState(false)
const [mountForm, setMountForm] = useState(false)

const form = useForm({
defaultValues: {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-form/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react",
"jsx": "react-jsx",
"moduleResolution": "Bundler",
"paths": {
"@tanstack/form-core": ["../form-core/src"]
Expand Down
Loading

0 comments on commit b60264c

Please sign in to comment.