Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typescript-json-schema

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-json-schema - npm Package Compare versions

Comparing version 0.52.0 to 0.53.0

24

dist/typescript-json-schema.js

@@ -258,3 +258,3 @@ "use strict";

var declarationCount = (_c = (_b = sym.declarations) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
throw new Error("Symbol \"" + sym.name + "\" has no valueDeclaration and " + declarationCount + " declarations.");
throw new Error("Symbol \"".concat(sym.name, "\" has no valueDeclaration and ").concat(declarationCount, " declarations."));
}

@@ -265,3 +265,3 @@ function getSourceFile(sym) {

if (currentDecl.parent === undefined) {
throw new Error("Unable to locate source file for declaration \"" + sym.name + "\".");
throw new Error("Unable to locate source file for declaration \"".concat(sym.name, "\"."));
}

@@ -445,3 +445,3 @@ currentDecl = currentDecl.parent;

}
else if (flags & ts.TypeFlags.Undefined) {
else if (flags & ts.TypeFlags.Undefined || propertyTypeString === "void") {
definition.type = "undefined";

@@ -453,3 +453,3 @@ }

definition.type = "string";
definition.format = "date-time";
definition.format = definition.format || "date-time";
}

@@ -926,3 +926,3 @@ else if (propertyTypeString === "object") {

var relativePath = path.relative(process.cwd(), sourceFile.fileName);
fullTypeName = typeName + "." + generateHashOfNode(getCanonicalDeclaration(reffedType), relativePath);
fullTypeName = "".concat(typeName, ".").concat(generateHashOfNode(getCanonicalDeclaration(reffedType), relativePath));
}

@@ -938,3 +938,3 @@ else {

var relativePath = path.relative(process.cwd(), sourceFile.fileName);
fullTypeName = this.getTypeName(typ) + "." + generateHashOfNode(getCanonicalDeclaration(sym), relativePath);
fullTypeName = "".concat(this.getTypeName(typ), ".").concat(generateHashOfNode(getCanonicalDeclaration(sym), relativePath));
}

@@ -958,3 +958,3 @@ else if (reffedType && this.schemaOverrides.has(reffedType.escapedName)) {

returnedDefinition = {
$ref: this.args.id + "#/definitions/" + fullTypeName,
$ref: "".concat(this.args.id, "#/definitions/") + fullTypeName,
};

@@ -1046,3 +1046,3 @@ }

}, {});
returnedDefinition = __assign({ $ref: this.args.id + "#/definitions/" + fullTypeName }, annotations);
returnedDefinition = __assign({ $ref: "".concat(this.args.id, "#/definitions/") + fullTypeName }, annotations);
}

@@ -1062,3 +1062,3 @@ }

if (!this.allSymbols[symbolName]) {
throw new Error("type " + symbolName + " not found");
throw new Error("type ".concat(symbolName, " not found"));
}

@@ -1193,3 +1193,3 @@ var def = this.getTypeDefinition(this.allSymbols[symbolName], this.args.topRef, undefined, undefined, undefined, this.userSymbols[symbolName] || undefined);

var typeName = fullyQualifiedName.replace(/".*"\./, "");
var name_1 = !args.uniqueNames ? typeName : typeName + "." + generateHashOfNode(node, relativePath);
var name_1 = !args.uniqueNames ? typeName : "".concat(typeName, ".").concat(generateHashOfNode(node, relativePath));
symbols_1.push({ name: name_1, typeName: typeName, fullyQualifiedName: fullyQualifiedName, symbol: symbol });

@@ -1224,3 +1224,3 @@ if (!userSymbols_1[name_1]) {

var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character;
console.error(diagnostic.file.fileName + " (" + (line + 1) + "," + (character + 1) + "): " + message);
console.error("".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message));
}

@@ -1250,3 +1250,3 @@ else {

else {
throw new Error(matchingSymbols.length + " definitions found for requested type \"" + fullTypeName + "\".");
throw new Error("".concat(matchingSymbols.length, " definitions found for requested type \"").concat(fullTypeName, "\"."));
}

@@ -1253,0 +1253,0 @@ }

{
"name": "typescript-json-schema",
"version": "0.52.0",
"version": "0.53.0",
"description": "typescript-json-schema generates JSON Schema files from your Typescript sources",

@@ -53,3 +53,3 @@ "main": "dist/typescript-json-schema.js",

"ts-node": "^10.2.1",
"typescript": "~4.4.4",
"typescript": "~4.5.0",
"yargs": "^17.1.1"

@@ -56,0 +56,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc