From a2fe9825a245e34507d7eee7e22348d45d1bd5e4 Mon Sep 17 00:00:00 2001 From: Simon Hessel Date: Thu, 2 Mar 2023 11:36:27 +0100 Subject: [PATCH] Hotfix for new internal subject name in react-hook-form --- .changeset/real-eggs-sell.md | 5 + package.json | 14 +- pnpm-lock.yaml | 299 +++++++++++++++++----------------- src/useCreateFormSubscribe.ts | 8 +- 4 files changed, 165 insertions(+), 161 deletions(-) create mode 100644 .changeset/real-eggs-sell.md diff --git a/.changeset/real-eggs-sell.md b/.changeset/real-eggs-sell.md new file mode 100644 index 0000000..82c486f --- /dev/null +++ b/.changeset/real-eggs-sell.md @@ -0,0 +1,5 @@ +--- +'react-hook-form-subscribe': patch +--- + +Hotfix for new internal subject name in react-hook-form https://github.com/react-hook-form/react-hook-form/commit/a8fb1a1ca7e9ab98545aaf1040a36f9c043cc69c diff --git a/package.json b/package.json index 1071e26..dfdaf31 100644 --- a/package.json +++ b/package.json @@ -41,15 +41,15 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", - "@types/node": "^18.14.0", + "@types/node": "^18.14.4", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@types/testing-library__jest-dom": "^5.14.5", - "@typescript-eslint/eslint-plugin": "^5.53.0", - "@typescript-eslint/parser": "^5.53.0", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", "@vitejs/plugin-react": "^3.1.0", - "@vitest/ui": "^0.28.5", - "eslint": "^8.34.0", + "@vitest/ui": "^0.29.2", + "eslint": "^8.35.0", "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-typescript": "^3.5.3", "eslint-plugin-import": "^2.27.5", @@ -63,11 +63,11 @@ "prettier": "^2.8.4", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hook-form": "^7.43.2", + "react-hook-form": "^7.43.3", "tsup": "^6.6.3", "typescript": "^4.9.5", "vite": "^4.1.4", - "vitest": "^0.28.5" + "vitest": "^0.29.2" }, "dependencies": { "react-use-event-hook": "^0.9.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4b5bbd..b08bc57 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,15 +6,15 @@ specifiers: '@testing-library/jest-dom': ^5.16.5 '@testing-library/react': ^14.0.0 '@testing-library/user-event': ^14.4.3 - '@types/node': ^18.14.0 + '@types/node': ^18.14.4 '@types/react': ^18.0.28 '@types/react-dom': ^18.0.11 '@types/testing-library__jest-dom': ^5.14.5 - '@typescript-eslint/eslint-plugin': ^5.53.0 - '@typescript-eslint/parser': ^5.53.0 + '@typescript-eslint/eslint-plugin': ^5.54.0 + '@typescript-eslint/parser': ^5.54.0 '@vitejs/plugin-react': ^3.1.0 - '@vitest/ui': ^0.28.5 - eslint: ^8.34.0 + '@vitest/ui': ^0.29.2 + eslint: ^8.35.0 eslint-config-prettier: ^8.6.0 eslint-import-resolver-typescript: ^3.5.3 eslint-plugin-import: ^2.27.5 @@ -28,12 +28,12 @@ specifiers: prettier: ^2.8.4 react: ^18.2.0 react-dom: ^18.2.0 - react-hook-form: ^7.43.2 + react-hook-form: ^7.43.3 react-use-event-hook: ^0.9.4 tsup: ^6.6.3 typescript: ^4.9.5 vite: ^4.1.4 - vitest: ^0.28.5 + vitest: ^0.29.2 dependencies: react-use-event-hook: 0.9.4_react@18.2.0 @@ -44,33 +44,33 @@ devDependencies: '@testing-library/jest-dom': 5.16.5 '@testing-library/react': 14.0.0_biqbaboplfbrettd7655fr4n2y '@testing-library/user-event': 14.4.3_@testing-library+dom@9.0.0 - '@types/node': 18.14.0 + '@types/node': 18.14.4 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 '@types/testing-library__jest-dom': 5.14.5 - '@typescript-eslint/eslint-plugin': 5.53.0_ny4s7qc6yg74faf3d6xty2ofzy - '@typescript-eslint/parser': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/eslint-plugin': 5.54.0_6mj2wypvdnknez7kws2nfdgupi + '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu '@vitejs/plugin-react': 3.1.0_vite@4.1.4 - '@vitest/ui': 0.28.5 - eslint: 8.34.0 - eslint-config-prettier: 8.6.0_eslint@8.34.0 - eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm - eslint-plugin-import: 2.27.5_2hqppaeqs2axgzqg6vttejknky - eslint-plugin-jsx-a11y: 6.7.1_eslint@8.34.0 - eslint-plugin-jsx-expressions: 1.3.1_ny4s7qc6yg74faf3d6xty2ofzy - eslint-plugin-prettier: 4.2.1_u5wnrdwibbfomslmnramz52buy - eslint-plugin-react: 7.32.2_eslint@8.34.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.34.0 - eslint-plugin-unused-imports: 2.0.0_cywiivd33wj5dtfbj25uyqfkna + '@vitest/ui': 0.29.2 + eslint: 8.35.0 + eslint-config-prettier: 8.6.0_eslint@8.35.0 + eslint-import-resolver-typescript: 3.5.3_yckic57kx266ph64dhq6ozvb54 + eslint-plugin-import: 2.27.5_tqrcrxlenpngfto46ddarus52y + eslint-plugin-jsx-a11y: 6.7.1_eslint@8.35.0 + eslint-plugin-jsx-expressions: 1.3.1_6mj2wypvdnknez7kws2nfdgupi + eslint-plugin-prettier: 4.2.1_u2zha4kiojzs42thzpgwygphmy + eslint-plugin-react: 7.32.2_eslint@8.35.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.35.0 + eslint-plugin-unused-imports: 2.0.0_hlu2tevvfejtijvruutuci6rky jsdom: 21.1.0 prettier: 2.8.4 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-hook-form: 7.43.2_react@18.2.0 + react-hook-form: 7.43.3_react@18.2.0 tsup: 6.6.3_typescript@4.9.5 typescript: 4.9.5 - vite: 4.1.4_@types+node@18.14.0 - vitest: 0.28.5_itn5mhdgoxdt6nk7zeh5bmcq5a + vite: 4.1.4_@types+node@18.14.4 + vitest: 0.29.2_hjnfa4mohew6fc4mnpzgbfyvpa packages: @@ -892,8 +892,8 @@ packages: dev: true optional: true - /@eslint/eslintrc/1.4.1: - resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} + /@eslint/eslintrc/2.0.0: + resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -909,6 +909,11 @@ packages: - supports-color dev: true + /@eslint/js/8.35.0: + resolution: {integrity: sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@humanwhocodes/config-array/0.11.8: resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} engines: {node: '>=10.10.0'} @@ -950,7 +955,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.14.0 + '@types/node': 18.14.4 '@types/yargs': 17.0.22 chalk: 4.1.2 dev: true @@ -1170,8 +1175,8 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node/18.14.0: - resolution: {integrity: sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==} + /@types/node/18.14.4: + resolution: {integrity: sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==} dev: true /@types/normalize-package-data/2.4.1: @@ -1228,8 +1233,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.53.0_ny4s7qc6yg74faf3d6xty2ofzy: - resolution: {integrity: sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==} + /@typescript-eslint/eslint-plugin/5.54.0_6mj2wypvdnknez7kws2nfdgupi: + resolution: {integrity: sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1239,12 +1244,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/type-utils': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm - '@typescript-eslint/utils': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu + '@typescript-eslint/scope-manager': 5.54.0 + '@typescript-eslint/type-utils': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu + '@typescript-eslint/utils': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 4.3.4 - eslint: 8.34.0 + eslint: 8.35.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -1256,21 +1261,21 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: + /@typescript-eslint/experimental-utils/5.52.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-kd8CRr04mNE3hw4et6+0T0NI5vli2H6dJCGzjX1r12s/FXUehLVadmvo2Nl3DN80YqAh1cVC6zYZAkpmGiVJ5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm - eslint: 8.34.0 + '@typescript-eslint/utils': 5.52.0_ycpbpc6yetojsgtrx3mwntkhsu + eslint: 8.35.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.53.0_7kw3g6rralp5ps6mg3uyzz6azm: - resolution: {integrity: sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==} + /@typescript-eslint/parser/5.54.0_ycpbpc6yetojsgtrx3mwntkhsu: + resolution: {integrity: sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1279,11 +1284,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 + '@typescript-eslint/scope-manager': 5.54.0 + '@typescript-eslint/types': 5.54.0 + '@typescript-eslint/typescript-estree': 5.54.0_typescript@4.9.5 debug: 4.3.4 - eslint: 8.34.0 + eslint: 8.35.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -1297,16 +1302,16 @@ packages: '@typescript-eslint/visitor-keys': 5.52.0 dev: true - /@typescript-eslint/scope-manager/5.53.0: - resolution: {integrity: sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==} + /@typescript-eslint/scope-manager/5.54.0: + resolution: {integrity: sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/visitor-keys': 5.53.0 + '@typescript-eslint/types': 5.54.0 + '@typescript-eslint/visitor-keys': 5.54.0 dev: true - /@typescript-eslint/type-utils/5.53.0_7kw3g6rralp5ps6mg3uyzz6azm: - resolution: {integrity: sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==} + /@typescript-eslint/type-utils/5.54.0_ycpbpc6yetojsgtrx3mwntkhsu: + resolution: {integrity: sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1315,10 +1320,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 - '@typescript-eslint/utils': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/typescript-estree': 5.54.0_typescript@4.9.5 + '@typescript-eslint/utils': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 4.3.4 - eslint: 8.34.0 + eslint: 8.35.0 tsutils: 3.21.0_typescript@4.9.5 typescript: 4.9.5 transitivePeerDependencies: @@ -1330,8 +1335,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types/5.53.0: - resolution: {integrity: sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==} + /@typescript-eslint/types/5.54.0: + resolution: {integrity: sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -1356,8 +1361,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree/5.53.0_typescript@4.9.5: - resolution: {integrity: sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==} + /@typescript-eslint/typescript-estree/5.54.0_typescript@4.9.5: + resolution: {integrity: sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1365,8 +1370,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/visitor-keys': 5.53.0 + '@typescript-eslint/types': 5.54.0 + '@typescript-eslint/visitor-keys': 5.54.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1377,7 +1382,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: + /@typescript-eslint/utils/5.52.0_ycpbpc6yetojsgtrx3mwntkhsu: resolution: {integrity: sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1388,29 +1393,29 @@ packages: '@typescript-eslint/scope-manager': 5.52.0 '@typescript-eslint/types': 5.52.0 '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.9.5 - eslint: 8.34.0 + eslint: 8.35.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 + eslint-utils: 3.0.0_eslint@8.35.0 semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils/5.53.0_7kw3g6rralp5ps6mg3uyzz6azm: - resolution: {integrity: sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==} + /@typescript-eslint/utils/5.54.0_ycpbpc6yetojsgtrx3mwntkhsu: + resolution: {integrity: sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 - eslint: 8.34.0 + '@typescript-eslint/scope-manager': 5.54.0 + '@typescript-eslint/types': 5.54.0 + '@typescript-eslint/typescript-estree': 5.54.0_typescript@4.9.5 + eslint: 8.35.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 + eslint-utils: 3.0.0_eslint@8.35.0 semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -1425,11 +1430,11 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@typescript-eslint/visitor-keys/5.53.0: - resolution: {integrity: sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==} + /@typescript-eslint/visitor-keys/5.54.0: + resolution: {integrity: sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.53.0 + '@typescript-eslint/types': 5.54.0 eslint-visitor-keys: 3.3.0 dev: true @@ -1444,35 +1449,35 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.19.6_@babel+core@7.20.12 magic-string: 0.27.0 react-refresh: 0.14.0 - vite: 4.1.4_@types+node@18.14.0 + vite: 4.1.4_@types+node@18.14.4 transitivePeerDependencies: - supports-color dev: true - /@vitest/expect/0.28.5: - resolution: {integrity: sha512-gqTZwoUTwepwGIatnw4UKpQfnoyV0Z9Czn9+Lo2/jLIt4/AXLTn+oVZxlQ7Ng8bzcNkR+3DqLJ08kNr8jRmdNQ==} + /@vitest/expect/0.29.2: + resolution: {integrity: sha512-wjrdHB2ANTch3XKRhjWZN0UueFocH0cQbi2tR5Jtq60Nb3YOSmakjdAvUa2JFBu/o8Vjhj5cYbcMXkZxn1NzmA==} dependencies: - '@vitest/spy': 0.28.5 - '@vitest/utils': 0.28.5 + '@vitest/spy': 0.29.2 + '@vitest/utils': 0.29.2 chai: 4.3.7 dev: true - /@vitest/runner/0.28.5: - resolution: {integrity: sha512-NKkHtLB+FGjpp5KmneQjTcPLWPTDfB7ie+MmF1PnUBf/tGe2OjGxWyB62ySYZ25EYp9krR5Bw0YPLS/VWh1QiA==} + /@vitest/runner/0.29.2: + resolution: {integrity: sha512-A1P65f5+6ru36AyHWORhuQBJrOOcmDuhzl5RsaMNFe2jEkoj0faEszQS4CtPU/LxUYVIazlUtZTY0OEZmyZBnA==} dependencies: - '@vitest/utils': 0.28.5 + '@vitest/utils': 0.29.2 p-limit: 4.0.0 pathe: 1.1.0 dev: true - /@vitest/spy/0.28.5: - resolution: {integrity: sha512-7if6rsHQr9zbmvxN7h+gGh2L9eIIErgf8nSKYDlg07HHimCxp4H6I/X/DPXktVPPLQfiZ1Cw2cbDIx9fSqDjGw==} + /@vitest/spy/0.29.2: + resolution: {integrity: sha512-Hc44ft5kaAytlGL2PyFwdAsufjbdOvHklwjNy/gy/saRbg9Kfkxfh+PklLm1H2Ib/p586RkQeNFKYuJInUssyw==} dependencies: tinyspy: 1.1.1 dev: true - /@vitest/ui/0.28.5: - resolution: {integrity: sha512-hzzZzv38mH/LMFh54QEJpWFuGixZZBOD+C0fHU81d1lsvochPwNZhWJbuRJQNyZLSMZYCYW4hF6PpNQJXDHDmg==} + /@vitest/ui/0.29.2: + resolution: {integrity: sha512-GpCExCMptrS1z3Xf6kz35Xdvjc2eTBy9OIIwW3HjePVxw9Q++ZoEaIBVimRTTGzSe40XiAI/ZyR0H0Ya9brqLA==} dependencies: fast-glob: 3.2.12 flatted: 3.2.7 @@ -1481,8 +1486,8 @@ packages: sirv: 2.0.2 dev: true - /@vitest/utils/0.28.5: - resolution: {integrity: sha512-UyZdYwdULlOa4LTUSwZ+Paz7nBHGTT72jKwdFSV4IjHF1xsokp+CabMdhjvVhYwkLfO88ylJT46YMilnkSARZA==} + /@vitest/utils/0.29.2: + resolution: {integrity: sha512-F14/Uc+vCdclStS2KEoXJlOLAEyqRhnw0gM27iXw9bMTcyKRPJrQ+rlC6XZ125GIPvvKYMPpVxNhiou6PsEeYQ==} dependencies: cli-truncate: 3.1.0 diff: 5.1.0 @@ -1732,10 +1737,6 @@ packages: update-browserslist-db: 1.0.10_browserslist@4.21.5 dev: true - /buffer-from/1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /bundle-require/4.0.1_esbuild@0.17.10: resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2349,13 +2350,13 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier/8.6.0_eslint@8.34.0: + /eslint-config-prettier/8.6.0_eslint@8.35.0: resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.34.0 + eslint: 8.35.0 dev: true /eslint-import-resolver-node/0.3.7: @@ -2368,7 +2369,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm: + /eslint-import-resolver-typescript/3.5.3_yckic57kx266ph64dhq6ozvb54: resolution: {integrity: sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2377,8 +2378,8 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.12.0 - eslint: 8.34.0 - eslint-plugin-import: 2.27.5_2hqppaeqs2axgzqg6vttejknky + eslint: 8.35.0 + eslint-plugin-import: 2.27.5_tqrcrxlenpngfto46ddarus52y get-tsconfig: 4.4.0 globby: 13.1.3 is-core-module: 2.11.0 @@ -2388,7 +2389,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_yfzt44nswbaazp63chcrlz6vvq: + /eslint-module-utils/2.7.4_igrub7c6rucg6hjc3uqgumd66y: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -2409,16 +2410,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu debug: 3.2.7 - eslint: 8.34.0 + eslint: 8.35.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm + eslint-import-resolver-typescript: 3.5.3_yckic57kx266ph64dhq6ozvb54 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import/2.27.5_2hqppaeqs2axgzqg6vttejknky: + /eslint-plugin-import/2.27.5_tqrcrxlenpngfto46ddarus52y: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -2428,15 +2429,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.34.0 + eslint: 8.35.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_yfzt44nswbaazp63chcrlz6vvq + eslint-module-utils: 2.7.4_igrub7c6rucg6hjc3uqgumd66y has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -2451,7 +2452,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y/6.7.1_eslint@8.34.0: + /eslint-plugin-jsx-a11y/6.7.1_eslint@8.35.0: resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -2466,7 +2467,7 @@ packages: axobject-query: 3.1.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.34.0 + eslint: 8.35.0 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -2476,7 +2477,7 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-jsx-expressions/1.3.1_ny4s7qc6yg74faf3d6xty2ofzy: + /eslint-plugin-jsx-expressions/1.3.1_6mj2wypvdnknez7kws2nfdgupi: resolution: {integrity: sha512-7PTIx62Oy4l3Igtat361C/SCrJ4yXNNJRh/pzXMbzvPzFkvOpHBkTXITkH8PMLDu1RAdilDpjaOUv1m14DbY7w==} engines: {node: 12.x || 14.x || >= 16} peerDependencies: @@ -2487,16 +2488,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm - '@typescript-eslint/parser': 5.53.0_7kw3g6rralp5ps6mg3uyzz6azm - eslint: 8.34.0 + '@typescript-eslint/experimental-utils': 5.52.0_ycpbpc6yetojsgtrx3mwntkhsu + '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu + eslint: 8.35.0 tsutils: 3.21.0_typescript@4.9.5 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-prettier/4.2.1_u5wnrdwibbfomslmnramz52buy: + /eslint-plugin-prettier/4.2.1_u2zha4kiojzs42thzpgwygphmy: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -2507,22 +2508,22 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.34.0 - eslint-config-prettier: 8.6.0_eslint@8.34.0 + eslint: 8.35.0 + eslint-config-prettier: 8.6.0_eslint@8.35.0 prettier: 2.8.4 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.34.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.35.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.34.0 + eslint: 8.35.0 dev: true - /eslint-plugin-react/7.32.2_eslint@8.34.0: + /eslint-plugin-react/7.32.2_eslint@8.35.0: resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'} peerDependencies: @@ -2532,7 +2533,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.34.0 + eslint: 8.35.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -2546,7 +2547,7 @@ packages: string.prototype.matchall: 4.0.8 dev: true - /eslint-plugin-unused-imports/2.0.0_cywiivd33wj5dtfbj25uyqfkna: + /eslint-plugin-unused-imports/2.0.0_hlu2tevvfejtijvruutuci6rky: resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2556,8 +2557,8 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.53.0_ny4s7qc6yg74faf3d6xty2ofzy - eslint: 8.34.0 + '@typescript-eslint/eslint-plugin': 5.54.0_6mj2wypvdnknez7kws2nfdgupi + eslint: 8.35.0 eslint-rule-composer: 0.3.0 dev: true @@ -2582,13 +2583,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.34.0: + /eslint-utils/3.0.0_eslint@8.35.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.34.0 + eslint: 8.35.0 eslint-visitor-keys: 2.1.0 dev: true @@ -2602,12 +2603,13 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.34.0: - resolution: {integrity: sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==} + /eslint/8.35.0: + resolution: {integrity: sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.4.1 + '@eslint/eslintrc': 2.0.0 + '@eslint/js': 8.35.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2618,7 +2620,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 + eslint-utils: 3.0.0_eslint@8.35.0 eslint-visitor-keys: 3.3.0 espree: 9.4.1 esquery: 1.4.2 @@ -3419,7 +3421,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.4.3 - '@types/node': 18.14.0 + '@types/node': 18.14.4 chalk: 4.1.2 ci-info: 3.7.1 graceful-fs: 4.2.10 @@ -4223,8 +4225,8 @@ packages: scheduler: 0.23.0 dev: true - /react-hook-form/7.43.2_react@18.2.0: - resolution: {integrity: sha512-NvD3Oe2Y9hhqo2R4I4iJigDzSLpdMnzUpNMxlnzTbdiT7NT3BW0GxWCzEtwPudZMUPbZhNcSy1EcGAygyhDORg==} + /react-hook-form/7.43.3_react@18.2.0: + resolution: {integrity: sha512-LV6Fixh+hirrl6dXbM78aB6n//82aKbsNbcofF3wc6nx1UJLu3Jj/gsg1E5C9iISnLX+du8VTUyBUz2aCy+H7w==} engines: {node: '>=12.22.0'} peerDependencies: react: ^16.8.0 || ^17 || ^18 @@ -4524,13 +4526,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /source-map-support/0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -5030,8 +5025,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node/0.28.5_@types+node@18.14.0: - resolution: {integrity: sha512-LmXb9saMGlrMZbXTvOveJKwMTBTNUH66c8rJnQ0ZPNX+myPEol64+szRzXtV5ORb0Hb/91yq+/D3oERoyAt6LA==} + /vite-node/0.29.2_@types+node@18.14.4: + resolution: {integrity: sha512-5oe1z6wzI3gkvc4yOBbDBbgpiWiApvuN4P55E8OI131JGrSuo4X3SOZrNmZYo4R8Zkze/dhi572blX0zc+6SdA==} engines: {node: '>=v14.16.0'} hasBin: true dependencies: @@ -5040,9 +5035,7 @@ packages: mlly: 1.1.1 pathe: 1.1.0 picocolors: 1.0.0 - source-map: 0.6.1 - source-map-support: 0.5.21 - vite: 4.1.4_@types+node@18.14.0 + vite: 4.1.4_@types+node@18.14.4 transitivePeerDependencies: - '@types/node' - less @@ -5053,7 +5046,7 @@ packages: - terser dev: true - /vite/4.1.4_@types+node@18.14.0: + /vite/4.1.4_@types+node@18.14.4: resolution: {integrity: sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -5078,7 +5071,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.14.0 + '@types/node': 18.14.4 esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 @@ -5087,8 +5080,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.28.5_itn5mhdgoxdt6nk7zeh5bmcq5a: - resolution: {integrity: sha512-pyCQ+wcAOX7mKMcBNkzDwEHRGqQvHUl0XnoHR+3Pb1hytAHISgSxv9h0gUiSiYtISXUU3rMrKiKzFYDrI6ZIHA==} + /vitest/0.29.2_hjnfa4mohew6fc4mnpzgbfyvpa: + resolution: {integrity: sha512-ydK9IGbAvoY8wkg29DQ4ivcVviCaUi3ivuPKfZEVddMTenFHUfB8EEDXQV8+RasEk1ACFLgMUqAaDuQ/Nk+mQA==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -5111,12 +5104,12 @@ packages: dependencies: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 - '@types/node': 18.14.0 - '@vitest/expect': 0.28.5 - '@vitest/runner': 0.28.5 - '@vitest/spy': 0.28.5 - '@vitest/ui': 0.28.5 - '@vitest/utils': 0.28.5 + '@types/node': 18.14.4 + '@vitest/expect': 0.29.2 + '@vitest/runner': 0.29.2 + '@vitest/spy': 0.29.2 + '@vitest/ui': 0.29.2 + '@vitest/utils': 0.29.2 acorn: 8.8.2 acorn-walk: 8.2.0 cac: 6.7.14 @@ -5132,8 +5125,8 @@ packages: tinybench: 2.3.1 tinypool: 0.3.1 tinyspy: 1.1.1 - vite: 4.1.4_@types+node@18.14.0 - vite-node: 0.28.5_@types+node@18.14.0 + vite: 4.1.4_@types+node@18.14.4 + vite-node: 0.29.2_@types+node@18.14.4 why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/useCreateFormSubscribe.ts b/src/useCreateFormSubscribe.ts index 9a38aa4..b755869 100644 --- a/src/useCreateFormSubscribe.ts +++ b/src/useCreateFormSubscribe.ts @@ -80,7 +80,13 @@ export const useCreateFormSubscribe = { - return control._subjects.watch.subscribe({ + // Watch has been renamed to values in https://github.com/react-hook-form/react-hook-form/commit/a8fb1a1ca7e9ab98545aaf1040a36f9c043cc69c + // To support both versions, we need to use the old name for older versions + const subject = + // @ts-expect-error + control._subjects.values ?? (control._subjects.watch as typeof control._subjects.values); + + return subject.subscribe({ next: (payload) => { if (payload.name && shouldSend(payload.name)) { // @ts-expect-error