snyk 1.820.0 → 1.824.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6318,9 +6318,10 @@ var CloudConfigFileTypes;
6318
6318
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6319
6319
  exports.parseFileContent = void 0;
6320
6320
  var YAML = __webpack_require__(6792);
6321
- function parseFileContent(fileContent) {
6321
+ function parseFileContent(fileContent, fileType) {
6322
+ if (fileType === void 0) { fileType = 'yaml'; }
6322
6323
  // YAML should fail on \/ but the library doesn't: https://snyksec.atlassian.net/browse/CC-1175
6323
- if (fileContent.includes('\\/')) {
6324
+ if (fileContent.includes('\\/') && fileType !== 'json') {
6324
6325
  throw new Error('Found escape character \\/.');
6325
6326
  }
6326
6327
  // the YAML library can parse both YAML and JSON content, as well as content with singe/multiple YAMLs