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.51.0 to 0.52.0

4

dist/typescript-json-schema-cli.js

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

var helpText = "Usage: typescript-json-schema <path-to-typescript-files-or-tsconfig> <type>";
var defaultArgs = typescript_json_schema_1.getDefaultArgs();
var defaultArgs = (0, typescript_json_schema_1.getDefaultArgs)();
var args = require("yargs")

@@ -56,3 +56,3 @@ .usage(helpText)

.argv;
typescript_json_schema_1.exec(args._[0], args._[1], {
(0, typescript_json_schema_1.exec)(args._[0], args._[1], {
ref: args.refs,

@@ -59,0 +59,0 @@ aliasRef: args.aliasRefs,

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

var glob = require("glob");
var stringify = require("json-stable-stringify");
var safe_stable_stringify_1 = require("safe-stable-stringify");
var path = require("path");

@@ -251,9 +251,11 @@ var crypto_1 = require("crypto");

function getCanonicalDeclaration(sym) {
var _a, _b, _c;
if (sym.valueDeclaration !== undefined) {
return sym.valueDeclaration;
}
else if (sym.declarations.length === 1) {
else if (((_a = sym.declarations) === null || _a === void 0 ? void 0 : _a.length) === 1) {
return sym.declarations[0];
}
throw new Error("Symbol \"" + sym.name + "\" has no valueDeclaration and " + sym.declarations.length + " declarations.");
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.");
}

@@ -361,3 +363,5 @@ function getSourceFile(sym) {

var _a, _b;
var _c = [doc.name, doc.text], name = _c[0], text = _c[1];
var name = doc.name;
var originalText = doc.text ? doc.text.map(function (t) { return t.text; }).join("") : "";
var text = originalText;
if (name.startsWith("TJS-")) {

@@ -370,3 +374,3 @@ name = name.slice(4);

else if (name === "TJS" && text.startsWith("-")) {
var match = new RegExp(REGEX_TJS_JSDOC).exec(doc.text);
var match = new RegExp(REGEX_TJS_JSDOC).exec(originalText);
if (match) {

@@ -761,6 +765,7 @@ name = match[1];

var decls = prop.declarations;
return !((decls === null || decls === void 0 ? void 0 : decls.filter(function (decl) {
var mods = decl.modifiers;
return mods && mods.filter(function (mod) { return mod.kind === ts.SyntaxKind.PrivateKeyword; }).length > 0;
}).length) > 0);
return !(decls &&
decls.filter(function (decl) {
var mods = decl.modifiers;
return mods && mods.filter(function (mod) { return mod.kind === ts.SyntaxKind.PrivateKeyword; }).length > 0;
}).length > 0);
});

@@ -1143,3 +1148,3 @@ var fullName = this.tc.typeToString(clazzType, undefined, ts.TypeFormatFlags.UseFullyQualifiedType);

function generateHashOfNode(node, relativePath) {
return crypto_1.createHash("md5").update(relativePath).update(node.pos.toString()).digest("hex").substring(0, 8);
return (0, crypto_1.createHash)("md5").update(relativePath).update(node.pos.toString()).digest("hex").substring(0, 8);
}

@@ -1300,3 +1305,3 @@ function buildGenerator(program, args, onlyIncludeFiles) {

}
json = stringify(definition, { space: 4 }) + "\n\n";
json = (0, safe_stable_stringify_1.stringify)(definition, null, 4) + "\n\n";
if (args.out) {

@@ -1303,0 +1308,0 @@ return [2, new Promise(function (resolve, reject) {

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

@@ -51,5 +51,5 @@ "main": "dist/typescript-json-schema.js",

"glob": "^7.1.7",
"json-stable-stringify": "^1.0.1",
"safe-stable-stringify": "^2.2.0",
"ts-node": "^10.2.1",
"typescript": "~4.2.3",
"typescript": "~4.4.4",
"yargs": "^17.1.1"

@@ -60,3 +60,2 @@ },

"@types/glob": "^7.1.4",
"@types/json-stable-stringify": "^1.0.33",
"@types/mocha": "^9.0.0",

@@ -74,3 +73,3 @@ "ajv": "^8.6.3",

"test": "yarn build && mocha -t 5000 --require source-map-support/register dist/test",
"debug": "ts-node --inspect=19248 --debug-brk typescript-json-schema-cli.ts",
"debug": "node --inspect=19248 --inspect-brk -r ts-node/register typescript-json-schema-cli.ts",
"docs": "./update-docs.js",

@@ -77,0 +76,0 @@ "run": "ts-node typescript-json-schema-cli.ts",

Sorry, the diff of this file is not supported yet

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