11import * as path from 'path' ;
22import { red , blue , yellow , green } from 'colorette' ;
33import { performance } from 'perf_hooks' ;
4- const isEqual = require ( 'lodash.isequal' ) ;
54import {
65 Config ,
76 SpecVersion ,
@@ -12,6 +11,7 @@ import {
1211 bundleDocument ,
1312 isRef ,
1413} from '@redocly/openapi-core' ;
14+ import { dequal } from '@redocly/openapi-core/lib/utils' ;
1515import {
1616 getFallbackApisOrExit ,
1717 printExecutionTime ,
@@ -449,7 +449,7 @@ export async function handleJoin(argv: JoinOptions, config: Config, packageVersi
449449 // Compare properties only if both are reference objects
450450 if ( ! isRef ( pathParameter ) && ! isRef ( parameter ) ) {
451451 if ( pathParameter . name === parameter . name && pathParameter . in === parameter . in ) {
452- if ( ! isEqual ( pathParameter . schema , parameter . schema ) ) {
452+ if ( ! dequal ( pathParameter . schema , parameter . schema ) ) {
453453 exitWithError ( `Different parameter schemas for (${ parameter . name } ) in ${ path } .` ) ;
454454 }
455455 isFoundParameter = true ;
@@ -535,7 +535,7 @@ export async function handleJoin(argv: JoinOptions, config: Config, packageVersi
535535
536536 function isServersEqual ( serverOne : Oas3Server , serverTwo : Oas3Server ) {
537537 if ( serverOne . description === serverTwo . description ) {
538- return isEqual ( serverOne . variables , serverTwo . variables ) ;
538+ return dequal ( serverOne . variables , serverTwo . variables ) ;
539539 }
540540
541541 return false ;
@@ -636,7 +636,7 @@ export async function handleJoin(argv: JoinOptions, config: Config, packageVersi
636636}
637637
638638function doesComponentsDiffer ( curr : object , next : object ) {
639- return ! isEqual ( Object . values ( curr ) [ 0 ] , Object . values ( next ) [ 0 ] ) ;
639+ return ! dequal ( Object . values ( curr ) [ 0 ] , Object . values ( next ) [ 0 ] ) ;
640640}
641641
642642function validateComponentsDifference ( files : any ) {
0 commit comments