Skip to content

Commit 4733b97

Browse files
authored
Merge pull request #11 from SAP-samples/feature/update-dependencies
feat: update dependencies and showcase CAP 2026 features
2 parents 08b9942 + 5eb07d3 commit 4733b97

15 files changed

Lines changed: 1623 additions & 984 deletions

File tree

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## [2.0.2] - 2026-05-01
7+
8+
**Changed**
9+
10+
- Update @sap/cds from 9.8.5 to 9.9.1
11+
- Update @cap-js/cds-test from 0.4.1 to 1.0.1 (stable release)
12+
- Update eslint from 10.2.1 to 10.3.0
13+
- Update @cap-js/hana from 2.7.0 to 2.8.0
14+
- Update @cap-js/sqlite from 2.2.0 to 2.4.0
15+
- Update @cap-js/postgres from 2.2.0 to 2.3.0
16+
- Update @sap/cds-common-content from 3.1.0 to 3.2.0
17+
- Update @sap/dev-cap-tools from 1.53.2 to 1.53.3
18+
- Update @cap-js/change-tracking from 1.2.1 to 2.0.0-beta.11 (trigger-based architecture with ~2.4-50x performance improvement)
19+
- Update site dependencies (mermaid 11.13→11.14, vue 3.5.31→3.5.33)
20+
- Update scraper dependencies (axios 1.14→1.15)
21+
- Raise minimum Node.js version from 20 to 22 (CDS 10 requirement)
22+
- Enable CDS 10 forward-compatibility flags: ieee754compatible, consistent_params, compat_srv_getters, compat_texts_entities, compat_assert_not_null, compat_save_drafts, calc_elements
23+
- Disable legacy queue locking (queue.legacyLocking: false) in preparation for CDS 10
24+
- Add HANA migration table (sap.changelog.Changes.hdbmigrationtable) for change-tracking v2 schema migration
25+
- Enable native node:sqlite driver (driver: "node") — uses Node.js built-in SQLite instead of better-sqlite3
26+
- Enable parallel $batch GET processing (max_batch_parallelization: 3) for concurrent read-only batch atomicity groups
27+
28+
**Added**
29+
30+
- cds-test-v1.test.js — showcase test demonstrating @cap-js/cds-test v1.0 features: Chai assertions, Fetch-based HTTP shortcuts, native sqlite verification
31+
- @cap-js/ord plugin (v1.6.0) — exposes Open Resource Discovery endpoints (/.well-known/open-resource-discovery, /ord/v1/documents/ord-document) for machine-readable application metadata
32+
633
## [2.0.0] - 2026-04-04
734

835
**Added**

cap/.cdsrc.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33
"asyncapi": {
44
"application_namespace": "sap.swapi"
55
}
6+
},
7+
"features": {
8+
"ieee754compatible": true,
9+
"consistent_params": true,
10+
"compat_srv_getters": false,
11+
"compat_texts_entities": false,
12+
"compat_assert_not_null": false,
13+
"compat_save_drafts": false
14+
},
15+
"fiori": {
16+
"calc_elements": true
617
}
7-
}
18+
}

cap/@cds-models/StarWarsPeople/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ module.exports.Film2Species_ = createEntityProxy(['StarWarsPeople', 'Film2Specie
7676
// Planet2People
7777
module.exports.Planet2People = createEntityProxy(['StarWarsPeople', 'Planet2People'], { target: { is_singular: true } })
7878
module.exports.Planet2People_ = createEntityProxy(['StarWarsPeople', 'Planet2People'], { target: { is_singular: false }})
79+
// ChangeView
80+
module.exports.ChangeView = createEntityProxy(['StarWarsPeople', 'ChangeView'], { target: { is_singular: true }, customProps: ["modification"] })
81+
module.exports.ChangeView_ = createEntityProxy(['StarWarsPeople', 'ChangeView'], { target: { is_singular: false }})
7982
// events
8083
// actions
8184
module.exports.countByGender = 'countByGender'
8285
// enums
8386
module.exports.Film.episode_id ??= { I: 1, II: 2, III: 3, IV: 4, V: 5, VI: 6, VII: 7, VIII: 8, IX: 9, X: 10, OTHER: 0 }
87+
module.exports.ChangeView.modification ??= { Create: "create", Update: "update", Delete: "delete" }

cap/@cds-models/StarWarsPeople/index.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ const Film_episode_id = {
2828
} as const;
2929
type Film_episode_id = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 0
3030

31+
// enum
32+
const ChangeView_modification = {
33+
Create: "create",
34+
Update: "update",
35+
Delete: "delete",
36+
} as const;
37+
type ChangeView_modification = "create" | "update" | "delete"
38+
3139
export function _FilmAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
3240
return class Film extends Base {
3341
declare ID?: __.Key<string>
@@ -93,6 +101,7 @@ export function _PeopleAspect<TBase extends new (...args: any[]) => object>(Base
93101
*/
94102
declare displayTitle?: string | null
95103
declare episodes?: __.Association.to.many<Episode2People_>
104+
declare changes?: __.Association.to.many<ChangeView_>
96105
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
97106
declare static readonly keys: __.KeysOf<People>;
98107
declare static readonly elements: __.ElementsOf<People>;
@@ -645,6 +654,63 @@ Object.defineProperty(Planet2People, 'is_singular', { value: true })
645654
export class Planet2People_ extends Array<Planet2People> {$count?: number}
646655
Object.defineProperty(Planet2People_, 'name', { value: 'StarWarsPeople.Planet2People' })
647656

657+
export function _ChangeViewAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
658+
return class ChangeView extends Base {
659+
declare ID?: __.Key<string>
660+
declare parent?: __.Association.to<ChangeView> | null
661+
declare parent_ID?: string | null
662+
declare children?: __.Composition.of.many<ChangeView_>
663+
declare locale?: string | null
664+
declare text?: string | null
665+
declare attribute?: string | null
666+
declare valueChangedFrom?: string | null
667+
declare valueChangedTo?: string | null
668+
declare valueChangedFromLabel?: string | null
669+
declare valueChangedToLabel?: string | null
670+
declare entity?: string | null
671+
declare entityKey?: string | null
672+
declare objectID?: string | null
673+
declare modification?: ChangeView_modification | null
674+
declare valueDataType?: string | null
675+
declare createdAt?: __.DeepRequired<_.managed>['createdAt'] | null
676+
/** Canonical user ID */
677+
declare createdBy?: __.DeepRequired<_.managed>['createdBy'] | null
678+
declare transactionID?: number | null
679+
declare attributeLabel?: string | null
680+
declare entityLabel?: string | null
681+
declare modificationLabel?: string | null
682+
declare valueChangedFromLabelDateTime?: __.CdsDateTime | null
683+
declare valueChangedFromLabelDateTimeWTZ?: __.CdsDateTime | null
684+
declare valueChangedFromLabelTime?: __.CdsTime | null
685+
declare valueChangedFromLabelDate?: __.CdsDate | null
686+
declare valueChangedFromLabelTimestamp?: __.CdsTimestamp | null
687+
declare valueChangedToLabelDateTime?: __.CdsDateTime | null
688+
declare valueChangedToLabelDateTimeWTZ?: __.CdsDateTime | null
689+
declare valueChangedToLabelTime?: __.CdsTime | null
690+
declare valueChangedToLabelDate?: __.CdsDate | null
691+
declare valueChangedToLabelTimestamp?: __.CdsTimestamp | null
692+
declare valueTimeZone?: string | null
693+
declare LimitedDescendantCount?: number | null
694+
declare DistanceFromRoot?: number | null
695+
declare DrillState?: string | null
696+
declare LimitedRank?: number | null
697+
declare parent_entityKey?: string | null
698+
declare parent_entity?: string | null
699+
declare parent_parent_entityKey?: string | null
700+
declare parent_parent_entity?: string | null
701+
static modification = ChangeView_modification;
702+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
703+
declare static readonly keys: __.KeysOf<ChangeView>;
704+
declare static readonly elements: __.ElementsOf<ChangeView>;
705+
declare static readonly actions: globalThis.Record<never, never>;
706+
};
707+
}
708+
export class ChangeView extends _ChangeViewAspect(__.Entity) {}
709+
Object.defineProperty(ChangeView, 'name', { value: 'StarWarsPeople.ChangeView' })
710+
Object.defineProperty(ChangeView, 'is_singular', { value: true })
711+
export class ChangeView_ extends Array<ChangeView> {$count?: number}
712+
Object.defineProperty(ChangeView_, 'name', { value: 'StarWarsPeople.ChangeView' })
713+
648714
/**
649715
* Showcase: unbound function — returns the count of characters matching the given gender.
650716
* No entity binding; runs custom handler logic in people-service.js.

cap/@cds-models/sap/changelog/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ module.exports.aspect_ = createEntityProxy(['sap.changelog', 'aspect'], { target
66
// ChangeView
77
module.exports.ChangeView = createEntityProxy(['sap.changelog', 'ChangeView'], { target: { is_singular: true }, customProps: ["modification"] })
88
module.exports.ChangeView_ = createEntityProxy(['sap.changelog', 'ChangeView'], { target: { is_singular: false }})
9-
// ChangeLog
10-
module.exports.ChangeLog = createEntityProxy(['sap.changelog', 'ChangeLog'], { target: { is_singular: true } })
11-
module.exports.ChangeLog_ = createEntityProxy(['sap.changelog', 'ChangeLog'], { target: { is_singular: false }})
9+
// i18nKeys
10+
module.exports.i18nKey = createEntityProxy(['sap.changelog', 'i18nKeys'], { target: { is_singular: true } })
11+
module.exports.i18nKeys = createEntityProxy(['sap.changelog', 'i18nKeys'], { target: { is_singular: false }})
12+
// CHANGE_TRACKING_DUMMY
13+
module.exports.CHANGE_TRACKING_DUMMY = createEntityProxy(['sap.changelog', 'CHANGE_TRACKING_DUMMY'], { target: { is_singular: true } })
14+
module.exports.CHANGE_TRACKING_DUMMY_ = createEntityProxy(['sap.changelog', 'CHANGE_TRACKING_DUMMY'], { target: { is_singular: false }})
1215
// Changes
1316
module.exports.Change = createEntityProxy(['sap.changelog', 'Changes'], { target: { is_singular: true }, customProps: ["modification"] })
1417
module.exports.Changes = createEntityProxy(['sap.changelog', 'Changes'], { target: { is_singular: false }})

cap/@cds-models/sap/changelog/index.ts

Lines changed: 73 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -39,102 +39,120 @@ Object.defineProperty(aspect_, 'name', { value: 'sap.changelog.aspect' })
3939
export function _ChangeViewAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
4040
return class ChangeView extends Base {
4141
declare ID?: __.Key<string>
42-
declare keys?: string | null
42+
declare parent?: __.Association.to<ChangeView> | null
43+
declare parent_ID?: string | null
44+
declare children?: __.Composition.of.many<ChangeView_>
45+
declare locale?: string | null
46+
declare text?: string | null
4347
declare attribute?: string | null
4448
declare valueChangedFrom?: string | null
4549
declare valueChangedTo?: string | null
50+
declare valueChangedFromLabel?: string | null
51+
declare valueChangedToLabel?: string | null
4652
declare entity?: string | null
47-
declare serviceEntity?: string | null
48-
declare parentKey?: string | null
49-
declare serviceEntityPath?: string | null
53+
declare entityKey?: string | null
54+
declare objectID?: string | null
5055
declare modification?: ChangeView_modification | null
5156
declare valueDataType?: string | null
52-
declare changeLog?: __.Association.to<ChangeLog> | null
53-
declare changeLog_ID?: string | null
5457
declare createdAt?: __.DeepRequired<_.managed>['createdAt'] | null
5558
/** Canonical user ID */
5659
declare createdBy?: __.DeepRequired<_.managed>['createdBy'] | null
57-
declare objectID?: string | null
58-
declare parentObjectID?: string | null
59-
declare entityKey?: string | null
60+
declare transactionID?: number | null
61+
declare attributeLabel?: string | null
62+
declare entityLabel?: string | null
63+
declare modificationLabel?: string | null
64+
declare valueChangedFromLabelDateTime?: __.CdsDateTime | null
65+
declare valueChangedFromLabelDateTimeWTZ?: __.CdsDateTime | null
66+
declare valueChangedFromLabelTime?: __.CdsTime | null
67+
declare valueChangedFromLabelDate?: __.CdsDate | null
68+
declare valueChangedFromLabelTimestamp?: __.CdsTimestamp | null
69+
declare valueChangedToLabelDateTime?: __.CdsDateTime | null
70+
declare valueChangedToLabelDateTimeWTZ?: __.CdsDateTime | null
71+
declare valueChangedToLabelTime?: __.CdsTime | null
72+
declare valueChangedToLabelDate?: __.CdsDate | null
73+
declare valueChangedToLabelTimestamp?: __.CdsTimestamp | null
74+
declare valueTimeZone?: string | null
75+
declare LimitedDescendantCount?: number | null
76+
declare DistanceFromRoot?: number | null
77+
declare DrillState?: string | null
78+
declare LimitedRank?: number | null
79+
declare parent_entityKey?: string | null
80+
declare parent_entity?: string | null
81+
declare parent_parent_entityKey?: string | null
82+
declare parent_parent_entity?: string | null
6083
static modification = ChangeView_modification;
6184
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
6285
declare static readonly keys: __.KeysOf<ChangeView>;
6386
declare static readonly elements: __.ElementsOf<ChangeView>;
6487
declare static readonly actions: globalThis.Record<never, never>;
6588
};
6689
}
67-
/**
68-
* Attribute-level Changes with simple capturing of one-level
69-
* composition trees in parent... elements.
70-
*/
7190
export class ChangeView extends _ChangeViewAspect(__.Entity) {}
7291
Object.defineProperty(ChangeView, 'name', { value: 'sap.changelog.ChangeView' })
7392
Object.defineProperty(ChangeView, 'is_singular', { value: true })
74-
/**
75-
* Attribute-level Changes with simple capturing of one-level
76-
* composition trees in parent... elements.
77-
*/
7893
export class ChangeView_ extends Array<ChangeView> {$count?: number}
7994
Object.defineProperty(ChangeView_, 'name', { value: 'sap.changelog.ChangeView' })
8095

81-
export function _ChangeLogAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
82-
return class ChangeLog extends _._managedAspect(_._cuidAspect(Base)) {
83-
declare serviceEntity?: string | null
84-
declare entity?: string | null
85-
declare entityKey?: string | null
86-
declare changes?: __.Composition.of.many<Changes>
87-
static override readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
88-
declare static readonly keys: __.KeysOf<ChangeLog> & typeof _.cuid.keys;
89-
declare static readonly elements: __.ElementsOf<ChangeLog>;
90-
declare static readonly actions: typeof _.cuid.actions & typeof _.managed.actions & globalThis.Record<never, never>;
96+
export function _i18nKeyAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
97+
return class i18nKey extends Base {
98+
declare ID?: __.Key<string>
99+
declare locale?: __.Key<string>
100+
declare text?: string | null
101+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
102+
declare static readonly keys: __.KeysOf<i18nKey>;
103+
declare static readonly elements: __.ElementsOf<i18nKey>;
104+
declare static readonly actions: globalThis.Record<never, never>;
91105
};
92106
}
93-
/** Top-level changes entity, e.g. UPDATE Incident by, at, ... */
94-
export class ChangeLog extends _ChangeLogAspect(__.Entity) {}
95-
Object.defineProperty(ChangeLog, 'name', { value: 'sap.changelog.ChangeLog' })
96-
Object.defineProperty(ChangeLog, 'is_singular', { value: true })
97-
/** Top-level changes entity, e.g. UPDATE Incident by, at, ... */
98-
export class ChangeLog_ extends Array<ChangeLog> {$count?: number}
99-
Object.defineProperty(ChangeLog_, 'name', { value: 'sap.changelog.ChangeLog' })
107+
export class i18nKey extends _i18nKeyAspect(__.Entity) {}
108+
Object.defineProperty(i18nKey, 'name', { value: 'sap.changelog.i18nKeys' })
109+
Object.defineProperty(i18nKey, 'is_singular', { value: true })
110+
export class i18nKeys extends Array<i18nKey> {$count?: number}
111+
Object.defineProperty(i18nKeys, 'name', { value: 'sap.changelog.i18nKeys' })
112+
113+
export function _CHANGE_TRACKING_DUMMYAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
114+
return class CHANGE_TRACKING_DUMMY extends Base {
115+
declare X?: __.Key<string>
116+
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
117+
declare static readonly keys: __.KeysOf<CHANGE_TRACKING_DUMMY>;
118+
declare static readonly elements: __.ElementsOf<CHANGE_TRACKING_DUMMY>;
119+
declare static readonly actions: globalThis.Record<never, never>;
120+
};
121+
}
122+
export class CHANGE_TRACKING_DUMMY extends _CHANGE_TRACKING_DUMMYAspect(__.Entity) {}
123+
Object.defineProperty(CHANGE_TRACKING_DUMMY, 'name', { value: 'sap.changelog.CHANGE_TRACKING_DUMMY' })
124+
Object.defineProperty(CHANGE_TRACKING_DUMMY, 'is_singular', { value: true })
125+
export class CHANGE_TRACKING_DUMMY_ extends Array<CHANGE_TRACKING_DUMMY> {$count?: number}
126+
Object.defineProperty(CHANGE_TRACKING_DUMMY_, 'name', { value: 'sap.changelog.CHANGE_TRACKING_DUMMY' })
100127

101128
export function _ChangeAspect<TBase extends new (...args: any[]) => object>(Base: TBase) {
102-
return class Change extends Base {
103-
declare ID?: __.Key<string>
104-
declare keys?: string | null
129+
return class Change extends _._cuidAspect(Base) {
130+
declare parent?: __.Association.to<Change> | null
131+
declare parent_ID?: string | null
132+
declare children?: __.Composition.of.many<Changes>
105133
declare attribute?: string | null
106134
declare valueChangedFrom?: string | null
107135
declare valueChangedTo?: string | null
108-
declare entityID?: string | null
136+
declare valueChangedFromLabel?: string | null
137+
declare valueChangedToLabel?: string | null
109138
declare entity?: string | null
110-
declare serviceEntity?: string | null
111-
declare parentEntityID?: string | null
112-
declare parentKey?: string | null
113-
declare serviceEntityPath?: string | null
139+
declare entityKey?: string | null
140+
declare objectID?: string | null
114141
declare modification?: Change_modification | null
115142
declare valueDataType?: string | null
116-
declare changeLog?: __.Association.to<ChangeLog> | null
117-
declare changeLog_ID?: string | null
118143
declare createdAt?: __.DeepRequired<_.managed>['createdAt'] | null
119144
/** Canonical user ID */
120145
declare createdBy?: __.DeepRequired<_.managed>['createdBy'] | null
146+
declare transactionID?: number | null
121147
static modification = Change_modification;
122-
static readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
123-
declare static readonly keys: __.KeysOf<Change>;
148+
static override readonly kind: 'entity' | 'type' | 'aspect' = 'entity';
149+
declare static readonly keys: __.KeysOf<Change> & typeof _.cuid.keys;
124150
declare static readonly elements: __.ElementsOf<Change>;
125-
declare static readonly actions: globalThis.Record<never, never>;
151+
declare static readonly actions: typeof _.cuid.actions & globalThis.Record<never, never>;
126152
};
127153
}
128-
/**
129-
* Attribute-level Changes with simple capturing of one-level
130-
* composition trees in parent... elements.
131-
*/
132154
export class Change extends _ChangeAspect(__.Entity) {}
133155
Object.defineProperty(Change, 'name', { value: 'sap.changelog.Changes' })
134156
Object.defineProperty(Change, 'is_singular', { value: true })
135-
/**
136-
* Attribute-level Changes with simple capturing of one-level
137-
* composition trees in parent... elements.
138-
*/
139157
export class Changes extends Array<Change> {$count?: number}
140158
Object.defineProperty(Changes, 'name', { value: 'sap.changelog.Changes' })

cap/CHANGELOG.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
[
2+
{
3+
"date": "2026-05-01",
4+
"version": "2.0.2",
5+
"Changed": [
6+
"Update @sap/cds from 9.8.5 to 9.9.1",
7+
"Update @cap-js/cds-test from 0.4.1 to 1.0.1 (stable release)",
8+
"Update eslint from 10.2.1 to 10.3.0",
9+
"Update @cap-js/hana from 2.7.0 to 2.8.0",
10+
"Update @cap-js/sqlite from 2.2.0 to 2.4.0",
11+
"Update @cap-js/postgres from 2.2.0 to 2.3.0",
12+
"Update @sap/cds-common-content from 3.1.0 to 3.2.0",
13+
"Update @sap/dev-cap-tools from 1.53.2 to 1.53.3",
14+
"Update @cap-js/change-tracking from 1.2.1 to 2.0.0-beta.11 (trigger-based architecture with ~2.4-50x performance improvement)",
15+
"Update site dependencies (mermaid 11.13→11.14, vue 3.5.31→3.5.33)",
16+
"Update scraper dependencies (axios 1.14→1.15)",
17+
"Raise minimum Node.js version from 20 to 22 (CDS 10 requirement)",
18+
"Enable CDS 10 forward-compatibility flags: ieee754compatible, consistent_params, compat_srv_getters, compat_texts_entities, compat_assert_not_null, compat_save_drafts, calc_elements",
19+
"Disable legacy queue locking (queue.legacyLocking: false) in preparation for CDS 10",
20+
"Add HANA migration table (sap.changelog.Changes.hdbmigrationtable) for change-tracking v2 schema migration",
21+
"Enable native node:sqlite driver (driver: \"node\") — uses Node.js built-in SQLite instead of better-sqlite3",
22+
"Enable parallel $batch GET processing (max_batch_parallelization: 3) for concurrent read-only batch atomicity groups"
23+
],
24+
"Added": [
25+
"cds-test-v1.test.js — showcase test demonstrating @cap-js/cds-test v1.0 features: Chai assertions, Fetch-based HTTP shortcuts, native sqlite verification",
26+
"@cap-js/ord plugin (v1.6.0) — exposes Open Resource Discovery endpoints (/.well-known/open-resource-discovery, /ord/v1/documents/ord-document) for machine-readable application metadata"
27+
]
28+
},
229
{
330
"date": "2026-04-04",
431
"version": "2.0.0",

0 commit comments

Comments
 (0)