Skip to content

Commit 9a18e45

Browse files
committed
big changes
1 parent f3047f3 commit 9a18e45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+36202
-8757
lines changed

.babelrc

-16
This file was deleted.

.browserslistrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Browsers we support
2+
Chrome >= 73
3+
Firefox >= 78
4+
Edge >= 79
5+
Safari >= 12.0
6+
iOS >= 12.0
7+
opera >= 53

.codesandbox/ci.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"installCommand": "install:csb",
3+
"sandboxes": ["/examples/react/basic-typescript", "/examples/solid/basic-typescript", "/examples/svelte/basic", "/examples/vue/basic"],
4+
"packages": ["packages/**"],
5+
"node": "16"
6+
}

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc

+54-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
11
{
2-
"extends": ["react-app", "prettier"]
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "import"],
5+
"extends": [
6+
"plugin:@typescript-eslint/eslint-recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:import/typescript",
9+
"react-app",
10+
"prettier"
11+
],
12+
"env": {
13+
"es6": true
14+
},
15+
"parserOptions": {
16+
"project": "./tsconfig.base.json",
17+
"sourceType": "module"
18+
},
19+
"settings": {
20+
"import/parsers": {
21+
"@typescript-eslint/parser": [".ts", ".tsx"]
22+
},
23+
"import/resolver": {
24+
"node": true,
25+
"typescript": {
26+
"project": "packages/*/tsconfig.json"
27+
}
28+
},
29+
"react": {
30+
"version": "detect"
31+
}
32+
},
33+
"rules": {
34+
"react/jsx-key": ["error", { "checkFragmentShorthand": true }],
35+
"@typescript-eslint/ban-types": "off",
36+
"@typescript-eslint/ban-ts-comment": "off",
37+
"@typescript-eslint/consistent-type-imports": "error",
38+
"@typescript-eslint/explicit-module-boundary-types": "off",
39+
"@typescript-eslint/no-empty-interface": "off",
40+
"@typescript-eslint/no-explicit-any": "off",
41+
"@typescript-eslint/no-non-null-assertion": "off",
42+
"@typescript-eslint/no-unnecessary-condition": "error",
43+
"@typescript-eslint/no-inferrable-types": [
44+
"error",
45+
{
46+
"ignoreParameters": true
47+
}
48+
],
49+
"no-shadow": "error",
50+
"import/no-cycle": "error",
51+
"import/no-unresolved": ["error", { "ignore": ["^@tanstack\/"] }],
52+
"import/no-unused-modules": ["off", { "unusedExports": true }],
53+
"no-redeclare": "off",
54+
"react-hooks/exhaustive-deps": "error"
55+
}
356
}

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto eol=lf

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [tannerlinsley, tkdodo]

.github/ISSUE_TEMPLATE/bug_report.yml

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: '🐛 Bug report'
2+
description: Report a reproducible bug or regression
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for reporting an issue :pray:.
8+
9+
This issue tracker is for reporting reproducible bugs or regression's found in [TanStack Form](https://github.com/TanStack/form)
10+
If you have a question about how to achieve something and are struggling, please post a question
11+
inside of TanStack Form's [Discussions tab](https://github.com/TanStack/form/discussions)
12+
13+
Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:
14+
- TanStack Form's [Discussions tab](https://github.com/TanStack/form/discussions)
15+
- TanStack Form's [Open Issues](https://github.com/TanStack/form/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
16+
- TanStack Form's [Closed Issues](https://github.com/TanStack/form/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)
17+
18+
The more information you fill in, the better the community can help you.
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Describe the bug
23+
description: Provide a clear and concise description of the challenge you are running into.
24+
validations:
25+
required: true
26+
- type: input
27+
id: link
28+
attributes:
29+
label: Your minimal, reproducible example
30+
description: |
31+
Please add a link to a minimal reproduction.
32+
Note:
33+
- Your bug may get fixed much faster if we can run your code and it doesn't have dependencies other than React/Solid/Vue/Svelte.
34+
- To create a shareable code example for web, you can use CodeSandbox (https://codesandbox.io/s/new) or Stackblitz (https://stackblitz.com/).
35+
- Please make sure the example is complete and runnable - e.g. avoid localhost URLs.
36+
- To stub out real api requests - Promise.resolve and Promise.reject are good options for easy reproduction
37+
- Feel free to fork any of the official CodeSandbox examples to reproduce your issue: https://tanstack.com/form/v4/docs/examples/react/simple
38+
- For React Native, you can use: https://snack.expo.dev/
39+
- For TypeScript related issues only, a TypeScript Playground link might be sufficient: https://www.typescriptlang.org/play
40+
- Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.
41+
placeholder: |
42+
e.g. Code Sandbox, Stackblitz, Expo Snack or TypeScript playground
43+
validations:
44+
required: true
45+
- type: textarea
46+
id: steps
47+
attributes:
48+
label: Steps to reproduce
49+
description: Describe the steps we have to take to reproduce the behavior.
50+
placeholder: |
51+
1. Go to '...'
52+
2. Click on '....'
53+
3. Scroll down to '....'
54+
4. See error
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: expected
59+
attributes:
60+
label: Expected behavior
61+
description: Provide a clear and concise description of what you expected to happen.
62+
placeholder: |
63+
As a user, I expected ___ behavior but i am seeing ___
64+
validations:
65+
required: true
66+
- type: dropdown
67+
attributes:
68+
label: How often does this bug happen?
69+
description: |
70+
Following the repro steps above, how easily are you able to reproduce this bug?
71+
options:
72+
- Every time
73+
- Often
74+
- Sometimes
75+
- Only once
76+
- type: textarea
77+
id: screenshots_or_videos
78+
attributes:
79+
label: Screenshots or Videos
80+
description: |
81+
If applicable, add screenshots or a video to help explain your problem.
82+
For more information on the supported file image/file types and the file size limits, please refer
83+
to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
84+
placeholder: |
85+
You can drag your video or image files inside of this editor ↓
86+
- type: textarea
87+
id: platform
88+
attributes:
89+
label: Platform
90+
description: |
91+
Please let us know which Operting System, Browser and Browser version you were using when the issue occurred.
92+
placeholder: |
93+
- OS: [e.g. macOS, Windows, Linux, iOS, Android]
94+
- Browser: [e.g. Chrome, Safari, Firefox, React Native]
95+
- Version: [e.g. 91.1]
96+
validations:
97+
required: true
98+
- type: dropdown
99+
id: adapter
100+
attributes:
101+
label: Tanstack Form adapter
102+
description: |
103+
Please let us know which adapter of TanStack Form you were using when the issue occurred.
104+
options:
105+
- react-form
106+
- solid-form
107+
- svelte-form
108+
- vue-form
109+
- vanilla
110+
- type: input
111+
id: rq-version
112+
attributes:
113+
label: TanStack Form version
114+
description: |
115+
Please let us know the exact version of TanStack Form you were using when the issue occurred. Please don't just put in "latest", as this is subject to change.
116+
placeholder: |
117+
e.g. v3.30.1
118+
validations:
119+
required: true
120+
- type: input
121+
id: ts-version
122+
attributes:
123+
label: TypeScript version
124+
description: |
125+
If you are using TypeScript, please let us know the exact version of TypeScript you were using when the issue occurred.
126+
placeholder: |
127+
e.g. v4.5.4
128+
- type: textarea
129+
id: additional
130+
attributes:
131+
label: Additional context
132+
description: Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Requests & Questions
4+
url: https://github.com/TanStack/form/discussions
5+
about: Please ask and answer questions here.
6+
- name: Community Chat
7+
url: https://discord.gg/mQd7egN
8+
about: A dedicated discord server hosted by Tanner Linsley

.github/workflows/ci.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: ci
2+
concurrency:
3+
group: publish-${{ github.github.base_ref }}
4+
cancel-in-progress: true
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: override release tag
10+
required: false
11+
push:
12+
branches:
13+
- 'main'
14+
- 'alpha'
15+
- 'beta'
16+
env:
17+
NX_DAEMON: false
18+
NX_VERBOSE_LOGGING: true
19+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
20+
jobs:
21+
test-and-publish:
22+
if: github.repository == 'TanStack/form' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
23+
name: 'Test & Publish'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
with:
28+
fetch-depth: '0'
29+
- uses: pnpm/[email protected]
30+
with:
31+
version: 7
32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: 16.14.2
35+
registry-url: https://registry.npmjs.org/
36+
cache: 'pnpm'
37+
- name: Install dependencies
38+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
39+
- name: Run Tests
40+
uses: nick-fields/[email protected]
41+
with:
42+
command: pnpm run test:ci --base=${{ github.event.before }}
43+
timeout_minutes: 10
44+
max_attempts: 3
45+
- name: Publish
46+
run: |
47+
git config --global user.name 'Tanner Linsley'
48+
git config --global user.email '[email protected]'
49+
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
50+
pnpm run cipublish
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
53+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
54+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
56+
TAG: ${{ inputs.tag }}
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)