@sap/cds-dk 7.9.6 → 7.9.7

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/bin/version.js CHANGED
@@ -62,27 +62,29 @@ function list_versions(args, options) {
62
62
  }
63
63
 
64
64
  function info({ root:cwd=process.cwd() }) {
65
- const env = require('../lib').env.for('cds', cwd)
66
- const isJava = env['project-nature'] === 'java'
67
- if (isJava && process.stderr.isTTY) {
65
+ const cds = require('../lib')
66
+ const env = cds.env.for('cds', cwd)
67
+ env.cli ??= {}; env.cli.version ??= {}
68
+ const javaInfo = !env.cli.version.skipjava && env['project-nature'] === 'java'
69
+ if (javaInfo && process.stderr.isTTY) {
68
70
  console.error('\x1b[2m'+'This takes a while. Collecting Java versions...', '\x1b[0m')
69
71
  }
70
72
 
71
73
  const npmRoot = execSync('npm root -g').toString().trim()
72
74
  let versions = {
73
- ..._versions_from(_pkg_path('@sap/cds-dk', __dirname), '@sap/cds-dk (global)'), // ... linked in cap/dev setup
74
- ..._versions_from(_pkg_path('@sap/cds-dk', npmRoot), '@sap/cds-dk (global)'), // ... or installed globally
75
+ ..._versions_from(_pkg_path('@sap/cds-dk', npmRoot), '@sap/cds-dk (global)'), // linked in cap/dev or installed globally
75
76
  ..._versions_from(_pkg_path('@sap/cds-dk', cwd)), // local dk, important for Java projects
76
77
  ..._versions_from(_pkg_path('@sap/cds', __dirname)), // @sap/cds from here
77
- ..._versions_from(cwd), // ... or from local app dependencies
78
- ..._versions_from(_pkg_path('@sap/cds-compiler', cwd, __dirname)), // compiler is no direct dependency, so list it explicitly
78
+ ..._versions_from(_pkg_path('@sap/cds', cds.home)), // ... or local @sap/cds
79
+ ..._versions_from(cwd), // ... more from local app dependencies
80
+ '@sap/cds-compiler': cds.compiler.version(),
79
81
  'Node.js': process.version,
80
- 'home': require('../lib/cds').home, // effective (local) cds
82
+ 'home': cds.home, // effective cds home
81
83
  }
82
84
  // sort Node entries
83
85
  versions = Object.keys(versions).sort().reduce((all, key) => { all[key] = versions[key]; return all }, {})
84
86
 
85
- if (isJava) {
87
+ if (javaInfo) {
86
88
  Object.assign(versions, capJavaVersion(cwd))
87
89
  }
88
90
  return versions
@@ -45,7 +45,7 @@ class MtxSidecarBuildPlugin extends NodejsBuildPlugin {
45
45
  */
46
46
  async _buildNodeApp(sidecarEnv) {
47
47
  const destSidecar = this.task.dest
48
- const destSidecarSrc = path.join(destSidecar, cds.env.folders.srv)
48
+ const destSidecarSrc = path.join(destSidecar, sidecarEnv.folders.srv)
49
49
  const model = this._compileSidecarSync(sidecarEnv)
50
50
  await this.compileToJson(model, path.join(destSidecarSrc, DEFAULT_CSN_FILE_NAME))
51
51
  await this.collectLanguageBundles(model, path.join(destSidecarSrc, getI18nDefaultFolder()))
@@ -165,6 +165,7 @@ class NodejsBuildPlugin extends EdmxBuildPlugin {
165
165
  if (this.task.options.workspaces) {
166
166
  workspaces = Array.isArray(this.task.options.workspaces) ? this.task.options.workspaces : [this.task.options.workspaces]
167
167
  } else {
168
+ // devDependencies are not considered
168
169
  workspaces = await getWorkspaces(true, false, wsRoot);
169
170
  }
170
171
  if (workspaces.length) {
@@ -203,7 +204,7 @@ class NodejsBuildPlugin extends EdmxBuildPlugin {
203
204
  } catch (err) {
204
205
  // ignore
205
206
  }
206
- if (fs.existsSync(path.join(dir, '.gitmodules')) || fs.existsSync(path.join(dir, 'node_modules'))) {
207
+ if (fs.existsSync(path.join(dir, '.gitmodules'))) {
207
208
  return // project root reached
208
209
  }
209
210
  if (path.dirname(dir) !== dir) {
package/lib/build/util.js CHANGED
@@ -189,7 +189,8 @@ async function getWorkspaces(resolve = false, devDependencies = true, wsRoot = c
189
189
  // read npm workspaces
190
190
  const pkgs = await _execNpmWs(wsRoot)
191
191
  pkgs.forEach(pkg => {
192
- if (!resolve || devDependencies && pgkJson.devDependencies?.[pkg] || pgkJson.dependencies?.[pkg]) {
192
+ // only create tarball archives for dependencies with version '*'
193
+ if (!resolve || devDependencies && pgkJson.devDependencies?.[pkg] === '*' || pgkJson.dependencies?.[pkg] === '*') {
193
194
  const workspace = _getWorkspace(wsRoot, pkg)
194
195
  if (workspace) {
195
196
  workspaces.push(workspace)
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.9.6",
3
+ "version": "7.9.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "7.9.6",
9
+ "version": "7.9.7",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^7",
@@ -81,7 +81,7 @@
81
81
  }
82
82
  },
83
83
  "node_modules/@eslint/eslintrc/node_modules/debug": {
84
- "version": "4.3.5",
84
+ "version": "4.3.6",
85
85
  "license": "MIT",
86
86
  "dependencies": {
87
87
  "ms": "2.1.2"
@@ -124,7 +124,7 @@
124
124
  }
125
125
  },
126
126
  "node_modules/@humanwhocodes/config-array/node_modules/debug": {
127
- "version": "4.3.5",
127
+ "version": "4.3.6",
128
128
  "license": "MIT",
129
129
  "dependencies": {
130
130
  "ms": "2.1.2"
@@ -225,7 +225,7 @@
225
225
  }
226
226
  },
227
227
  "node_modules/@sap/cds-compiler": {
228
- "version": "4.9.6",
228
+ "version": "4.9.8",
229
229
  "license": "SEE LICENSE IN LICENSE",
230
230
  "dependencies": {
231
231
  "antlr4": "4.9.3"
@@ -261,7 +261,7 @@
261
261
  }
262
262
  },
263
263
  "node_modules/@sap/cds-mtxs": {
264
- "version": "1.18.2",
264
+ "version": "1.18.3",
265
265
  "license": "SEE LICENSE IN LICENSE",
266
266
  "dependencies": {
267
267
  "@sap/hdi-deploy": "^4",
@@ -424,7 +424,7 @@
424
424
  }
425
425
  },
426
426
  "node_modules/agent-base/node_modules/debug": {
427
- "version": "4.3.5",
427
+ "version": "4.3.6",
428
428
  "license": "MIT",
429
429
  "optional": true,
430
430
  "dependencies": {
@@ -549,7 +549,7 @@
549
549
  "license": "MIT"
550
550
  },
551
551
  "node_modules/axios": {
552
- "version": "1.7.2",
552
+ "version": "1.7.4",
553
553
  "license": "MIT",
554
554
  "dependencies": {
555
555
  "follow-redirects": "^1.15.6",
@@ -1141,7 +1141,7 @@
1141
1141
  }
1142
1142
  },
1143
1143
  "node_modules/eslint/node_modules/debug": {
1144
- "version": "4.3.5",
1144
+ "version": "4.3.6",
1145
1145
  "license": "MIT",
1146
1146
  "dependencies": {
1147
1147
  "ms": "2.1.2"
@@ -1666,7 +1666,7 @@
1666
1666
  }
1667
1667
  },
1668
1668
  "node_modules/http-proxy-agent/node_modules/debug": {
1669
- "version": "4.3.5",
1669
+ "version": "4.3.6",
1670
1670
  "license": "MIT",
1671
1671
  "optional": true,
1672
1672
  "dependencies": {
@@ -1699,7 +1699,7 @@
1699
1699
  }
1700
1700
  },
1701
1701
  "node_modules/https-proxy-agent/node_modules/debug": {
1702
- "version": "4.3.5",
1702
+ "version": "4.3.6",
1703
1703
  "license": "MIT",
1704
1704
  "optional": true,
1705
1705
  "dependencies": {
@@ -1757,7 +1757,7 @@
1757
1757
  "optional": true
1758
1758
  },
1759
1759
  "node_modules/ignore": {
1760
- "version": "5.3.1",
1760
+ "version": "5.3.2",
1761
1761
  "license": "MIT",
1762
1762
  "engines": {
1763
1763
  "node": ">= 4"
@@ -2888,7 +2888,7 @@
2888
2888
  }
2889
2889
  },
2890
2890
  "node_modules/socks-proxy-agent/node_modules/debug": {
2891
- "version": "4.3.5",
2891
+ "version": "4.3.6",
2892
2892
  "license": "MIT",
2893
2893
  "optional": true,
2894
2894
  "dependencies": {
@@ -3136,7 +3136,7 @@
3136
3136
  }
3137
3137
  },
3138
3138
  "node_modules/uglify-js": {
3139
- "version": "3.19.0",
3139
+ "version": "3.19.2",
3140
3140
  "license": "BSD-2-Clause",
3141
3141
  "optional": true,
3142
3142
  "bin": {
@@ -3280,7 +3280,7 @@
3280
3280
  }
3281
3281
  },
3282
3282
  "node_modules/yaml": {
3283
- "version": "2.4.5",
3283
+ "version": "2.5.0",
3284
3284
  "license": "ISC",
3285
3285
  "bin": {
3286
3286
  "yaml": "bin.mjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.9.6",
3
+ "version": "7.9.7",
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": [