@sap/cds-dk 6.8.0 → 6.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 CHANGED
@@ -7,6 +7,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
9
9
 
10
+ ## Version 6.8.1 - 2023-05-10
11
+
12
+ ### Fixed
13
+
14
+ - `cds-ts watch` no longer fails with strange compilation errors if called in combination w/ `ts-node`
15
+
10
16
  ## Version 6.8.0 - 2023-05-04
11
17
 
12
18
  ### Added
package/bin/watch.js CHANGED
@@ -80,8 +80,8 @@ async function watch ([cwd], {
80
80
  _options: JSON.stringify(options)
81
81
  })
82
82
  if (process.env.CDS_TYPESCRIPT) {
83
- const tsNodeRegister = localOrGlobal('ts-node', 'register')
84
- env.NODE_OPTIONS = `-r ${tsNodeRegister} ` + (env.NODE_OPTIONS || '')
83
+ // Needed by ts-node/tsc to find the tsconfig.json. Same as `--project`.
84
+ env.TS_NODE_PROJECT = env.TS_NODE_PROJECT ?? cwd ?? process.cwd()
85
85
  }
86
86
 
87
87
  // allow running w/o or partial local node_modules, also add cds-dk for its sqlite
@@ -194,18 +194,6 @@ function paths (dir) {
194
194
  return parts.map ((_,i,a)=> a.slice(0,n-i).join(sep)+nm).filter(p => fs.existsSync(p))
195
195
  }
196
196
 
197
- function localOrGlobal (id, pathInMod) {
198
- // require package.json to get a stable root path of the moduloe, not its main script
199
- const modPath = require.resolve (id+'/package.json', { paths:[ process.cwd(), npmGlobalModules() ] })
200
- return resolve(modPath, '..', pathInMod)
201
- }
202
-
203
- function npmGlobalModules() {
204
- try {
205
- return require ('child_process').execSync('npm root -g').toString().trim()
206
- } catch (err) { return }
207
- }
208
-
209
197
  //
210
198
  // Child process impl launched by watch
211
199
  //
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "6.8.0",
9
+ "version": "6.8.1",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "~6.8.0",
@@ -54,12 +54,12 @@
54
54
  }
55
55
  },
56
56
  "node_modules/@eslint/eslintrc": {
57
- "version": "2.0.2",
57
+ "version": "2.0.3",
58
58
  "license": "MIT",
59
59
  "dependencies": {
60
60
  "ajv": "^6.12.4",
61
61
  "debug": "^4.3.2",
62
- "espree": "^9.5.1",
62
+ "espree": "^9.5.2",
63
63
  "globals": "^13.19.0",
64
64
  "ignore": "^5.2.0",
65
65
  "import-fresh": "^3.2.1",
@@ -75,7 +75,7 @@
75
75
  }
76
76
  },
77
77
  "node_modules/@eslint/js": {
78
- "version": "8.39.0",
78
+ "version": "8.40.0",
79
79
  "license": "MIT",
80
80
  "engines": {
81
81
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -227,7 +227,7 @@
227
227
  }
228
228
  },
229
229
  "node_modules/@sap/cds-mtxs": {
230
- "version": "1.8.0",
230
+ "version": "1.8.1",
231
231
  "license": "SEE LICENSE IN LICENSE",
232
232
  "dependencies": {
233
233
  "@sap/hdi-deploy": "^4",
@@ -1083,13 +1083,13 @@
1083
1083
  }
1084
1084
  },
1085
1085
  "node_modules/eslint": {
1086
- "version": "8.39.0",
1086
+ "version": "8.40.0",
1087
1087
  "license": "MIT",
1088
1088
  "dependencies": {
1089
1089
  "@eslint-community/eslint-utils": "^4.2.0",
1090
1090
  "@eslint-community/regexpp": "^4.4.0",
1091
- "@eslint/eslintrc": "^2.0.2",
1092
- "@eslint/js": "8.39.0",
1091
+ "@eslint/eslintrc": "^2.0.3",
1092
+ "@eslint/js": "8.40.0",
1093
1093
  "@humanwhocodes/config-array": "^0.11.8",
1094
1094
  "@humanwhocodes/module-importer": "^1.0.1",
1095
1095
  "@nodelib/fs.walk": "^1.2.8",
@@ -1100,8 +1100,8 @@
1100
1100
  "doctrine": "^3.0.0",
1101
1101
  "escape-string-regexp": "^4.0.0",
1102
1102
  "eslint-scope": "^7.2.0",
1103
- "eslint-visitor-keys": "^3.4.0",
1104
- "espree": "^9.5.1",
1103
+ "eslint-visitor-keys": "^3.4.1",
1104
+ "espree": "^9.5.2",
1105
1105
  "esquery": "^1.4.2",
1106
1106
  "esutils": "^2.0.2",
1107
1107
  "fast-deep-equal": "^3.1.3",
@@ -1152,7 +1152,7 @@
1152
1152
  }
1153
1153
  },
1154
1154
  "node_modules/eslint-visitor-keys": {
1155
- "version": "3.4.0",
1155
+ "version": "3.4.1",
1156
1156
  "license": "Apache-2.0",
1157
1157
  "engines": {
1158
1158
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1162,12 +1162,12 @@
1162
1162
  }
1163
1163
  },
1164
1164
  "node_modules/espree": {
1165
- "version": "9.5.1",
1165
+ "version": "9.5.2",
1166
1166
  "license": "BSD-2-Clause",
1167
1167
  "dependencies": {
1168
1168
  "acorn": "^8.8.0",
1169
1169
  "acorn-jsx": "^5.3.2",
1170
- "eslint-visitor-keys": "^3.4.0"
1170
+ "eslint-visitor-keys": "^3.4.1"
1171
1171
  },
1172
1172
  "engines": {
1173
1173
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2057,7 +2057,7 @@
2057
2057
  "optional": true
2058
2058
  },
2059
2059
  "node_modules/node-fetch": {
2060
- "version": "2.6.9",
2060
+ "version": "2.6.11",
2061
2061
  "license": "MIT",
2062
2062
  "optional": true,
2063
2063
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.8.0",
3
+ "version": "6.8.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": [