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.1 to 11.0.2

2

dist/src/index.d.ts
import { JSONSchema4 } from 'json-schema';
import { Options as $RefOptions } from '@apidevtools/json-schema-ref-parser';
import { Options as $RefOptions } from '@bcherny/json-schema-ref-parser';
import { Options as PrettierOptions } from 'prettier';

@@ -4,0 +4,0 @@ export { EnumJSONSchema, JSONSchema, NamedEnumJSONSchema, CustomTypeJSONSchema } from './types/JSONSchema';

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

import $RefParser = require('@apidevtools/json-schema-ref-parser');
import $RefParser = require('@bcherny/json-schema-ref-parser');
import { JSONSchema } from './types/JSONSchema';

@@ -3,0 +3,0 @@ export declare type DereferencedPaths = WeakMap<$RefParser.JSONSchemaObject, string>;

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

exports.dereference = void 0;
var $RefParser = require("@apidevtools/json-schema-ref-parser");
var $RefParser = require("@bcherny/json-schema-ref-parser");
var utils_1 = require("./utils");

@@ -68,3 +68,3 @@ function dereference(schema, _a) {

case 1:
dereferencedSchema = _b.sent() // TODO: fix types
dereferencedSchema = (_b.sent()) // TODO: fix types
;

@@ -71,0 +71,0 @@ return [2 /*return*/, { dereferencedPaths: dereferencedPaths, dereferencedSchema: dereferencedSchema }];

{
"name": "json-schema-to-typescript",
"version": "11.0.1",
"version": "11.0.2",
"description": "compile json schema to typescript typings",

@@ -49,3 +49,3 @@ "main": "dist/src/index.js",

"dependencies": {
"@apidevtools/json-schema-ref-parser": "https://github.com/bcherny/json-schema-ref-parser.git#984282d34a2993e5243aa35100fe32a63699164d",
"@bcherny/json-schema-ref-parser": "9.0.9",
"@types/json-schema": "^7.0.11",

@@ -52,0 +52,0 @@ "@types/lodash": "^4.14.182",

@@ -205,5 +205,10 @@ # json-schema-to-typescript [![Build Status][build]](https://github.com/bcherny/json-schema-to-typescript/actions?query=branch%3Amaster+workflow%3ACI) [![npm]](https://www.npmjs.com/package/json-schema-to-typescript) [![mit]](https://opensource.org/licenses/MIT)

- [AWS](https://github.com/aws/aws-toolkit-vscode), [AWSLabs](https://github.com/awslabs/cdk8s)
- [Alibaba](https://github.com/alibaba/lowcode-engine)
- [Amazon](https://github.com/aws/aws-toolkit-vscode), [AWSLabs](https://github.com/awslabs/cdk8s)
- [Expo](https://github.com/expo/expo)
- [FormatJS](https://github.com/formatjs/formatjs)
- [Microsoft](https://github.com/microsoft/mixed-reality-extension-sdk)
- [Mozilla](https://github.com/mdn/browser-compat-data)
- [Nx](https://github.com/nrwl/nx)
- [RStudio](https://github.com/rstudio/rstudio)
- [Sourcegraph](https://github.com/sourcegraph/sourcegraph)

@@ -210,0 +215,0 @@ - [Stryker](https://github.com/stryker-mutator/stryker)

import {readFileSync} from 'fs'
import {JSONSchema4} from 'json-schema'
import {Options as $RefOptions} from '@apidevtools/json-schema-ref-parser'
import {Options as $RefOptions} from '@bcherny/json-schema-ref-parser'
import {cloneDeep, endsWith, merge} from 'lodash'

@@ -5,0 +5,0 @@ import {dirname} from 'path'

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

import $RefParser = require('@apidevtools/json-schema-ref-parser')
import $RefParser = require('@bcherny/json-schema-ref-parser')
import {JSONSchema} from './types/JSONSchema'

@@ -14,3 +14,3 @@ import {log} from './utils'

const dereferencedPaths: DereferencedPaths = new WeakMap()
const dereferencedSchema = await parser.dereference(cwd, schema as any, {
const dereferencedSchema = (await parser.dereference(cwd, schema as any, {
...$refOptions,

@@ -23,4 +23,4 @@ dereference: {

}
}) as any // TODO: fix types
})) as any // TODO: fix types
return {dereferencedPaths, dereferencedSchema}
}
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