@shuvi/router-react 1.0.8 → 1.0.10

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.
@@ -10,13 +10,13 @@ export declare namespace MemoryRouter {
10
10
  var propTypes: {
11
11
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
12
  routes: PropTypes.Requireable<(object | null | undefined)[]>;
13
- initialEntries: PropTypes.Requireable<(string | PropTypes.InferProps<{
13
+ initialEntries: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
14
14
  pathname: PropTypes.Requireable<string>;
15
15
  search: PropTypes.Requireable<string>;
16
16
  hash: PropTypes.Requireable<string>;
17
17
  state: PropTypes.Requireable<object>;
18
18
  key: PropTypes.Requireable<string>;
19
- }> | null | undefined)[]>;
19
+ }> | null | undefined> | null | undefined)[]>;
20
20
  initialIndex: PropTypes.Requireable<number>;
21
21
  };
22
22
  }
package/esm/Router.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
- import invariant from '@shuvi/utils/lib/invariant';
3
+ import invariant from '@shuvi/utils/invariant';
4
4
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
5
5
  import { RouterContext, RouteContext } from './contexts';
6
6
  import { useInRouterContext } from './hooks';
package/esm/hooks.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useContext } from 'react';
3
3
  import { matchPathname } from '@shuvi/router';
4
- import invariant from '@shuvi/utils/lib/invariant';
4
+ import invariant from '@shuvi/utils/invariant';
5
5
  import { RouterContext, RouteContext, MatchedRouteContext } from './contexts';
6
6
  import { warning } from './utils';
7
7
  /**
@@ -10,13 +10,13 @@ export declare namespace MemoryRouter {
10
10
  var propTypes: {
11
11
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
12
  routes: PropTypes.Requireable<(object | null | undefined)[]>;
13
- initialEntries: PropTypes.Requireable<(string | PropTypes.InferProps<{
13
+ initialEntries: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
14
14
  pathname: PropTypes.Requireable<string>;
15
15
  search: PropTypes.Requireable<string>;
16
16
  hash: PropTypes.Requireable<string>;
17
17
  state: PropTypes.Requireable<object>;
18
18
  key: PropTypes.Requireable<string>;
19
- }> | null | undefined)[]>;
19
+ }> | null | undefined> | null | undefined)[]>;
20
20
  initialIndex: PropTypes.Requireable<number>;
21
21
  };
22
22
  }
package/lib/Router.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Router = void 0;
4
4
  const React = require("react");
5
5
  const PropTypes = require("prop-types");
6
- const invariant_1 = require("@shuvi/utils/lib/invariant");
6
+ const invariant_1 = require("@shuvi/utils/invariant");
7
7
  const shim_1 = require("use-sync-external-store/shim");
8
8
  const contexts_1 = require("./contexts");
9
9
  const hooks_1 = require("./hooks");
package/lib/hooks.js CHANGED
@@ -4,7 +4,7 @@ exports.useMatchedRoute = exports.useRouter = exports.useResolvedPath = exports.
4
4
  const React = require("react");
5
5
  const react_1 = require("react");
6
6
  const router_1 = require("@shuvi/router");
7
- const invariant_1 = require("@shuvi/utils/lib/invariant");
7
+ const invariant_1 = require("@shuvi/utils/invariant");
8
8
  const contexts_1 = require("./contexts");
9
9
  const utils_1 = require("./utils");
10
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/router-react",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/shuvijs/shuvi.git",
@@ -25,14 +25,14 @@
25
25
  "build:cjs": "tsc -p tsconfig.build.json -m commonjs --outDir lib"
26
26
  },
27
27
  "engines": {
28
- "node": ">= 12.0.0"
28
+ "node": ">= 16.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@shuvi/router": "1.0.8",
32
- "@shuvi/platform-shared": "1.0.8",
33
- "@shuvi/utils": "1.0.8",
31
+ "@shuvi/router": "1.0.10",
32
+ "@shuvi/platform-shared": "1.0.10",
33
+ "@shuvi/utils": "1.0.10",
34
34
  "prop-types": "^15.8.1",
35
- "use-sync-external-store": "1.1.0"
35
+ "use-sync-external-store": "1.2.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/prop-types": "^15.7.5",
@@ -40,8 +40,8 @@
40
40
  "@types/react-test-renderer": "18.0.0",
41
41
  "@types/use-sync-external-store": "0.0.3",
42
42
  "react-test-renderer": "^18.1.0",
43
- "react": "18.1.0",
44
- "react-dom": "18.1.0"
43
+ "react": "18.2.0",
44
+ "react-dom": "18.2.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.8.0"