snyk 1.965.0 → 1.966.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.
@@ -1289,8 +1289,8 @@ function getLineNumberForSingleNode(baseNode, remainingPath) {
1289
1289
  }
1290
1290
  var nodeForPath = getNodeForPath(node.values, remainingPath[0]);
1291
1291
  if (!nodeForPath) {
1292
- // If the path does not exist, we will return '-1'
1293
- return -1;
1292
+ //Not exists
1293
+ return node.lineLocation.line;
1294
1294
  }
1295
1295
  node = nodeForPath;
1296
1296
  remainingPath = remainingPath.splice(1);
@@ -1575,12 +1575,7 @@ var CloudConfigFileTypes;
1575
1575
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1576
1576
  exports.parseFileContent = void 0;
1577
1577
  var YAML = __webpack_require__(6792);
1578
- function parseFileContent(fileContent, fileType) {
1579
- if (fileType === void 0) { fileType = 'yaml'; }
1580
- // YAML should fail on \/ but the library doesn't: https://snyksec.atlassian.net/browse/CC-1175
1581
- if (fileContent.includes('\\/') && fileType !== 'json') {
1582
- throw new Error('Found escape character \\/.');
1583
- }
1578
+ function parseFileContent(fileContent) {
1584
1579
  // the YAML library can parse both YAML and JSON content, as well as content with singe/multiple YAMLs
1585
1580
  // by using this library we don't have to disambiguate between these different contents ourselves
1586
1581
  return YAML.parseAllDocuments(fileContent).map(function (doc) {