New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@sinclair/typebox-codegen

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinclair/typebox-codegen - npm Package Compare versions

Comparing version
0.9.1
to
0.9.2
sinclair-typebox-codegen-0.9.1.tgz

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+1
-1
{
"name": "@sinclair/typebox-codegen",
"version": "0.9.1",
"version": "0.9.2",
"description": "Code Generation Tools for TypeBox",

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

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

const rawTypeExpression = IsRecursiveType(node) ? `Type.Recursive(This => Type.Object(${members}))` : `Type.Object(${members})`;
const typeExpression = heritage.length === 0 ? rawTypeExpression : `Type.Intersect([${heritage.join(', ')}, ${rawTypeExpression}])`;
const typeExpression = heritage.length === 0 ? rawTypeExpression : `Type.Composite([${heritage.join(', ')}, ${rawTypeExpression}])`;
const type = InjectOptions(typeExpression, options);

@@ -359,3 +359,3 @@ const typeDeclaration = `${exports}const ${node.name.getText()} = <${constraints}>(${parameters}) => ${type}`;

const rawTypeExpression = IsRecursiveType(node) ? `Type.Recursive(This => Type.Object(${members}))` : `Type.Object(${members})`;
const typeExpression = heritage.length === 0 ? rawTypeExpression : `Type.Intersect([${heritage.join(', ')}, ${rawTypeExpression}])`;
const typeExpression = heritage.length === 0 ? rawTypeExpression : `Type.Composite([${heritage.join(', ')}, ${rawTypeExpression}])`;
const type = InjectOptions(typeExpression, options);

@@ -400,6 +400,7 @@ const typeDeclaration = `${exports}const ${node.name.getText()} = ${type}`;

function* HeritageClause(node) {
// Consideration: This may be better expressed as a heritage type (for review)
const types = node.types.map((node) => Collect(node));
if (types.length === 1)
return yield types[0];
yield `Type.Intersect([${types.join(', ')}])`;
yield `Type.Composite([${types.join(', ')}])`;
}

@@ -406,0 +407,0 @@ function* IndexedAccessType(node) {