@sap/cds-dk 9.8.0 → 9.8.1
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 +7 -0
- package/bin/build.js +1 -1
- package/bin/version.js +4 -3
- package/lib/build/plugins/featureToggles.js +5 -4
- package/lib/build/plugins/fiori/index.js +0 -2
- package/lib/build/plugins/hana/index.js +6 -2
- package/lib/build/plugins/plugin.js +12 -1
- package/lib/init/constants.js +1 -1
- package/lib/init/template/helm/index.js +1 -1
- package/lib/lint/eslintHelp.json +1 -1
- package/npm-shrinkwrap.json +19 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
8
8
|
|
|
9
|
+
## Version 9.8.1 - 2026-03-13
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `cds build` plugins correctly formats a thrown `BuildError` in the logs.
|
|
14
|
+
- `cds version` also reports a cds-dk installation in Java projects that don't have such a dependency in their `package.json`.
|
|
15
|
+
|
|
9
16
|
## Version 9.8.0 - 2026-03-09
|
|
10
17
|
|
|
11
18
|
### Added
|
package/bin/build.js
CHANGED
|
@@ -167,7 +167,7 @@ async function build([project], options = {}) {
|
|
|
167
167
|
}
|
|
168
168
|
const { build, BuildError } = require('../lib/build')
|
|
169
169
|
try {
|
|
170
|
-
return build(options)
|
|
170
|
+
return await build(options)
|
|
171
171
|
} catch (e) {
|
|
172
172
|
if (e instanceof BuildError || e.constructor.name === 'CompilationError') {
|
|
173
173
|
cds._log(e.messages.length ? e.messages : e.message, { 'log-level': options['log-level'] || cds.env['log-level'] })
|
package/bin/version.js
CHANGED
|
@@ -100,6 +100,7 @@ function canonic_options4 ([pattern], options) {
|
|
|
100
100
|
const o = {
|
|
101
101
|
root: cds.root,
|
|
102
102
|
depth: options.all ? 11 : 1,
|
|
103
|
+
java: cds.env['project-nature'] === 'java',
|
|
103
104
|
...options,
|
|
104
105
|
}
|
|
105
106
|
if (pattern) o.pattern = pattern
|
|
@@ -128,7 +129,7 @@ async function node_versions(o) {
|
|
|
128
129
|
const _pkg = o.pattern ? RegExp(o.pattern) : cap_packages
|
|
129
130
|
const deps = lines.map (line => {
|
|
130
131
|
let [, path, name, version, location = path ] = _line.exec(line) || []
|
|
131
|
-
if (!location || location.includes('EXTRANEOUS')) return
|
|
132
|
+
if (!location || (location.includes('EXTRANEOUS') && !o.java)) return
|
|
132
133
|
if (name.match(_pkg)) return [ name, version, location ]
|
|
133
134
|
}) .filter (x => x)
|
|
134
135
|
|
|
@@ -174,7 +175,7 @@ async function node_versions(o) {
|
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
function java_versions (o) {
|
|
177
|
-
const javaInfo = !cds.env.cli?.version?.skipjava &&
|
|
178
|
+
const javaInfo = !cds.env.cli?.version?.skipjava && o.java
|
|
178
179
|
if (!javaInfo) return []
|
|
179
180
|
else if (process.stderr.isTTY && !o.json) console.warn (DIMMED, 'This takes a while. Collecting Java versions...', RESET)
|
|
180
181
|
const { MAVEN_ARCHETYPE_VERSION:mav } = require ('../lib/init/constants')
|
|
@@ -214,7 +215,7 @@ function print_versions (rows, o, cwd = o.root+'/') {
|
|
|
214
215
|
if (!rows || rows.length === 0) return console.error (YELLOW, ' No CAP packages found.', RESET)
|
|
215
216
|
|
|
216
217
|
// cds10: remove and offer --json option instead
|
|
217
|
-
if (process.env.WS_BASE_URL ||
|
|
218
|
+
if (process.env.WS_BASE_URL || o.java || findPom(cwd)) {
|
|
218
219
|
console.log(rows.map(([name,version,location]) => `${GREEN}${name === 'cds.home'?'home':name}:${RESET} ${version??location}`).join('\n'))
|
|
219
220
|
return
|
|
220
221
|
}
|
|
@@ -34,11 +34,12 @@ module.exports = class FeatureTogglesBuildPlugin extends require('./internal') {
|
|
|
34
34
|
|
|
35
35
|
if (dictionary.features) {
|
|
36
36
|
// create language bundles for all features
|
|
37
|
-
|
|
37
|
+
const featureBundleTasks = Object.keys(dictionary.features).map(async ftName => {
|
|
38
38
|
// attach the sources information for i18n location reference
|
|
39
39
|
dictionary.features[ftName]['$sources'] = paths.features[ftName]
|
|
40
40
|
await this.collectLanguageBundles(dictionary.features[ftName], path.join(destFts, ftsName, ftName, i18nFolder))
|
|
41
|
-
}
|
|
41
|
+
})
|
|
42
|
+
await Promise.all(featureBundleTasks)
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -51,7 +52,7 @@ module.exports = class FeatureTogglesBuildPlugin extends require('./internal') {
|
|
|
51
52
|
const ftsName = path.dirname(cds.env.features.folders || 'fts/*')
|
|
52
53
|
|
|
53
54
|
// create feature models
|
|
54
|
-
|
|
55
|
+
await Promise.all(Object.keys(ftsPaths).map(async ftName => {
|
|
55
56
|
const ftCsn = await cds.load(ftsPaths[ftName], options)
|
|
56
57
|
const ftPath = path.join(destFts, ftsName, ftName)
|
|
57
58
|
|
|
@@ -62,7 +63,7 @@ module.exports = class FeatureTogglesBuildPlugin extends require('./internal') {
|
|
|
62
63
|
await this.compileToJson(ftCsn, path.join(ftPath, DEFAULT_CSN_FILE_NAME))
|
|
63
64
|
this._validateFeature(ftCsn, baseCsn)
|
|
64
65
|
features[ftName] = ftCsn
|
|
65
|
-
}
|
|
66
|
+
}))
|
|
66
67
|
return features
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -64,8 +64,6 @@ module.exports = class FioriBuildPlugin extends require('../edmx') {
|
|
|
64
64
|
const model = await cds.load(modelPaths, options)
|
|
65
65
|
fioriBuildOptions.appModel.set(appFolder, model)
|
|
66
66
|
|
|
67
|
-
await this.compileToEdmx(model)
|
|
68
|
-
|
|
69
67
|
// cache edmx per fiori app root folder
|
|
70
68
|
this._cachedEdmx = new Map()
|
|
71
69
|
await this.compileToEdmx(model)
|
|
@@ -141,13 +141,17 @@ module.exports = class HanaBuildPlugin extends require('../internal') {
|
|
|
141
141
|
csvFolder = !dbCSVs.length || dbCSVs.some(res => res && res.startsWith(csvPath)) ? "data" : "csv"
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
//
|
|
144
|
+
// preserve last-write-wins semantics for duplicate basenames while parallelizing distinct file copies
|
|
145
|
+
const csvResourcesByName = new Map()
|
|
145
146
|
for (const res of resources) {
|
|
146
147
|
// do not duplicate resources that are already contained in db/src/**
|
|
147
148
|
if (res && /\.csv$/.test(res) && !res.startsWith(dbSrc)) {
|
|
148
|
-
|
|
149
|
+
csvResourcesByName.set(path.basename(res), res)
|
|
149
150
|
}
|
|
150
151
|
}
|
|
152
|
+
await Promise.all(Array.from(csvResourcesByName.entries()).map(([fileName, res]) => {
|
|
153
|
+
return this.copy(res).to(path.join(this.task.options.compileDest, csvFolder, fileName))
|
|
154
|
+
}))
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
if (this.isStagingBuild()) {
|
|
@@ -248,7 +248,18 @@ module.exports = class Plugin {
|
|
|
248
248
|
return model
|
|
249
249
|
}
|
|
250
250
|
const sources = filterFeaturePaths(model, this.task.options.model || this.task.src)
|
|
251
|
-
|
|
251
|
+
if (!sources.features) {
|
|
252
|
+
return model
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const options = this.options()
|
|
256
|
+
this.context._modelCache ??= new Map()
|
|
257
|
+
const cacheKey = JSON.stringify({ files: sources.base, options })
|
|
258
|
+
if (!this.context._modelCache.has(cacheKey)) {
|
|
259
|
+
const _load = cds.load(sources.base, options)
|
|
260
|
+
this.context._modelCache.set(cacheKey, _load)
|
|
261
|
+
}
|
|
262
|
+
return this.context._modelCache.get(cacheKey)
|
|
252
263
|
}
|
|
253
264
|
|
|
254
265
|
options() {
|
package/lib/init/constants.js
CHANGED
|
@@ -40,7 +40,7 @@ module.exports = class HelmTemplate extends require('../../plugin') {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
async run() {
|
|
43
|
-
console.
|
|
43
|
+
console.log(term.warn(`The "cds add helm" command is deprecated and will be removed in the next major release. Please use the "cds add kyma" command instead.`))
|
|
44
44
|
const project = readProject()
|
|
45
45
|
let registry, domain, tag
|
|
46
46
|
if (!HelmTemplate.hasInProduction() && !project.isBas /* don't run this for the BAS Yeoman generator */) {
|
package/lib/lint/eslintHelp.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "9.39.
|
|
2
|
+
"version": "9.39.4",
|
|
3
3
|
"help": "\n# SYNOPSIS\n\n *cds lint* [options] file.js [file.js] [dir]\n\n Runs environment checks and/or checks the specified models\n based on the ESLint framework\n\n# OPTIONS\n \n Basic configuration:\n --no-config-lookup Disable look up for eslint.config.js\n -c, --config path::String Use this configuration instead of eslint.config.js, eslint.config.mjs, or eslint.config.cjs\n --inspect-config Open the config inspector with the current configuration\n --ext [String] Specify additional file extensions to lint\n --global [String] Define global variables\n --parser String Specify the parser to be used\n --parser-options Object Specify parser options\n \n Specify Rules and Plugins:\n --plugin [String] Specify plugins\n --rule Object Specify rules\n \n Fix Problems:\n --fix Automatically fix problems\n --fix-dry-run Automatically fix problems without saving the changes to the file system\n --fix-type Array Specify the types of fixes to apply (directive, problem, suggestion, layout)\n \n Ignore Files:\n --no-ignore Disable use of ignore files and patterns\n --ignore-pattern [String] Patterns of files to ignore\n \n Use stdin:\n --stdin Lint code provided on <STDIN> - default: false\n --stdin-filename String Specify filename to process STDIN as\n \n Handle Warnings:\n --quiet Report errors only - default: false\n --max-warnings Int Number of warnings to trigger nonzero exit code - default: -1\n \n Output:\n -o, --output-file path::String Specify file to write report to\n -f, --format String Use a specific output format - default: stylish\n --color, --no-color Force enabling/disabling of color\n \n Inline configuration comments:\n --no-inline-config Prevent comments from changing config or rules\n --report-unused-disable-directives Adds reported errors for unused eslint-disable and eslint-enable directives\n --report-unused-disable-directives-severity String Chooses severity level for reporting unused eslint-disable and eslint-enable directives - either: off, warn, error, 0, 1, or 2\n --report-unused-inline-configs String Adds reported errors for unused eslint inline config comments - either: off, warn, error, 0, 1, or 2\n \n Caching:\n --cache Only check changed files - default: false\n --cache-file path::String Path to the cache file. Deprecated: use --cache-location - default: .eslintcache\n --cache-location path::String Path to the cache file or directory\n --cache-strategy String Strategy to use for detecting changed files in the cache - either: metadata or content - default: metadata\n \n Suppressing Violations:\n --suppress-all Suppress all violations - default: false\n --suppress-rule [String] Suppress specific rules\n --suppressions-location path::String Specify the location of the suppressions file\n --prune-suppressions Prune unused suppressions - default: false\n --pass-on-unpruned-suppressions Ignore unused suppressions - default: false\n \n Miscellaneous:\n --init Run config initialization wizard - default: false\n --env-info Output execution environment information - default: false\n --no-error-on-unmatched-pattern Prevent errors when pattern is unmatched\n --exit-on-fatal-error Exit with exit code 2 in case of fatal error - default: false\n --no-warn-ignored Suppress warnings when the file list includes ignored files\n --pass-on-no-patterns Exit with exit code 0 in case no file patterns are passed\n --debug Output debugging information\n -h, --help Show help\n -v, --version Output the version number\n --print-config path::String Print the configuration for the given file\n --stats Add statistics to the lint report - default: false\n --flag [String] Enable a feature flag\n --mcp Start the ESLint MCP server\n --concurrency Int|String Number of linting threads, auto to choose automatically, off for no multithreading - default: off\n \n",
|
|
4
4
|
"options": [
|
|
5
5
|
"--config",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "9.8.
|
|
3
|
+
"version": "9.8.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "9.8.
|
|
9
|
+
"version": "9.8.1",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cap-js/asyncapi": "^1.0.0",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"node_modules/@cap-js/db-service": {
|
|
44
|
-
"version": "2.
|
|
45
|
-
"integrity": "sha512-
|
|
44
|
+
"version": "2.9.0",
|
|
45
|
+
"integrity": "sha512-WCXhoqezaF6A5I2l0MNZeHKXXtHRNEq7Rp0R89/uccOHQIx0DuU0U9NuJJPV/1G5RGk2QKQ9VBo/KYn+MZuuNQ==",
|
|
46
46
|
"devOptional": true,
|
|
47
47
|
"license": "Apache-2.0",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"generic-pool": "^3.9.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@sap/cds": ">=9.
|
|
52
|
+
"@sap/cds": ">=9.8"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"node_modules/@cap-js/openapi": {
|
|
@@ -64,16 +64,22 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"node_modules/@cap-js/sqlite": {
|
|
67
|
-
"version": "2.
|
|
68
|
-
"integrity": "sha512-
|
|
67
|
+
"version": "2.2.0",
|
|
68
|
+
"integrity": "sha512-FPj+uVU/14vtGUl2P/Q8y7XhZbsLgrCav2O5PjHPXnupegjby4sMJkgVNxVHnkyKPFgO/W8uEsq9r5TU9VPx8w==",
|
|
69
69
|
"license": "Apache-2.0",
|
|
70
70
|
"optional": true,
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@cap-js/db-service": "^2.
|
|
72
|
+
"@cap-js/db-service": "^2.9.0",
|
|
73
73
|
"better-sqlite3": "^12.0.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@sap/cds": ">=9"
|
|
76
|
+
"@sap/cds": ">=9.8",
|
|
77
|
+
"sql.js": "^1.13.0"
|
|
78
|
+
},
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"sql.js": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
77
83
|
}
|
|
78
84
|
},
|
|
79
85
|
"node_modules/@eslint/js": {
|
|
@@ -97,8 +103,8 @@
|
|
|
97
103
|
}
|
|
98
104
|
},
|
|
99
105
|
"node_modules/@sap/cds": {
|
|
100
|
-
"version": "9.8.
|
|
101
|
-
"integrity": "sha512-
|
|
106
|
+
"version": "9.8.2",
|
|
107
|
+
"integrity": "sha512-B85qUoUCVHN8gqHdD4nY+0LM1hEGGllEqWnMxsIBijBv3KXB4tOkf/krC8POieKZGMFRHylAcW1fAYVgbLqppw==",
|
|
102
108
|
"license": "SEE LICENSE IN LICENSE",
|
|
103
109
|
"dependencies": {
|
|
104
110
|
"@sap/cds-compiler": "^6.4",
|
|
@@ -1211,8 +1217,8 @@
|
|
|
1211
1217
|
"license": "MIT"
|
|
1212
1218
|
},
|
|
1213
1219
|
"node_modules/node-abi": {
|
|
1214
|
-
"version": "3.
|
|
1215
|
-
"integrity": "sha512
|
|
1220
|
+
"version": "3.88.0",
|
|
1221
|
+
"integrity": "sha512-At6b4UqIEVudaqPsXjmUO1r/N5BUr4yhDGs5PkBE8/oG5+TfLPhFechiskFsnT6Ql0VfUXbalUUCbfXxtj7K+w==",
|
|
1216
1222
|
"license": "MIT",
|
|
1217
1223
|
"optional": true,
|
|
1218
1224
|
"dependencies": {
|