🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

openapi-format

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-format - npm Package Compare versions

Comparing version

to
1.25.2

6

CHANGELOG.md
## unreleased
## [1.25.2] - 2025-04-02
- Overlay: Prevent distorted properties (#154)
## [1.25.1] - 2025-03-29
- fix: Prevent distorted properties when sorting (#154)
- Sort: Prevent distorted properties (#154)

@@ -7,0 +11,0 @@ ## [1.25.0] - 2025-01-01

2

package.json
{
"name": "openapi-format",
"version": "1.25.1",
"version": "1.25.2",
"description": "Format an OpenAPI document by ordering, formatting and filtering fields.",

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

@@ -130,4 +130,2 @@ const {JSONPath} = require('jsonpath-plus');

function deepMerge(target, source) {
if (typeof source !== 'object' || source === null) return source;
if (Array.isArray(target) && Array.isArray(source)) {

@@ -156,2 +154,11 @@ // Merge arrays by unique 'name' and 'in' for OpenAPI parameters

// If source is an array but the target isn't an array, return a shallow copy.
if (Array.isArray(source)) {
return source.slice();
}
// If source is not an object or is null, return it directly.
if (typeof source !== 'object' || source === null) return source;
// If target is not an object or is null, initialize it as an object.
if (typeof target !== 'object' || target === null) {

@@ -158,0 +165,0 @@ target = {};

Sorry, the diff of this file is too big to display