Socket
Socket
Sign inDemoInstall

@nestjs/swagger

Package Overview
Dependencies
Maintainers
2
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/swagger - npm Package Compare versions

Comparing version 7.0.8 to 7.0.9

2

dist/plugin/utils/ast-utils.d.ts

@@ -23,3 +23,3 @@ import * as ts from 'typescript';

export declare function createBooleanLiteral(factory: ts.NodeFactory, flag: boolean): ts.BooleanLiteral;
export declare function createPrimitiveLiteral(factory: ts.NodeFactory, item: unknown, typeOfItem?: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"): ts.StringLiteral | ts.NumericLiteral | ts.BooleanLiteral | ts.PrefixUnaryExpression;
export declare function createPrimitiveLiteral(factory: ts.NodeFactory, item: unknown, typeOfItem?: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"): ts.StringLiteral | ts.NumericLiteral | ts.PrefixUnaryExpression | ts.BooleanLiteral;
export declare function createLiteralFromAnyValue(factory: ts.NodeFactory, item: unknown): any;

@@ -254,7 +254,23 @@ "use strict";

}
if (ts.isIdentifier(node) || ts.isCallExpression(node)) {
if (ts.isCallExpression(node) || ts.isIdentifier(node)) {
return false;
}
return true;
if (ts.isNewExpression(node)) {
if (node.expression?.escapedText === 'Date') {
return true;
}
return false;
}
if (node.kind === ts.SyntaxKind.FalseKeyword ||
node.kind === ts.SyntaxKind.TrueKeyword ||
node.kind === ts.SyntaxKind.NullKeyword) {
return true;
}
if (ts.isNumericLiteral(node) ||
ts.isPrefixUnaryExpression(node) ||
ts.isStringLiteral(node)) {
return true;
}
return false;
}
exports.canReferenceNode = canReferenceNode;

@@ -235,2 +235,5 @@ "use strict";

if (!(0, plugin_utils_1.canReferenceNode)(initializer, options)) {
const parentFilePath = node.getSourceFile().fileName;
const propertyName = node.name.getText();
plugin_debug_logger_1.pluginDebugLogger.debug(`Skipping registering default value for "${propertyName}" property in "${parentFilePath}" file because it is not a referenceable value ("${initializer.getText()}").`);
return undefined;

@@ -237,0 +240,0 @@ }

{
"name": "@nestjs/swagger",
"version": "7.0.8",
"version": "7.0.9",
"description": "Nest - modern, fast, powerful node.js web framework (@swagger)",

@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec",

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