@sap/cds-dk 4.7.1 → 4.7.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
@@ -6,6 +6,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
8
8
 
9
+ ## Version 4.7.2 - 2021-12-15
10
+
11
+ ### Fixed
12
+
13
+ - `cds add lint` uses JSONC parser to read ESLint config files of type `.eslintrc[.js,.cjs,.json]`.
14
+
15
+ ### Changed
16
+
17
+ - `cds init` uses latest Maven Java archetype version `1.21.0` for creating Java projects.
18
+
9
19
  ## Version 4.7.1 - 2021-12-06
10
20
 
11
21
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  const os = require('os');
2
2
 
3
- const MAVEN_ARCHETYPE_VERSION = '1.20.3';
3
+ const MAVEN_ARCHETYPE_VERSION = '1.21.0';
4
4
 
5
5
  const constants = {
6
6
  IS_WIN: (os.platform() === 'win32'),
@@ -31,7 +31,9 @@ class MvnArchetypeUtil {
31
31
 
32
32
  params.set('-B');
33
33
 
34
- defaultLogger.isDebug && params.set('-X');
34
+ if (defaultLogger.isDebug) {
35
+ params.set('-X'); params.set('-e');
36
+ }
35
37
 
36
38
  return Array.from(params, (e) => {
37
39
  let result = e[0];
@@ -23,7 +23,6 @@ class Linter {
23
23
  this.eslintCmdOpts = {};
24
24
  this.eslintCmdOptsIndex = 0;
25
25
  this.eslintCmdFileExpr = "";
26
- this.formatter = false;
27
26
  this.isFile = false;
28
27
  this.help = "";
29
28
  this.debug = "";
package/lib/lint/io.js CHANGED
@@ -22,7 +22,7 @@ module.exports = {
22
22
  case ".eslintrc.js":
23
23
  case ".eslintrc.cjs":
24
24
  try {
25
- config = JSON.parse(configString.replace(/^module\.exports =/, ""));
25
+ config = JSONC.parse((configString.replace(/^module\.exports =/, "")));
26
26
  } catch (err) {
27
27
  config = {};
28
28
  }
@@ -33,7 +33,7 @@ module.exports = {
33
33
  break;
34
34
  case ".eslintrc.json":
35
35
  case ".eslintrc":
36
- config = JSON.parse(await fsp.readFile(configPath, "utf8"));
36
+ config = await fsUtil.readJSONC(configPath);
37
37
  break;
38
38
  case "package.json":
39
39
  config = JSON.parse(await fsp.readFile(configPath, "utf8"));