Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ed9baa7
chore(Node Update): ✨ Update dependencies and refactor code
spirit-wiegmann Dec 11, 2025
78d72f5
chore(CaaSMapper): 🔧 update DEFAULT_MAX_REFERENCE_DEPTH to 2
spirit-wiegmann Dec 11, 2025
381a551
Merge branch 'refs/heads/master' into issue/PX-334-node-and-dependenc…
spirit-wiegmann Dec 11, 2025
a6ea55a
chore(package): 🔧 update package names and repository URLs
spirit-wiegmann Dec 11, 2025
d0bf317
chore(package): 🔧 update package names and repository URLs
spirit-wiegmann Dec 11, 2025
a5f4558
chore(tests): 🔧 update Faker to @faker-js/faker
spirit-wiegmann Dec 11, 2025
d3feef5
chore(tests): 🔧 update integration tests to use `INTEGRATION_TEST_TEN…
spirit-wiegmann Dec 11, 2025
70be118
chore(node): 🔧 update Node.js version to 24.x in CI configurations
spirit-wiegmann Dec 11, 2025
af9b1fa
feat!: breaking API change
spirit-wiegmann Dec 11, 2025
5942451
chore(release): 🔧 update checkout action to use fetch-depth and ref
spirit-wiegmann Dec 11, 2025
918ceb6
chore(validation): 🔧 update checkout action to use `github.head_ref`
spirit-wiegmann Dec 11, 2025
63a0a17
chore(release): 🔧 configure npm authentication for releases
spirit-wiegmann Dec 11, 2025
6b599f6
chore(release): 🔧 update release configuration for npm authentication
spirit-wiegmann Dec 11, 2025
d6abd94
chore(release): 🔧 update release scripts to use `release-it`
spirit-wiegmann Dec 11, 2025
fbb193a
chore(package): 🔧 update Node.js engine version specification
spirit-wiegmann Dec 11, 2025
c276faa
chore(release): 🔧 add release-it configuration and CI script
spirit-wiegmann Dec 11, 2025
e28238f
chore(release): 🔧 update release-it configuration for improved workflow
spirit-wiegmann Dec 11, 2025
b8989a3
chore(package): 🔧 remove unused `postpublish` script from package.json
spirit-wiegmann Dec 11, 2025
8f2928a
chore(release): 🔧 remove unused `@release-it/bumper` plugin
spirit-wiegmann Dec 11, 2025
917936f
chore(package): 🔧 update package metadata and migration guide
spirit-wiegmann Dec 15, 2025
e112698
chore(package): 🔧 update release scripts for improved CI integration
spirit-wiegmann Dec 15, 2025
8b7a725
chore(dev): fix dev index, improve reference depth logging, repair pa…
nico-mcalley Jan 13, 2026
949f518
chore(dev): fix maxReferenceDepth
nico-mcalley Jan 13, 2026
91574f7
chore(package.json): switch name for release testing
nico-mcalley Jan 13, 2026
63b0789
feat(core): ⚡️ update node dependencies, refactor utils, and document…
spirit-wiegmann Jan 14, 2026
c8c49cd
chore(package): 🔧 update package names and versions for release align…
spirit-wiegmann Jan 14, 2026
69dc8bc
chore(ci): 🔧 update dry run publish command in `validation.yml`
spirit-wiegmann Jan 15, 2026
b6a127c
chore(release): 🚀 add custom workspace publish and version sync scripts
spirit-wiegmann Jan 15, 2026
07b1f41
chore(ci): 🛡️ enforce `fail-on-severity: moderate` in dependency revi…
spirit-wiegmann Jan 15, 2026
6bbf6cd
chore(ci): ⬆️ update `dependency-review-action` to v4
spirit-wiegmann Jan 15, 2026
e785a65
chore(ci): 🔐 add `GH_TOKEN` and `GITHUB_TOKEN` env vars to dry run pu…
spirit-wiegmann Jan 15, 2026
613d2b8
chore(release): 🔧 remove `@release-it-plugins/workspaces` and refacto…
spirit-wiegmann Jan 15, 2026
3469c3f
chore(release): 🔧 update dry-run scripts to include workspace publish…
spirit-wiegmann Jan 15, 2026
47b540d
chore(release): 🔧 add workspace version sync to dry-run release scripts
spirit-wiegmann Jan 15, 2026
8da4c13
test(integration): 🧪 improve reliability of CaaS integration tests wi…
spirit-wiegmann Jan 15, 2026
fd2f3a9
test(remote-projects): 🧪 increase retry attempts and timeout for remo…
spirit-wiegmann Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v1
uses: actions/dependency-review-action@v4
with:
fail-on-severity: moderate
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x

- name: use cache if package-lock has not changed
uses: actions/cache@v4
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x
registry-url: 'https://registry.npmjs.org'

- name: Install
run: npm install

- name: Build
run: npm run build

- name: Configure npm authentication
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release
run: npm run semantic-release
run: npm run release:ci
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 11 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x

- name: use cache if package-lock has not changed
uses: actions/cache@v4
Expand All @@ -31,5 +34,11 @@ jobs:
- name: Run tests
run: npm run test

- name: Set authentication for publishing
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}

- name: Dry run publish
run: npm run semantic-release:dry-run
run: npm run release:ci:dry-run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
24.12.0
41 changes: 41 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"git": {
"commitMessage": "chore(release): ${version} [skip ci]\n\n${changelog}",
"tagName": "v${version}",
"requireCleanWorkingDir": false,
"requireBranch": false,
"commit": true,
"tag": true,
"push": true
},
"github": {
"release": true,
"releaseName": "v${version}",
"autoGenerate": false
},
"npm": {
"publish": true,
"skipChecks": true
},
"hooks": {
"before:init": [
"npm run test"
],
"after:bump": [
"node scripts/sync-workspace-versions.js",
"npm run build"
],
"after:npm:release": [
"node scripts/publish-workspace.js"
],
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md",
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.",
"ignoreRecommendedBump": false
}
}
}
18 changes: 0 additions & 18 deletions .releaserc

This file was deleted.

50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
## BREAKING CHANGES

### Migrating to v11.0.0

This version contains breaking changes. Please read the following migration guide carefully.

#### 1. CaaSEventStream - Lazy Loading (Breaking Change)

The `CaaSEventStream` export has been changed to use lazy loading to prevent browser bundling issues with the `better-sse` dependency.

**Before (v10.x):**
```typescript
import { CaaSEventStream } from 'fsxa-api'

const handler = CaaSEventStream.eventStreamHandler(api)
```

**After (v11.x):**
```typescript
import { CaaSEventStream } from 'fsxa-api'

// Now requires async/await
const handler = await CaaSEventStream.getEventStreamHandler(api)
```

**Key Changes:**
- `CaaSEventStream.eventStreamHandler()` is now `CaaSEventStream.getEventStreamHandler()` and returns a Promise
- The module is dynamically imported only when called (server-side), preventing `better-sse` from being bundled in browser builds
- Browser code can safely import `fsxa-api` without errors, as long as `getEventStreamHandler()` is only called on the server

#### 2. Default maxReferenceDepth Changed (Breaking Change)

The default value for `maxReferenceDepth` has been reduced from **10** to **2** for performance optimization.

**Impact:** If your application relies on deeply nested references being resolved automatically, you may need to explicitly set a higher value.

**Migration:**
```typescript
const config = {
apikey: 'your-api-key',
caasURL: 'https://your.caas.url',
// ... other config options
maxReferenceDepth: 10, // Explicitly set if you need the old behavior
}

const api = new FSXARemoteApi(config)
```

**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.

# [10.24.0](https://github.com/e-Spirit/javascript-content-api-library/compare/v10.23.0...v10.24.0) (2025-09-22)


Expand Down
4 changes: 2 additions & 2 deletions dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { createFile } from './utils'
import dotenv from 'dotenv'
import express from 'express'
import cors from 'cors'
import { FSXAContentMode, FSXARemoteApi } from '../src'
import { FSXAContentMode, FSXAProxyApi, FSXARemoteApi, LogLevel } from '../src'
import { default as expressIntegration } from '../src/integrations/express'
import { FSXAProxyApi, LogLevel } from 'fsxa-proxy-api'
require('cross-fetch/polyfill')

dotenv.config({ path: './dev/.env' })
Expand All @@ -29,6 +28,7 @@ const remoteApi = new FSXARemoteApi({
remotes: JSON.parse(API_REMOTES || '{}'),
logLevel: LogLevel.INFO,
enableEventStream: !!API_ENABLE_EVENT_STREAM,
maxReferenceDepth: 0
})

app.use(cors())
Expand Down
141 changes: 141 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import * as esbuild from 'esbuild'
import AnalyzerPlugin from 'esbuild-analyzer'
import fs from 'fs'

const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'))

// Externe Dependencies (nicht bündeln)
const external = [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
...Object.keys(pkg.optionalDependencies || {}),
'util'
]

// Gemeinsame Build-Optionen für Node.js (Main Bundle)
const commonNodeOptions = {
bundle: true,
target: 'es2015',
sourcemap: true,
minify: true,
treeShaking: true,
legalComments: 'none',
logLevel: 'info',
external,
minifyWhitespace: true,
minifySyntax: true,
metafile: true,
}

// Gemeinsame Build-Optionen für Browser (Proxy Bundle)
const browserOptions = {
bundle: true,
platform: 'browser',
target: 'es2020',
format: 'esm',
sourcemap: true,
minify: true,
treeShaking: true,
legalComments: 'none',
logLevel: 'info',
external,
minifyWhitespace: true,
minifySyntax: true,
metafile: true,
charset: 'utf8',
}

// Stats-Verzeichnis erstellen
if (!fs.existsSync('stats')) {
fs.mkdirSync('stats', { recursive: true })
}

// Main Bundle (fsxa-api)
console.log('Building main bundle (fsxa-api)...')

// CJS build - use platform: 'node' for proper CommonJS exports
await esbuild.build({
...commonNodeOptions,
platform: 'node',
entryPoints: ['src/index.ts'],
outfile: 'dist/fsxa-api.cjs.js',
format: 'cjs',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-api-cjs.html',
})
],
})

// ESM build - use platform: 'neutral' to avoid Node.js-specific code
await esbuild.build({
...commonNodeOptions,
platform: 'neutral',
entryPoints: ['src/index.ts'],
outfile: 'dist/fsxa-api.es5.js',
format: 'esm',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-api-esm.html',
})
],
})

console.log('Main bundle built successfully!')

// Proxy Bundle (fsxa-proxy-api)
console.log('Building proxy bundle (fsxa-proxy-api)...')

await esbuild.build({
...browserOptions,
entryPoints: ['src/proxy.ts'],
outfile: 'proxy/dist/fsxa-proxy-api.cjs.js',
format: 'cjs',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-proxy-api-cjs.html',
})
],
})

await esbuild.build({
...browserOptions,
entryPoints: ['src/proxy.ts'],
outfile: 'proxy/dist/fsxa-proxy-api.es5.js',
format: 'esm',
plugins: [
AnalyzerPlugin({
outfile: 'stats/fsxa-proxy-api-esm.html',
})
],
})

console.log('Proxy bundle built successfully!')

// Bundle-Größen ausgeben
console.log('\n📦 Bundle Sizes:')
console.log('─'.repeat(60))

const files = [
'dist/fsxa-api.cjs.js',
'dist/fsxa-api.es5.js',
'proxy/dist/fsxa-proxy-api.cjs.js',
'proxy/dist/fsxa-proxy-api.es5.js',
]

files.forEach((file) => {
if (fs.existsSync(file)) {
const stats = fs.statSync(file)
const sizeKB = (stats.size / 1024).toFixed(2)
console.log(`${file.padEnd(45)} ${sizeKB.padStart(10)} KB`)
}
})

console.log('─'.repeat(60))

console.log('\n✓ Bundle analysis reports generated:')
console.log(' - stats/fsxa-api-cjs.html')
console.log(' - stats/fsxa-api-esm.html')
console.log(' - stats/fsxa-proxy-api-cjs.html')
console.log(' - stats/fsxa-proxy-api-esm.html')
console.log('\nBuild complete!')
3 changes: 2 additions & 1 deletion integrationtests/.env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
INTEGRATION_TEST_API_KEY=xxxxxxxx-xxxx-xxxx-xxxxxxxx
INTEGRATION_TEST_CAAS=https://your-caas-api.e-spirit.cloud
INTEGRATION_TEST_NAVIGATION_SERVICE=https://your-navigation-service.e-spirit.cloud
INTEGRATION_TEST_NAVIGATION_SERVICE=https://your-navigation-service.e-spirit.cloud
INTEGRATION_TEST_TENANT_ID=fsxa-api-integration-test
Loading
Loading