package.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. {
  2. "name": "react-hook-form",
  3. "description": "Performant, flexible and extensible forms library for React Hooks",
  4. "version": "7.50.1",
  5. "main": "dist/index.cjs.js",
  6. "module": "dist/index.esm.mjs",
  7. "umd:main": "dist/index.umd.js",
  8. "unpkg": "dist/index.umd.js",
  9. "jsdelivr": "dist/index.umd.js",
  10. "jsnext:main": "dist/index.esm.mjs",
  11. "source": "src/index.ts",
  12. "types": "dist/index.d.ts",
  13. "sideEffects": false,
  14. "files": [
  15. "dist",
  16. "dist/__tests__"
  17. ],
  18. "exports": {
  19. "./package.json": "./package.json",
  20. ".": {
  21. "types": "./dist/index.d.ts",
  22. "react-server": "./dist/react-server.esm.mjs",
  23. "import": "./dist/index.esm.mjs",
  24. "require": "./dist/index.cjs.js"
  25. }
  26. },
  27. "scripts": {
  28. "clean": "rimraf dist",
  29. "prebuild": "pnpm clean",
  30. "build": "pnpm build:modern",
  31. "build:watch": "pnpm build:modern -w",
  32. "postbuild": "rimraf dist/__tests__ && node ./scripts/rollup/assert-esm-exports.mjs && node ./scripts/rollup/assert-cjs-exports.cjs",
  33. "build:modern": "rollup -c ./scripts/rollup/rollup.config.js",
  34. "build:esm": "rollup -c ./scripts/rollup/rollup.esm.config.js",
  35. "prettier:fix": "prettier --config .prettierrc --write \"**/*.{js,ts,tsx,css}\"",
  36. "lint": "eslint '**/*.{js,ts,tsx}'",
  37. "lint:fix": "pnpm lint --fix",
  38. "type": "tsc --noEmit",
  39. "jest-preview": "jest-preview",
  40. "test": "jest --config ./scripts/jest/jest.config.js",
  41. "test:coverage": "pnpm test -- --coverage",
  42. "test:watch": "pnpm test -- --onlyChanged --watch",
  43. "test:web": "TEST_ENV=web pnpm test",
  44. "test:type": "tsd src/__typetest__",
  45. "e2e": "cypress run",
  46. "e2e:watch": "cypress open",
  47. "api-extractor": "api-extractor run --local",
  48. "api-extractor:build": "pnpm build:esm && pnpm api-extractor",
  49. "api-extractor:ci": "node scripts/apiExtractor.js",
  50. "postversion": "git push && git push origin v$npm_package_version",
  51. "prepublishOnly": "pnpm install && pnpm lint:fix && pnpm type && pnpm test && pnpm build",
  52. "bundlewatch": "pnpm build:modern && bundlewatch",
  53. "start": "pnpm build:esm && pnpm --dir ./app install && pnpm --dir ./app run dev",
  54. "csb:install": "npm i -g pnpm@8 && pnpm i"
  55. },
  56. "keywords": [
  57. "react",
  58. "hooks",
  59. "form",
  60. "forms",
  61. "form-validation",
  62. "validation",
  63. "typescript",
  64. "react-hooks"
  65. ],
  66. "repository": {
  67. "type": "git",
  68. "url": "https://github.com/react-hook-form/react-hook-form"
  69. },
  70. "homepage": "https://www.react-hook-form.com",
  71. "author": "<bluebill1049@hotmail.com>",
  72. "license": "MIT",
  73. "devDependencies": {
  74. "@microsoft/api-extractor": "^7.35.2",
  75. "@rollup/plugin-commonjs": "^22.0.2",
  76. "@rollup/plugin-node-resolve": "^14.1.0",
  77. "@rollup/plugin-terser": "^0.4.3",
  78. "@swc/core": "^1.3.62",
  79. "@swc/jest": "^0.2.26",
  80. "@testing-library/jest-dom": "^5.16.5",
  81. "@testing-library/react": "^13.4.0",
  82. "@testing-library/react-hooks": "^8.0.1",
  83. "@types/jest": "^29.5.2",
  84. "@types/react": "^18.2.9",
  85. "@types/react-dom": "^18.2.4",
  86. "@types/testing-library__jest-dom": "^5.14.6",
  87. "@typescript-eslint/eslint-plugin": "^5.59.9",
  88. "@typescript-eslint/parser": "^5.59.9",
  89. "bundlewatch": "^0.3.3",
  90. "cypress": "^10.11.0",
  91. "eslint": "^8.42.0",
  92. "eslint-config-prettier": "^8.8.0",
  93. "eslint-plugin-cypress": "^2.13.3",
  94. "eslint-plugin-prettier": "^4.2.1",
  95. "eslint-plugin-react": "^7.32.2",
  96. "eslint-plugin-react-hooks": "^4.6.0",
  97. "eslint-plugin-simple-import-sort": "^8.0.0",
  98. "husky": "^8.0.3",
  99. "jest": "^29.5.0",
  100. "jest-environment-jsdom": "^29.5.0",
  101. "jest-preview": "^0.3.1",
  102. "lint-staged": "^13.2.2",
  103. "msw": "^1.2.2",
  104. "prettier": "^2.8.8",
  105. "react": "^18.2.0",
  106. "react-dom": "^18.2.0",
  107. "react-test-renderer": "^18.2.0",
  108. "rimraf": "^3.0.2",
  109. "rollup": "^2.79.1",
  110. "rollup-plugin-peer-deps-external": "^2.2.4",
  111. "rollup-plugin-sourcemaps": "^0.6.3",
  112. "rollup-plugin-typescript2": "^0.34.1",
  113. "tsd": "^0.27.0",
  114. "typescript": "^5.1.3",
  115. "whatwg-fetch": "^3.6.2"
  116. },
  117. "bundlewatch": {
  118. "files": [
  119. {
  120. "path": "./dist/index.cjs.js",
  121. "maxSize": "10 kB"
  122. }
  123. ]
  124. },
  125. "peerDependencies": {
  126. "react": "^16.8.0 || ^17 || ^18"
  127. },
  128. "lint-staged": {
  129. "*.{js,ts,tsx}": [
  130. "pnpm lint:fix",
  131. "pnpm prettier:fix"
  132. ],
  133. "*.{md,json,yml}": [
  134. "prettier --write"
  135. ]
  136. },
  137. "husky": {
  138. "hooks": {
  139. "pre-commit": "lint-staged"
  140. }
  141. },
  142. "funding": {
  143. "type": "opencollective",
  144. "url": "https://opencollective.com/react-hook-form"
  145. },
  146. "engines": {
  147. "node": ">=12.22.0"
  148. }
  149. }