@ui5/dts-generator
Advanced tools
Comparing version 1.60.2 to 1.60.3
@@ -0,3 +1,7 @@ | ||
## 1.60.3 | ||
Defaults Config handling. | ||
## 1.60.2 | ||
Initial Release |
@@ -9,6 +9,19 @@ const _ = require("lodash"); | ||
const defaultOptions = { | ||
dependencies: [], | ||
directives: { | ||
badMethods: [], | ||
badInterfaces: [], | ||
typeTyposMap: [], | ||
namespacesToInterfaces: {}, | ||
fqnToIgnore: {} | ||
} | ||
}; | ||
function jsonToDTS(targetLibJson, options) { | ||
const actualOptions = _.defaultsDeep(options, defaultOptions); | ||
const targetLibFixedJson = fixApiJson(targetLibJson); | ||
const depsFixedJsons = timer(function fixJson() { | ||
return _.map(options.dependencies, fixApiJson); | ||
return _.map(actualOptions.dependencies, fixApiJson); | ||
}); | ||
@@ -37,3 +50,3 @@ | ||
symbolTable, | ||
options.directives | ||
actualOptions.directives | ||
); | ||
@@ -44,8 +57,8 @@ | ||
targetLibFixAst, | ||
options.directives.fqnToIgnore | ||
actualOptions.directives.fqnToIgnore | ||
); | ||
if (options.importsGen) { | ||
const depLibNames = _.map(options.dependencies, dep => dep.library); | ||
targetLibDtsText = options.importsGen(targetLibDtsText, depLibNames); | ||
if (actualOptions.importsGen) { | ||
const depLibNames = _.map(actualOptions.dependencies, dep => dep.library); | ||
targetLibDtsText = actualOptions.importsGen(targetLibDtsText, depLibNames); | ||
} | ||
@@ -52,0 +65,0 @@ |
{ | ||
"name": "@ui5/dts-generator", | ||
"description": "Generates TypeScript Definitions from UI5 api.json files", | ||
"version": "1.60.2", | ||
"version": "1.60.3", | ||
"license": "Apache-2.0", | ||
@@ -14,3 +14,3 @@ "repository": { | ||
"dependencies": { | ||
"lodash": "4.17.14", | ||
"lodash": "4.17.15", | ||
"lodash.combinations": "18.9.19", | ||
@@ -29,3 +29,3 @@ "prettier": "1.18.2", | ||
}, | ||
"gitHead": "e17ce72f10169a6d70e849b14cee176ec9758d70" | ||
"gitHead": "78dd94c6e99f9773acec49ab37bd266d61da51a9" | ||
} |
71838
1926
+ Addedlodash@4.17.15(transitive)
- Removedlodash@4.17.144.17.21(transitive)
Updatedlodash@4.17.15