@veloxts/web 0.8.2 → 0.8.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @veloxts/web
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - bump dependencies across packages (April 2026)
8
+ - Updated dependencies
9
+ - @veloxts/auth@0.8.3
10
+ - @veloxts/client@0.8.3
11
+ - @veloxts/core@0.8.3
12
+ - @veloxts/router@0.8.3
13
+
3
14
  ## 0.8.2
4
15
 
5
16
  ### Patch Changes
@@ -560,6 +571,7 @@
560
571
  - ### feat(auth): Unified Adapter-Only Architecture
561
572
 
562
573
  **New Features:**
574
+
563
575
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
564
576
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
565
577
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -567,20 +579,24 @@
567
579
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
568
580
 
569
581
  **Architecture Changes:**
582
+
570
583
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
571
584
  - Single code path for authentication (no more dual native/adapter modes)
572
585
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
573
586
 
574
587
  **Breaking Changes:**
588
+
575
589
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
576
590
  - Remove deprecated `session` field from `AuthConfig`
577
591
  - `User` interface no longer has index signature (extend via declaration merging)
578
592
 
579
593
  **Type Safety Improvements:**
594
+
580
595
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
581
596
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
582
597
 
583
598
  **Migration:**
599
+
584
600
  - Existing `authPlugin` usage remains backward-compatible
585
601
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
586
602
 
@@ -601,10 +617,12 @@
601
617
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
602
618
 
603
619
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
620
+
604
621
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
605
622
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
606
623
 
607
624
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
625
+
608
626
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
609
627
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
610
628
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -612,17 +630,20 @@
612
630
  - Fix jwtManager singleton pattern in templates
613
631
 
614
632
  ### Phase 3: Router Helpers (`@veloxts/router`)
633
+
615
634
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
616
635
  - Add `toRouter()` for router-only use cases
617
636
  - Update all router templates to use `createRouter()`
618
637
 
619
638
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
639
+
620
640
  - Add `NarrowingGuard` interface with phantom `_narrows` type
621
641
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
622
642
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
623
643
  - Enables `ctx.user` to be non-null after guard passes
624
644
 
625
645
  ### Phase 5: Documentation (`@veloxts/router`)
646
+
626
647
  - Document `.rest()` override patterns
627
648
  - Document `createRouter()` helper usage
628
649
  - Document `guardNarrow()` experimental API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/web",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "React Server Components integration for VeloxTS framework using Vinxi",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -72,10 +72,10 @@
72
72
  "peerDependencies": {
73
73
  "react": ">=19.2.0",
74
74
  "react-dom": ">=19.2.0",
75
- "@veloxts/auth": "0.8.2",
76
- "@veloxts/core": "0.8.2",
77
- "@veloxts/client": "0.8.2",
78
- "@veloxts/router": "0.8.2"
75
+ "@veloxts/auth": "0.8.3",
76
+ "@veloxts/core": "0.8.3",
77
+ "@veloxts/client": "0.8.3",
78
+ "@veloxts/router": "0.8.3"
79
79
  },
80
80
  "peerDependenciesMeta": {
81
81
  "@veloxts/auth": {
@@ -86,21 +86,21 @@
86
86
  }
87
87
  },
88
88
  "devDependencies": {
89
- "@types/jsdom": "28.0.0",
90
- "@types/node": "25.5.0",
89
+ "@types/jsdom": "28.0.1",
90
+ "@types/node": "25.6.0",
91
91
  "@types/react": "19.2.14",
92
92
  "@types/react-dom": "19.2.3",
93
- "@vitest/coverage-v8": "4.1.0",
94
- "fastify": "5.8.2",
95
- "jsdom": "28.1.0",
96
- "react": "19.2.4",
97
- "react-dom": "19.2.4",
93
+ "@vitest/coverage-v8": "4.1.5",
94
+ "fastify": "5.8.5",
95
+ "jsdom": "29.0.2",
96
+ "react": "19.2.5",
97
+ "react-dom": "19.2.5",
98
98
  "typescript": "5.9.3",
99
- "vitest": "4.1.0",
100
- "@veloxts/auth": "0.8.2",
101
- "@veloxts/core": "0.8.2",
102
- "@veloxts/router": "0.8.2",
103
- "@veloxts/client": "0.8.2"
99
+ "vitest": "4.1.5",
100
+ "@veloxts/auth": "0.8.3",
101
+ "@veloxts/core": "0.8.3",
102
+ "@veloxts/router": "0.8.3",
103
+ "@veloxts/client": "0.8.3"
104
104
  },
105
105
  "keywords": [
106
106
  "velox",