@equinor/fusion-framework-vite-plugin-spa 3.1.11 → 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,43 @@
1
1
  # @equinor/fusion-framework-vite-plugin-spa
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - abffa53: Major version bump for Fusion Framework React 19 release.
8
+
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
+ ### Patch Changes
23
+
24
+ - 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
25
+
26
+ Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
27
+ No breaking API changes affect this codebase. The `dev-server` peerDependency
28
+ is widened to accept both Vite 7 and Vite 8.
29
+
30
+ - Updated dependencies [abffa53]
31
+ - Updated dependencies [abffa53]
32
+ - Updated dependencies [abffa53]
33
+ - Updated dependencies [8f30948]
34
+ - Updated dependencies [abffa53]
35
+ - @equinor/fusion-framework-module@6.0.0
36
+ - @equinor/fusion-framework-module-http@8.0.0
37
+ - @equinor/fusion-framework-module-msal@8.0.0
38
+ - @equinor/fusion-framework-module-service-discovery@10.0.0
39
+ - @equinor/fusion-framework-module-telemetry@5.0.0
40
+
3
41
  ## 3.1.11
4
42
 
5
43
  ### Patch Changes
@@ -95,7 +133,6 @@
95
133
  - [#3922](https://github.com/equinor/fusion-framework/pull/3922) [`d34ebd8`](https://github.com/equinor/fusion-framework/commit/d34ebd82c93acabc88f88e44a725f084af3af5ec) Thanks [@odinr](https://github.com/odinr)! - Enable AG Grid Enterprise license injection for the dev-portal by setting a global window key produced from the SPA template environment. The portal reads `window.FUSION_AG_GRID_KEY` to configure the AG Grid module and silence license warnings when a valid key is present. CLI docs now mention the license key setup.
96
134
 
97
135
  **Usage:**
98
-
99
136
  - In your SPA environment file, set `FUSION_SPA_AG_GRID_KEY=your-license-key-here`.
100
137
  - The SPA HTML template injects `window.FUSION_AG_GRID_KEY` before bootstrap runs, and the dev-portal picks it up automatically.
101
138
 
@@ -118,7 +155,6 @@
118
155
  - [#3932](https://github.com/equinor/fusion-framework/pull/3932) [`15aaa87`](https://github.com/equinor/fusion-framework/commit/15aaa87e6a8b391c0672db0dcdca4c1cac3b50a7) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: update rollup build dependency from 4.52.5 to 4.55.2.
119
156
 
120
157
  This update includes:
121
-
122
158
  - Improved circular dependency handling for manual chunks
123
159
  - Enhanced tree-shaking for Symbol properties
124
160
  - Performance improvements via variable name caching
@@ -175,7 +211,6 @@
175
211
  ### Patch Changes
176
212
 
177
213
  - [#3714](https://github.com/equinor/fusion-framework/pull/3714) [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8) Thanks [@odinr](https://github.com/odinr)! - Fix MSAL v4 compatibility issues in SPA plugin.
178
-
179
214
  - Update MSAL client configuration to use nested auth object structure
180
215
  - Replace deprecated defaultAccount with account property
181
216
  - Update acquireToken calls to use MSAL v4 request structure
@@ -213,20 +248,17 @@
213
248
  This update addresses a security vulnerability in Vite's development server and includes bug fixes for improved compatibility. The update ensures secure development environments and better plugin ecosystem compatibility.
214
249
 
215
250
  **Changes:**
216
-
217
251
  - Updated Vite from v7.1.10 to v7.1.12
218
252
  - Includes security fix for development server file system checks
219
253
  - Includes compatibility fix for CommonJS plugin
220
254
  - No breaking changes or API modifications
221
255
 
222
256
  **Security Fix (v7.1.11):**
223
-
224
257
  - **dev**: trim trailing slash before `server.fs.deny` check ([#20968](https://github.com/vitejs/vite/issues/20968))
225
258
  - Prevents potential path traversal vulnerability in development server
226
259
  - Only affects development environment, not production builds
227
260
 
228
261
  **Bug Fix (v7.1.12):**
229
-
230
262
  - **deps**: downgrade commonjs plugin to 28.0.6 to avoid rollup/plugins issues ([#20990](https://github.com/vitejs/vite/issues/20990))
231
263
  - Improves compatibility with Rollup plugin ecosystem
232
264
  - Prevents potential build issues
@@ -242,19 +274,16 @@
242
274
  - [#3584](https://github.com/equinor/fusion-framework/pull/3584) [`0dd31cd`](https://github.com/equinor/fusion-framework/commit/0dd31cd1078b383ddab4a8cf1bb03d502e214715) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump @rollup/plugin-node-resolve from 16.0.1 to 16.0.3
243
275
 
244
276
  Bug fixes:
245
-
246
277
  - fix: resolve bare targets of package "imports" using export maps; avoid fileURLToPath(null)
247
278
  - fix: error thrown with empty entry
248
279
 
249
280
  - [#3604](https://github.com/equinor/fusion-framework/pull/3604) [`31e2581`](https://github.com/equinor/fusion-framework/commit/31e2581fca2765dc7caf54f74db3db51020b53b7) Thanks [@odinr](https://github.com/odinr)! - Update SPA bootstrap telemetry configuration to use proper adapter identifiers.
250
281
 
251
282
  **Changes:**
252
-
253
283
  - Refactor console adapter setup for cleaner conditional logic
254
284
  - Update setAdapter calls to include required identifier parameter
255
285
 
256
286
  **Migration:**
257
-
258
287
  - No breaking changes for SPA consumers - internal implementation update only
259
288
 
260
289
  - Updated dependencies [[`6900d98`](https://github.com/equinor/fusion-framework/commit/6900d98142c84f4703095f8d03b09af57a1d7d2e), [`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`31e2581`](https://github.com/equinor/fusion-framework/commit/31e2581fca2765dc7caf54f74db3db51020b53b7), [`0bc6b38`](https://github.com/equinor/fusion-framework/commit/0bc6b38e61c98a2f9dea7b55fa9983f268f860be), [`a13de68`](https://github.com/equinor/fusion-framework/commit/a13de68b2f196a779ea850af055d8db7926941ce)]:
@@ -273,7 +302,6 @@
273
302
  Previously, the plugin was using direct `.pathname` access on URL objects which could cause issues on Windows due to path separator differences. This change replaces the direct pathname access with `fileURLToPath()` and `normalizePath()` from Vite to ensure proper cross-platform path handling.
274
303
 
275
304
  **Changes:**
276
-
277
305
  - Import `normalizePath` from Vite for consistent path normalization
278
306
  - Use `fileURLToPath()` to properly convert file URLs to paths
279
307
  - Apply `normalizePath()` to ensure consistent path separators across platforms
@@ -287,7 +315,6 @@
287
315
  - [#3579](https://github.com/equinor/fusion-framework/pull/3579) [`b6a64d9`](https://github.com/equinor/fusion-framework/commit/b6a64d94bad7248c06b3aa7d65d7d698052437c7) Thanks [@Noggling](https://github.com/Noggling)! - Add peer dependencies to SPA Vite plugin
288
316
 
289
317
  Added peer dependencies to ensure proper dependency resolution for the SPA Vite plugin. This change declares the Fusion Framework modules that the plugin expects to be available in the consuming application:
290
-
291
318
  - `@equinor/fusion-framework-module`
292
319
  - `@equinor/fusion-framework-module-http`
293
320
  - `@equinor/fusion-framework-module-msal`
@@ -301,7 +328,6 @@
301
328
  ### Minor Changes
302
329
 
303
330
  - [#3547](https://github.com/equinor/fusion-framework/pull/3547) [`99a3c26`](https://github.com/equinor/fusion-framework/commit/99a3c26275c2089c3708124f5819ce383d8dc3dc) Thanks [@odinr](https://github.com/odinr)! - Enhanced SPA plugin with portal proxy support for testing apps in real portal environments ([Issue #3546](https://github.com/equinor/fusion-framework/issues/3546)).
304
-
305
331
  - Added `proxy` option to portal configuration to enable `/portal-proxy` routing
306
332
  - Added `FUSION_SPA_PORTAL_PROXY` environment variable support
307
333
  - Updated TypeScript types to include portal proxy configuration
@@ -327,7 +353,6 @@
327
353
  ### Patch Changes
328
354
 
329
355
  - [#3490](https://github.com/equinor/fusion-framework/pull/3490) [`45954e5`](https://github.com/equinor/fusion-framework/commit/45954e5db471a2faa24e88e41fc6d6c18817d6d1) Thanks [@odinr](https://github.com/odinr)! - Remove logger level configuration from bootstrap template.
330
-
331
356
  - Removed `configurator.logger.level` assignment from `bootstrap.ts`
332
357
  - Logger level configuration should be handled elsewhere or is no longer needed
333
358
 
@@ -338,7 +363,6 @@
338
363
  This patch update fixes bugs and improves stability in the vite dependency.
339
364
 
340
365
  - [#3521](https://github.com/equinor/fusion-framework/pull/3521) [`d1098f7`](https://github.com/equinor/fusion-framework/commit/d1098f7eeff04380c9e05e4a7a7d6b16e1d95884) Thanks [@odinr](https://github.com/odinr)! - Add comprehensive telemetry integration to SPA bootstrap and service worker.
341
-
342
366
  - Enable telemetry in SPA bootstrap with ConsoleAdapter
343
367
  - Add configurable console logging levels via FUSION_SPA_TELEMETRY_CONSOLE_LEVEL environment variable
344
368
  - Track bootstrap performance for portal loading operations
@@ -348,7 +372,6 @@
348
372
  - Fix console level filtering logic to properly respect environment variable settings
349
373
 
350
374
  **Implementation Notes:**
351
-
352
375
  - Console level filtering defaults to `TelemetryLevel.Information` (1) when env var not set
353
376
  - Invalid env var values fallback to logging all telemetry (robust error handling)
354
377
  - Backward compatible: existing behavior unchanged when no FUSION_SPA_TELEMETRY_CONSOLE_LEVEL specified
@@ -361,7 +384,6 @@
361
384
  ### Patch Changes
362
385
 
363
386
  - [`56c27ec`](https://github.com/equinor/fusion-framework/commit/56c27ec9de03e07e725eecfdf2c028a1e29b6ece) Thanks [@odinr](https://github.com/odinr)! - Updated workspace dependencies to use exact version specifiers for consistent release behavior.
364
-
365
387
  - Changed workspace dependencies from `workspace:^` to `workspace:*` across CLI, dev-server, and SPA vite plugin packages
366
388
  - Ensures exact version resolution within the monorepo for predictable builds and releases
367
389
  - Affects both dependencies and devDependencies where applicable
@@ -375,19 +397,16 @@
375
397
  **Problem**: During hard refresh, the service worker would not intercept fetch requests, causing authenticated API requests to fail. The service worker could be stuck in "waiting" state or already active but not controlling the page (`navigator.serviceWorker.controller` was `undefined`).
376
398
 
377
399
  **Root Cause**: Two related issues in the service worker lifecycle during hard refresh:
378
-
379
400
  1. **Waiting state**: When code changes, the new service worker enters "waiting" state, but `skipWaiting()` only runs in the `install` event (which already fired)
380
401
  2. **No controller**: Even when active, `clients.claim()` only runs in the `activate` event, which doesn't fire again if the service worker is already active
381
402
 
382
403
  **Solution**:
383
-
384
404
  - **Force activation on config receipt**: When receiving `INIT_CONFIG`, immediately call both `skipWaiting()` and `clients.claim()` to ensure the service worker activates and takes control regardless of its current state
385
405
  - **Wait for controller**: Registration now waits for `navigator.serviceWorker.controller` to be set before proceeding, ensuring fetch interception is ready
386
406
  - **Disable service worker caching**: Added `updateViaCache: 'none'` to always fetch fresh service worker code during development
387
407
  - **Comprehensive state handling**: Handle service workers in installing, waiting, and active states
388
408
 
389
409
  **Changes**:
390
-
391
410
  1. **sw.ts**: Call `skipWaiting()` and `clients.claim()` when receiving `INIT_CONFIG` message
392
411
  2. **register-service-worker.ts**: Wait for controller with polling and timeout fallback; disable service worker HTTP caching
393
412
 
@@ -411,7 +430,6 @@
411
430
  - [#3349](https://github.com/equinor/fusion-framework/pull/3349) [`c511123`](https://github.com/equinor/fusion-framework/commit/c511123c835e24e9ddefcc4c47c2455f5df12087) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump vite from 6.x to 7.1.5
412
431
 
413
432
  Major version update of Vite build tool across all packages. This update includes:
414
-
415
433
  - Enhanced build performance and caching
416
434
  - Better error reporting with code frames
417
435
  - Improved TypeScript integration
@@ -419,7 +437,6 @@
419
437
  - New development server features
420
438
 
421
439
  ### Links
422
-
423
440
  - [Vite 7.1.5 Release Notes](https://github.com/vitejs/vite/releases/tag/v7.1.5)
424
441
  - [Vite 7.x Migration Guide](https://vitejs.dev/guide/migration)
425
442
 
@@ -428,7 +445,6 @@
428
445
  ### Patch Changes
429
446
 
430
447
  - [#3381](https://github.com/equinor/fusion-framework/pull/3381) [`bae9c95`](https://github.com/equinor/fusion-framework/commit/bae9c9554f335d0384b864436874bded47d00ed8) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update rollup from 4.49.0 to 4.50.2
431
-
432
448
  - Updated rollup dependency via vite transitive dependency
433
449
  - Includes bug fixes for tree-shaking array destructuring patterns
434
450
  - Performance improvements and platform support updates
@@ -437,7 +453,6 @@
437
453
  - [#2910](https://github.com/equinor/fusion-framework/pull/2910) [`07cc985`](https://github.com/equinor/fusion-framework/commit/07cc9857e1427b574e011cc319518e701dba784d) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updated vitest from 2.1.9 to 3.2.4 across all packages.
438
454
 
439
455
  ## Breaking Changes
440
-
441
456
  - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
442
457
  - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
443
458
  - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
@@ -445,18 +460,15 @@
445
460
  - **TypeScript Support**: Enhanced TypeScript integration and type definitions
446
461
 
447
462
  ## Security Updates
448
-
449
463
  - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
450
464
  - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
451
465
 
452
466
  ## Migration Notes
453
-
454
467
  - Test snapshots may need regeneration due to quote format changes
455
468
  - Some test configurations might need updates for new TypeScript support
456
469
  - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
457
470
 
458
471
  ## Links
459
-
460
472
  - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
461
473
  - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
462
474
 
@@ -471,7 +483,6 @@
471
483
  This plugin represents a strategic modularization of the Fusion Framework CLI codebase. By extracting the SPA functionality into its own dedicated package, we've simplified the CLI's architecture while enabling greater flexibility. This modular design allows the SPA component to be replaced or reused by third-party developers independently of the CLI. The primary goal is to maintain a cleaner, more maintainable codebase through proper separation of concerns, with the CLI using this plugin rather than containing this functionality directly.
472
484
 
473
485
  **Key Features**:
474
-
475
486
  - **Fusion Framework Bootstrap**: Automatically initializes core modules and renders configured portals
476
487
  - **Service Discovery**: Enables dynamic service routing and eliminates hardcoded service endpoints
477
488
  - **MSAL Authentication**: Provides seamless Azure AD integration with configurable authentication flows
@@ -499,7 +510,6 @@
499
510
  ### Patch Changes
500
511
 
501
512
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`5973182`](https://github.com/equinor/fusion-framework/commit/5973182b156adb56137f1fc683635ae15274cc57) Thanks [@odinr](https://github.com/odinr)! - Update portal config and manifest API routes and types for consistency:
502
-
503
513
  - Change dev server API route for portal manifest/config from `/portals/portals/...` to `/portal-config/portals/...` for alignment with client usage.
504
514
  - Make portal config optional in dev server route and type definitions.
505
515
  - Update SPA bootstrap to use `portal-config` as the service discovery client key.
@@ -513,7 +523,6 @@
513
523
  ### Patch Changes
514
524
 
515
525
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`23fdc8a`](https://github.com/equinor/fusion-framework/commit/23fdc8a80d21ff063b17d8c596c0afc0a891305f) Thanks [@odinr](https://github.com/odinr)! - Fix dependency and devDependency declarations for lodash.mergewith:
516
-
517
526
  - Move "lodash.mergewith" to dependencies and ensure correct version for @types/lodash.mergewith in devDependencies.
518
527
  - Remove duplicate and misplaced entries for lodash.mergewith and its types.
519
528
  - Remove unused @equinor/fusion-framework-vite-plugin-api-service from devDependencies.
@@ -526,7 +535,6 @@
526
535
  ### Patch Changes
527
536
 
528
537
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`713cb15`](https://github.com/equinor/fusion-framework/commit/713cb15c5f1607e7f7285940a58165d97d8e41df) Thanks [@odinr](https://github.com/odinr)! - Refactor plugin internals for improved Vite compatibility and maintainability:
529
-
530
538
  - Made `resolveId` and `config` hooks async to support dynamic import resolution for virtual modules.
531
539
  - Improved resource alias resolution for `/@fusion-spa-bootstrap.js` and `/@fusion-spa-sw.js` using `import.meta.resolve` and `fileURLToPath`.
532
540
  - Enhanced environment variable handling by merging plugin and loaded environments, and defining them on `config.define`.
@@ -538,7 +546,6 @@
538
546
  ### Minor Changes
539
547
 
540
548
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`ea96493`](https://github.com/equinor/fusion-framework/commit/ea96493d95336f682e31a7b63161783ae7c99a63) Thanks [@odinr](https://github.com/odinr)! - Refactor build output and entrypoints for SPA Vite plugin:
541
-
542
549
  - Change main export entrypoint to `./dist/bin/index.js` (was `./dist/esm/index.js`).
543
550
  - Remove the `./html` export subpath.
544
551
  - Update Rollup config to bundle from `dist/esm` to `dist/bin` and adjust input/output accordingly.
@@ -552,7 +559,6 @@
552
559
  ### Patch Changes
553
560
 
554
561
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8870e73`](https://github.com/equinor/fusion-framework/commit/8870e73bd6d4141142c69c11c67b5b154bc80023) Thanks [@odinr](https://github.com/odinr)! - Update build system and dependencies:
555
-
556
562
  - Switch build script to use Rollup with a new `rollup.config.js` for ESM output
557
563
  - Add postbuild script to emit TypeScript declarations
558
564
  - Move all dependencies to devDependencies for clarity
@@ -608,7 +614,6 @@
608
614
  This plugin enables building single-page applications (SPAs) with Vite. It provides features such as service discovery, MSAL authentication, and service worker configuration.
609
615
 
610
616
  **Features**:
611
-
612
617
  - **Service Discovery**: Fetch service discovery configurations and authenticate requests.
613
618
  - **MSAL Authentication**: Authenticate users with Azure AD.
614
619
  - **Service Worker**: Intercept fetch requests, apply authentication headers, and rewrite URLs.
@@ -657,7 +662,6 @@
657
662
  ```
658
663
 
659
664
  **Additional Details**:
660
-
661
665
  - **Custom Bootstrap**: Allows defining custom bootloader scripts.
662
666
  - **Dynamic Proxy**: Supports dynamic proxy services using `@equinor/fusion-framework-vite-plugin-api-service`.
663
667
  - **Environment Variables**: Automatically maps `.env` variables to `import.meta.env`.
@@ -667,7 +671,6 @@
667
671
  ### Patch Changes
668
672
 
669
673
  - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - Fetch and pass portal config to portal render function in bootstrap.ts
670
-
671
674
  - The SPA bootstrap script now fetches the portal config from `/portals/{portalId}@{portalTag}/config` and passes it as `config` to the portal's render function.
672
675
  - This enables portals to receive their runtime configuration directly at startup.
673
676