@squide/firefly-webpack-configs 2.0.0 → 4.0.0

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 CHANGED
@@ -1,5 +1,77 @@
1
1
  # @squide/firefly-webpack-configs
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#182](https://github.com/gsoft-inc/wl-squide/pull/182) [`58cf066`](https://github.com/gsoft-inc/wl-squide/commit/58cf066e87e23611510c254cca96016bd2bad08a) Thanks [@patricklafrance](https://github.com/patricklafrance)! - ## Firefly v9
8
+
9
+ This major version of @squide/firefly introduces TanStack Query as the official library for fetching the global data of a Squide's application and features a complete rewrite of the AppRouter component, which now uses a state machine to manage the application's bootstrapping flow.
10
+
11
+ Prior to v9, Squide applications couldn't use TanStack Query to fetch global data, making it challenging for Workleap's applications to keep their global data in sync with the server state. With v9, applications can now leverage custom wrappers of the useQueries hook to fetch and keep their global data up-to-date with the server state. Additionally, the new deferred registrations update feature allows applications to even keep their conditional navigation items in sync with the server state.
12
+
13
+ Finally, with v9, Squide's philosophy has evolved. We used to describe Squide as a shell for federated applications. Now, we refer to Squide as a shell for modular applications. After playing with Squide's local module feature for a while, we discovered that Squide offers significant value even for non-federated applications, which triggered this shift in philosophy.
14
+
15
+ > For a full breakdown of the changres and a migration procedure, read the following [documentation](https://gsoft-inc.github.io/wl-squide/guides/migrate-to-firefly-v9/).
16
+
17
+ ## Breaking changes
18
+
19
+ - The `useAreModulesRegistered` hook has been removed, use the `useIsBootstrapping` hook instead.
20
+ - The `useAreModulesReady` hook has been removed, use the `useIsBootstrapping` hook instead.
21
+ - The `useIsMswStarted` hook has been removed, use the `useIsBootstrapping` hook instead.
22
+ - The `completeModuleRegistrations` function as been removed use the `useDeferredRegistrations` hook instead.
23
+ - The `completeLocalModulesRegistrations` function has been removed use the `useDeferredRegistrations` hook instead.
24
+ - The `completeRemoteModuleRegistrations` function has been removed use the `useDeferredRegistrations` hook instead.
25
+ - The `useSession` hook has been removed, define your own React context instead.
26
+ - The `useIsAuthenticated` hook has been removed, define your own React context instead.
27
+ - The `sessionAccessor` option has been removed from the `FireflyRuntime` options, define your own React context instead.
28
+ - Removed supports for deferred routes.
29
+ - Plugin's constructor now requires a runtime instance argument.
30
+ - Plugins now registers with a factory function.
31
+ - Full rewrite of the `AppRouter` component.
32
+
33
+ ## Renamed
34
+
35
+ - The `setMswAsStarted` function has been renamed to `setMswIsReady`.
36
+
37
+ ## Others
38
+
39
+ - The `@squide/firefly` package now takes a peerDependency on `@tanstack/react-query`.
40
+ - The `@squide/firefly` package doesn't takes a peerDependency on `react-error-boundary` anymore.
41
+
42
+ ## New hooks and functions
43
+
44
+ - A new `useIsBoostrapping` hook is now available.
45
+ - A new `useDeferredRegistrations` hook is now available.
46
+ - A new `usePublicDataQueries` hook is now available.
47
+ - A new `useProtectedDataQueries` hook is now available.
48
+ - A new `isGlobalDataQueriesError` function is now available.
49
+
50
+ ## Improvements
51
+
52
+ - Deferred registration functions now always receive a `data` argument.
53
+ - Deferred registration functions now receives a new `operation` argument.
54
+ - Navigation items now include a `$canRender` option, enabling modules to control whether a navigation item should be rendered.
55
+ - New `$key` option for navigation items.
56
+
57
+ For more details about the changes and a migration procedure, read the following [documentation](https://gsoft-inc.github.io/wl-squide/guides/migrate-to-firefly-v9/).
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [[`58cf066`](https://github.com/gsoft-inc/wl-squide/commit/58cf066e87e23611510c254cca96016bd2bad08a)]:
62
+ - @squide/webpack-configs@4.0.0
63
+
64
+ ## 3.0.0
65
+
66
+ ### Major Changes
67
+
68
+ - [#170](https://github.com/gsoft-inc/wl-squide/pull/170) [`119570f`](https://github.com/gsoft-inc/wl-squide/commit/119570f9c93341285a24e8be879d0a468ee2b5db) Thanks [@patricklafrance](https://github.com/patricklafrance)! - The host define function doesn't accept an "applicationName" anymore as it is now hardcoded to "host".
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [[`119570f`](https://github.com/gsoft-inc/wl-squide/commit/119570f9c93341285a24e8be879d0a468ee2b5db)]:
73
+ - @squide/webpack-configs@3.0.0
74
+
3
75
  ## 2.0.0
4
76
 
5
77
  ### Major Changes
@@ -58,7 +130,7 @@
58
130
  import { defineDevHostConfig } from "@squide/firefly-webpack-configs";
59
131
  import { swcConfig } from "./swc.dev.js";
60
132
 
61
- export default defineDevHostConfig(swcConfig, "host", 8080, {
133
+ export default defineDevHostConfig(swcConfig, 8080, {
62
134
  overlay: false,
63
135
  });
64
136
  ```
@@ -98,7 +170,7 @@
98
170
  },
99
171
  ];
100
172
 
101
- export default defineDevHostConfig(swcConfig, "host", 8080, Remotes, {
173
+ export default defineDevHostConfig(swcConfig, 8080, Remotes, {
102
174
  overlay: false,
103
175
  });
104
176
  ```
package/dist/index.d.ts CHANGED
@@ -8,11 +8,11 @@ type FireflyFeatures = Omit<Features, "router" | "msw">;
8
8
  interface FireflyDefineDevHostConfigOptions extends DefineDevHostConfigOptions {
9
9
  features?: FireflyFeatures;
10
10
  }
11
- declare function defineDevHostConfig(swcConfig: SwcConfig, applicationName: string, port: number, remotes: RemoteDefinition[], { features, ...options }?: FireflyDefineDevHostConfigOptions): webpack.Configuration;
11
+ declare function defineDevHostConfig(swcConfig: SwcConfig, port: number, remotes: RemoteDefinition[], { features, ...options }?: FireflyDefineDevHostConfigOptions): webpack.Configuration;
12
12
  interface FireflyDefineBuildHostConfigOptions extends DefineBuildHostConfigOptions {
13
13
  features?: FireflyFeatures;
14
14
  }
15
- declare function defineBuildHostConfig(swcConfig: SwcConfig, applicationName: string, remotes: RemoteDefinition[], { features, ...options }?: FireflyDefineBuildHostConfigOptions): webpack.Configuration;
15
+ declare function defineBuildHostConfig(swcConfig: SwcConfig, remotes: RemoteDefinition[], { features, ...options }?: FireflyDefineBuildHostConfigOptions): webpack.Configuration;
16
16
  interface FireflyDefineDevRemoteModuleConfigOptions extends DefineDevRemoteModuleConfigOptions {
17
17
  features?: FireflyFeatures;
18
18
  }
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ export { defineRemoteModuleFederationPluginOptions } from '@squide/webpack-confi
3
3
  export * from '@workleap/webpack-configs';
4
4
 
5
5
  // src/index.ts
6
- function defineDevHostConfig(swcConfig, applicationName, port, remotes, { features = {}, ...options } = {}) {
7
- return defineDevHostConfig$1(swcConfig, applicationName, port, remotes, {
6
+ function defineDevHostConfig(swcConfig, port, remotes, { features = {}, ...options } = {}) {
7
+ return defineDevHostConfig$1(swcConfig, port, remotes, {
8
8
  ...options,
9
9
  features: {
10
10
  router: "react-router",
@@ -13,8 +13,8 @@ function defineDevHostConfig(swcConfig, applicationName, port, remotes, { featur
13
13
  }
14
14
  });
15
15
  }
16
- function defineBuildHostConfig(swcConfig, applicationName, remotes, { features = {}, ...options } = {}) {
17
- return defineBuildHostConfig$1(swcConfig, applicationName, remotes, {
16
+ function defineBuildHostConfig(swcConfig, remotes, { features = {}, ...options } = {}) {
17
+ return defineBuildHostConfig$1(swcConfig, remotes, {
18
18
  ...options,
19
19
  features: {
20
20
  router: "react-router",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@squide/firefly-webpack-configs",
3
3
  "author": "Workleap",
4
- "version": "2.0.0",
4
+ "version": "4.0.0",
5
5
  "description": "Webpack configuration helpers for the Squide firefly technology stack.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -36,8 +36,8 @@
36
36
  "webpack-dev-server": ">=5.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@module-federation/enhanced": "0.1.11",
40
- "@swc/core": "1.4.17",
39
+ "@module-federation/enhanced": "0.2.6",
40
+ "@swc/core": "1.7.0",
41
41
  "@swc/jest": "0.2.36",
42
42
  "@types/jest": "29.5.12",
43
43
  "@workleap/eslint-plugin": "3.2.2",
@@ -47,14 +47,14 @@
47
47
  "eslint": "8.57.0",
48
48
  "jest": "29.7.0",
49
49
  "jest-environment-jsdom": "29.7.0",
50
- "ts-jest": "29.1.2",
51
- "tsup": "8.0.2",
52
- "typescript": "5.4.5",
53
- "webpack": "5.91.0"
50
+ "ts-jest": "29.2.3",
51
+ "tsup": "8.1.2",
52
+ "typescript": "5.5.3",
53
+ "webpack": "5.93.0"
54
54
  },
55
55
  "dependencies": {
56
56
  "@workleap/webpack-configs": "1.5.1",
57
- "@squide/webpack-configs": "2.0.0"
57
+ "@squide/webpack-configs": "4.0.0"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=20.0.0"