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

Update React to v18 & AntD to v5 #1376

Merged
merged 28 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e6e3ca5
updated react to v18
piotrpospiech Oct 24, 2024
a3098cf
updated testing library to 13.4.0
piotrpospiech Oct 24, 2024
ca38213
updated testing library to v14.3.1
piotrpospiech Oct 24, 2024
341d69d
fixing tests - wip
piotrpospiech Oct 25, 2024
5ba9be0
fixed submit in forEach test
piotrpospiech Oct 25, 2024
eb815df
Replace act with waitFor ValidatedForm
kestarumper Oct 25, 2024
34e4e06
removed regexes from *ByRole
piotrpospiech Oct 25, 2024
c8cfadd
Replace act with waitFor AutoForm BaseForm
kestarumper Oct 25, 2024
492fb00
removed react & react-dom from package.json
piotrpospiech Oct 25, 2024
2c01513
removed comment
piotrpospiech Oct 25, 2024
8420ee6
Update react to 18 unstyled semantic bootstrap4 bootstrap5
kestarumper Oct 25, 2024
f1f087e
updated validation flow test
piotrpospiech Oct 25, 2024
565f78f
migrated from npm to pnpm
piotrpospiech Oct 25, 2024
7eb4d3e
updated scripts
piotrpospiech Oct 25, 2024
4947bf9
added @types/react to uniforms core package
piotrpospiech Oct 25, 2024
8f07531
removed import from uniforms-bootstrap4
piotrpospiech Oct 25, 2024
d7ad699
disabled AntD and MUI tests
piotrpospiech Oct 25, 2024
b104cc9
fixed dependencies and disabled some eslint rules temporary
piotrpospiech Oct 25, 2024
d0fe9b5
updated react for mui
piotrpospiech Oct 25, 2024
dbd46be
enabled and fixed MUI tests
piotrpospiech Oct 26, 2024
fff099a
fixed TS errors in tests
piotrpospiech Oct 28, 2024
b4458a9
Update react 18 antd5 (#1375)
kestarumper Oct 28, 2024
86b44d1
migrated npm leftovers, updated CI with pnpm
piotrpospiech Oct 28, 2024
587bac2
updated eslintignore
piotrpospiech Oct 28, 2024
0cbc0eb
fixed coverage script
piotrpospiech Oct 28, 2024
1c063e1
updated reproductions
piotrpospiech Oct 28, 2024
00ebd4a
fixed jest-dom types
piotrpospiech Oct 28, 2024
36edcbe
updated eslintignore
piotrpospiech Oct 28, 2024
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
12 changes: 3 additions & 9 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
/.parcel-cache
/coverage

/node_modules
/npm-debug.log
/npm-debug.log*
node_modules/
/packages/*/cjs
/packages/*/esm
/packages/*/node_modules
/reproductions/dist
/reproductions/node_modules
/website/.cache-loader
/website/.docusaurus
/website/build
/website/node_modules
/scripts/
/jest.config.js
13 changes: 6 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
"plugin:import/typescript",
"vazco/typescript"
],
"ignorePatterns": ["reproductions/**/*"],
"overrides": [
{
"files": ["**/__tests__/**/*"],
"env": {
"jest": true
}
},
{
"files": ["reproductions/**/*"],
"files": [
"reproductions/**/*",
"**/__tests__/**/*",
"**/__suites__/**/*"
],
"rules": {
"import/no-unresolved": "off"
}
Expand Down
24 changes: 6 additions & 18 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Our kanban board is public and available [here](https://github.com/orgs/vazco/pr
## Making changes

- Create a fork from where you want to base your work.
- Clone the repo and run `npm ci` **in the top-level only**.
- Make sure you are using `npm` that understands the `package-lock.json` format. Check the current version in the `package.json` file.
- Clone the repo and run `pnpm install` **in the top-level only**.
- Make sure you are using `pnpm` that understands the `pnpm-lock.json` format. Check the current version in the `package.json` file.
- Make sure your commit messages are in the proper format:
- Bugfix or feature:
- `Implemented asynchronous validation (closes #17).`
Expand All @@ -28,7 +28,7 @@ Our kanban board is public and available [here](https://github.com/orgs/vazco/pr
- `Refactored joinName tests.`
- `Updated README.md.`
- Make sure you have added the necessary tests for your changes. Do not worry though, the Codecov bot will report it in the pull request.
- Make sure your code passes _all_ tests: `npm test`.
- Make sure your code passes _all_ tests: `pnpm test`.

### Development

Expand All @@ -39,33 +39,21 @@ Run the commands below in the root directory.
#### Running the build in watch mode

```sh
npm run build:watch
pnpm build:watch
```

#### Running the tests in watch mode

```sh
npm run test -- --watch
pnpm test -- --watch
```

#### Fixing lint issues automatically

```sh
npm run lint:code -- --fix
pnpm lint:code -- --fix
```

#### Making changes to the documentation website (docusaurus)

The local version of docs will use the locally built version of uniforms, so make sure to run the build in watch mode for live changes.

Navigate to `/website` and run

```sh
npm start
```

It will start the docusaurus in development mode supporting hot reload so you should see the changes made to the website immediately.

## _Work in progress_ PRs are also welcome

If you can't or won't finish your PR, submit it anyway - maybe someone else will continue your work. If you don't know how to achieve your desired feature - file an issue for it - maybe someone else will implement it.
57 changes: 21 additions & 36 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,40 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
cache: npm
cache: pnpm
node-version: ${{ matrix.node-version }}

- name: Check dependency duplications
uses: vazco/open-standards/actions/npm-dependency-duplications/@master

- name: Check dependency vulnerabilities
uses: vazco/open-standards/actions/npm-dependency-vulnerabilities/@master

- name: Install
run: npm i -g npm@8 --no-audit && npm ci --no-audit
- name: Lint
run: npm run lint
run: pnpm install

- name: Check linting
run: pnpm lint:code

- name: Check formatting
run: pnpm lint:text

- name: Check types
run: pnpm lint:types

- name: Test
run: npm run coverage -- --no-cache --runInBand
run: pnpm coverage

- name: Report coverage
uses: codecov/[email protected]
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Docs:
runs-on: ubuntu-latest
needs: CI
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/[email protected]
- name: Use Node.js 20
uses: actions/[email protected]
with:
cache: npm
node-version: 20
- name: Install
run: npm ci --no-audit
- name: Build docs
run: npm --prefix website run build
- name: Deploy docs
uses: peaceiris/[email protected]
with:
allow_empty_commit: true
cname: uniforms.tools
force_orphan: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
- name: Create a concentrated doc file
run: node ./scripts/concatenateDocs.js . uniformsConcentratedDocs.md
- name: Upload the concentrated doc file as an artifact
uses: actions/upload-artifact@v3
with:
name: uniformsConcentratedDocs-${{ github.sha }}-${{ github.run_id }}-$(date +'%Y-%m-%d').md
path: uniformsConcentratedDocs.md
19 changes: 5 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
/.idea
/.parcel-cache
/coverage
.DS_Store
.idea/
.parcel-cache/
.turbo
coverage/
dist/
node_modules/

/node_modules
/npm-debug.log
/npm-debug.log*
/packages/*/cjs
/packages/*/esm
/packages/*/node_modules
/reproductions/dist
/reproductions/node_modules
/reproductions/.parcel-cache
/website/.cache-loader
/website/.docusaurus
/website/build
/website/node_modules
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
'eslint --cache --cache-location node_modules/.cache/eslint --cache-strategy content',
],
'**/*.{json,md,mdx,yml}': ['prettier --check'],
'**/*.{ts,tsx}': () => 'npm run lint:types'
'**/*.{ts,tsx}': () => 'pnpm lint:types',
};
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://github.com/testing-library/jest-dom/issues/442#issuecomment-1325926509
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=@types*
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
/.parcel-cache
/coverage
/node_modules
/npm-debug.log
/npm-debug.log*
/packages/*/cjs
/packages/*/esm
/packages/*/node_modules
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module.exports = {
collectCoverageFrom: ['packages/*/src/*.{ts,tsx}'],
coverageReporters: ['html', 'lcovonly', 'text-summary'],
moduleNameMapper: {
'^simpl-schema$': '<rootDir>/node_modules/simpl-schema',
'^uniforms/__suites__$': '<rootDir>/packages/uniforms/__suites__',
'^uniforms([^/]*)(.*)$': '<rootDir>/packages/uniforms$1/src$2',
},
Expand Down
Loading