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

@kubb/parser

Package Overview
Dependencies
Maintainers
1
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/parser - npm Package Compare versions

Comparing version 0.0.0-canary-20240426151741 to 0.0.0-canary-20240426152325

9

dist/factory.js

@@ -314,3 +314,10 @@ // src/factory.ts

if (isNumber(value)) {
initializer = factory.createNumericLiteral(value);
if (value < 0) {
initializer = factory.createPrefixUnaryExpression(
ts.SyntaxKind.MinusToken,
factory.createNumericLiteral(Math.abs(value))
);
} else {
initializer = factory.createNumericLiteral(value);
}
}

@@ -317,0 +324,0 @@ if (typeof value === "boolean") {

2

package.json
{
"name": "@kubb/parser",
"version": "0.0.0-canary-20240426151741",
"version": "0.0.0-canary-20240426152325",
"description": "Generator parser",

@@ -5,0 +5,0 @@ "keywords": [

@@ -461,3 +461,14 @@ import { isNumber } from 'remeda'

if (isNumber(value)) {
initializer = factory.createNumericLiteral(value)
// Error: Negative numbers should be created in combination with createPrefixUnaryExpression factory.
// The method createNumericLiteral only accepts positive numbers
// or those combined with createPrefixUnaryExpression.
// Therefore, we need to ensure that the number is not negative.
if (value < 0) {
initializer = factory.createPrefixUnaryExpression(
ts.SyntaxKind.MinusToken,
factory.createNumericLiteral(Math.abs(value))
)
} else {
initializer = factory.createNumericLiteral(value)
}
}

@@ -464,0 +475,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

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