@sap/cds-dk 9.9.0 → 9.9.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 CHANGED
@@ -6,6 +6,20 @@ 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.9.1 - 2026-05-07
10
+
11
+ ### Changed
12
+
13
+ - `cds add lint` now adds a dependency on `eslint@10`, instead of `eslint@9`.
14
+
15
+ ### Fixed
16
+
17
+ - `cds add test` now uses version 1 of `@cap-js/cds-test`.
18
+ - `cds add vue` uses correct placeholder values for book and author in `App.vue`.
19
+ - `cds debug` support for latest Chrome versions.
20
+ - `cds watch` runs ESM projects with `tsx` again, so that `.js` import are rewritten to `.ts`. This got broken in 9.9.0, but used to work in 9.8.
21
+ - `cds add` only adds the `event-mesh.json` if a facet requiring the file is run.
22
+
9
23
  ## Version 9.9.0 - 2026-04-23
10
24
 
11
25
  ### Added
package/bin/cds.js CHANGED
@@ -264,9 +264,11 @@ function _prepareTsIfNeeded(cds) {
264
264
  return delete process.env.CDS_TYPESCRIPT
265
265
 
266
266
  if (!process.env.CDS_TYPESCRIPT ) {
267
+ const type = _moduleType(cds)
268
+ const tsxLoader = type === 'module' ? 'tsx/esm' : 'tsx/cjs'
267
269
  try {
268
- cds._localOrGlobal('tsx/cjs') // cjs is needed as we are in CJS code
269
- DEBUG?.(`[cds] - Detected ${path.relative(cds.root, tsconfig)}. Running with tsx.\n`)
270
+ cds._localOrGlobal(tsxLoader)
271
+ DEBUG?.(`[cds] - Detected ${path.relative(cds.root, tsconfig)}. Running with ${tsxLoader}.\n`)
270
272
  process.env.CDS_TYPESCRIPT = 'tsx'
271
273
  }
272
274
  catch (e) {
@@ -276,5 +278,12 @@ function _prepareTsIfNeeded(cds) {
276
278
  }
277
279
  }
278
280
  }
279
-
280
281
  }
282
+
283
+ function _moduleType(cds) {
284
+ try {
285
+ return require(path.join(cds.root??'.', 'package.json')).type
286
+ } catch {
287
+ return 'commonjs'
288
+ }
289
+ }
package/bin/debug.js CHANGED
@@ -215,15 +215,16 @@ async function debug() {
215
215
  async function openDevTools(port) {
216
216
  attempts++
217
217
  const ide = vscode ? 'vscode' : 'chrome'
218
+ const clientHost = host === '0.0.0.0' || host === 'localhost' ? '127.0.0.1' : host
218
219
  try {
219
220
  switch (ide) {
220
221
  case 'chrome': {
221
- const res = await fetch(`http://localhost:${port}/json/list`)
222
+ const res = await fetch(`http://${clientHost}:${port}/json/list`)
222
223
  const data = await res.json()
223
224
  if (!data?.length) throw 'No debugger found on port ' + port
224
- const wsUrl = data[0].webSocketDebuggerUrl
225
+ const wsPath = new URL(data[0].webSocketDebuggerUrl).pathname
225
226
  let command
226
- const url = `devtools://devtools/bundled/inspector.html?ws=${wsUrl.split('ws://')[1]}`
227
+ const url = `devtools://devtools/bundled/js_app.html?ws=${clientHost}:${port}${wsPath}`
227
228
  console.log(`Opening Chrome DevTools at ${url}`)
228
229
  if (os === 'darwin') {
229
230
  command = `open -a "Google Chrome" '${url}'`
@@ -1,5 +1,5 @@
1
1
  ---
2
- # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2
+ # yaml-language-server: $schema=https://ui5.github.io/cli/schema/ui5.yaml.json
3
3
  specVersion: '4.0'
4
4
  metadata:
5
5
  name: {{app}}
@@ -78,6 +78,6 @@ module.exports = class EnterpriseMessagingTemplate extends require('../../plugin
78
78
  await KymaTemplate.mergeDependency('service-instance', 'event-mesh')
79
79
  }
80
80
 
81
- if (!exists('event-mesh.json')) await merge(__dirname, 'files/event-mesh.json.hbs').into('event-mesh.json', { project })
81
+ if (addKyma || addMta) await merge(__dirname, 'files/event-mesh.json.hbs').into('event-mesh.json', { project })
82
82
  }
83
83
  }
@@ -62,6 +62,6 @@ module.exports = class EnterpriseMessagingSharedTemplate extends require('../../
62
62
  await KymaTemplate.mergeDependency('service-instance', 'event-mesh')
63
63
  }
64
64
 
65
- if (!exists('event-mesh.json')) await merge(__dirname, 'files/event-mesh.json.hbs').into('event-mesh.json', { project })
65
+ if (addKyma || addMta) await merge(__dirname, 'files/event-mesh.json.hbs').into('event-mesh.json', { project })
66
66
  }
67
67
  }
@@ -1,5 +1,5 @@
1
1
  ---
2
- # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2
+ # yaml-language-server: $schema=https://ui5.github.io/cli/schema/ui5.yaml.json
3
3
  specVersion: '4.0'
4
4
  metadata:
5
5
  name: {{app}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "@sap/eslint-plugin-cds": "^4",
4
- "eslint": "^9"
4
+ "eslint": "^10"
5
5
  }
6
6
  }
@@ -5,7 +5,7 @@
5
5
  "@sap/cds": "^9"
6
6
  },
7
7
  "devDependencies": {
8
- "@cap-js/sqlite": "^2"
8
+ "@cap-js/sqlite": "^2.4"
9
9
  },
10
10
  "scripts": {
11
11
  "start": "cds-serve"
@@ -1,5 +1,5 @@
1
1
  ---
2
- # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
2
+ # yaml-language-server: $schema=https://ui5.github.io/cli/schema/ui5.yaml.json
3
3
  specVersion: '4.0'
4
4
  metadata:
5
5
  name: {{app}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "devDependencies": {
3
- "@cap-js/cds-test": ">=0.4.1"
3
+ "@cap-js/cds-test": "^1"
4
4
  },
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -2,15 +2,15 @@
2
2
  {{#hasEsmStyle}}
3
3
  import cds from '@sap/cds'
4
4
 
5
- const { GET, POST, expect, axios } = cds.test (import.meta.dirname+'/..')
5
+ const { GET, POST, expect, defaults } = cds.test (import.meta.dirname+'/..')
6
6
  {{/hasEsmStyle}}
7
7
  {{^hasEsmStyle}}
8
8
  const cds = require('@sap/cds')
9
9
 
10
- const { GET, POST, expect, axios } = cds.test (__dirname+'/..')
10
+ const { GET, POST, expect, defaults } = cds.test (__dirname+'/..')
11
11
  {{/hasEsmStyle}}
12
12
  {{#user}}
13
- axios.defaults.auth = { username: '{{user}}', password: '{{password}}' }
13
+ defaults.auth = { username: '{{user}}', password: '{{password}}' }
14
14
  {{/user}}
15
15
 
16
16
  describe('{{serviceName}} OData APIs', () => {
@@ -15,8 +15,8 @@ onMounted(async () => {
15
15
  <table>
16
16
  <tr v-for="b in books" :key="b.ID">
17
17
  <td>
18
- <span class="title">{{ b.title }}</span>{{^isJava}}
19
- <span class="author"><i> by {{ b.author }}</i></span>{{/isJava}}
18
+ <span class="title">{{#literal}}{{ b.title }}{{/literal}}</span>{{^isJava}}
19
+ <span class="author"><i>{{#literal}} by {{ b.author }}{{/literal}}</i></span>{{/isJava}}
20
20
  </td>
21
21
  </tr>
22
22
  </table>
@@ -22,7 +22,8 @@ module.exports = class VueTemplate extends require('../../plugin') {
22
22
  async run() {
23
23
  const app = cds.cli.options.into ?? await ask4([`app name: `])
24
24
  let into = path.join(cds.env.folders.app, app)
25
- await renderAndCopy(path.join(__dirname, 'files'), into, { app, isJava: cds.env['project-nature'] === 'java' })
25
+ await renderAndCopy(path.join(__dirname, 'files'), into, { app, isJava: cds.env['project-nature'] === 'java', literal: () => text => text,
26
+ })
26
27
  if (cds.cli.command === 'init') into = path.join(cds.cli.argv[0], into)
27
28
  await $`npm i --prefix ${into}`
28
29
  }
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.9.0",
3
+ "version": "9.9.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "9.9.0",
9
+ "version": "9.9.1",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@cap-js/asyncapi": "^1.0.0",
13
13
  "@cap-js/openapi": "^1.0.0",
14
- "@sap/cds": ">=8.3",
15
- "@sap/cds-mtxs": ">=2",
14
+ "@sap/cds": "^8.3 || ^9",
15
+ "@sap/cds-mtxs": "^2 || ^3",
16
16
  "@sap/hdi-deploy": "^5",
17
17
  "express": "^4.22.1 || ^5",
18
18
  "hdb": "^2.0.0",
@@ -40,8 +40,8 @@
40
40
  }
41
41
  },
42
42
  "node_modules/@cap-js/db-service": {
43
- "version": "2.9.0",
44
- "integrity": "sha512-WCXhoqezaF6A5I2l0MNZeHKXXtHRNEq7Rp0R89/uccOHQIx0DuU0U9NuJJPV/1G5RGk2QKQ9VBo/KYn+MZuuNQ==",
43
+ "version": "2.11.0",
44
+ "integrity": "sha512-sl33LcxZYAJgMCQZDw4lMGe4kWYq6685Xc6ze4qcoM+rd6aqiyVsSC6C7XH5yerXs7cVHhRC+Dgo8AsaapFzlQ==",
45
45
  "devOptional": true,
46
46
  "license": "Apache-2.0",
47
47
  "dependencies": {
@@ -63,12 +63,12 @@
63
63
  }
64
64
  },
65
65
  "node_modules/@cap-js/sqlite": {
66
- "version": "2.2.0",
67
- "integrity": "sha512-FPj+uVU/14vtGUl2P/Q8y7XhZbsLgrCav2O5PjHPXnupegjby4sMJkgVNxVHnkyKPFgO/W8uEsq9r5TU9VPx8w==",
66
+ "version": "2.4.0",
67
+ "integrity": "sha512-Ao+AzIN6BWHNpLbGxAzF79OezFNHzDG2srwiBABs0FYxIxEGkc2hg6ETo79pTTt66gcWtx7pWh/N9xk2M6SFBQ==",
68
68
  "license": "Apache-2.0",
69
69
  "optional": true,
70
70
  "dependencies": {
71
- "@cap-js/db-service": "^2.9.0",
71
+ "@cap-js/db-service": "^2.11.0",
72
72
  "better-sqlite3": "^12.0.0"
73
73
  },
74
74
  "peerDependencies": {
@@ -102,8 +102,8 @@
102
102
  }
103
103
  },
104
104
  "node_modules/@sap/cds": {
105
- "version": "9.9.0",
106
- "integrity": "sha512-09qkye9erBr71GNt6vdu9HmvZCKSTECYdxppQyAYJjeOeLJW4eL1eyZThawRkvqqLOEdmsEZdfG6eZ3X+w0YYA==",
105
+ "version": "9.9.1",
106
+ "integrity": "sha512-GqdsBsRkZThhpOyzj8ihf/jDmf/2zprZFgaun6ZymUw4/ahzjK/bbdd6eQ8txDuv88pnUl2HPFjvUVq3O/6hCA==",
107
107
  "license": "SEE LICENSE IN LICENSE",
108
108
  "dependencies": {
109
109
  "@sap/cds-compiler": "^6.4",
@@ -129,8 +129,8 @@
129
129
  }
130
130
  },
131
131
  "node_modules/@sap/cds-compiler": {
132
- "version": "6.9.0",
133
- "integrity": "sha512-UXQ5pomb+Fw48Ch1mJoN1JkDy0loZX8nZKXjy4qxY2s9FMwNOwKJP9wPomAVlYcuzq6u8Viqh5j70ty8ciGWGg==",
132
+ "version": "6.9.1",
133
+ "integrity": "sha512-j5C61t1mPhMW3vpD3LIRVn40DMiIF2XahOPeJIPjRpUiGMbQPdVreqAhiRHg39GYhSK6etlr5/MIx3a2ljtqHg==",
134
134
  "license": "SEE LICENSE IN LICENSE",
135
135
  "bin": {
136
136
  "cdsc": "bin/cdsc.js",
@@ -1085,8 +1085,8 @@
1085
1085
  "license": "MIT"
1086
1086
  },
1087
1087
  "node_modules/node-abi": {
1088
- "version": "3.89.0",
1089
- "integrity": "sha512-6u9UwL0HlAl21+agMN3YAMXcKByMqwGx+pq+P76vii5f7hTPtKDp08/H9py6DY+cfDw7kQNTGEj/rly3IgbNQA==",
1088
+ "version": "3.92.0",
1089
+ "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",
1090
1090
  "license": "MIT",
1091
1091
  "optional": true,
1092
1092
  "dependencies": {
@@ -1692,8 +1692,8 @@
1692
1692
  }
1693
1693
  },
1694
1694
  "node_modules/yaml": {
1695
- "version": "2.8.3",
1696
- "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
1695
+ "version": "2.8.4",
1696
+ "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==",
1697
1697
  "license": "ISC",
1698
1698
  "bin": {
1699
1699
  "yaml": "bin.mjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.9.0",
3
+ "version": "9.9.1",
4
4
  "description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [
@@ -19,8 +19,8 @@
19
19
  "dependencies": {
20
20
  "@cap-js/asyncapi": "^1.0.0",
21
21
  "@cap-js/openapi": "^1.0.0",
22
- "@sap/cds": ">=8.3",
23
- "@sap/cds-mtxs": ">=2",
22
+ "@sap/cds": "^8.3 || ^9",
23
+ "@sap/cds-mtxs": "^2 || ^3",
24
24
  "@sap/hdi-deploy": "^5",
25
25
  "express": "^4.22.1 || ^5",
26
26
  "hdb": "^2.0.0",