@sap/generator-cds
Advanced tools
Comparing version 2.18.1 to 2.18.3
@@ -11,2 +11,11 @@ # Changelog | ||
## [2.18.3] - 2023-09-08 | ||
### Fixed | ||
- now handles return value of npm show version command correctly | ||
### Changed | ||
- Requires `Node.js` version 14 or higher | ||
- Updated libraries | ||
## [2.18.1] - 2022-07-01 | ||
@@ -13,0 +22,0 @@ ### Fixed |
const i18n = require('../i18n/i18n'); | ||
const ExecHelper = require('./exec_helper'); | ||
const TargetError = require('./target_error'); | ||
const VersionComparer = require('./version_comparer'); | ||
@@ -9,13 +8,2 @@ | ||
static _getMaxVersion(versions) { | ||
let maxVersion = '0.0.0'; | ||
for (const version of versions) { | ||
if (VersionComparer.compare(version, maxVersion) > 0) { | ||
maxVersion = version; | ||
} | ||
} | ||
return maxVersion; | ||
} | ||
static async updateDependencies(dependencies = {}, options = {}, logger = {}) { // NOSONAR | ||
@@ -29,3 +17,3 @@ | ||
if (dependencies[module] === NpmDependenciesHelper.REPLACE_TOKEN) { | ||
const cmd = ['npm', 'show', `${module}@*`, 'version', '--json'] | ||
const cmd = ['npm', 'show', module, 'version', '--json'] | ||
@@ -37,6 +25,6 @@ if (options.debug) { | ||
const res = await ExecHelper.executeCommand(cmd); | ||
const versions = JSON.parse(res.stdout.toString()); | ||
const maxVersion = this._getMaxVersion(versions); | ||
const maxVersion = JSON.parse(res.stdout.toString()); | ||
result[module] = `^${maxVersion}`; | ||
logger.log?.(`${module}: ${maxVersion}`); | ||
if (options.debug) { | ||
@@ -43,0 +31,0 @@ logger.warn(res.stderr); |
@@ -9,6 +9,3 @@ { | ||
"start": "node node_modules/@sap/hdi-deploy/deploy.js" | ||
}, | ||
"engines": { | ||
"node": "^14" | ||
} | ||
} |
{ | ||
"name": "@sap/generator-cds", | ||
"version": "2.18.1", | ||
"description": "Project generator for cds projects", | ||
"homepage": "https://cap.cloud.sap/", | ||
"author": "SAP SE (https://www.sap.com)", | ||
"license": "See LICENSE file", | ||
"files": [ | ||
"lib", | ||
"bin", | ||
"LICENSE", | ||
"npm-shrinkwrap.json", | ||
"CHANGELOG.md" | ||
], | ||
"main": "lib/index.js", | ||
"keywords": [ | ||
"CAP", | ||
"CDS", | ||
"SAP" | ||
], | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"bin": { | ||
"cds-gen": "./bin/cds-gen.js" | ||
}, | ||
"dependencies": { | ||
"minimist": "1.2.6", | ||
"xml2js": "0.4.23", | ||
"yaml": "1.10.2" | ||
} | ||
} | ||
"name": "@sap/generator-cds", | ||
"version": "2.18.3", | ||
"description": "Project generator for cds projects", | ||
"homepage": "https://cap.cloud.sap/", | ||
"author": "SAP SE (https://www.sap.com)", | ||
"license": "SEE LICENSE IN LICENSE", | ||
"files": [ | ||
"lib", | ||
"bin", | ||
"LICENSE", | ||
"npm-shrinkwrap.json", | ||
"CHANGELOG.md" | ||
], | ||
"main": "lib/index.js", | ||
"keywords": [ | ||
"CAP", | ||
"CDS", | ||
"SAP" | ||
], | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"bin": { | ||
"cds-gen": "./bin/cds-gen.js" | ||
}, | ||
"dependencies": { | ||
"minimist": "1.2.8", | ||
"xml2js": "0.6.2", | ||
"yaml": "2.3.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
160328
2165
0
2
+ Addedminimist@1.2.8(transitive)
+ Addedsax@1.2.4(transitive)
+ Addedxml2js@0.6.2(transitive)
+ Addedyaml@2.3.2(transitive)
- Removedminimist@1.2.6(transitive)
- Removedsax@1.4.1(transitive)
- Removedxml2js@0.4.23(transitive)
- Removedyaml@1.10.2(transitive)
Updatedminimist@1.2.8
Updatedxml2js@0.6.2
Updatedyaml@2.3.2