diff --git a/.changeset/afraid-mirrors-hunt.md b/.changeset/afraid-mirrors-hunt.md deleted file mode 100644 index d2fb4ea75..000000000 --- a/.changeset/afraid-mirrors-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@squide/core": minor ---- - -- Added a `usePlugin` hook. diff --git a/.changeset/polite-geckos-occur.md b/.changeset/polite-geckos-occur.md deleted file mode 100644 index 022162a87..000000000 --- a/.changeset/polite-geckos-occur.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -"@squide/firefly": major ---- - -- The `AppRouter` component now requires to define a `RouterProvider` as a child. This change has been made to provide more flexibility on the consumer side about the definition of the React Router router. - -Before: - -```tsx - -``` - -Now: - -```tsx - - {(routes, providerProps) => ( - - )} - -``` - -- When in development and using React strict mode, the public and protected handler can be called twice. This issue highlighted that the `AppRouter` component doesn't equipe correctly the handlers to dispose of previous HTTP requests if they are called multiple times because of re-renders. Therefore, the handlers now receives an [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that should be forwared to the HTTP client initiating the fetch request. -- The fix also requires the consumer to provide new properties (`isPublicDataLoaded` and `isProtectedDataLoaded`) indicating whether or not the public and/or protected data has been loaded. - -```tsx -async function fetchPublicData(setFeatureFlags: (featureFlags: FeatureFlags) => void, signal: AbortSignal) { - try { - const response = await fetch("/api/feature-flags", { - signal - }); - - if (response.ok) { - const data = await response.json(); - - setFeatureFlags(data); - } - } catch (error: unknown) { - if (!signal.aborted) { - throw error; - } - } -} - -const [featureFlags, setFeatureFlags] = useState(); - -const handleLoadPublicData = useCallback((signal: AbortSignal) => { - return fetchPublicData(setFeatureFlags, signal); -}, []); - - - {(routes, providerProps) => ( - - )} - -``` - -- Fixed an issue where the deferred registrations could be completed before the protected data has been loaded. diff --git a/.changeset/six-teachers-hunt.md b/.changeset/six-teachers-hunt.md deleted file mode 100644 index dde485b0c..000000000 --- a/.changeset/six-teachers-hunt.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@squide/react-router": major ---- - -- To be consistent with the other API of Squide, the `useNavigationItems` hook now accept an object literal of options rather than an optional `menuId` argument. - -Before: - -```tsx -const items = useNavigationItems("my-custom-menu"); -``` - -Now: - -```tsx -const items = useNavigationItems({ menuId: "my-custom-menu" }); -``` diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index a7f1b6053..0546d6595 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @squide/core +## 3.2.0 + +### Minor Changes + +- [#131](https://github.com/gsoft-inc/wl-squide/pull/131) [`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - Added a `usePlugin` hook. + ## 3.1.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 9b39d7422..50e61bbb6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@squide/core", "author": "Workleap", - "version": "3.1.1", + "version": "3.2.0", "description": "The core package of @squide federated application shell.", "license": "Apache-2.0", "repository": { diff --git a/packages/fakes/CHANGELOG.md b/packages/fakes/CHANGELOG.md index e81fb017d..09ea31bb1 100644 --- a/packages/fakes/CHANGELOG.md +++ b/packages/fakes/CHANGELOG.md @@ -1,5 +1,12 @@ # @squide/fakes +## 1.0.12 + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + ## 1.0.11 ### Patch Changes diff --git a/packages/fakes/package.json b/packages/fakes/package.json index 4f5de3dd8..42ef320f1 100644 --- a/packages/fakes/package.json +++ b/packages/fakes/package.json @@ -1,7 +1,7 @@ { "name": "@squide/fakes", "author": "Workleap", - "version": "1.0.11", + "version": "1.0.12", "description": "Fake implementations to facilitate the development of federated modules in isolation with @squide.", "license": "Apache-2.0", "repository": { diff --git a/packages/firefly/CHANGELOG.md b/packages/firefly/CHANGELOG.md index 4f26e3601..a58b91243 100644 --- a/packages/firefly/CHANGELOG.md +++ b/packages/firefly/CHANGELOG.md @@ -1,5 +1,87 @@ # @squide/firefly +## 4.0.0 + +### Major Changes + +- [#131](https://github.com/gsoft-inc/wl-squide/pull/131) [`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - The `AppRouter` component now requires to define a `RouterProvider` as a child. This change has been made to provide more flexibility on the consumer side about the definition of the React Router router. + + Before: + + ```tsx + + ``` + + Now: + + ```tsx + + {(routes, providerProps) => ( + + )} + + ``` + + - When in development and using React strict mode, the public and protected handler can be called twice. This issue highlighted that the `AppRouter` component doesn't equipe correctly the handlers to dispose of previous HTTP requests if they are called multiple times because of re-renders. Therefore, the handlers now receives an [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that should be forwared to the HTTP client initiating the fetch request. + - The fix also requires the consumer to provide new properties (`isPublicDataLoaded` and `isProtectedDataLoaded`) indicating whether or not the public and/or protected data has been loaded. + + ```tsx + async function fetchPublicData(setFeatureFlags: (featureFlags: FeatureFlags) => void, signal: AbortSignal) { + try { + const response = await fetch("/api/feature-flags", { + signal + }); + + if (response.ok) { + const data = await response.json(); + + setFeatureFlags(data); + } + } catch (error: unknown) { + if (!signal.aborted) { + throw error; + } + } + } + + const [featureFlags, setFeatureFlags] = useState(); + + const handleLoadPublicData = useCallback((signal: AbortSignal) => { + return fetchPublicData(setFeatureFlags, signal); + }, []); + + + {(routes, providerProps) => ( + + )} + + ``` + + - Fixed an issue where the deferred registrations could be completed before the protected data has been loaded. + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d), [`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + - @squide/react-router@4.0.0 + - @squide/msw@2.0.8 + - @squide/webpack-module-federation@3.0.3 + - @squide/webpack-configs@1.1.2 + ## 3.0.3 ### Patch Changes diff --git a/packages/firefly/package.json b/packages/firefly/package.json index 824c22155..28291d622 100644 --- a/packages/firefly/package.json +++ b/packages/firefly/package.json @@ -1,7 +1,7 @@ { "name": "@squide/firefly", "author": "Workleap", - "version": "3.0.3", + "version": "4.0.0", "description": "Helpers to facilitate the creation of a shell package with Squide firefly technology stack.", "license": "Apache-2.0", "repository": { diff --git a/packages/i18next/CHANGELOG.md b/packages/i18next/CHANGELOG.md index 2be9349d6..d29557653 100644 --- a/packages/i18next/CHANGELOG.md +++ b/packages/i18next/CHANGELOG.md @@ -1,5 +1,12 @@ # @squide/i18next +## 1.0.2 + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + ## 1.0.1 ### Patch Changes diff --git a/packages/i18next/package.json b/packages/i18next/package.json index 022cde30a..254980064 100644 --- a/packages/i18next/package.json +++ b/packages/i18next/package.json @@ -1,7 +1,7 @@ { "name": "@squide/i18next", "author": "Workleap", - "version": "1.0.1", + "version": "1.0.2", "description": "Add support for i18next to @squide federated application shell.", "license": "Apache-2.0", "repository": { diff --git a/packages/msw/CHANGELOG.md b/packages/msw/CHANGELOG.md index e95b00164..ebe924bdc 100644 --- a/packages/msw/CHANGELOG.md +++ b/packages/msw/CHANGELOG.md @@ -1,5 +1,12 @@ # @squide/msw +## 2.0.8 + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + ## 2.0.7 ### Patch Changes diff --git a/packages/msw/package.json b/packages/msw/package.json index edba5508c..3543c9c77 100644 --- a/packages/msw/package.json +++ b/packages/msw/package.json @@ -1,7 +1,7 @@ { "name": "@squide/msw", "author": "Workleap", - "version": "2.0.7", + "version": "2.0.8", "description": "Add support for MSW to @squide federated application shell.", "license": "Apache-2.0", "repository": { diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 198d81dc7..4f0e383b2 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,5 +1,28 @@ # @squide/react-router +## 4.0.0 + +### Major Changes + +- [#131](https://github.com/gsoft-inc/wl-squide/pull/131) [`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - To be consistent with the other API of Squide, the `useNavigationItems` hook now accept an object literal of options rather than an optional `menuId` argument. + + Before: + + ```tsx + const items = useNavigationItems("my-custom-menu"); + ``` + + Now: + + ```tsx + const items = useNavigationItems({ menuId: "my-custom-menu" }); + ``` + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + ## 3.0.2 ### Patch Changes diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 78e9ce28f..715a7a620 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,7 +1,7 @@ { "name": "@squide/react-router", "author": "Workleap", - "version": "3.0.2", + "version": "4.0.0", "description": "Add support for React Router to @squide federated application shell.", "license": "Apache-2.0", "repository": { diff --git a/packages/webpack-configs/CHANGELOG.md b/packages/webpack-configs/CHANGELOG.md index 9d2bc16d7..d9c0e3a3f 100644 --- a/packages/webpack-configs/CHANGELOG.md +++ b/packages/webpack-configs/CHANGELOG.md @@ -1,5 +1,12 @@ # @squide/webpack-configs +## 1.1.2 + +### Patch Changes + +- Updated dependencies []: + - @squide/webpack-module-federation@3.0.3 + ## 1.1.1 ### Patch Changes diff --git a/packages/webpack-configs/package.json b/packages/webpack-configs/package.json index 2356bcffb..8e12e4635 100644 --- a/packages/webpack-configs/package.json +++ b/packages/webpack-configs/package.json @@ -1,7 +1,7 @@ { "name": "@squide/webpack-configs", "author": "Workleap", - "version": "1.1.1", + "version": "1.1.2", "description": "Utilities to configure webpack with a @squide federated application shell.", "license": "Apache-2.0", "repository": { diff --git a/packages/webpack-module-federation/CHANGELOG.md b/packages/webpack-module-federation/CHANGELOG.md index de4fcf696..c022898e3 100644 --- a/packages/webpack-module-federation/CHANGELOG.md +++ b/packages/webpack-module-federation/CHANGELOG.md @@ -1,5 +1,12 @@ # @squide/webpack-module-federation +## 3.0.3 + +### Patch Changes + +- Updated dependencies [[`7caa44b`](https://github.com/gsoft-inc/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]: + - @squide/core@3.2.0 + ## 3.0.2 ### Patch Changes diff --git a/packages/webpack-module-federation/package.json b/packages/webpack-module-federation/package.json index 4a69ba838..c20fa4a7d 100644 --- a/packages/webpack-module-federation/package.json +++ b/packages/webpack-module-federation/package.json @@ -1,7 +1,7 @@ { "name": "@squide/webpack-module-federation", "author": "Workleap", - "version": "3.0.2", + "version": "3.0.3", "description": "Add support for Module Federation to @squide federated application shell.", "license": "Apache-2.0", "repository": {