@equinor/fusion-framework-react-module 4.0.0-next-663bed8344cc2ca0111705b05045173328b3104d → 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,177 +1,310 @@
1
1
  # Change Log
2
2
 
3
- ## 4.0.0-next-663bed8344cc2ca0111705b05045173328b3104d
3
+ ## 4.0.0
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#2510](https://github.com/equinor/fusion-framework/pull/2510) [`663bed8`](https://github.com/equinor/fusion-framework/commit/663bed8344cc2ca0111705b05045173328b3104d) Thanks [@eikeland](https://github.com/eikeland)! - BREAKING_CHANGE: all fusion-framework modules are now defiend as type module.
7
+ - abffa53: Major version bump for Fusion Framework React 19 release.
8
8
 
9
- > [!WARNING]
10
- > This will introduce breaking changes to the consumption of fusion-framework moduels.
9
+ All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
10
+
11
+ **Breaking changes:**
12
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
13
+ - React Router upgraded from v6 to v7
14
+ - Navigation module refactored with new history API
15
+ - `renderComponent` and `renderApp` now use `createRoot` API
16
+
17
+ **Migration:**
18
+ - Update your React version to 18.0.0 or higher before upgrading
19
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
20
+ - See individual package changelogs for package-specific migration steps
21
+
22
+ - abffa53: Require React 18+ as peer dependency. React 17 is no longer supported.
23
+
24
+ **Migration:** Update your application to React 18+ to continue using these packages.
25
+
26
+ Closes https://github.com/equinor/fusion-framework/issues/3504
27
+
28
+ - abffa53: Upgrade to React 19 and remove support for React versions lower than 18.
29
+
30
+ **Breaking changes:**
31
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
32
+ - React 16 and 17 are no longer supported
33
+ - Dev dependencies upgraded to React 19.2.1 and @types/react 19.2.7
34
+
35
+ **Migration:**
36
+ - Update your React version to 18.0.0 or higher before upgrading these packages
37
+ - If using React 16 or 17, upgrade to React 18 or 19 first
38
+
39
+ Closes https://github.com/equinor/fusion-framework/issues/3504
40
+
41
+ ### Minor Changes
42
+
43
+ - abffa53: Add type exports for better TypeScript support and tree-shaking.
44
+
45
+ The following types are now exported from `@equinor/fusion-framework-react-module`:
46
+ - `Modules`
47
+ - `ModulesInstanceType`
48
+ - `AnyModule`
49
+ - `ModulesInstance`
50
+
51
+ ```typescript
52
+ import type {
53
+ Modules,
54
+ ModulesInstanceType,
55
+ } from "@equinor/fusion-framework-react-module";
56
+ ```
57
+
58
+ ### Patch Changes
59
+
60
+ - Updated dependencies [abffa53]
61
+ - @equinor/fusion-framework-module@6.0.0
62
+
63
+ ## 3.1.14
64
+
65
+ ### Patch Changes
66
+
67
+ - [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
68
+
69
+ - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
70
+ - @equinor/fusion-framework-module@5.0.6
71
+
72
+ ## 3.1.13
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [[`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253)]:
77
+ - @equinor/fusion-framework-module@5.0.0
78
+
79
+ ## 3.1.13-next.2
80
+
81
+ ### Patch Changes
82
+
83
+ - [#3137](https://github.com/equinor/fusion-framework/pull/3137) [`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461) Thanks [@odinr](https://github.com/odinr)! - updates from main
84
+
85
+ - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128) Thanks [@odinr](https://github.com/odinr)! - merge with main
86
+
87
+ - Updated dependencies [[`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461), [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128)]:
88
+ - @equinor/fusion-framework-module@4.4.3-next.2
89
+
90
+ ## 3.1.13-next.1
11
91
 
12
92
  ### Patch Changes
13
93
 
14
- - Updated dependencies [[`663bed8`](https://github.com/equinor/fusion-framework/commit/663bed8344cc2ca0111705b05045173328b3104d)]:
15
- - @equinor/fusion-framework-module@5.0.0-next-663bed8344cc2ca0111705b05045173328b3104d
94
+ - Updated dependencies [[`bbda62d`](https://github.com/equinor/fusion-framework/commit/bbda62def35c8e8b742d90459680f7199c4ece0f)]:
95
+ - @equinor/fusion-framework-module@4.4.3-next.1
96
+
97
+ ## 3.1.13-next.0
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [[`53ef326`](https://github.com/equinor/fusion-framework/commit/53ef32633ce1c050e20614f1343148327a40b2e6)]:
102
+ - @equinor/fusion-framework-module@4.4.3-next.0
103
+
104
+ ## 3.1.12
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [[`96bb1fb`](https://github.com/equinor/fusion-framework/commit/96bb1fb744d8dc2410e99fea6ca948d2d5489428)]:
109
+ - @equinor/fusion-framework-module@4.4.2
110
+
111
+ ## 3.1.11
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [[`e49f916`](https://github.com/equinor/fusion-framework/commit/e49f9161557202df57248d02ade4d2ef50231bdc), [`c6af3a3`](https://github.com/equinor/fusion-framework/commit/c6af3a3c926fb245e9d056b506d47b8bf4f1efde)]:
116
+ - @equinor/fusion-framework-module@4.4.1
117
+
118
+ ## 3.1.10
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [[`efd70a3`](https://github.com/equinor/fusion-framework/commit/efd70a34f734e0c155d3440e35ce4fa11a7abc42)]:
123
+ - @equinor/fusion-framework-module@4.4.0
124
+
125
+ ## 3.1.9
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [[`f53b60b`](https://github.com/equinor/fusion-framework/commit/f53b60b7805706ce7617e614f0ac0c24317a2e43)]:
130
+ - @equinor/fusion-framework-module@4.3.8
131
+
132
+ ## 3.1.8
133
+
134
+ ### Patch Changes
135
+
136
+ - [#2885](https://github.com/equinor/fusion-framework/pull/2885) [`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update he `Typescript` version `^5.7.3` to `^5.8.2`
137
+
138
+ - Updated dependencies [[`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237)]:
139
+ - @equinor/fusion-framework-module@4.3.7
140
+
141
+ ## 3.1.7
142
+
143
+ ### Patch Changes
144
+
145
+ - [#2855](https://github.com/equinor/fusion-framework/pull/2855) [`811f1a0`](https://github.com/equinor/fusion-framework/commit/811f1a0139ff4d1b0c3fba1ec2b77cc84ba080d1) Thanks [@odinr](https://github.com/odinr)! - Conformed to Biome `linter.correctness.useExhaustiveDependencies`
146
+
147
+ - [#2848](https://github.com/equinor/fusion-framework/pull/2848) [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d) Thanks [@odinr](https://github.com/odinr)! - Refactored imports to use `type` when importing types from a module, to conform with the `useImportType` rule in Biome.
148
+
149
+ - Updated dependencies [[`ba5d12e`](https://github.com/equinor/fusion-framework/commit/ba5d12eba0a38db412353765e997d02c1fbb478d), [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d)]:
150
+ - @equinor/fusion-framework-module@4.3.6
16
151
 
17
152
  ## 3.1.6
18
153
 
19
154
  ### Patch Changes
20
155
 
21
- - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
22
- - @equinor/fusion-framework-module@4.3.5
156
+ - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
157
+ - @equinor/fusion-framework-module@4.3.5
23
158
 
24
159
  ## 3.1.5
25
160
 
26
161
  ### Patch Changes
27
162
 
28
- - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
29
- - @equinor/fusion-framework-module@4.3.4
163
+ - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
164
+ - @equinor/fusion-framework-module@4.3.4
30
165
 
31
166
  ## 3.1.4
32
167
 
33
168
  ### Patch Changes
34
169
 
35
- - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
36
- - @equinor/fusion-framework-module@4.3.3
170
+ - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
171
+ - @equinor/fusion-framework-module@4.3.3
37
172
 
38
173
  ## 3.1.3
39
174
 
40
175
  ### Patch Changes
41
176
 
42
- - [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
177
+ - [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
43
178
 
44
- - [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
179
+ - [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
45
180
 
46
- Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
181
+ Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
182
+ 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
183
+ 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
184
+ 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
47
185
 
48
- 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
49
- 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
50
- 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
186
+ No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
51
187
 
52
- No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
188
+ Before:
53
189
 
54
- Before:
55
-
56
- ```json
57
- {
58
- "compilerOptions": {
59
- "module": "ES2022",
60
- "target": "ES6",
61
- "incremental": true,
62
- "removeComments": true,
63
- "preserveConstEnums": true,
64
- "sourceMap": true,
65
- "moduleResolution": "node"
66
- }
190
+ ```json
191
+ {
192
+ "compilerOptions": {
193
+ "module": "ES2022",
194
+ "target": "ES6",
195
+ "incremental": true,
196
+ "removeComments": true,
197
+ "preserveConstEnums": true,
198
+ "sourceMap": true,
199
+ "moduleResolution": "node"
67
200
  }
68
- ```
69
-
70
- After:
71
-
72
- ```json
73
- {
74
- "compilerOptions": {
75
- "module": "ES2022",
76
- "target": "ES6",
77
- "incremental": true,
78
- "preserveConstEnums": true,
79
- "sourceMap": true,
80
- "moduleResolution": "node"
81
- }
201
+ }
202
+ ```
203
+
204
+ After:
205
+
206
+ ```json
207
+ {
208
+ "compilerOptions": {
209
+ "module": "ES2022",
210
+ "target": "ES6",
211
+ "incremental": true,
212
+ "preserveConstEnums": true,
213
+ "sourceMap": true,
214
+ "moduleResolution": "node"
82
215
  }
83
- ```
216
+ }
217
+ ```
84
218
 
85
- This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
219
+ This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
86
220
 
87
- - Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
88
- - @equinor/fusion-framework-module@4.3.2
221
+ - Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
222
+ - @equinor/fusion-framework-module@4.3.2
89
223
 
90
224
  ## 3.1.2
91
225
 
92
226
  ### Patch Changes
93
227
 
94
- - Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
95
- - @equinor/fusion-framework-module@4.3.1
228
+ - Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
229
+ - @equinor/fusion-framework-module@4.3.1
96
230
 
97
231
  ## 3.1.1
98
232
 
99
233
  ### Patch Changes
100
234
 
101
- - [#1981](https://github.com/equinor/fusion-framework/pull/1981) [`3d068b5`](https://github.com/equinor/fusion-framework/commit/3d068b5a7b214b62fcae5546f08830ea90f872dc) Thanks [@eikeland](https://github.com/eikeland)! - Align package exports with node10+ documentation.
235
+ - [#1981](https://github.com/equinor/fusion-framework/pull/1981) [`3d068b5`](https://github.com/equinor/fusion-framework/commit/3d068b5a7b214b62fcae5546f08830ea90f872dc) Thanks [@eikeland](https://github.com/eikeland)! - Align package exports with node10+ documentation.
102
236
 
103
237
  ## 3.1.0
104
238
 
105
239
  ### Minor Changes
106
240
 
107
- - [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
241
+ - [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
108
242
 
109
243
  ### Patch Changes
110
244
 
111
- - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
112
- - @equinor/fusion-framework-module@4.3.0
245
+ - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
246
+ - @equinor/fusion-framework-module@4.3.0
113
247
 
114
248
  ## 3.0.8
115
249
 
116
250
  ### Patch Changes
117
251
 
118
- - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
119
- - @equinor/fusion-framework-module@4.2.7
252
+ - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
253
+ - @equinor/fusion-framework-module@4.2.7
120
254
 
121
255
  ## 3.0.7
122
256
 
123
257
  ### Patch Changes
124
258
 
125
- - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
126
- - @equinor/fusion-framework-module@4.2.6
259
+ - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
260
+ - @equinor/fusion-framework-module@4.2.6
127
261
 
128
262
  ## 3.0.6
129
263
 
130
264
  ### Patch Changes
131
265
 
132
- - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
266
+ - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
133
267
 
134
- - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
135
- - @equinor/fusion-framework-module@4.2.5
268
+ - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
269
+ - @equinor/fusion-framework-module@4.2.5
136
270
 
137
271
  ## 3.0.5
138
272
 
139
273
  ### Patch Changes
140
274
 
141
- - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
142
- - @equinor/fusion-framework-module@4.2.4
275
+ - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
276
+ - @equinor/fusion-framework-module@4.2.4
143
277
 
144
278
  ## 3.0.4
145
279
 
146
280
  ### Patch Changes
147
281
 
148
- - [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
282
+ - [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
149
283
 
150
- conflicts of `@types/react` made random outcomes when using `yarn`
284
+ conflicts of `@types/react` made random outcomes when using `yarn`
151
285
 
152
- this change should not affect consumer of the packages, but might conflict dependent on local package manager.
286
+ this change should not affect consumer of the packages, but might conflict dependent on local package manager.
153
287
 
154
- - [#1125](https://github.com/equinor/fusion-framework/pull/1125) [`2dccccd1`](https://github.com/equinor/fusion-framework/commit/2dccccd124fbe3cdde2132c29c27d3da9fc6f1f5) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump react and @types/react to react 18.2
288
+ - [#1125](https://github.com/equinor/fusion-framework/pull/1125) [`2dccccd1`](https://github.com/equinor/fusion-framework/commit/2dccccd124fbe3cdde2132c29c27d3da9fc6f1f5) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump react and @types/react to react 18.2
155
289
 
156
- only dev deps updated should not affect any consumers
290
+ only dev deps updated should not affect any consumers
157
291
 
158
- see [react changelog](https://github.com/facebook/react/releases) for details
292
+ see [react changelog](https://github.com/facebook/react/releases) for details
159
293
 
160
- - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
161
- - @equinor/fusion-framework-module@4.2.3
294
+ - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
295
+ - @equinor/fusion-framework-module@4.2.3
162
296
 
163
297
  ## 3.0.3
164
298
 
165
299
  ### Patch Changes
166
300
 
167
- - [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
168
-
169
- - align all versions of typescript
170
- - update types to build
171
- - a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
301
+ - [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
302
+ - align all versions of typescript
303
+ - update types to build
304
+ - a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
172
305
 
173
- - Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
174
- - @equinor/fusion-framework-module@4.2.0
306
+ - Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
307
+ - @equinor/fusion-framework-module@4.2.0
175
308
 
176
309
  All notable changes to this project will be documented in this file.
177
310
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
@@ -216,7 +349,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
216
349
 
217
350
  ### Features
218
351
 
219
- - update typing of useModule hook ([958dd04](https://github.com/equinor/fusion-framework/commit/958dd0401667e9ebb1a51bced128ae43369cd6c4))
352
+ - update typing of useModule hook ([958dd04](https://github.com/equinor/fusion-framework/commit/958dd0401667e9ebb1a51bced128ae43369cd6c4))
220
353
 
221
354
  ## 1.0.15 (2022-11-11)
222
355
 
@@ -270,7 +403,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
270
403
 
271
404
  ### Bug Fixes
272
405
 
273
- - update typings and linting ([7d2056b](https://github.com/equinor/fusion-framework/commit/7d2056b7866850b7efdfd4567385b5dbbcdf8761))
406
+ - update typings and linting ([7d2056b](https://github.com/equinor/fusion-framework/commit/7d2056b7866850b7efdfd4567385b5dbbcdf8761))
274
407
 
275
408
  ## [1.0.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.1...@equinor/fusion-framework-react-module@1.0.2) (2022-09-13)
276
409
 
@@ -292,21 +425,21 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
292
425
 
293
426
  ### ⚠ BREAKING CHANGES
294
427
 
295
- - **react-module:** config is now object
428
+ - **react-module:** config is now object
296
429
 
297
430
  ### Features
298
431
 
299
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
432
+ - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
300
433
 
301
434
  ## [1.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.5...@equinor/fusion-framework-react-module@1.0.0-alpha.0) (2022-09-12)
302
435
 
303
436
  ### ⚠ BREAKING CHANGES
304
437
 
305
- - **react-module:** config is now object
438
+ - **react-module:** config is now object
306
439
 
307
440
  ### Features
308
441
 
309
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
442
+ - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
310
443
 
311
444
  ## [0.2.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.4...@equinor/fusion-framework-react-module@0.2.5) (2022-09-05)
312
445
 
@@ -316,7 +449,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
316
449
 
317
450
  ### Bug Fixes
318
451
 
319
- - **react-module:** fix typing of refs ([0df08fc](https://github.com/equinor/fusion-framework/commit/0df08fc00990a5c93b851f2c00175c7996f15845))
452
+ - **react-module:** fix typing of refs ([0df08fc](https://github.com/equinor/fusion-framework/commit/0df08fc00990a5c93b851f2c00175c7996f15845))
320
453
 
321
454
  ## 0.2.3 (2022-09-05)
322
455
 
@@ -332,14 +465,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
332
465
 
333
466
  # 0.2.0 (2022-08-11)
334
467
 
335
- - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
468
+ - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
336
469
 
337
470
  ### BREAKING CHANGES
338
471
 
339
- - module.initialize now has object as arg
472
+ - module.initialize now has object as arg
340
473
 
341
474
  # 0.1.0 (2022-08-05)
342
475
 
343
476
  ### Features
344
477
 
345
- - **react-module:** initial ([#192](https://github.com/equinor/fusion-framework/issues/192)) ([368614b](https://github.com/equinor/fusion-framework/commit/368614b2c7bd43fad21b17ba709a42cad6e84319))
478
+ - **react-module:** initial ([#192](https://github.com/equinor/fusion-framework/issues/192)) ([368614b](https://github.com/equinor/fusion-framework/commit/368614b2c7bd43fad21b17ba709a42cad6e84319))
@@ -1,28 +1,8 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __rest = (this && this.__rest) || function (s, e) {
11
- var t = {};
12
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
- t[p] = s[p];
14
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
- t[p[i]] = s[p[i]];
18
- }
19
- return t;
20
- };
21
1
  import { jsx as _jsx } from "react/jsx-runtime";
22
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
23
- import { lazy, useEffect } from 'react';
3
+ import { lazy, useEffect, } from 'react';
24
4
  import { initializeModules, } from '@equinor/fusion-framework-module';
25
- import moduleContext from './context';
5
+ import moduleContext from './context.js';
26
6
  /**
27
7
  * Function for creating a `ModuleProvider` component.
28
8
  *
@@ -54,21 +34,19 @@ import moduleContext from './context';
54
34
  * @param ref optional parent module instance
55
35
  * @returns Suspensive `ModuleProvider`
56
36
  */
57
- export const createModuleProvider = (configurator, ref) => __awaiter(void 0, void 0, void 0, function* () {
58
- const Component = lazy(() => __awaiter(void 0, void 0, void 0, function* () {
59
- const _a = yield initializeModules(configurator, ref), { dispose } = _a, instance = __rest(_a, ["dispose"]);
37
+ export const createModuleProvider = async (configurator, ref) => {
38
+ const Component = lazy(async () => {
39
+ const { dispose, ...instance } = await initializeModules(configurator, ref);
60
40
  return {
61
41
  default: ({ children }) => {
62
- // eslint-disable-next-line react-hooks/rules-of-hooks
63
- useEffect(() => dispose,
64
- // eslint-disable-next-line react-hooks/exhaustive-deps
65
- [instance]);
42
+ // biome-ignore lint/correctness/useExhaustiveDependencies: should dispose when new instance is provided
43
+ useEffect(() => dispose, [instance]);
66
44
  return _jsx(ModuleProvider, { value: instance, children: children });
67
45
  },
68
46
  };
69
- }));
47
+ });
70
48
  return Component;
71
- });
49
+ };
72
50
  export const ModuleProvider = moduleContext.Provider;
73
51
  export default ModuleProvider;
74
52
  //# sourceMappingURL=ModuleProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleProvider.js","sourceRoot":"","sources":["../../src/ModuleProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EACH,iBAAiB,GAIpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,aAAa,MAAM,WAAW,CAAC;AAWtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,CAIvD,YAA2C,EAC3C,GAAU,EACiD,EAAE;IAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAS,EAAE;QAC9B,MAAM,KAA2B,MAAM,iBAAiB,CAAiB,YAAY,EAAE,GAAG,CAAC,EAArF,EAAE,OAAO,OAA4E,EAAvE,QAAQ,cAAtB,WAAwB,CAA6D,CAAC;QAC5F,OAAO;YACH,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAkC,EAAE,EAAE;gBACtD,sDAAsD;gBACtD,SAAS,CACL,GAAG,EAAE,CAAC,OAAO;gBACb,wDAAwD;gBACxD,CAAC,QAAQ,CAAC,CACb,CAAC;gBACF,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAkB,CAAC;YACxE,CAAC;SACJ,CAAC;IACN,CAAC,CAAA,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACrB,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC;AAErD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ModuleProvider.js","sourceRoot":"","sources":["../../src/ModuleProvider.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EACL,IAAI,EACJ,SAAS,GAIV,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,iBAAiB,GAIlB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,aAAa,MAAM,cAAc,CAAC;AAYzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,KAAK,EAK9D,YAA2C,EAC3C,GAAU,EACuC,EAAE;IACnD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAAiB,YAAY,EAAE,GAAG,CAAC,CAAC;QAC5F,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,QAAQ,EAA4B,EAAE,EAAE;gBAClD,wGAAwG;gBACxG,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrC,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAkB,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC;AAErD,eAAe,cAAc,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ModuleProvider, createModuleProvider } from './ModuleProvider';
2
- export { useModules, useModule } from './useModules';
1
+ export { ModuleProvider, createModuleProvider } from './ModuleProvider.js';
2
+ export { useModules, useModule } from './useModules.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +1,48 @@
1
1
  import { useContext } from 'react';
2
- import { moduleContext } from './context';
3
- /** Hook for using modules in current context scope */
2
+ import { moduleContext } from './context.js';
3
+ /**
4
+ * Hook for accessing module instances from the current context scope.
5
+ *
6
+ * Retrieves initialized module instances that were provided via a `ModuleProvider`.
7
+ * The hook supports both array and object-based module collections, with full type safety.
8
+ *
9
+ * @template TModules - The type of modules to retrieve. Can be an array of modules or a record/object mapping module names to module types. Defaults to all available `Modules`.
10
+ * @returns An object containing the initialized module instances, with types inferred from the provided module definitions.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // Using with a specific module object
15
+ * const modules = useModules<{ navigation: NavigationModule }>();
16
+ * const navigation = modules.navigation;
17
+ *
18
+ * // Using with default modules
19
+ * const allModules = useModules();
20
+ * ```
21
+ */
4
22
  export const useModules = () => useContext(moduleContext);
5
- /** Hook for use a single module in current context scope */
6
- export const useModule = (key) => useModules()[key];
23
+ /**
24
+ * Hook for accessing a single module instance from the current context scope.
25
+ *
26
+ * Convenience hook that retrieves a single module by its key/name. This is useful
27
+ * when you only need one module and want to avoid destructuring from `useModules`.
28
+ *
29
+ * @template T - The type of the module to retrieve. Defaults to any module from the available `Modules`.
30
+ * @template TKey - The string key/name of the module. Automatically inferred from `T` when possible.
31
+ * @param key - The name/key of the module to retrieve from the context.
32
+ * @returns The initialized instance of the requested module, with proper type inference.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Get a specific module by name
37
+ * const navigation = useModule('navigation');
38
+ *
39
+ * // With explicit type
40
+ * const navigation = useModule<NavigationModule>('navigation');
41
+ * ```
42
+ */
43
+ export const useModule = (key) => {
44
+ const modules = useModules();
45
+ return modules[key];
46
+ };
7
47
  export default useModules;
8
48
  //# sourceMappingURL=useModules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAS,EAAE,CAAC,UAAU,CAAC,aAAa,CAAM,CAAC;AAErE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAG,CAIrB,GAAS,EACiD,EAAE,CAAC,UAAU,EAAiB,CAAC,GAAG,CAAC,CAAC;AAElG,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAES,EAAE,CAAC,UAAU,CAAC,aAAa,CAAkC,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAIvB,GAAS,EACmD,EAAE;IAC9D,MAAM,OAAO,GAAG,UAAU,EAA6B,CAAC;IACxD,OAAQ,OAAmC,CAAC,GAAG,CAE9C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '3.1.6';
2
+ export const version = '4.0.0';
3
3
  //# sourceMappingURL=version.js.map