Socket
Socket
Sign inDemoInstall

@nestjs/swagger

Package Overview
Dependencies
Maintainers
4
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 4.0.6 to 4.0.7

6

dist/plugin/utils/ast-utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typescript_1 = require("typescript");
const decorators_1 = require("../../decorators");
const plugin_constants_1 = require("../plugin-constants");
const plugin_utils_1 = require("./plugin-utils");
function isArray(type) {

@@ -86,4 +85,3 @@ const symbol = type.getSymbol();

.expression;
if (identifier &&
identifier.escapedText === `${plugin_constants_1.OPENAPI_NAMESPACE}.${decorators_1.ApiResponse.name}`) {
if (plugin_utils_1.isDynamicallyAdded(identifier)) {
return undefined;

@@ -90,0 +88,0 @@ }

@@ -7,1 +7,2 @@ import * as ts from 'typescript';

export declare function replaceImportPath(typeReference: string, fileName: string): string;
export declare function isDynamicallyAdded(identifier: ts.Node): boolean;

@@ -48,3 +48,5 @@ "use strict";

function hasPropertyKey(key, properties) {
return properties.some(item => item.name.getText() === key);
return properties
.filter(item => !isDynamicallyAdded(item))
.some(item => item.name.getText() === key);
}

@@ -67,1 +69,5 @@ exports.hasPropertyKey = hasPropertyKey;

exports.replaceImportPath = replaceImportPath;
function isDynamicallyAdded(identifier) {
return identifier && !identifier.parent && identifier.pos === -1;
}
exports.isDynamicallyAdded = isDynamicallyAdded;
{
"name": "@nestjs/swagger",
"version": "4.0.6",
"version": "4.0.7",
"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