typescript-json-schema
Advanced tools
Comparing version 0.37.0 to 0.38.0
{ | ||
"name": "typescript-json-schema", | ||
"version": "0.37.0", | ||
"version": "0.38.0", | ||
"description": "typescript-json-schema generates JSON Schema files from your Typescript sources", | ||
@@ -49,20 +49,20 @@ "main": "typescript-json-schema.js", | ||
"dependencies": { | ||
"glob": "~7.1.2", | ||
"glob": "~7.1.4", | ||
"json-stable-stringify": "^1.0.1", | ||
"typescript": "^3.0.1", | ||
"yargs": "^12.0.1" | ||
"typescript": "^3.4.5", | ||
"yargs": "^13.2.4" | ||
}, | ||
"devDependencies": { | ||
"@types/assertion-error": "^1.1.0", | ||
"@types/chai": "^4.1.4", | ||
"@types/glob": "^5.0.35", | ||
"@types/chai": "^4.1.7", | ||
"@types/glob": "^7.1.1", | ||
"@types/json-stable-stringify": "^1.0.32", | ||
"@types/mocha": "^5.2.5", | ||
"@types/node": "^10.9.1", | ||
"ajv": "^6.5.3", | ||
"chai": "^4.1.2", | ||
"mocha": "^5.2.0", | ||
"source-map-support": "^0.5.9", | ||
"ts-node": "^7.0.1", | ||
"tslint": "^5.11.0" | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.0.2", | ||
"ajv": "^6.10.0", | ||
"chai": "^4.2.0", | ||
"mocha": "^6.1.4", | ||
"source-map-support": "^0.5.12", | ||
"ts-node": "^8.1.0", | ||
"tslint": "^5.16.0" | ||
}, | ||
@@ -69,0 +69,0 @@ "scripts": { |
@@ -279,3 +279,3 @@ "use strict"; | ||
} | ||
else if (flags & ts.TypeFlags.Any) { | ||
else if ((flags & ts.TypeFlags.Any) || (flags & ts.TypeFlags.Unknown)) { | ||
} | ||
@@ -299,3 +299,3 @@ else if (propertyTypeString === "Date" && !this.args.rejectDateType) { | ||
if ((propertyType.flags & ts.TypeFlags.Object) && | ||
(propertyType.objectFlags & (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface))) { | ||
(propertyType.objectFlags & (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface | ts.ObjectFlags.Mapped))) { | ||
definition.type = "object"; | ||
@@ -725,3 +725,3 @@ definition.additionalProperties = false; | ||
var reffedDefinition = void 0; | ||
if (asTypeAliasRef && reffedType.getFlags() & (ts.TypeFlags.IndexedAccess | ts.TypeFlags.Index | ts.TypeFlags.Intersection) && symbol) { | ||
if (asTypeAliasRef && reffedType && typ.symbol !== reffedType && symbol) { | ||
reffedDefinition = this.getTypeDefinition(typ, true, undefined, symbol, symbol); | ||
@@ -980,2 +980,3 @@ } | ||
delete options.declaration; | ||
delete options.declarationDir; | ||
delete options.declarationMap; | ||
@@ -997,4 +998,4 @@ var program = ts.createProgram({ | ||
function exec(filePattern, fullTypeName, args) { | ||
var _a; | ||
if (args === void 0) { args = getDefaultArgs(); } | ||
var _a; | ||
var program; | ||
@@ -1001,0 +1002,0 @@ var onlyIncludeFiles = undefined; |
@@ -410,3 +410,3 @@ import * as glob from "glob"; | ||
definition.type = "undefined"; | ||
} else if (flags & ts.TypeFlags.Any) { | ||
} else if ((flags & ts.TypeFlags.Any) || (flags & ts.TypeFlags.Unknown)) { | ||
// no type restriction, so that anything will match | ||
@@ -427,3 +427,3 @@ } else if (propertyTypeString === "Date" && !this.args.rejectDateType) { | ||
if ((propertyType.flags & ts.TypeFlags.Object) && | ||
((propertyType as ts.ObjectType).objectFlags & (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface))) { | ||
((propertyType as ts.ObjectType).objectFlags & (ts.ObjectFlags.Anonymous | ts.ObjectFlags.Interface | ts.ObjectFlags.Mapped))) { | ||
definition.type = "object"; | ||
@@ -918,3 +918,3 @@ definition.additionalProperties = false; | ||
let reffedDefinition: Definition; | ||
if (asTypeAliasRef && reffedType!.getFlags() & (ts.TypeFlags.IndexedAccess | ts.TypeFlags.Index | ts.TypeFlags.Intersection) && symbol) { | ||
if (asTypeAliasRef && reffedType && typ.symbol !== reffedType && symbol) { | ||
reffedDefinition = this.getTypeDefinition(typ, true, undefined, symbol, symbol); | ||
@@ -1189,2 +1189,3 @@ } else { | ||
delete options.declaration; | ||
delete options.declarationDir; | ||
delete options.declarationMap; | ||
@@ -1191,0 +1192,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
164179
2464
+ Addedansi-regex@4.1.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedcliui@5.0.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedstring-width@3.1.0(transitive)
+ Addedstrip-ansi@5.2.0(transitive)
+ Addedwrap-ansi@5.1.0(transitive)
+ Addedyargs@13.3.2(transitive)
+ Addedyargs-parser@13.1.2(transitive)
- Removedansi-regex@2.1.13.0.1(transitive)
- Removedcliui@4.1.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcross-spawn@6.0.6(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexeca@1.0.0(transitive)
- Removedget-caller-file@1.0.3(transitive)
- Removedget-stream@4.1.0(transitive)
- Removedinvert-kv@2.0.0(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedlcid@2.0.0(transitive)
- Removedmap-age-cleaner@0.1.3(transitive)
- Removedmem@4.3.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednice-try@1.0.5(transitive)
- Removednpm-run-path@2.0.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedos-locale@3.1.0(transitive)
- Removedp-defer@1.0.0(transitive)
- Removedp-finally@1.0.0(transitive)
- Removedp-is-promise@2.1.0(transitive)
- Removedpath-key@2.0.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedrequire-main-filename@1.0.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring-width@1.0.22.1.1(transitive)
- Removedstrip-ansi@3.0.14.0.0(transitive)
- Removedstrip-eof@1.0.0(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedyargs@12.0.5(transitive)
- Removedyargs-parser@11.1.1(transitive)
Updatedglob@~7.1.4
Updatedtypescript@^3.4.5
Updatedyargs@^13.2.4