Skip to content

Commit

Permalink
Update React to v18 & AntD to v5 (#1376)
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Mucha <[email protected]>
Co-authored-by: Adrian Mucha <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 2b680f2 commit 36eb052
Show file tree
Hide file tree
Showing 50 changed files with 12,664 additions and 30,086 deletions.
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

0 comments on commit 36eb052

Please sign in to comment.