react-router 6.3.0 → 6.4.0-pre.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.
Files changed (71) hide show
  1. package/.eslintrc +12 -0
  2. package/CHANGELOG.md +8 -0
  3. package/__tests__/.eslintrc +8 -0
  4. package/__tests__/DataMemoryRouter-test.tsx +1902 -0
  5. package/__tests__/Route-test.tsx +45 -0
  6. package/__tests__/Router-basename-test.tsx +110 -0
  7. package/__tests__/Router-test.tsx +62 -0
  8. package/__tests__/Routes-location-test.tsx +69 -0
  9. package/__tests__/Routes-test.tsx +148 -0
  10. package/__tests__/__snapshots__/route-matching-test.tsx.snap +197 -0
  11. package/__tests__/absolute-path-matching-test.tsx +61 -0
  12. package/__tests__/createRoutesFromChildren-test.tsx +189 -0
  13. package/__tests__/descendant-routes-params-test.tsx +67 -0
  14. package/__tests__/descendant-routes-splat-matching-test.tsx +241 -0
  15. package/__tests__/descendant-routes-warning-test.tsx +140 -0
  16. package/__tests__/generatePath-test.tsx +45 -0
  17. package/__tests__/gh-issue-8127-test.tsx +32 -0
  18. package/__tests__/gh-issue-8165-test.tsx +97 -0
  19. package/__tests__/greedy-matching-test.tsx +89 -0
  20. package/__tests__/index-routes-test.tsx +24 -0
  21. package/__tests__/layout-routes-test.tsx +283 -0
  22. package/__tests__/matchPath-test.tsx +335 -0
  23. package/__tests__/matchRoutes-test.tsx +144 -0
  24. package/__tests__/navigate-test.tsx +49 -0
  25. package/__tests__/params-decode-test.tsx +36 -0
  26. package/__tests__/path-matching-test.tsx +270 -0
  27. package/__tests__/resolvePath-test.tsx +50 -0
  28. package/__tests__/route-depth-order-matching-test.tsx +135 -0
  29. package/__tests__/route-matching-test.tsx +164 -0
  30. package/__tests__/same-component-lifecycle-test.tsx +57 -0
  31. package/__tests__/setup.ts +15 -0
  32. package/__tests__/useHref-basename-test.tsx +351 -0
  33. package/__tests__/useHref-test.tsx +287 -0
  34. package/__tests__/useLocation-test.tsx +29 -0
  35. package/__tests__/useMatch-test.tsx +137 -0
  36. package/__tests__/useNavigate-test.tsx +100 -0
  37. package/__tests__/useOutlet-test.tsx +355 -0
  38. package/__tests__/useParams-test.tsx +212 -0
  39. package/__tests__/useResolvedPath-test.tsx +109 -0
  40. package/__tests__/useRoutes-test.tsx +122 -0
  41. package/__tests__/utils/renderStrict.tsx +21 -0
  42. package/__tests__/utils/waitForRedirect.tsx +5 -0
  43. package/index.ts +187 -0
  44. package/jest-transformer.js +10 -0
  45. package/jest.config.js +10 -0
  46. package/lib/components.tsx +491 -0
  47. package/lib/context.ts +96 -0
  48. package/lib/hooks.tsx +689 -0
  49. package/lib/use-sync-external-store-shim/index.ts +31 -0
  50. package/lib/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts +153 -0
  51. package/lib/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts +20 -0
  52. package/node-main.js +7 -0
  53. package/package.json +7 -4
  54. package/tsconfig.json +20 -0
  55. package/LICENSE.md +0 -22
  56. package/index.d.ts +0 -14
  57. package/index.js +0 -941
  58. package/index.js.map +0 -1
  59. package/lib/components.d.ts +0 -110
  60. package/lib/context.d.ts +0 -31
  61. package/lib/hooks.d.ts +0 -99
  62. package/lib/router.d.ts +0 -120
  63. package/main.js +0 -19
  64. package/react-router.development.js +0 -895
  65. package/react-router.development.js.map +0 -1
  66. package/react-router.production.min.js +0 -12
  67. package/react-router.production.min.js.map +0 -1
  68. package/umd/react-router.development.js +0 -990
  69. package/umd/react-router.development.js.map +0 -1
  70. package/umd/react-router.production.min.js +0 -12
  71. package/umd/react-router.production.min.js.map +0 -1
package/.eslintrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "commonjs": true
5
+ },
6
+ "globals": {
7
+ "__DEV__": true
8
+ },
9
+ "rules": {
10
+ "strict": 0
11
+ }
12
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # react-router
2
+
3
+ ## 6.4.0-pre.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Make `fallbackElement` optional and change type to `ReactNode` (type changes only) (#8896)
8
+ - Properly trigger error boundaries on 404 routes
@@ -0,0 +1,8 @@
1
+ {
2
+ "env": {
3
+ "jest": true
4
+ },
5
+ "rules": {
6
+ "no-console": 0
7
+ }
8
+ }