@equinor/fusion-framework-module-msal 4.0.9 → 5.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 +39 -0
- package/README.md +68 -0
- package/dist/esm/__tests__/versioning/resolve-version.test.js +207 -0
- package/dist/esm/__tests__/versioning/resolve-version.test.js.map +1 -0
- package/dist/esm/static.js +1 -1
- package/dist/esm/v2/provider.js +1 -1
- package/dist/esm/v2/provider.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/versioning/VersionError.js +78 -0
- package/dist/esm/versioning/VersionError.js.map +1 -0
- package/dist/esm/versioning/create-version-message.js +54 -0
- package/dist/esm/versioning/create-version-message.js.map +1 -0
- package/dist/esm/versioning/index.js +25 -0
- package/dist/esm/versioning/index.js.map +1 -0
- package/dist/esm/versioning/resolve-version.js +90 -0
- package/dist/esm/versioning/resolve-version.js.map +1 -0
- package/dist/esm/versioning/static.js +10 -0
- package/dist/esm/versioning/static.js.map +1 -0
- package/dist/esm/versioning/types.js +2 -0
- package/dist/esm/versioning/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/__tests__/versioning/resolve-version.test.d.ts +1 -0
- package/dist/types/static.d.ts +1 -1
- package/dist/types/v2/configurator.d.ts +6 -40
- package/dist/types/version.d.ts +1 -1
- package/dist/types/versioning/VersionError.d.ts +73 -0
- package/dist/types/versioning/create-version-message.d.ts +34 -0
- package/dist/types/versioning/index.d.ts +23 -0
- package/dist/types/versioning/resolve-version.d.ts +43 -0
- package/dist/types/versioning/static.d.ts +8 -0
- package/dist/types/versioning/types.d.ts +54 -0
- package/package.json +5 -4
- package/src/__tests__/versioning/resolve-version.test.ts +255 -0
- package/src/v2/provider.ts +1 -1
- package/src/version.ts +1 -1
- package/src/versioning/VersionError.ts +103 -0
- package/src/versioning/create-version-message.ts +63 -0
- package/src/versioning/index.ts +29 -0
- package/src/versioning/resolve-version.ts +125 -0
- package/src/versioning/static.ts +8 -0
- package/src/versioning/types.ts +60 -0
- package/tsconfig.json +1 -1
- package/vitest.config.ts +11 -0
- package/dist/esm/resolve-version.js +0 -27
- package/dist/esm/resolve-version.js.map +0 -1
- package/dist/types/resolve-version.d.ts +0 -10
- package/src/resolve-version.ts +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#3394](https://github.com/equinor/fusion-framework/pull/3394) [`c222c67`](https://github.com/equinor/fusion-framework/commit/c222c673bc7cdefff6eb0cd9436bfa3d1f185295) Thanks [@odinr](https://github.com/odinr)! - feat: migrate to zod v4
|
|
8
|
+
|
|
9
|
+
Updated source code to migrate from zod v3 to v4. Updated zod dependency from v3.25.76 to v4.1.8 and modified authentication configuration schemas in the MSAL module to be compatible with zod v4's stricter type checking and updated API.
|
|
10
|
+
|
|
11
|
+
Key changes in source code:
|
|
12
|
+
|
|
13
|
+
- Updated `AuthClientConfigSchema` and `AuthConfigSchema` for zod v4 compatibility
|
|
14
|
+
- Enhanced version schema transformation to work with zod v4
|
|
15
|
+
- Improved validation of client configuration (clientId, tenantId, redirectUri)
|
|
16
|
+
- Better type safety for provider configuration and version handling
|
|
17
|
+
|
|
18
|
+
Breaking changes: Schema validation behavior may differ due to zod v4's stricter type checking. Error message format has changed from zod v3 to v4 format. Function schema definitions now require explicit typing.
|
|
19
|
+
|
|
20
|
+
Links:
|
|
21
|
+
|
|
22
|
+
- [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
|
|
23
|
+
- [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
|
|
24
|
+
|
|
25
|
+
## 4.1.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [#3376](https://github.com/equinor/fusion-framework/pull/3376) [`da373ad`](https://github.com/equinor/fusion-framework/commit/da373ade663898b2628e28529b6e3dea3b91ed43) Thanks [@odinr](https://github.com/odinr)! - Improved MSAL module version checking to be more permissive for minor and patch versions.
|
|
30
|
+
|
|
31
|
+
Fixes: #3375
|
|
32
|
+
|
|
33
|
+
- Refactored version checking logic into dedicated versioning module
|
|
34
|
+
- Made version checking more permissive for minor and patch versions
|
|
35
|
+
- Only major version incompatibilities will block execution
|
|
36
|
+
- Minor version differences now show warnings but allow execution to continue
|
|
37
|
+
- Patch version differences are completely ignored
|
|
38
|
+
- Added comprehensive test coverage for version resolution
|
|
39
|
+
- Improved error messages and warnings for better developer experience
|
|
40
|
+
- Maintains backward compatibility with existing configurations
|
|
41
|
+
|
|
3
42
|
## 4.0.9
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -150,6 +150,74 @@ The module implements a hoisting pattern where the authentication provider is cr
|
|
|
150
150
|
- 📖 [MSAL Cookbook](https://github.com/equinor/fusion-framework/tree/main/cookbooks/app-react-msal) - Complete working examples
|
|
151
151
|
- 🐛 [Report Issues](https://github.com/equinor/fusion/issues) - Bug reports and feature requests
|
|
152
152
|
|
|
153
|
+
## Version Management
|
|
154
|
+
|
|
155
|
+
The MSAL module includes built-in version checking to ensure compatibility between different MSAL library versions.
|
|
156
|
+
|
|
157
|
+
### Version Resolution
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
import { resolveVersion, VersionError } from '@equinor/fusion-framework-module-msal/versioning';
|
|
161
|
+
|
|
162
|
+
// Resolve and validate a version
|
|
163
|
+
const result = resolveVersion('2.0.0');
|
|
164
|
+
console.log(result.isLatest); // false
|
|
165
|
+
console.log(result.satisfiesLatest); // true
|
|
166
|
+
console.log(result.enumVersion); // MsalModuleVersion.V2
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Version Checking Behavior
|
|
170
|
+
|
|
171
|
+
- **Major Version Incompatibility**: Throws `VersionError` if requested major version is greater than latest
|
|
172
|
+
- **Minor Version Mismatch**: Logs warning but allows execution
|
|
173
|
+
- **Patch Differences**: Ignored for compatibility
|
|
174
|
+
- **Invalid Versions**: Throws `VersionError` with descriptive message
|
|
175
|
+
|
|
176
|
+
### API Reference
|
|
177
|
+
|
|
178
|
+
#### `resolveVersion(version: string | SemVer): ResolvedVersion`
|
|
179
|
+
|
|
180
|
+
Resolves and validates a version string against the latest available MSAL version.
|
|
181
|
+
|
|
182
|
+
**Parameters:**
|
|
183
|
+
- `version` - Version string or SemVer object to resolve
|
|
184
|
+
|
|
185
|
+
**Returns:** `ResolvedVersion` object containing:
|
|
186
|
+
- `wantedVersion: SemVer` - The parsed requested version
|
|
187
|
+
- `latestVersion: SemVer` - The latest available version
|
|
188
|
+
- `isLatest: boolean` - Whether the version is exactly the latest
|
|
189
|
+
- `satisfiesLatest: boolean` - Whether the major version matches latest
|
|
190
|
+
- `enumVersion: MsalModuleVersion` - Corresponding enum version
|
|
191
|
+
|
|
192
|
+
**Throws:** `VersionError` for invalid or incompatible versions
|
|
193
|
+
|
|
194
|
+
#### `VersionError`
|
|
195
|
+
|
|
196
|
+
Error class for version-related issues with the following types:
|
|
197
|
+
- `InvalidVersion` - Requested version is not a valid semver
|
|
198
|
+
- `InvalidLatestVersion` - Latest version parsing failed (build issue)
|
|
199
|
+
- `MajorIncompatibility` - Major version is greater than latest
|
|
200
|
+
- `MinorMismatch` - Minor version differs (warning only)
|
|
201
|
+
- `PatchDifference` - Patch version differs (info only)
|
|
202
|
+
- `IncompatibleVersion` - General incompatibility
|
|
203
|
+
|
|
204
|
+
### Error Handling
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
import { resolveVersion, VersionError } from '@equinor/fusion-framework-module-msal/versioning';
|
|
208
|
+
|
|
209
|
+
try {
|
|
210
|
+
const result = resolveVersion('3.0.0'); // Assuming latest is 2.x
|
|
211
|
+
} catch (error) {
|
|
212
|
+
if (error instanceof VersionError) {
|
|
213
|
+
console.error('Version error:', error.message);
|
|
214
|
+
console.error('Requested:', error.requestedVersion);
|
|
215
|
+
console.error('Latest:', error.latestVersion);
|
|
216
|
+
console.error('Type:', error.type);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
153
221
|
## Additional Resources
|
|
154
222
|
|
|
155
223
|
- [Microsoft Graph API Documentation](https://docs.microsoft.com/en-us/graph/)
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
+
import { SemVer } from 'semver';
|
|
3
|
+
import { resolveVersion } from '../../versioning/resolve-version';
|
|
4
|
+
import { VersionError } from '../../versioning/VersionError';
|
|
5
|
+
// Mock the static module to avoid test failures when package version changes
|
|
6
|
+
// This ensures tests remain stable regardless of package.json version bumps
|
|
7
|
+
vi.mock('../../static', () => ({
|
|
8
|
+
MsalModuleVersion: {
|
|
9
|
+
V2: 'v2',
|
|
10
|
+
Latest: '4.0.9', // Fixed version for consistent testing
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
// Import the mocked version
|
|
14
|
+
import { MsalModuleVersion } from '../../static';
|
|
15
|
+
describe('resolveVersion', () => {
|
|
16
|
+
describe('mock verification', () => {
|
|
17
|
+
it('should use mocked version for consistent testing', () => {
|
|
18
|
+
// Verify that our mock is working and we're using the fixed version
|
|
19
|
+
expect(MsalModuleVersion.Latest).toBe('4.0.9');
|
|
20
|
+
expect(MsalModuleVersion.V2).toBe('v2');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
describe('successful version resolution', () => {
|
|
24
|
+
it('should resolve a valid version string', () => {
|
|
25
|
+
const result = resolveVersion('2.1.0');
|
|
26
|
+
expect(result).toMatchObject({
|
|
27
|
+
wantedVersion: expect.any(SemVer),
|
|
28
|
+
latestVersion: expect.any(SemVer),
|
|
29
|
+
isLatest: false,
|
|
30
|
+
satisfiesLatest: false, // 2.x is not compatible with 4.x
|
|
31
|
+
enumVersion: MsalModuleVersion.V2,
|
|
32
|
+
});
|
|
33
|
+
expect(result.wantedVersion.version).toBe('2.1.0');
|
|
34
|
+
expect(result.latestVersion.version).toBe('4.0.9');
|
|
35
|
+
});
|
|
36
|
+
it('should resolve with SemVer object', () => {
|
|
37
|
+
const semver = new SemVer('2.0.0');
|
|
38
|
+
const result = resolveVersion(semver);
|
|
39
|
+
expect(result.wantedVersion).toBe(semver);
|
|
40
|
+
expect(result.satisfiesLatest).toBe(false); // 2.x is not compatible with 4.x
|
|
41
|
+
});
|
|
42
|
+
it('should resolve latest version when no version provided', () => {
|
|
43
|
+
const result = resolveVersion();
|
|
44
|
+
expect(result.wantedVersion.version).toBe('4.0.9');
|
|
45
|
+
expect(result.latestVersion.version).toBe('4.0.9');
|
|
46
|
+
expect(result.isLatest).toBe(true);
|
|
47
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
48
|
+
});
|
|
49
|
+
it('should resolve latest version when empty string provided', () => {
|
|
50
|
+
const result = resolveVersion('');
|
|
51
|
+
expect(result.wantedVersion.version).toBe('4.0.9');
|
|
52
|
+
expect(result.isLatest).toBe(true);
|
|
53
|
+
});
|
|
54
|
+
it('should handle patch version differences without warnings', () => {
|
|
55
|
+
const result = resolveVersion('4.0.8');
|
|
56
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
57
|
+
expect(result.isLatest).toBe(false);
|
|
58
|
+
expect(result.warnings).toBeUndefined();
|
|
59
|
+
});
|
|
60
|
+
it('should handle minor version differences with warnings', () => {
|
|
61
|
+
const result = resolveVersion('4.1.0');
|
|
62
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
63
|
+
expect(result.isLatest).toBe(false);
|
|
64
|
+
expect(result.warnings).toBeDefined();
|
|
65
|
+
expect(result.warnings).toHaveLength(1);
|
|
66
|
+
expect(result.warnings?.[0]).toContain('Minor version mismatch');
|
|
67
|
+
});
|
|
68
|
+
it('should find correct enum version for major version', () => {
|
|
69
|
+
const result = resolveVersion('2.5.0');
|
|
70
|
+
expect(result.enumVersion).toBe(MsalModuleVersion.V2);
|
|
71
|
+
expect(result.satisfiesLatest).toBe(false); // 2.x is not compatible with 4.x
|
|
72
|
+
});
|
|
73
|
+
it('should throw error when no matching major version exists in enum', () => {
|
|
74
|
+
// Version 3.0.0 should throw because there's no enum for major version 3
|
|
75
|
+
expect(() => resolveVersion('3.0.0')).toThrow(VersionError);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe('error handling', () => {
|
|
79
|
+
it('should throw VersionError for invalid version string', () => {
|
|
80
|
+
expect(() => resolveVersion('invalid-version')).toThrow(VersionError);
|
|
81
|
+
});
|
|
82
|
+
it('should not throw for malformed version (coerce handles it)', () => {
|
|
83
|
+
// semver.coerce('2.') returns '2.0.0', so it doesn't throw
|
|
84
|
+
expect(() => resolveVersion('2.')).not.toThrow();
|
|
85
|
+
});
|
|
86
|
+
it('should throw VersionError for non-semver string', () => {
|
|
87
|
+
expect(() => resolveVersion('not-a-version')).toThrow(VersionError);
|
|
88
|
+
});
|
|
89
|
+
it('should throw VersionError for major version incompatibility', () => {
|
|
90
|
+
expect(() => resolveVersion('5.0.0')).toThrow(VersionError);
|
|
91
|
+
});
|
|
92
|
+
it('should throw VersionError for very high major version', () => {
|
|
93
|
+
expect(() => resolveVersion('999.0.0')).toThrow(VersionError);
|
|
94
|
+
});
|
|
95
|
+
it('should include correct error type for major incompatibility', () => {
|
|
96
|
+
try {
|
|
97
|
+
resolveVersion('5.0.0');
|
|
98
|
+
expect.fail('Should have thrown VersionError');
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
expect(error).toBeInstanceOf(VersionError);
|
|
102
|
+
const versionError = error;
|
|
103
|
+
expect(versionError.type).toBe('major-incompatibility');
|
|
104
|
+
expect(versionError.requestedVersion).toBe('5.0.0');
|
|
105
|
+
expect(versionError.latestVersion).toBe('4.0.9');
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
it('should include correct error type for invalid version', () => {
|
|
109
|
+
try {
|
|
110
|
+
resolveVersion('invalid');
|
|
111
|
+
expect.fail('Should have thrown VersionError');
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
expect(error).toBeInstanceOf(VersionError);
|
|
115
|
+
expect(error.type).toBe('invalid-version');
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
describe('version comparison logic', () => {
|
|
120
|
+
it('should correctly identify latest version', () => {
|
|
121
|
+
const result = resolveVersion('4.0.9');
|
|
122
|
+
expect(result.isLatest).toBe(true);
|
|
123
|
+
});
|
|
124
|
+
it('should correctly identify non-latest version', () => {
|
|
125
|
+
const result = resolveVersion('4.0.8');
|
|
126
|
+
expect(result.isLatest).toBe(false);
|
|
127
|
+
});
|
|
128
|
+
it('should correctly identify satisfying version', () => {
|
|
129
|
+
const result = resolveVersion('4.1.0');
|
|
130
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
131
|
+
});
|
|
132
|
+
it('should correctly identify non-satisfying version', () => {
|
|
133
|
+
expect(() => resolveVersion('5.0.0')).toThrow();
|
|
134
|
+
});
|
|
135
|
+
it('should throw error for major versions without enum values', () => {
|
|
136
|
+
// Version 3.0.0 should throw because there's no enum for major version 3
|
|
137
|
+
expect(() => resolveVersion('3.0.0')).toThrow(VersionError);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
describe('warning behavior', () => {
|
|
141
|
+
it('should warn on minor version mismatch', () => {
|
|
142
|
+
const result = resolveVersion('4.1.0');
|
|
143
|
+
expect(result.warnings).toBeDefined();
|
|
144
|
+
expect(result.warnings).toHaveLength(1);
|
|
145
|
+
expect(result.warnings?.[0]).toContain('Minor version mismatch');
|
|
146
|
+
});
|
|
147
|
+
it('should not warn on patch version differences', () => {
|
|
148
|
+
const result = resolveVersion('4.0.8');
|
|
149
|
+
expect(result.warnings).toBeUndefined();
|
|
150
|
+
});
|
|
151
|
+
it('should not warn on exact version match', () => {
|
|
152
|
+
const result = resolveVersion('4.0.9');
|
|
153
|
+
expect(result.warnings).toBeUndefined();
|
|
154
|
+
});
|
|
155
|
+
it('should warn with correct version information', () => {
|
|
156
|
+
const result = resolveVersion('4.2.0');
|
|
157
|
+
expect(result.warnings).toBeDefined();
|
|
158
|
+
expect(result.warnings).toHaveLength(1);
|
|
159
|
+
expect(result.warnings?.[0]).toContain('4.2.0');
|
|
160
|
+
expect(result.warnings?.[0]).toContain('4.0.9');
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
describe('edge cases', () => {
|
|
164
|
+
it('should handle version with pre-release identifiers (coerce strips them)', () => {
|
|
165
|
+
const result = resolveVersion('4.0.9-beta.1');
|
|
166
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
167
|
+
expect(result.wantedVersion.version).toBe('4.0.9'); // coerce strips pre-release
|
|
168
|
+
});
|
|
169
|
+
it('should handle version with build metadata (coerce strips them)', () => {
|
|
170
|
+
const result = resolveVersion('4.0.9+build.123');
|
|
171
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
172
|
+
expect(result.wantedVersion.version).toBe('4.0.9'); // coerce strips build metadata
|
|
173
|
+
});
|
|
174
|
+
it('should handle very long version strings (coerce strips them)', () => {
|
|
175
|
+
const longVersion = '4.0.9-beta.1.alpha.2+build.123.456';
|
|
176
|
+
const result = resolveVersion(longVersion);
|
|
177
|
+
expect(result.satisfiesLatest).toBe(true);
|
|
178
|
+
expect(result.wantedVersion.version).toBe('4.0.9'); // coerce strips pre-release and build
|
|
179
|
+
});
|
|
180
|
+
it('should throw error for zero versions without enum values', () => {
|
|
181
|
+
// Version 0.0.0 should throw because there's no enum for major version 0
|
|
182
|
+
expect(() => resolveVersion('0.0.0')).toThrow(VersionError);
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
describe('return value structure', () => {
|
|
186
|
+
it('should return object with all required properties', () => {
|
|
187
|
+
const result = resolveVersion('2.1.0');
|
|
188
|
+
expect(result).toHaveProperty('wantedVersion');
|
|
189
|
+
expect(result).toHaveProperty('latestVersion');
|
|
190
|
+
expect(result).toHaveProperty('isLatest');
|
|
191
|
+
expect(result).toHaveProperty('satisfiesLatest');
|
|
192
|
+
expect(result).toHaveProperty('enumVersion');
|
|
193
|
+
expect(typeof result.isLatest).toBe('boolean');
|
|
194
|
+
expect(typeof result.satisfiesLatest).toBe('boolean');
|
|
195
|
+
expect(result.wantedVersion).toBeInstanceOf(SemVer);
|
|
196
|
+
expect(result.latestVersion).toBeInstanceOf(SemVer);
|
|
197
|
+
expect(typeof result.enumVersion).toBe('string');
|
|
198
|
+
});
|
|
199
|
+
it('should have consistent latest version across calls', () => {
|
|
200
|
+
const result1 = resolveVersion('2.0.0');
|
|
201
|
+
const result2 = resolveVersion('4.0.0');
|
|
202
|
+
expect(result1.latestVersion.version).toBe(result2.latestVersion.version);
|
|
203
|
+
expect(result1.latestVersion.version).toBe('4.0.9');
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
//# sourceMappingURL=resolve-version.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-version.test.js","sourceRoot":"","sources":["../../../../src/__tests__/versioning/resolve-version.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7B,iBAAiB,EAAE;QACjB,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,OAAO,EAAE,uCAAuC;KACzD;CACF,CAAC,CAAC,CAAC;AAEJ,4BAA4B;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM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C,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;YAC5D,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YAExC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC1E,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/esm/static.js
CHANGED
|
@@ -3,6 +3,6 @@ export const ModuleName = 'msal';
|
|
|
3
3
|
export var MsalModuleVersion;
|
|
4
4
|
(function (MsalModuleVersion) {
|
|
5
5
|
MsalModuleVersion["V2"] = "v2";
|
|
6
|
-
MsalModuleVersion["Latest"] = "
|
|
6
|
+
MsalModuleVersion["Latest"] = "5.0.0";
|
|
7
7
|
})(MsalModuleVersion || (MsalModuleVersion = {}));
|
|
8
8
|
//# sourceMappingURL=static.js.map
|
package/dist/esm/v2/provider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAuthClient, ConsoleLogger } from './client';
|
|
2
2
|
import { MsalModuleVersion } from '../static';
|
|
3
|
-
import resolveVersion from '../resolve-version';
|
|
3
|
+
import { resolveVersion } from '../versioning/resolve-version';
|
|
4
4
|
import { SemanticVersion } from '@equinor/fusion-framework-module';
|
|
5
5
|
export class AuthProvider {
|
|
6
6
|
_config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/v2/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,gBAAgB,EAAoB,aAAa,EAAE,MAAM,UAAU,CA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AAM,CAAC,CAAC;oBAC5C,KAAK,qBAAqB;wBACxB,OAAO,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/esm/version.js
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { VersionMessageType } from './static';
|
|
2
|
+
import { createVersionMessage } from './create-version-message';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a VersionError instance with a formatted message.
|
|
5
|
+
*
|
|
6
|
+
* This is a helper function that creates a VersionError with a human-readable
|
|
7
|
+
* message based on the error type and version information.
|
|
8
|
+
*
|
|
9
|
+
* @param type - The type of version error
|
|
10
|
+
* @param requestedVersion - The version that was requested
|
|
11
|
+
* @param latestVersion - The latest available version
|
|
12
|
+
* @param options - Additional error options including the error type
|
|
13
|
+
* @returns A new VersionError instance with formatted message
|
|
14
|
+
*/
|
|
15
|
+
const createVersionError = (type, requestedVersion, latestVersion, options) => {
|
|
16
|
+
return new VersionError(createVersionMessage(type, requestedVersion, latestVersion), requestedVersion, latestVersion, { ...options, type });
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Error class for version-related issues in the MSAL module.
|
|
20
|
+
*
|
|
21
|
+
* This error is thrown when there are version compatibility problems,
|
|
22
|
+
* such as requesting an incompatible major version or providing an invalid version string.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* try {
|
|
27
|
+
* resolveVersion('3.0.0'); // Assuming latest is 2.x
|
|
28
|
+
* } catch (error) {
|
|
29
|
+
* if (error instanceof VersionError) {
|
|
30
|
+
* console.error('Version error:', error.message);
|
|
31
|
+
* console.error('Requested:', error.requestedVersion);
|
|
32
|
+
* console.error('Latest:', error.latestVersion);
|
|
33
|
+
* console.error('Type:', error.type);
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* // Create a version error manually
|
|
41
|
+
* const error = VersionError.create(
|
|
42
|
+
* VersionError.Type.MajorIncompatibility,
|
|
43
|
+
* '3.0.0',
|
|
44
|
+
* '2.1.0'
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export class VersionError extends Error {
|
|
49
|
+
/** The version that was requested by the user */
|
|
50
|
+
requestedVersion;
|
|
51
|
+
/** The latest available version in the system */
|
|
52
|
+
latestVersion;
|
|
53
|
+
/** The specific type of version error that occurred */
|
|
54
|
+
type;
|
|
55
|
+
/** The error name for instanceof checks */
|
|
56
|
+
static Name = 'VersionError';
|
|
57
|
+
/** Reference to the VersionMessageType enum for convenience */
|
|
58
|
+
static Type = VersionMessageType;
|
|
59
|
+
/** Factory method for creating VersionError instances with formatted messages */
|
|
60
|
+
static create = createVersionError;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a new VersionError instance.
|
|
63
|
+
*
|
|
64
|
+
* @param message - The error message describing the version issue
|
|
65
|
+
* @param requestedVersion - The version that was requested (will be stored as string)
|
|
66
|
+
* @param latestVersion - The latest available version (will be stored as string)
|
|
67
|
+
* @param options - Additional error options including the error type
|
|
68
|
+
*/
|
|
69
|
+
constructor(message, requestedVersion, latestVersion, options) {
|
|
70
|
+
super(message, options);
|
|
71
|
+
this.name = VersionError.Name;
|
|
72
|
+
// Store versions as strings
|
|
73
|
+
this.requestedVersion = String(requestedVersion);
|
|
74
|
+
this.latestVersion = String(latestVersion);
|
|
75
|
+
this.type = options?.type;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=VersionError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionError.js","sourceRoot":"","sources":["../../../src/versioning/VersionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;;;;;;;GAWG;AACH,MAAM,kBAAkB,GAAG,CACzB,IAAwB,EACxB,gBAAiC,EACjC,aAA8B,EAC9B,OAAsD,EACxC,EAAE;IAChB,OAAO,IAAI,YAAY,CACrB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAC3D,gBAAgB,EAChB,aAAa,EACb,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,iDAAiD;IACjC,gBAAgB,CAAS;IAEzC,iDAAiD;IACjC,aAAa,CAAS;IAEtC,uDAAuD;IACvC,IAAI,CAAsB;IAE1C,2CAA2C;IAC3C,MAAM,CAAC,IAAI,GAAG,cAAc,CAAC;IAE7B,+DAA+D;IAC/D,MAAM,CAAC,IAAI,GAAG,kBAAkB,CAAC;IAEjC,iFAAiF;IACjF,MAAM,CAAC,MAAM,GAA8B,kBAAkB,CAAC;IAE9D;;;;;;;OAOG;IACH,YACE,OAAe,EACf,gBAAiC,EACjC,aAA8B,EAC9B,OAAsD;QAEtD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;QAE9B,4BAA4B;QAC5B,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QAE3C,IAAI,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,CAAC;IAC5B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { VersionMessageType } from './static';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a human-readable version message based on the version message type.
|
|
4
|
+
*
|
|
5
|
+
* This function generates descriptive error messages for different version compatibility
|
|
6
|
+
* scenarios, helping developers understand version-related issues.
|
|
7
|
+
*
|
|
8
|
+
* @param type - The type of version message to create
|
|
9
|
+
* @param requestedVersion - The version that was requested by the user
|
|
10
|
+
* @param latestVersion - The latest available version in the system
|
|
11
|
+
* @returns A formatted, human-readable version message string
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const message = createVersionMessage(
|
|
16
|
+
* VersionMessageType.MajorIncompatibility,
|
|
17
|
+
* '3.0.0',
|
|
18
|
+
* '2.1.0'
|
|
19
|
+
* );
|
|
20
|
+
* // Returns: "Requested major version 3.0.0 is greater than the latest major version 2.1.0"
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const message = createVersionMessage(
|
|
26
|
+
* VersionMessageType.MinorMismatch,
|
|
27
|
+
* '2.1.0',
|
|
28
|
+
* '2.2.0'
|
|
29
|
+
* );
|
|
30
|
+
* // Returns: "Minor version mismatch, requested 2.1.0, latest 2.2.0"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export const createVersionMessage = (type, requestedVersion, latestVersion) => {
|
|
34
|
+
// Convert versions to strings for consistent formatting
|
|
35
|
+
const requestedVersionString = String(requestedVersion);
|
|
36
|
+
const latestVersionString = String(latestVersion);
|
|
37
|
+
switch (type) {
|
|
38
|
+
case VersionMessageType.MajorIncompatibility:
|
|
39
|
+
return `Requested major version ${requestedVersionString} is greater than the latest major version ${latestVersionString}`;
|
|
40
|
+
case VersionMessageType.InvalidVersion:
|
|
41
|
+
return `Invalid version ${requestedVersionString}`;
|
|
42
|
+
case VersionMessageType.InvalidLatestVersion:
|
|
43
|
+
return `Failed to parse latest version "${latestVersionString}" - this indicates the version.ts file was not generated correctly. Check for import errors in the build process.`;
|
|
44
|
+
case VersionMessageType.MinorMismatch:
|
|
45
|
+
return `Minor version mismatch, requested ${requestedVersionString}, latest ${latestVersionString}`;
|
|
46
|
+
case VersionMessageType.PatchDifference:
|
|
47
|
+
return `Patch version difference, requested ${requestedVersionString}, latest ${latestVersionString}`;
|
|
48
|
+
case VersionMessageType.IncompatibleVersion:
|
|
49
|
+
return `Incompatible version, requested ${requestedVersionString}, latest ${latestVersionString}`;
|
|
50
|
+
default:
|
|
51
|
+
return createVersionMessage(VersionMessageType.IncompatibleVersion, requestedVersion, latestVersion);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=create-version-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-version-message.js","sourceRoot":"","sources":["../../../src/versioning/create-version-message.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAwB,EACxB,gBAAiC,EACjC,aAA8B,EACtB,EAAE;IACV,wDAAwD;IACxD,MAAM,sBAAsB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IAClD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,kBAAkB,CAAC,oBAAoB;YAC1C,OAAO,2BAA2B,sBAAsB,6CAA6C,mBAAmB,EAAE,CAAC;QAC7H,KAAK,kBAAkB,CAAC,cAAc;YACpC,OAAO,mBAAmB,sBAAsB,EAAE,CAAC;QACrD,KAAK,kBAAkB,CAAC,oBAAoB;YAC1C,OAAO,mCAAmC,mBAAmB,mHAAmH,CAAC;QACnL,KAAK,kBAAkB,CAAC,aAAa;YACnC,OAAO,qCAAqC,sBAAsB,YAAY,mBAAmB,EAAE,CAAC;QACtG,KAAK,kBAAkB,CAAC,eAAe;YACrC,OAAO,uCAAuC,sBAAsB,YAAY,mBAAmB,EAAE,CAAC;QACxG,KAAK,kBAAkB,CAAC,mBAAmB;YACzC,OAAO,mCAAmC,sBAAsB,YAAY,mBAAmB,EAAE,CAAC;QACpG;YACE,OAAO,oBAAoB,CACzB,kBAAkB,CAAC,mBAAmB,EACtC,gBAAgB,EAChB,aAAa,CACd,CAAC;IACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Versioning module for MSAL module compatibility checking.
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive version resolution and validation functionality
|
|
5
|
+
* for the MSAL module, ensuring compatibility between different MSAL library versions.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { resolveVersion, VersionError } from '@equinor/fusion-framework-module-msal/versioning';
|
|
10
|
+
*
|
|
11
|
+
* try {
|
|
12
|
+
* const result = resolveVersion('2.1.0');
|
|
13
|
+
* console.log('Version is compatible:', result.satisfiesLatest);
|
|
14
|
+
* } catch (error) {
|
|
15
|
+
* if (error instanceof VersionError) {
|
|
16
|
+
* console.error('Version error:', error.message);
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
// Core versioning functionality
|
|
22
|
+
export { resolveVersion } from './resolve-version';
|
|
23
|
+
// Error handling
|
|
24
|
+
export { VersionError } from './VersionError';
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/versioning/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gCAAgC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,iBAAiB;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import semver from 'semver';
|
|
2
|
+
import { MsalModuleVersion } from '../static';
|
|
3
|
+
import { VersionError } from './VersionError';
|
|
4
|
+
/**
|
|
5
|
+
* Resolves and validates a version string against the latest available MSAL version.
|
|
6
|
+
*
|
|
7
|
+
* This function performs comprehensive version checking including:
|
|
8
|
+
* - Parsing and validating the requested version
|
|
9
|
+
* - Checking major version compatibility (throws on incompatibility)
|
|
10
|
+
* - Warning on minor version mismatches (logs warning but continues)
|
|
11
|
+
* - Ignoring patch version differences for maximum compatibility
|
|
12
|
+
*
|
|
13
|
+
* @param version - The version string or SemVer object to resolve. If not provided, defaults to latest.
|
|
14
|
+
* @returns A ResolvedVersion object containing parsed versions and compatibility information
|
|
15
|
+
*
|
|
16
|
+
* @throws {VersionError} When the requested version is invalid or incompatible
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* // Resolve a specific version
|
|
21
|
+
* const result = resolveVersion('2.1.0');
|
|
22
|
+
* console.log(result.satisfiesLatest); // true if major version matches
|
|
23
|
+
*
|
|
24
|
+
* // Resolve with SemVer object
|
|
25
|
+
* const result2 = resolveVersion(new SemVer('2.0.0'));
|
|
26
|
+
*
|
|
27
|
+
* // Default to latest version
|
|
28
|
+
* const result3 = resolveVersion();
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* // Error handling
|
|
34
|
+
* try {
|
|
35
|
+
* const result = resolveVersion('3.0.0'); // Assuming latest is 2.x
|
|
36
|
+
* } catch (error) {
|
|
37
|
+
* if (error instanceof VersionError) {
|
|
38
|
+
* console.error('Version error:', error.message);
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export function resolveVersion(version) {
|
|
44
|
+
// Initialize warnings array to collect any version mismatches
|
|
45
|
+
const warnings = [];
|
|
46
|
+
// Parse the requested version, defaulting to latest if not provided
|
|
47
|
+
const versionString = version || MsalModuleVersion.Latest;
|
|
48
|
+
// Parse versions using coerce for backward compatibility
|
|
49
|
+
const wantedVersion = semver.coerce(versionString);
|
|
50
|
+
const latestVersion = semver.coerce(MsalModuleVersion.Latest);
|
|
51
|
+
// Validate that the requested version is a valid semver
|
|
52
|
+
if (!wantedVersion) {
|
|
53
|
+
throw VersionError.create(VersionError.Type.InvalidVersion, versionString, MsalModuleVersion.Latest);
|
|
54
|
+
}
|
|
55
|
+
// This should never happen! Indicates version.ts was not generated correctly
|
|
56
|
+
// This is a critical build-time issue that needs immediate attention
|
|
57
|
+
if (!latestVersion) {
|
|
58
|
+
throw VersionError.create(VersionError.Type.InvalidLatestVersion, versionString, MsalModuleVersion.Latest);
|
|
59
|
+
}
|
|
60
|
+
// Major version incompatibility check - this is a hard error
|
|
61
|
+
// Users cannot request a major version that doesn't exist yet
|
|
62
|
+
if (wantedVersion.major > latestVersion.major) {
|
|
63
|
+
throw VersionError.create(VersionError.Type.MajorIncompatibility, String(wantedVersion), String(latestVersion));
|
|
64
|
+
}
|
|
65
|
+
// Minor version mismatch - add warning but don't throw
|
|
66
|
+
// This helps developers stay aware of version differences without breaking functionality
|
|
67
|
+
if (wantedVersion.major === latestVersion.major && wantedVersion.minor !== latestVersion.minor) {
|
|
68
|
+
const minorMismatchWarning = VersionError.create(VersionError.Type.MinorMismatch, String(wantedVersion), String(latestVersion));
|
|
69
|
+
warnings.push(minorMismatchWarning.message);
|
|
70
|
+
}
|
|
71
|
+
// Find the corresponding enum version for the requested major version
|
|
72
|
+
// This is used for module configuration and feature detection
|
|
73
|
+
const enumVersion = Object.values(MsalModuleVersion).find((x) => semver.coerce(x)?.major === wantedVersion.major);
|
|
74
|
+
// If no matching enum version is found, this indicates a major version
|
|
75
|
+
// that doesn't have a corresponding enum value defined
|
|
76
|
+
if (!enumVersion) {
|
|
77
|
+
throw VersionError.create(VersionError.Type.MajorIncompatibility, String(wantedVersion), String(latestVersion));
|
|
78
|
+
}
|
|
79
|
+
// Return comprehensive version resolution result
|
|
80
|
+
return {
|
|
81
|
+
wantedVersion,
|
|
82
|
+
latestVersion,
|
|
83
|
+
isLatest: wantedVersion.compare(latestVersion) === 0,
|
|
84
|
+
satisfiesLatest: wantedVersion.major === latestVersion.major,
|
|
85
|
+
enumVersion,
|
|
86
|
+
warnings: warnings.length > 0 ? warnings : undefined,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export default resolveVersion;
|
|
90
|
+
//# sourceMappingURL=resolve-version.js.map
|