@sap/cds 9.8.1 → 9.8.2

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
@@ -4,6 +4,12 @@
4
4
  - The format is based on [Keep a Changelog](https://keepachangelog.com/).
5
5
  - This project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## Version 9.8.2 - 2026-03-10
8
+
9
+ ### Fixed
10
+
11
+ - Compatibility with `@eslint/js^10`
12
+
7
13
  ## Version 9.8.1 - 2026-03-09
8
14
 
9
15
  ### Fixed
package/eslint.config.mjs CHANGED
@@ -14,9 +14,6 @@ export const defaults = {
14
14
  rules: {
15
15
  'no-unused-vars': 'warn',
16
16
  'no-console': 'warn',
17
- 'preserve-caught-error': 'off',
18
- 'no-useless-assignment': 'off',
19
- 'no-unassigned-vars': 'off'
20
17
  },
21
18
 
22
19
  languageOptions: {
@@ -9,6 +9,7 @@ exports.read = function read (res, ext = '.properties', options) {
9
9
  const src = fs.readFileSync(path.resolve(res),'utf-8')
10
10
  return Object.defineProperty (exports.parse(src,options), '_source', {value:res})
11
11
  } catch (e) {
12
+ // eslint-disable-next-line preserve-caught-error
12
13
  if (e.code !== 'ENOENT') throw new Error (`Corrupt ${ext} file: ${res+ext}`)
13
14
  }
14
15
  }
@@ -295,7 +295,7 @@ class Config {
295
295
  const any = this._add_vcap_services_to (vcaps)
296
296
  if (any) this._sources.push ('process.env.VCAP_SERVICES')
297
297
  } catch(e) {
298
- throw new Error ('[cds.env] - failed to parse VCAP_SERVICES:\n '+ e.message)
298
+ throw new Error ('[cds.env] - failed to parse VCAP_SERVICES:\n '+ e.message, {cause: e})
299
299
  }
300
300
  }
301
301
 
package/lib/i18n/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-useless-assignment */
2
+
1
3
  const I18nBundle = require ('./bundles')
2
4
  const I18nFiles = require ('./files')
3
5
  const cds = require('../index')
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-useless-assignment */
2
+
1
3
  const cds = require('../index')
2
4
  const infer = exports = module.exports = (..._) => infer.target(..._)
3
5
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-useless-assignment */
2
+
1
3
  const cds = require ('../index')
2
4
  const placeholders = [...'x'.repeat(9)].map((x,i) => `{${i+1}}`)
3
5
 
@@ -39,7 +39,7 @@ const _configured = (u,x) => {
39
39
  u.attr = { ...u.attr, ...x }
40
40
  }
41
41
  if (u.jwt) {
42
- if ((x = _deprecated (u.jwt.zid, 'jwt.zid','tenant'))) {
42
+ if (( _deprecated (u.jwt.zid, 'jwt.zid','tenant'))) {
43
43
  u.tenant = u.jwt.zid
44
44
  }
45
45
  if ((x = _deprecated (u.jwt.attributes, 'jwt.attributes','attr'))) {
@@ -189,7 +189,7 @@ exports.read = async function read (file, _encoding) {
189
189
  if (_encoding === 'json' || !_encoding && f.endsWith('.json')) try {
190
190
  return JSON.parse(src)
191
191
  } catch(e) {
192
- throw new Error (`Failed to parse JSON in ${f}: ${e.message}`)
192
+ throw new Error (`Failed to parse JSON in ${f}: ${e.message}`, { cause: e })
193
193
  }
194
194
  else return process.platform === 'win32' ? src?.replace(/\r\n/g, '\n') : src
195
195
  }
@@ -36,7 +36,7 @@ class RedisMessaging extends cds.MessagingService {
36
36
  try {
37
37
  await this.client.connect()
38
38
  } catch (e) {
39
- throw new Error('Connection to Redis could not be established: ' + e)
39
+ throw new Error('Connection to Redis could not be established: ' + e, { cause: e })
40
40
  }
41
41
 
42
42
  this._ready = true
@@ -463,7 +463,6 @@ function _processSegments(from, model, namespace, cqn, protocol) {
463
463
 
464
464
  // > navigation
465
465
  one = !!(current.is2one || ref[i].where)
466
- incompleteKeys = one || i === ref.length - 1 ? false : true
467
466
  current = model.definitions[current.target]
468
467
  target = current
469
468
 
@@ -259,7 +259,7 @@ const _processTasks = (target, tenant, _opts = {}) => {
259
259
  LOG.error(`${service.name}: Programming error detected:`, e)
260
260
  task.updateData = { attempts: opts.maxAttempts }
261
261
  toBeUpdated.push(task)
262
- throw new Error(`${service.name}: Programming error detected.`)
262
+ throw new Error(`${service.name}: Programming error detected.`, { cause: e })
263
263
  }
264
264
  if (e.unrecoverable) {
265
265
  LOG.error(`${service.name}: Unrecoverable error:`, e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds",
3
- "version": "9.8.1",
3
+ "version": "9.8.2",
4
4
  "description": "SAP Cloud Application Programming Model - CDS for Node.js",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [