Socket
Socket
Sign inDemoInstall

json-schema-to-typescript

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-to-typescript - npm Package Compare versions

Comparing version 11.0.5 to 12.0.0

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## 12.0.0
- b73e1c7 Bugfix: Parse enums as literals, rather than as schemas (#508)
## 11.0.0

@@ -7,0 +11,0 @@

4

dist/src/parser.js

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

params: schema.enum.map(function (_, n) { return ({
ast: parse(_, options, undefined, processed, usedNames),
ast: parseLiteral(_, undefined),
keyName: schema.tsEnumNames[n]

@@ -215,3 +215,3 @@ }); }),

standaloneName: standaloneName(schema, keyNameFromDefinition, usedNames),
params: schema.enum.map(function (_) { return parse(_, options, undefined, processed, usedNames); }),
params: schema.enum.map(function (_) { return parseLiteral(_, undefined); }),
type: 'UNION'

@@ -218,0 +218,0 @@ };

{
"name": "json-schema-to-typescript",
"version": "11.0.5",
"version": "12.0.0",
"description": "compile json schema to typescript typings",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

@@ -170,3 +170,3 @@ import {JSONSchema4Type, JSONSchema4TypeName} from 'json-schema'

params: schema.enum!.map((_, n) => ({
ast: parse(_, options, undefined, processed, usedNames),
ast: parseLiteral(_, undefined),
keyName: schema.tsEnumNames![n]

@@ -261,3 +261,3 @@ })),

standaloneName: standaloneName(schema, keyNameFromDefinition, usedNames),
params: schema.enum!.map(_ => parse(_, options, undefined, processed, usedNames)),
params: schema.enum!.map(_ => parseLiteral(_, undefined)),
type: 'UNION'

@@ -264,0 +264,0 @@ }

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