react-hook-form-rules 1.4.1 → 1.4.3

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.
@@ -7,6 +7,10 @@ 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:
@@ -30,8 +34,20 @@ jobs:
30
34
  - name: Authenticate with npm
31
35
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
32
36
 
37
+ - name: Check .npmrc
38
+ run: npm run check-npmrc
39
+
40
+ - name: Debug env variables
41
+ run: |
42
+ echo "NPM_TOKEN=${{ secrets.NPM_TOKEN }}"
43
+ echo "GH_PACKAGES_TOKEN=${{ secrets.GH_PACKAGES_TOKEN }}"
44
+
45
+ - name: Authenticate with GitHub Packages
46
+ run: echo "@chopperqt:registry=https://npm.pkg.github.com/" >> ~/.npmrc && echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_PACKAGES_TOKEN }}" >> ~/.npmrc
47
+
33
48
  - name: Run semantic-release
34
49
  run: npx semantic-release
35
50
  env:
36
51
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37
52
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53
+ GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
package/.vvcasd ADDED
@@ -0,0 +1,5 @@
1
+ registry=https://registry.npmjs.org/
2
+ //registry.npmjs.org/:_authToken=${NPM_TOKEN}
3
+
4
+ @chopperqt:registry=https://npm.pkg.github.com/
5
+ //npm.pkg.github.com/:_authToken=${GH_PACKAGES_TOKEN}
package/CHANGELOG.md ADDED
@@ -0,0 +1,83 @@
1
+ ## [1.4.3](https://github.com/chopperqt/react-hook-form-rules/compare/v1.4.2...v1.4.3) (2025-03-15)
2
+
3
+ ### 🔥 Code Refactoring
4
+
5
+ * незначительные правки ([da9eef9](https://github.com/chopperqt/react-hook-form-rules/commit/da9eef91d6e80df56ec5a32bce7f62ce532b2b6f))
6
+
7
+ ## [1.0.1](https://github.com/chopperqt/react-hook-form-rules/compare/v1.0.0...v1.0.1) (2025-03-15)
8
+
9
+ ### 🔥 Code Refactoring
10
+
11
+ * измнеение версии ([ca25833](https://github.com/chopperqt/react-hook-form-rules/commit/ca25833c08484db0194ee6e3503e3f17dbe3d264))
12
+
13
+ ## 1.0.0 (2025-03-15)
14
+
15
+ ### 🆕 Features
16
+
17
+ * добавлен CI release ([a875975](https://github.com/chopperqt/react-hook-form-rules/commit/a875975601ed3be3e02d72bdbdfc9c3c74c7381f))
18
+ * добавлен commitizen и semantic-release ([fa61a4c](https://github.com/chopperqt/react-hook-form-rules/commit/fa61a4c9c6493b36b4abc304706d74104d631da6))
19
+ * добавлен недостающий пакет ([edaf738](https://github.com/chopperqt/react-hook-form-rules/commit/edaf7381593bde0e6798da036fe7f897defe64af))
20
+ * добавлен пакет ([cccdfee](https://github.com/chopperqt/react-hook-form-rules/commit/cccdfee421da031fe7433ca44ee9dc5688ef2bbf))
21
+ * добавлена публикация в github packages ([4e0d4db](https://github.com/chopperqt/react-hook-form-rules/commit/4e0d4db013f789ae193cefa3e121b5e317a376ec))
22
+ * добавлены permissionas ([e42b3d0](https://github.com/chopperqt/react-hook-form-rules/commit/e42b3d081854ec57d21923b37436be5032ebd2e6))
23
+ * добавлены некоторые плагины ([0d9e4f1](https://github.com/chopperqt/react-hook-form-rules/commit/0d9e4f1d556bd4c095300ac5e1e30bae2773b5fd))
24
+ * жалкая попытка ([3e14b80](https://github.com/chopperqt/react-hook-form-rules/commit/3e14b8031fea6fbb9a350c7ec80d88310688f428))
25
+ * изменен release ([42c4134](https://github.com/chopperqt/react-hook-form-rules/commit/42c413422f411bb83716b844120afceaa7f8f9d2))
26
+ * обновление CI rlease ([7312de2](https://github.com/chopperqt/react-hook-form-rules/commit/7312de21e2b5c491c1e3a5b7d46e0053ca7a69fe))
27
+ * обновление semantic-release node ([9f4d6ea](https://github.com/chopperqt/react-hook-form-rules/commit/9f4d6ea1b75e4cf1ad5d3dea5942f43931f2808a))
28
+ * правки импортов ([2c7b5de](https://github.com/chopperqt/react-hook-form-rules/commit/2c7b5de4c99ade3a3f755f6122eb78f1611054c9))
29
+ * правки нейминга ([c231562](https://github.com/chopperqt/react-hook-form-rules/commit/c231562e2b4e8822b386c6ea23c621f7f2e76719))
30
+
31
+ ### 🔥 Code Refactoring
32
+
33
+ * ghjdhrf ([92668f0](https://github.com/chopperqt/react-hook-form-rules/commit/92668f015e765a64e31366e8e9cf272ad19c1389))
34
+ * gjgsnrf ([2759b1f](https://github.com/chopperqt/react-hook-form-rules/commit/2759b1ffe717855a239d56b3445326f34ca3717f))
35
+ * добавление которые плагинов ([3cc2e8a](https://github.com/chopperqt/react-hook-form-rules/commit/3cc2e8a9359075cad1f6d6eba4ba307d65ba1cf4))
36
+ * жалкие попытки ([3c1f17b](https://github.com/chopperqt/react-hook-form-rules/commit/3c1f17b73323c39d375d49409ec778443bdd62b7))
37
+ * исправление названия папки ([07a9d87](https://github.com/chopperqt/react-hook-form-rules/commit/07a9d87643a1219755b55d67db144387a635a79b))
38
+ * незначительные правки ([a94d8b9](https://github.com/chopperqt/react-hook-form-rules/commit/a94d8b9f30ac033f2b0542bede2411cab04d27dd))
39
+ * незначительные правки ([0b4af36](https://github.com/chopperqt/react-hook-form-rules/commit/0b4af365918b60a3bf9d13e00a36903860d9e28a))
40
+ * незначительные правки ([4ba2910](https://github.com/chopperqt/react-hook-form-rules/commit/4ba2910488730885a4c856fa85254f8f7f30587e))
41
+ * незначительные правки ([83cdca6](https://github.com/chopperqt/react-hook-form-rules/commit/83cdca6ea879f127569740b0df6e1fa12469fcc1))
42
+ * незначительные правки ([d957531](https://github.com/chopperqt/react-hook-form-rules/commit/d9575319912e9d9b9a6d655f8e275d191b0dfbee))
43
+ * незначительные правки ([ae4bc8d](https://github.com/chopperqt/react-hook-form-rules/commit/ae4bc8df55362669125b46e5fa7b5c7a2d6d3ff4))
44
+ * незначительные правки ([380bff6](https://github.com/chopperqt/react-hook-form-rules/commit/380bff6712720ceae40a4a2da8f67760be9ae607))
45
+ * незначительные правки ([7835978](https://github.com/chopperqt/react-hook-form-rules/commit/783597889151f9309308aae758516f0bfdc177a8))
46
+ * незначительные правки ([ca75448](https://github.com/chopperqt/react-hook-form-rules/commit/ca7544803e9a3118441b36dffb15bfe4884dd474))
47
+ * незначительные правки ([b570c47](https://github.com/chopperqt/react-hook-form-rules/commit/b570c47c96ebe44937abbe61df5fed0b2f71197e))
48
+ * незначительные правки ([30638e4](https://github.com/chopperqt/react-hook-form-rules/commit/30638e4ffd58dd08001ab365f6d03cafd60a63d0))
49
+ * незначительные правки ([0f40195](https://github.com/chopperqt/react-hook-form-rules/commit/0f4019502f2ad54eb2a73f4e705c2183963e9d2a))
50
+ * незначительные правки ([a523404](https://github.com/chopperqt/react-hook-form-rules/commit/a5234048c0f08eee34143454ee10057af4b6ebdf))
51
+ * обновление ([267436f](https://github.com/chopperqt/react-hook-form-rules/commit/267436fb9b1cb0cf16dd5f3c094d4f49263dca10))
52
+ * очередная жалкая попытка ([4cd5227](https://github.com/chopperqt/react-hook-form-rules/commit/4cd5227e96d50a475413431ca8e6b37f0f1406e7))
53
+ * поднятие версии node ([3d99e01](https://github.com/chopperqt/react-hook-form-rules/commit/3d99e017bfc0e1275c60c022c9c6267eda5d4df4))
54
+ * попытка ([b81087c](https://github.com/chopperqt/react-hook-form-rules/commit/b81087c547cbf4d0d358a51af1d054d1f03c9f31))
55
+ * попытка ([46282a8](https://github.com/chopperqt/react-hook-form-rules/commit/46282a833319073e403236832867da64687a168a))
56
+ * пОпытка запустить ([eec52db](https://github.com/chopperqt/react-hook-form-rules/commit/eec52dba0c42831a43ec26610443a075cd9d8bc6))
57
+ * пОпытка запустить ([b17ba07](https://github.com/chopperqt/react-hook-form-rules/commit/b17ba07bceda573b5a8e733ebbc27fc5e15ad420))
58
+ * попытка запушить как надо ([4b2c469](https://github.com/chopperqt/react-hook-form-rules/commit/4b2c469d0fd6faedb6ae42e261a26fabc57e38cc))
59
+ * попытка удачно запустить ([089654f](https://github.com/chopperqt/react-hook-form-rules/commit/089654fad7b032686578e69d8aaf0cb1f8ac9ffe))
60
+ * правки ([ada50f7](https://github.com/chopperqt/react-hook-form-rules/commit/ada50f78a3a5811721704f024a55c9933a8d4d03))
61
+ * правки release ([84a226a](https://github.com/chopperqt/react-hook-form-rules/commit/84a226a5c23a38bd0f255e2e4abe0cf9da844d36))
62
+ * удаление плагина, который не используется ([df4524e](https://github.com/chopperqt/react-hook-form-rules/commit/df4524eae5c470f9beba308c60223c09e3c52c48))
63
+
64
+ ## [1.6.0](https://github.com/chopperqt/react-hook-form-rules/compare/v1.5.3...v1.6.0) (2025-03-15)
65
+
66
+ ### 🆕 Features
67
+
68
+ * добавлен пакет ([cccdfee](https://github.com/chopperqt/react-hook-form-rules/commit/cccdfee421da031fe7433ca44ee9dc5688ef2bbf))
69
+ * жалкая попытка ([3e14b80](https://github.com/chopperqt/react-hook-form-rules/commit/3e14b8031fea6fbb9a350c7ec80d88310688f428))
70
+
71
+ ### 🔥 Code Refactoring
72
+
73
+ * gjgsnrf ([2759b1f](https://github.com/chopperqt/react-hook-form-rules/commit/2759b1ffe717855a239d56b3445326f34ca3717f))
74
+ * жалкие попытки ([3c1f17b](https://github.com/chopperqt/react-hook-form-rules/commit/3c1f17b73323c39d375d49409ec778443bdd62b7))
75
+ * незначительные правки ([0b4af36](https://github.com/chopperqt/react-hook-form-rules/commit/0b4af365918b60a3bf9d13e00a36903860d9e28a))
76
+ * незначительные правки ([4ba2910](https://github.com/chopperqt/react-hook-form-rules/commit/4ba2910488730885a4c856fa85254f8f7f30587e))
77
+ * незначительные правки ([83cdca6](https://github.com/chopperqt/react-hook-form-rules/commit/83cdca6ea879f127569740b0df6e1fa12469fcc1))
78
+ * незначительные правки ([d957531](https://github.com/chopperqt/react-hook-form-rules/commit/d9575319912e9d9b9a6d655f8e275d191b0dfbee))
79
+ * незначительные правки ([ae4bc8d](https://github.com/chopperqt/react-hook-form-rules/commit/ae4bc8df55362669125b46e5fa7b5c7a2d6d3ff4))
80
+ * очередная жалкая попытка ([4cd5227](https://github.com/chopperqt/react-hook-form-rules/commit/4cd5227e96d50a475413431ca8e6b37f0f1406e7))
81
+ * попытка ([b81087c](https://github.com/chopperqt/react-hook-form-rules/commit/b81087c547cbf4d0d358a51af1d054d1f03c9f31))
82
+ * попытка ([46282a8](https://github.com/chopperqt/react-hook-form-rules/commit/46282a833319073e403236832867da64687a168a))
83
+ * правки ([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.4.1",
3
+ "version": "1.4.3",
4
4
  "publishConfig": {
5
- "access": "public"
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",
@@ -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
- return Object?.keys(obj)?.length > 0 || formattedMessage;
17
+ const isEmpty = Object?.keys(obj)?.length === 0;
18
+
19
+ return isEmpty || formattedMessage;
18
20
  };