@squide/firefly 4.0.1 → 4.0.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.
- package/CHANGELOG.md +18 -0
- package/dist/AppRouter.js +1 -1
- package/dist/{chunk-72TYI5MX.js → chunk-7LQUNM5I.js} +7 -3
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @squide/firefly
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#137](https://github.com/gsoft-inc/wl-squide/pull/137) [`2f5946f9`](https://github.com/gsoft-inc/wl-squide/commit/2f5946f9c51740dc0d207d53085b143d9f1e407c) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the no custom 404 route handling.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2f5946f9`](https://github.com/gsoft-inc/wl-squide/commit/2f5946f9c51740dc0d207d53085b143d9f1e407c)]:
|
|
10
|
+
- @squide/react-router@4.0.3
|
|
11
|
+
|
|
12
|
+
## 4.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#135](https://github.com/gsoft-inc/wl-squide/pull/135) [`8e73083`](https://github.com/gsoft-inc/wl-squide/commit/8e73083bb90a6f23495ac6a8dca0245862ee2c9a) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fixing a remaining issue with deferred registrations that depends on protected data.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`8e73083`](https://github.com/gsoft-inc/wl-squide/commit/8e73083bb90a6f23495ac6a8dca0245862ee2c9a)]:
|
|
19
|
+
- @squide/react-router@4.0.2
|
|
20
|
+
|
|
3
21
|
## 4.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/AppRouter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AppRouter, BootstrappingRoute } from './chunk-
|
|
1
|
+
export { AppRouter, BootstrappingRoute } from './chunk-7LQUNM5I.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLogOnceLogger, isNil } from '@squide/core';
|
|
2
2
|
import { useIsMswStarted } from '@squide/msw';
|
|
3
|
-
import {
|
|
3
|
+
import { useRouteMatch, useIsRouteProtected, useRoutes, findRouteByPath } from '@squide/react-router';
|
|
4
4
|
import { useAreModulesRegistered, useAreModulesReady } from '@squide/webpack-module-federation';
|
|
5
5
|
import { useEffect, useCallback, cloneElement, useMemo } from 'react';
|
|
6
6
|
import { ErrorBoundary, useErrorBoundary } from 'react-error-boundary';
|
|
@@ -94,7 +94,8 @@ function BootstrappingRoute(props) {
|
|
|
94
94
|
}
|
|
95
95
|
}, [logger, areModulesRegistered, areModulesReady, isMswStarted, waitForMsw]);
|
|
96
96
|
useLoadPublicData(areModulesRegistered, areModulesReady, isMswStarted, isPublicDataLoaded, onLoadPublicData);
|
|
97
|
-
const
|
|
97
|
+
const activeRoute = useRouteMatch(location2, { throwWhenThereIsNoMatch: areModulesReady });
|
|
98
|
+
const isActiveRouteProtected = useIsRouteProtected(activeRoute);
|
|
98
99
|
useLoadProtectedData(areModulesRegistered, areModulesReady, isMswStarted, isActiveRouteProtected, isProtectedDataLoaded, onLoadProtectedData);
|
|
99
100
|
useEffect(() => {
|
|
100
101
|
if (onCompleteRegistrations) {
|
|
@@ -105,7 +106,7 @@ function BootstrappingRoute(props) {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
}, [areModulesRegistered, areModulesReady, isMswStarted, isPublicDataLoaded, isProtectedDataLoaded, isActiveRouteProtected, onCompleteRegistrations]);
|
|
108
|
-
if (!areModulesReady || !isMswStarted || !isPublicDataLoaded || isActiveRouteProtected && !isProtectedDataLoaded) {
|
|
109
|
+
if (!areModulesReady || !isMswStarted || !activeRoute || !isPublicDataLoaded || isActiveRouteProtected && !isProtectedDataLoaded) {
|
|
109
110
|
return fallbackElement;
|
|
110
111
|
}
|
|
111
112
|
return /* @__PURE__ */ jsx(Outlet, {});
|
|
@@ -131,6 +132,9 @@ function AppRouter(props) {
|
|
|
131
132
|
});
|
|
132
133
|
}, [errorElement]);
|
|
133
134
|
return useMemo(() => {
|
|
135
|
+
if (areModulesRegistered && !findRouteByPath(routes, "*")) {
|
|
136
|
+
throw new Error("For the AppRouter component to work properly, the application must be a define a custom no match router. For additional information, refer to: https://reactrouter.com/en/main/start/tutorial#handling-not-found-errors.");
|
|
137
|
+
}
|
|
134
138
|
return renderRouterProvider([
|
|
135
139
|
{
|
|
136
140
|
element: /* @__PURE__ */ jsx(ErrorBoundary, { fallbackRender: errorRenderer, children: /* @__PURE__ */ jsx(
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/firefly",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"description": "Helpers to facilitate the creation of a shell package with Squide firefly technology stack.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@squide/core": "3.2.1",
|
|
95
95
|
"@squide/msw": "2.0.9",
|
|
96
|
-
"@squide/react-router": "4.0.
|
|
96
|
+
"@squide/react-router": "4.0.3",
|
|
97
97
|
"@squide/webpack-module-federation": "3.0.4"
|
|
98
98
|
},
|
|
99
99
|
"sideEffects": false,
|