react-hook-form-rules 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +20 -3
- package/.vvcasd +5 -0
- package/CHANGELOG.md +96 -0
- package/index.ts +3 -3
- package/package.json +6 -3
- package/release.config.cjs +17 -11
- package/rules/object/get-required-object-rule.ts +3 -1
- package/dist/react-hook-form-rules-1.4.1.tgz +0 -0
- /package/rules/array/{get-max-array-length.ts → get-max-array-length-rule.ts} +0 -0
- /package/rules/array/{get-min-array-length.ts → get-min-array-length-rule.ts} +0 -0
|
@@ -7,10 +7,18 @@ on:
|
|
|
7
7
|
|
|
8
8
|
permissions:
|
|
9
9
|
contents: write
|
|
10
|
+
packages: write
|
|
11
|
+
issues: write # to be able to comment on released issues
|
|
12
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
13
|
+
id-token: write
|
|
10
14
|
|
|
11
15
|
jobs:
|
|
12
16
|
release:
|
|
13
17
|
runs-on: ubuntu-latest
|
|
18
|
+
env:
|
|
19
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
21
|
+
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
|
|
14
22
|
|
|
15
23
|
steps:
|
|
16
24
|
- name: Checkout repository
|
|
@@ -30,8 +38,17 @@ jobs:
|
|
|
30
38
|
- name: Authenticate with npm
|
|
31
39
|
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
32
40
|
|
|
41
|
+
- name: Check .npmrc
|
|
42
|
+
run: npm run check-npmrc
|
|
43
|
+
|
|
44
|
+
- name: Debug env variables
|
|
45
|
+
run: |
|
|
46
|
+
echo "NPM_TOKEN=${{ secrets.NPM_TOKEN }}"
|
|
47
|
+
echo "GH_PACKAGES_TOKEN=${{ secrets.GH_PACKAGES_TOKEN }}"
|
|
48
|
+
echo $NPM_TOKEN | wc -c
|
|
49
|
+
|
|
50
|
+
- name: Authenticate with GitHub Packages
|
|
51
|
+
run: echo "@chopperqt:registry=https://npm.pkg.github.com/" >> ~/.npmrc && echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_PACKAGES_TOKEN }}" >> ~/.npmrc
|
|
52
|
+
|
|
33
53
|
- name: Run semantic-release
|
|
34
54
|
run: npx semantic-release
|
|
35
|
-
env:
|
|
36
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.vvcasd
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
## [1.5.0](https://github.com/chopperqt/react-hook-form-rules/compare/v1.4.3...v1.5.0) (2025-03-15)
|
|
2
|
+
|
|
3
|
+
### 🆕 Features
|
|
4
|
+
|
|
5
|
+
* добавлена проверка токена ([7a2ad16](https://github.com/chopperqt/react-hook-form-rules/commit/7a2ad16d5521a8b773de35ccb89f66767fd27fb0))
|
|
6
|
+
|
|
7
|
+
### 🔥 Code Refactoring
|
|
8
|
+
|
|
9
|
+
* env подняты выше ([799628d](https://github.com/chopperqt/react-hook-form-rules/commit/799628d43debdb03bcc958fd95d4b02a076164d5))
|
|
10
|
+
* добавлен .npmrc ([80cebac](https://github.com/chopperqt/react-hook-form-rules/commit/80cebac0b76cf5e30b12c8b908404f5d494b7b04))
|
|
11
|
+
* добавлен .npmrc ([607979c](https://github.com/chopperqt/react-hook-form-rules/commit/607979c3c63023dfcb2b883168f6d7b1f54cb0ce))
|
|
12
|
+
* исправление npmrc ([946c28d](https://github.com/chopperqt/react-hook-form-rules/commit/946c28d1b57ffe984aaa42d0d135ddf18c3e4260))
|
|
13
|
+
|
|
14
|
+
## [1.4.3](https://github.com/chopperqt/react-hook-form-rules/compare/v1.4.2...v1.4.3) (2025-03-15)
|
|
15
|
+
|
|
16
|
+
### 🔥 Code Refactoring
|
|
17
|
+
|
|
18
|
+
* незначительные правки ([da9eef9](https://github.com/chopperqt/react-hook-form-rules/commit/da9eef91d6e80df56ec5a32bce7f62ce532b2b6f))
|
|
19
|
+
|
|
20
|
+
## [1.0.1](https://github.com/chopperqt/react-hook-form-rules/compare/v1.0.0...v1.0.1) (2025-03-15)
|
|
21
|
+
|
|
22
|
+
### 🔥 Code Refactoring
|
|
23
|
+
|
|
24
|
+
* измнеение версии ([ca25833](https://github.com/chopperqt/react-hook-form-rules/commit/ca25833c08484db0194ee6e3503e3f17dbe3d264))
|
|
25
|
+
|
|
26
|
+
## 1.0.0 (2025-03-15)
|
|
27
|
+
|
|
28
|
+
### 🆕 Features
|
|
29
|
+
|
|
30
|
+
* добавлен CI release ([a875975](https://github.com/chopperqt/react-hook-form-rules/commit/a875975601ed3be3e02d72bdbdfc9c3c74c7381f))
|
|
31
|
+
* добавлен commitizen и semantic-release ([fa61a4c](https://github.com/chopperqt/react-hook-form-rules/commit/fa61a4c9c6493b36b4abc304706d74104d631da6))
|
|
32
|
+
* добавлен недостающий пакет ([edaf738](https://github.com/chopperqt/react-hook-form-rules/commit/edaf7381593bde0e6798da036fe7f897defe64af))
|
|
33
|
+
* добавлен пакет ([cccdfee](https://github.com/chopperqt/react-hook-form-rules/commit/cccdfee421da031fe7433ca44ee9dc5688ef2bbf))
|
|
34
|
+
* добавлена публикация в github packages ([4e0d4db](https://github.com/chopperqt/react-hook-form-rules/commit/4e0d4db013f789ae193cefa3e121b5e317a376ec))
|
|
35
|
+
* добавлены permissionas ([e42b3d0](https://github.com/chopperqt/react-hook-form-rules/commit/e42b3d081854ec57d21923b37436be5032ebd2e6))
|
|
36
|
+
* добавлены некоторые плагины ([0d9e4f1](https://github.com/chopperqt/react-hook-form-rules/commit/0d9e4f1d556bd4c095300ac5e1e30bae2773b5fd))
|
|
37
|
+
* жалкая попытка ([3e14b80](https://github.com/chopperqt/react-hook-form-rules/commit/3e14b8031fea6fbb9a350c7ec80d88310688f428))
|
|
38
|
+
* изменен release ([42c4134](https://github.com/chopperqt/react-hook-form-rules/commit/42c413422f411bb83716b844120afceaa7f8f9d2))
|
|
39
|
+
* обновление CI rlease ([7312de2](https://github.com/chopperqt/react-hook-form-rules/commit/7312de21e2b5c491c1e3a5b7d46e0053ca7a69fe))
|
|
40
|
+
* обновление semantic-release node ([9f4d6ea](https://github.com/chopperqt/react-hook-form-rules/commit/9f4d6ea1b75e4cf1ad5d3dea5942f43931f2808a))
|
|
41
|
+
* правки импортов ([2c7b5de](https://github.com/chopperqt/react-hook-form-rules/commit/2c7b5de4c99ade3a3f755f6122eb78f1611054c9))
|
|
42
|
+
* правки нейминга ([c231562](https://github.com/chopperqt/react-hook-form-rules/commit/c231562e2b4e8822b386c6ea23c621f7f2e76719))
|
|
43
|
+
|
|
44
|
+
### 🔥 Code Refactoring
|
|
45
|
+
|
|
46
|
+
* ghjdhrf ([92668f0](https://github.com/chopperqt/react-hook-form-rules/commit/92668f015e765a64e31366e8e9cf272ad19c1389))
|
|
47
|
+
* gjgsnrf ([2759b1f](https://github.com/chopperqt/react-hook-form-rules/commit/2759b1ffe717855a239d56b3445326f34ca3717f))
|
|
48
|
+
* добавление которые плагинов ([3cc2e8a](https://github.com/chopperqt/react-hook-form-rules/commit/3cc2e8a9359075cad1f6d6eba4ba307d65ba1cf4))
|
|
49
|
+
* жалкие попытки ([3c1f17b](https://github.com/chopperqt/react-hook-form-rules/commit/3c1f17b73323c39d375d49409ec778443bdd62b7))
|
|
50
|
+
* исправление названия папки ([07a9d87](https://github.com/chopperqt/react-hook-form-rules/commit/07a9d87643a1219755b55d67db144387a635a79b))
|
|
51
|
+
* незначительные правки ([a94d8b9](https://github.com/chopperqt/react-hook-form-rules/commit/a94d8b9f30ac033f2b0542bede2411cab04d27dd))
|
|
52
|
+
* незначительные правки ([0b4af36](https://github.com/chopperqt/react-hook-form-rules/commit/0b4af365918b60a3bf9d13e00a36903860d9e28a))
|
|
53
|
+
* незначительные правки ([4ba2910](https://github.com/chopperqt/react-hook-form-rules/commit/4ba2910488730885a4c856fa85254f8f7f30587e))
|
|
54
|
+
* незначительные правки ([83cdca6](https://github.com/chopperqt/react-hook-form-rules/commit/83cdca6ea879f127569740b0df6e1fa12469fcc1))
|
|
55
|
+
* незначительные правки ([d957531](https://github.com/chopperqt/react-hook-form-rules/commit/d9575319912e9d9b9a6d655f8e275d191b0dfbee))
|
|
56
|
+
* незначительные правки ([ae4bc8d](https://github.com/chopperqt/react-hook-form-rules/commit/ae4bc8df55362669125b46e5fa7b5c7a2d6d3ff4))
|
|
57
|
+
* незначительные правки ([380bff6](https://github.com/chopperqt/react-hook-form-rules/commit/380bff6712720ceae40a4a2da8f67760be9ae607))
|
|
58
|
+
* незначительные правки ([7835978](https://github.com/chopperqt/react-hook-form-rules/commit/783597889151f9309308aae758516f0bfdc177a8))
|
|
59
|
+
* незначительные правки ([ca75448](https://github.com/chopperqt/react-hook-form-rules/commit/ca7544803e9a3118441b36dffb15bfe4884dd474))
|
|
60
|
+
* незначительные правки ([b570c47](https://github.com/chopperqt/react-hook-form-rules/commit/b570c47c96ebe44937abbe61df5fed0b2f71197e))
|
|
61
|
+
* незначительные правки ([30638e4](https://github.com/chopperqt/react-hook-form-rules/commit/30638e4ffd58dd08001ab365f6d03cafd60a63d0))
|
|
62
|
+
* незначительные правки ([0f40195](https://github.com/chopperqt/react-hook-form-rules/commit/0f4019502f2ad54eb2a73f4e705c2183963e9d2a))
|
|
63
|
+
* незначительные правки ([a523404](https://github.com/chopperqt/react-hook-form-rules/commit/a5234048c0f08eee34143454ee10057af4b6ebdf))
|
|
64
|
+
* обновление ([267436f](https://github.com/chopperqt/react-hook-form-rules/commit/267436fb9b1cb0cf16dd5f3c094d4f49263dca10))
|
|
65
|
+
* очередная жалкая попытка ([4cd5227](https://github.com/chopperqt/react-hook-form-rules/commit/4cd5227e96d50a475413431ca8e6b37f0f1406e7))
|
|
66
|
+
* поднятие версии node ([3d99e01](https://github.com/chopperqt/react-hook-form-rules/commit/3d99e017bfc0e1275c60c022c9c6267eda5d4df4))
|
|
67
|
+
* попытка ([b81087c](https://github.com/chopperqt/react-hook-form-rules/commit/b81087c547cbf4d0d358a51af1d054d1f03c9f31))
|
|
68
|
+
* попытка ([46282a8](https://github.com/chopperqt/react-hook-form-rules/commit/46282a833319073e403236832867da64687a168a))
|
|
69
|
+
* пОпытка запустить ([eec52db](https://github.com/chopperqt/react-hook-form-rules/commit/eec52dba0c42831a43ec26610443a075cd9d8bc6))
|
|
70
|
+
* пОпытка запустить ([b17ba07](https://github.com/chopperqt/react-hook-form-rules/commit/b17ba07bceda573b5a8e733ebbc27fc5e15ad420))
|
|
71
|
+
* попытка запушить как надо ([4b2c469](https://github.com/chopperqt/react-hook-form-rules/commit/4b2c469d0fd6faedb6ae42e261a26fabc57e38cc))
|
|
72
|
+
* попытка удачно запустить ([089654f](https://github.com/chopperqt/react-hook-form-rules/commit/089654fad7b032686578e69d8aaf0cb1f8ac9ffe))
|
|
73
|
+
* правки ([ada50f7](https://github.com/chopperqt/react-hook-form-rules/commit/ada50f78a3a5811721704f024a55c9933a8d4d03))
|
|
74
|
+
* правки release ([84a226a](https://github.com/chopperqt/react-hook-form-rules/commit/84a226a5c23a38bd0f255e2e4abe0cf9da844d36))
|
|
75
|
+
* удаление плагина, который не используется ([df4524e](https://github.com/chopperqt/react-hook-form-rules/commit/df4524eae5c470f9beba308c60223c09e3c52c48))
|
|
76
|
+
|
|
77
|
+
## [1.6.0](https://github.com/chopperqt/react-hook-form-rules/compare/v1.5.3...v1.6.0) (2025-03-15)
|
|
78
|
+
|
|
79
|
+
### 🆕 Features
|
|
80
|
+
|
|
81
|
+
* добавлен пакет ([cccdfee](https://github.com/chopperqt/react-hook-form-rules/commit/cccdfee421da031fe7433ca44ee9dc5688ef2bbf))
|
|
82
|
+
* жалкая попытка ([3e14b80](https://github.com/chopperqt/react-hook-form-rules/commit/3e14b8031fea6fbb9a350c7ec80d88310688f428))
|
|
83
|
+
|
|
84
|
+
### 🔥 Code Refactoring
|
|
85
|
+
|
|
86
|
+
* gjgsnrf ([2759b1f](https://github.com/chopperqt/react-hook-form-rules/commit/2759b1ffe717855a239d56b3445326f34ca3717f))
|
|
87
|
+
* жалкие попытки ([3c1f17b](https://github.com/chopperqt/react-hook-form-rules/commit/3c1f17b73323c39d375d49409ec778443bdd62b7))
|
|
88
|
+
* незначительные правки ([0b4af36](https://github.com/chopperqt/react-hook-form-rules/commit/0b4af365918b60a3bf9d13e00a36903860d9e28a))
|
|
89
|
+
* незначительные правки ([4ba2910](https://github.com/chopperqt/react-hook-form-rules/commit/4ba2910488730885a4c856fa85254f8f7f30587e))
|
|
90
|
+
* незначительные правки ([83cdca6](https://github.com/chopperqt/react-hook-form-rules/commit/83cdca6ea879f127569740b0df6e1fa12469fcc1))
|
|
91
|
+
* незначительные правки ([d957531](https://github.com/chopperqt/react-hook-form-rules/commit/d9575319912e9d9b9a6d655f8e275d191b0dfbee))
|
|
92
|
+
* незначительные правки ([ae4bc8d](https://github.com/chopperqt/react-hook-form-rules/commit/ae4bc8df55362669125b46e5fa7b5c7a2d6d3ff4))
|
|
93
|
+
* очередная жалкая попытка ([4cd5227](https://github.com/chopperqt/react-hook-form-rules/commit/4cd5227e96d50a475413431ca8e6b37f0f1406e7))
|
|
94
|
+
* попытка ([b81087c](https://github.com/chopperqt/react-hook-form-rules/commit/b81087c547cbf4d0d358a51af1d054d1f03c9f31))
|
|
95
|
+
* попытка ([46282a8](https://github.com/chopperqt/react-hook-form-rules/commit/46282a833319073e403236832867da64687a168a))
|
|
96
|
+
* правки ([ada50f7](https://github.com/chopperqt/react-hook-form-rules/commit/ada50f78a3a5811721704f024a55c9933a8d4d03))
|
package/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getEmailRule } from "./rules/link/get-email-rule";
|
|
2
2
|
import { getUrlRule } from "./rules/link/get-url-rule";
|
|
3
3
|
|
|
4
|
-
import { getMaxArrayLengthRule } from "./rules/array/get-max-array-length";
|
|
5
|
-
import { getMinArrayLengthRule } from "./rules/array/get-min-array-length";
|
|
4
|
+
import { getMaxArrayLengthRule } from "./rules/array/get-max-array-length-rule";
|
|
5
|
+
import { getMinArrayLengthRule } from "./rules/array/get-min-array-length-rule";
|
|
6
6
|
import { getRequiredArrayRule } from "./rules/array/get-required-array-rule";
|
|
7
7
|
|
|
8
8
|
import { getMaxLengthRule } from "./rules/default/get-max-length-rule";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
getMinRule,
|
|
26
26
|
getRequiredRule,
|
|
27
27
|
getUrlRule,
|
|
28
|
-
}
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-hook-form-rules",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
|
-
"
|
|
5
|
+
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -10,17 +10,20 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"build": "tsc --declaration",
|
|
13
|
+
"check-npmrc": "cat ~/.npmrc",
|
|
13
14
|
"deploy": "npm run build && npm publish",
|
|
14
15
|
"commit": "cz"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [],
|
|
17
|
-
"author": "",
|
|
18
|
+
"author": "chopperqt",
|
|
18
19
|
"license": "ISC",
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"@types/node": "^22.7.0",
|
|
21
22
|
"typescript": "^5.6.2"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
25
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
26
|
+
"@semantic-release/exec": "^7.0.3",
|
|
24
27
|
"@semantic-release/git": "^10.0.1",
|
|
25
28
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
26
29
|
"cz-conventional-changelog": "^3.3.0",
|
package/release.config.cjs
CHANGED
|
@@ -4,17 +4,6 @@
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
branches: ["release"],
|
|
6
6
|
plugins: [
|
|
7
|
-
["@semantic-release/npm", {
|
|
8
|
-
"npmPublish": true,
|
|
9
|
-
"tarballDir": "dist"
|
|
10
|
-
}], // Публикуем в npm и обновляем package.json
|
|
11
|
-
["@semantic-release/git", {
|
|
12
|
-
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
|
|
13
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
14
|
-
}],
|
|
15
|
-
// ["@semantic-release/github", {
|
|
16
|
-
// "assets": ["dist/**"] // Загружаем файлы в GitHub Release
|
|
17
|
-
// }],
|
|
18
7
|
[
|
|
19
8
|
'@semantic-release/commit-analyzer',
|
|
20
9
|
{
|
|
@@ -58,5 +47,22 @@ module.exports = {
|
|
|
58
47
|
},
|
|
59
48
|
},
|
|
60
49
|
],
|
|
50
|
+
"@semantic-release/changelog",
|
|
51
|
+
[
|
|
52
|
+
"@semantic-release/npm",
|
|
53
|
+
{
|
|
54
|
+
"npmPublish": true,
|
|
55
|
+
"pkgRoot": ".",
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"@semantic-release/github",
|
|
60
|
+
{
|
|
61
|
+
assets: [
|
|
62
|
+
{ path: "dist/*.tgz", label: "Package Distribution" },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
"@semantic-release/git",
|
|
61
67
|
]
|
|
62
68
|
};
|
|
@@ -14,5 +14,7 @@ export const getRequiredObjectRule = (obj: Record<string, unknown>, message?: st
|
|
|
14
14
|
return false || formattedMessage;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const isEmpty = Object?.keys(obj)?.length === 0;
|
|
18
|
+
|
|
19
|
+
return isEmpty || formattedMessage;
|
|
18
20
|
};
|
|
Binary file
|
|
File without changes
|
|
File without changes
|