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

ts-json-schema-generator

Package Overview
Dependencies
Maintainers
3
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-json-schema-generator - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2--canary.1922.0f11817.0

dist/test/minify/index.test.d.ts

18

dist/package.json
{
"name": "ts-json-schema-generator",
"version": "2.0.1",
"version": "2.0.2--canary.1922.0f11817.0",
"description": "Generate JSON schema from your Typescript sources",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"bin": {

@@ -44,3 +45,3 @@ "ts-json-schema-generator": "./bin/ts-json-schema-generator"

"engines": {
"node": ">=10.0.0"
"node": ">=18.0.0"
},

@@ -54,3 +55,3 @@ "dependencies": {

"safe-stable-stringify": "^2.4.3",
"typescript": "~5.4.5"
"typescript": "^5.4.5"
},

@@ -63,2 +64,4 @@ "devDependencies": {

"@babel/preset-typescript": "^7.24.1",
"@eslint/js": "^9.0.0",
"@types/eslint": "^8.56.9",
"@types/glob": "^8.1.0",

@@ -68,4 +71,2 @@ "@types/jest": "^29.5.12",

"@types/normalize-path": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"ajv": "^8.12.0",

@@ -76,3 +77,3 @@ "ajv-formats": "^3.0.1",

"cross-env": "^7.0.3",
"eslint": "^8.55.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",

@@ -84,2 +85,3 @@ "eslint-plugin-prettier": "^5.1.3",

"ts-node": "^10.9.2",
"typescript-eslint": "^7.7.0",
"vega": "^5.28.0",

@@ -92,4 +94,4 @@ "vega-lite": "^5.18.0"

"watch": "tsc -w",
"lint": "eslint \"{src,test,factory}/**/*.ts\"",
"format": "yarn lint --fix",
"lint": "eslint",
"format": "eslint --fix",
"test": "jest test/ --verbose",

@@ -96,0 +98,0 @@ "test:fast": "cross-env FAST_TEST=1 jest test/ --verbose",

{
"name": "ts-json-schema-generator",
"version": "2.0.1",
"version": "2.0.2--canary.1922.0f11817.0",
"description": "Generate JSON schema from your Typescript sources",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"bin": {

@@ -44,3 +45,3 @@ "ts-json-schema-generator": "./bin/ts-json-schema-generator"

"engines": {
"node": ">=10.0.0"
"node": ">=18.0.0"
},

@@ -54,3 +55,3 @@ "dependencies": {

"safe-stable-stringify": "^2.4.3",
"typescript": "~5.4.5"
"typescript": "^5.4.5"
},

@@ -63,2 +64,4 @@ "devDependencies": {

"@babel/preset-typescript": "^7.24.1",
"@eslint/js": "^9.0.0",
"@types/eslint": "^8.56.9",
"@types/glob": "^8.1.0",

@@ -68,4 +71,2 @@ "@types/jest": "^29.5.12",

"@types/normalize-path": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"ajv": "^8.12.0",

@@ -76,3 +77,3 @@ "ajv-formats": "^3.0.1",

"cross-env": "^7.0.3",
"eslint": "^8.55.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",

@@ -84,2 +85,3 @@ "eslint-plugin-prettier": "^5.1.3",

"ts-node": "^10.9.2",
"typescript-eslint": "^7.7.0",
"vega": "^5.28.0",

@@ -92,4 +94,4 @@ "vega-lite": "^5.18.0"

"watch": "tsc -w",
"lint": "eslint \"{src,test,factory}/**/*.ts\"",
"format": "yarn lint --fix",
"lint": "eslint",
"format": "eslint --fix",
"test": "jest test/ --verbose",

@@ -96,0 +98,0 @@ "test:fast": "cross-env FAST_TEST=1 jest test/ --verbose",

@@ -37,3 +37,3 @@ import { TupleType } from "../Type/TupleType";

const subContext = this.createSubContext(node, context);
return this.childNodeParser.createType(decl, subContext)!;
return this.childNodeParser.createType(decl, subContext);
}

@@ -40,0 +40,0 @@

@@ -173,3 +173,3 @@ import ts, { PropertyName } from "typescript";

return this.childNodeParser.createType(indexSignature.type!, context) ?? this.additionalProperties;
return this.childNodeParser.createType(indexSignature.type, context) ?? this.additionalProperties;
}

@@ -176,0 +176,0 @@

@@ -31,3 +31,3 @@ import ts from "typescript";

return translate(types as BaseType[]);
return translate(types);
}

@@ -51,3 +51,3 @@ }

export function translate(types: BaseType[]): BaseType {
types = uniqueTypeArray(types as BaseType[]);
types = uniqueTypeArray(types);

@@ -54,0 +54,0 @@ if (types.length == 1) {

@@ -86,3 +86,2 @@ import ts from "typescript";

throw new LogicError(
// eslint-disable-next-line max-len
`Unexpected key type "${

@@ -89,0 +88,0 @@ constraintType ? constraintType.getId() : constraintType

@@ -75,3 +75,3 @@ import ts, { MethodSignature, PropertySignature } from "typescript";

return this.childNodeParser.createType(indexSignature.type!, context) ?? this.additionalProperties;
return this.childNodeParser.createType(indexSignature.type, context) ?? this.additionalProperties;
}

@@ -78,0 +78,0 @@

@@ -36,3 +36,3 @@ import ts from "typescript";

if (typeSymbol.name === "Promise") {
return this.childNodeParser.createType(node.typeArguments![0]!, this.createSubContext(node, context));
return this.childNodeParser.createType(node.typeArguments![0], this.createSubContext(node, context));
}

@@ -39,0 +39,0 @@

@@ -116,4 +116,4 @@ import { Definition } from "../Schema/Definition";

return new ObjectProperty(property.getName(), preserveAnnotation(propertyType!, newPropType), false);
return new ObjectProperty(property.getName(), preserveAnnotation(propertyType, newPropType), false);
}
}

@@ -14,3 +14,3 @@ import { Definition } from "../Schema/Definition";

return (definition: Definition, baseType: BaseType): Definition => {
const other = childTypeFormatter.getDefinition(derefType(baseType)!);
const other = childTypeFormatter.getDefinition(derefType(baseType));

@@ -17,0 +17,0 @@ definition.properties = deepMerge(other.properties || {}, definition.properties || {});

@@ -0,1 +1,2 @@

/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
import stringify from "safe-stable-stringify";

@@ -2,0 +3,0 @@

@@ -224,3 +224,3 @@ import { AnyType } from "../Type/AnyType";

inferMap,
new Set(insideTypes).add(source!).add(target!)
new Set(insideTypes).add(source).add(target)
);

@@ -227,0 +227,0 @@ })

@@ -32,3 +32,3 @@ import { Command, Option } from "commander";

"--functions <functions>",
// eslint-disable-next-line max-len
"How to handle functions. `fail` will throw an error. `comment` will add a comment. `hide` will treat the function like a NeverType or HiddenType."

@@ -35,0 +35,0 @@ )

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 not supported yet

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 not supported yet

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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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