Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
];
}
const [leftSchemaSDL, rightSchemaSDL] = [
printSchema(leftSchema),
printSchema(rightSchema)
];
if (leftSchemaSDL === rightSchemaSDL) {
return;
}
const diff = disparity.unified(leftSchemaSDL, rightSchemaSDL, {
paths: [leftSchemaLocation, rightSchemaLocation]
});
const diffNoColor = disparity.unifiedNoColor(leftSchemaSDL, rightSchemaSDL, {
paths: [leftSchemaLocation, rightSchemaLocation]
});
const dangerousChanges = findDangerousChanges(leftSchema, rightSchema);
const breakingChanges = findBreakingChanges(leftSchema, rightSchema);
return {
diff,
diffNoColor,
dangerousChanges,
breakingChanges
};
}
function textDifference (expected, value, noColor) {
const diff = noColor ? disparity.unifiedNoColor : disparity.unified
const textDiff = diff(expected, value)
return removeExplanation(textDiff)
}