Skip to content

Commit

Permalink
fix: bundler errors in React and Vue adapters should now be resolved (#…
Browse files Browse the repository at this point in the history
…447)

* fix: bundler errors in React and Vue adapters should now be resolved

* chore: replace use-isomorphic-layout-effect with dep for RN support
  • Loading branch information
crutchcorn authored Sep 8, 2023
1 parent 57c9f5f commit e3e60cc
Show file tree
Hide file tree
Showing 12 changed files with 2,190 additions and 484 deletions.
2 changes: 1 addition & 1 deletion examples/vue/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/vue-form": "workspace:*",
"@tanstack/vue-form": "^0.2.0",
"vue": "^3.3.4"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion examples/vue/simple/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { useForm } from '@tanstack/vue-form'
import FieldInfo from './FieldInfo.vue'
import { provideFormContext } from '@tanstack/vue-form/src'
const form = useForm({
defaultValues: {
Expand Down
2 changes: 1 addition & 1 deletion packages/form-core/tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "tsup.config.js"]
}
3 changes: 2 additions & 1 deletion packages/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"dependencies": {
"@tanstack/form-core": "workspace:*",
"@tanstack/react-store": "0.1.3",
"@tanstack/store": "0.1.3"
"@tanstack/store": "0.1.3",
"use-isomorphic-layout-effect": "^1.1.2"
},
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-form/src/useField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '@tanstack/form-core'
import { FieldApi, functionalUpdate } from '@tanstack/form-core'
import { useFormContext, formContext } from './formContext'
import { useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect'
import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect'
import type { UseFieldOptions } from './types'

declare module '@tanstack/form-core' {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-form/src/useForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useStore } from '@tanstack/react-store'
import React, { type ReactNode, useState } from 'react'
import { type UseField, type FieldComponent, Field, useField } from './useField'
import { formContext } from './formContext'
import { useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect'
import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect'

declare module '@tanstack/form-core' {
// eslint-disable-next-line no-shadow
Expand Down
3 changes: 0 additions & 3 deletions packages/react-form/src/utils/isBrowser.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/react-form/src/utils/useIsomorphicLayoutEffect.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/react-form/tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "tsup.config.js"]
}
13 changes: 13 additions & 0 deletions packages/vue-form/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": [
"**/*.ts",
"**/*.tsx",
".eslintrc.cjs",
"test-setup.ts",
"tsup.config.js"
]
}
4 changes: 2 additions & 2 deletions packages/vue-form/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
legacyConfig({ entry: ['src/*.ts'] }),
modernConfig({ entry: ['src/*.ts', 'src/*.tsx'] }),
legacyConfig({ entry: ['src/*.ts', 'src/*.tsx'] }),
])
Loading

0 comments on commit e3e60cc

Please sign in to comment.