From 5cf31ea1f5ad833e4e67da4f945a57acadff332a Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 16 Oct 2023 15:54:23 +0800 Subject: [PATCH 1/3] chore: async-validator => @rc-component/async-validator --- README.md | 2 +- package.json | 6 +++--- src/utils/validateUtil.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 261bce3bf..56011fcf7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ open http://localhost:8000 ## Feature - Support react.js and even react-native -- Validate fields with [async-validator](https://github.com/yiminghe/async-validator/) +- Validate fields with [@rc-component/async-validator](https://github.com/react-component/async-validator/) ## Install diff --git a/package.json b/package.json index 7206d520a..779caa5cf 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,9 @@ "react-dom": ">=16.9.0" }, "dependencies": { - "@babel/runtime": "^7.18.0", - "async-validator": "^4.1.0", - "rc-util": "^5.32.2" + "@babel/runtime": "^7.23.2", + "@rc-component/async-validator": "^5.0.0", + "rc-util": "^5.38.0" }, "devDependencies": { "@rc-component/father-plugin": "^1.0.0", diff --git a/src/utils/validateUtil.ts b/src/utils/validateUtil.ts index 866e0e857..58f3adf54 100644 --- a/src/utils/validateUtil.ts +++ b/src/utils/validateUtil.ts @@ -1,4 +1,4 @@ -import RawAsyncValidator from 'async-validator'; +import RawAsyncValidator from '@rc-component/async-validator'; import * as React from 'react'; import warning from 'rc-util/lib/warning'; import type { @@ -36,7 +36,7 @@ async function validateRule( ): Promise { const cloneRule = { ...rule }; - // Bug of `async-validator` + // Bug of `@rc-component/async-validator` // https://github.com/react-component/field-form/issues/316 // https://github.com/react-component/field-form/issues/313 delete (cloneRule as any).ruleIndex; @@ -116,7 +116,7 @@ async function validateRule( } /** - * We use `async-validator` to validate the value. + * We use `@rc-component/async-validator` to validate the value. * But only check one value in a time to avoid namePath validate issue. */ export function validateRules( From 8c6916e60e0c1d7480a896d1530fb803d29813f7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 16 Oct 2023 16:08:59 +0800 Subject: [PATCH 2/3] chore: upgrade np version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 779caa5cf..d985e9b36 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"", "test": "rc-test", "test:coverage": "umi-test --coverage", - "prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish", + "prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish --any-branch", "lint": "eslint src/ --ext .tsx,.ts", "lint:tsc": "tsc -p tsconfig.json --noEmit", "now-build": "npm run docs:build" @@ -67,7 +67,7 @@ "father": "^4.0.0", "gh-pages": "^3.1.0", "jest": "^29.0.0", - "np": "^5.0.3", + "np": "^5.0.0", "prettier": "^2.1.2", "rc-test": "^7.0.15", "react": "^18.0.0", From 6cc06cde0c7c8fc7d455797894e2cd6ffd598b4c Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 16 Oct 2023 16:31:12 +0800 Subject: [PATCH 3/3] 1.40.0-0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d985e9b36..8aa69ba7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-field-form", - "version": "1.39.0", + "version": "1.40.0-0", "description": "React Form Component", "typings": "es/index.d.ts", "engines": {