Skip to content

Commit 63b0789

Browse files
feat(core): ⚡️ update node dependencies, refactor utils, and document breaking changes
* Update Node.js dependencies and adjust `peer` flags in `package-lock.json` for improved compatibility. * Refactor utility functions: export `get` and `set` from `MappingUtils.ts` and update imports in `XMLParser.ts`. * Move `chunk` utility in `CaaSMapper.ts` for consistency. * Update `.env.template` with new `INTEGRATION_TEST_TENANT_ID` variable. * Update package metadata: bump version to 11.0.0, update authors/contributors. * Add breaking changes and migration guide to `CHANGELOG.md`; remove migration guide from `README.md`. Signed-off-by: Justin Wiegmann <wiegmann@e-spirit.com>
1 parent 91574f7 commit 63b0789

9 files changed

Lines changed: 150 additions & 119 deletions

File tree

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
## BREAKING CHANGES
2+
3+
### Migrating to v11.0.0
4+
5+
This version contains breaking changes. Please read the following migration guide carefully.
6+
7+
#### 1. CaaSEventStream - Lazy Loading (Breaking Change)
8+
9+
The `CaaSEventStream` export has been changed to use lazy loading to prevent browser bundling issues with the `better-sse` dependency.
10+
11+
**Before (v10.x):**
12+
```typescript
13+
import { CaaSEventStream } from 'fsxa-api'
14+
15+
const handler = CaaSEventStream.eventStreamHandler(api)
16+
```
17+
18+
**After (v11.x):**
19+
```typescript
20+
import { CaaSEventStream } from 'fsxa-api'
21+
22+
// Now requires async/await
23+
const handler = await CaaSEventStream.getEventStreamHandler(api)
24+
```
25+
26+
**Key Changes:**
27+
- `CaaSEventStream.eventStreamHandler()` is now `CaaSEventStream.getEventStreamHandler()` and returns a Promise
28+
- The module is dynamically imported only when called (server-side), preventing `better-sse` from being bundled in browser builds
29+
- Browser code can safely import `fsxa-api` without errors, as long as `getEventStreamHandler()` is only called on the server
30+
31+
#### 2. Default maxReferenceDepth Changed (Breaking Change)
32+
33+
The default value for `maxReferenceDepth` has been reduced from **10** to **2** for performance optimization.
34+
35+
**Impact:** If your application relies on deeply nested references being resolved automatically, you may need to explicitly set a higher value.
36+
37+
**Migration:**
38+
```typescript
39+
const config = {
40+
apikey: 'your-api-key',
41+
caasURL: 'https://your.caas.url',
42+
// ... other config options
43+
maxReferenceDepth: 10, // Explicitly set if you need the old behavior
44+
}
45+
46+
const api = new FSXARemoteApi(config)
47+
```
48+
49+
**Recommendation:** The new default of 2 is sufficient for most use cases and improves performance. Only increase this value if you specifically need deeper reference resolution.
50+
151
# [10.24.0](https://github.com/e-Spirit/javascript-content-api-library/compare/v10.23.0...v10.24.0) (2025-09-22)
252

353

README.md

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,6 @@ Relying solely on the provided code without thorough validation and possible ext
2525
Features marked as experimental are subject to change as long as they remain in the experimental state.
2626
Breaking changes to experimental features are not reflected in a major version changes.
2727

28-
## Migration Guide
29-
30-
### Migrating to v11.0.0
31-
32-
This version contains breaking changes. Please read the following migration guide carefully.
33-
34-
#### 1. CaaSEventStream - Lazy Loading (Breaking Change)
35-
36-
The `CaaSEventStream` export has been changed to use lazy loading to prevent browser bundling issues with the `better-sse` dependency.
37-
38-
**Before (v10.x):**
39-
```typescript
40-
import { CaaSEventStream } from 'fsxa-api'
41-
42-
const handler = CaaSEventStream.eventStreamHandler(api)
43-
```
44-
45-
**After (v11.x):**
46-
```typescript
47-
import { CaaSEventStream } from 'fsxa-api'
48-
49-
// Now requires async/await
50-
const handler = await CaaSEventStream.getEventStreamHandler(api)
51-
```
52-
53-
**Key Changes:**
54-
- `CaaSEventStream.eventStreamHandler()` is now `CaaSEventStream.getEventStreamHandler()` and returns a Promise
55-
- The module is dynamically imported only when called (server-side), preventing `better-sse` from being bundled in browser builds
56-
- Browser code can safely import `fsxa-api` without errors, as long as `getEventStreamHandler()` is only called on the server
57-
58-
#### 2. Default maxReferenceDepth Changed (Breaking Change)
59-
60-
The default value for `maxReferenceDepth` has been reduced from **10** to **2** for performance optimization.
61-
62-
**Impact:** If your application relies on deeply nested references being resolved automatically, you may need to explicitly set a higher value.
63-
64-
**Migration:**
65-
```typescript
66-
const config = {
67-
apikey: 'your-api-key',
68-
caasURL: 'https://your.caas.url',
69-
// ... other config options
70-
maxReferenceDepth: 10, // Explicitly set if you need the old behavior
71-
}
72-
73-
const api = new FSXARemoteApi(config)
74-
```
75-
76-
**Recommendation:** The new default of 2 is sufficient for most use cases and improves performance. Only increase this value if you specifically need deeper reference resolution.
77-
7828
## Methods
7929

8030
In this section all available methods will be explained using examples.

integrationtests/.env.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
INTEGRATION_TEST_API_KEY=xxxxxxxx-xxxx-xxxx-xxxxxxxx
22
INTEGRATION_TEST_CAAS=https://your-caas-api.e-spirit.cloud
3-
INTEGRATION_TEST_NAVIGATION_SERVICE=https://your-navigation-service.e-spirit.cloud
3+
INTEGRATION_TEST_NAVIGATION_SERVICE=https://your-navigation-service.e-spirit.cloud
4+
INTEGRATION_TEST_TENANT_ID=fsxa-api-integration-test

0 commit comments

Comments
 (0)