From 3f797dbe80707670b2e41d82a8ed28fc78f4d765 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 23 Oct 2020 11:57:55 +0200
Subject: [PATCH] chore(deps): update dependency @types/js-yaml to v3.12.5
 (#6614)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
---
 lib/datasource/helm/index.ts             |  3 +-
 lib/manager/docker-compose/extract.ts    |  3 +-
 lib/manager/gitlabci-include/extract.ts  |  3 +-
 lib/manager/helm-requirements/extract.ts |  3 +-
 lib/manager/helm-values/extract.ts       |  3 +-
 lib/manager/helmv3/extract.ts            |  3 +-
 lib/manager/pub/extract.ts               |  3 +-
 package.json                             |  2 +-
 yarn.lock                                | 44 ++++--------------------
 9 files changed, 21 insertions(+), 46 deletions(-)

diff --git a/lib/datasource/helm/index.ts b/lib/datasource/helm/index.ts
index e9493d5741..8e9d34aee7 100644
--- a/lib/datasource/helm/index.ts
+++ b/lib/datasource/helm/index.ts
@@ -1,3 +1,4 @@
+import is from '@sindresorhus/is';
 import yaml from 'js-yaml';
 
 import { logger } from '../../logger';
@@ -49,7 +50,7 @@ export async function getRepositoryData(
   }
   try {
     const doc = yaml.safeLoad(res.body, { json: true });
-    if (!doc) {
+    if (!is.plainObject<Record<string, unknown>>(doc)) {
       logger.warn(`Failed to parse index.yaml from ${repository}`);
       return null;
     }
diff --git a/lib/manager/docker-compose/extract.ts b/lib/manager/docker-compose/extract.ts
index e210d0e463..88adf9f278 100644
--- a/lib/manager/docker-compose/extract.ts
+++ b/lib/manager/docker-compose/extract.ts
@@ -46,7 +46,8 @@ export function extractPackageFile(
   logger.debug('docker-compose.extractPackageFile()');
   let config: DockerComposeConfig;
   try {
-    config = safeLoad(content, { json: true });
+    // TODO: fix me
+    config = safeLoad(content, { json: true }) as unknown;
     if (!config) {
       logger.debug(
         { fileName },
diff --git a/lib/manager/gitlabci-include/extract.ts b/lib/manager/gitlabci-include/extract.ts
index 5deb943ec3..702081356d 100644
--- a/lib/manager/gitlabci-include/extract.ts
+++ b/lib/manager/gitlabci-include/extract.ts
@@ -40,7 +40,8 @@ export async function extractPackageFile(
 ): Promise<PackageFile | null> {
   const deps: PackageDependency[] = [];
   try {
-    const doc = yaml.safeLoad(content, { json: true });
+    // TODO: fix me
+    const doc = yaml.safeLoad(content, { json: true }) as any;
     if (doc?.include && is.array(doc.include)) {
       for (const includeObj of doc.include) {
         if (includeObj.file && includeObj.project) {
diff --git a/lib/manager/helm-requirements/extract.ts b/lib/manager/helm-requirements/extract.ts
index 7ebd542a38..a43a3c89b2 100644
--- a/lib/manager/helm-requirements/extract.ts
+++ b/lib/manager/helm-requirements/extract.ts
@@ -18,7 +18,8 @@ export async function extractPackageFile(
       logger.debug({ fileName }, 'Failed to find helm Chart.yaml');
       return null;
     }
-    const chart = yaml.safeLoad(chartContents, { json: true });
+    // TODO: fix me
+    const chart = yaml.safeLoad(chartContents, { json: true }) as any;
     if (!(chart?.apiVersion && chart.name && chart.version)) {
       logger.debug(
         { fileName },
diff --git a/lib/manager/helm-values/extract.ts b/lib/manager/helm-values/extract.ts
index bdaab75161..26f3f22863 100644
--- a/lib/manager/helm-values/extract.ts
+++ b/lib/manager/helm-values/extract.ts
@@ -56,7 +56,8 @@ export function extractPackageFile(content: string): PackageFile {
   try {
     // a parser that allows extracting line numbers would be preferable, with
     // the current approach we need to match anything we find again during the update
-    parsedContent = yaml.safeLoad(content, { json: true });
+    // TODO: fix me
+    parsedContent = yaml.safeLoad(content, { json: true }) as any;
   } catch (err) {
     logger.debug({ err }, 'Failed to parse helm-values YAML');
     return null;
diff --git a/lib/manager/helmv3/extract.ts b/lib/manager/helmv3/extract.ts
index 01ae9f4bdd..f81f075a56 100644
--- a/lib/manager/helmv3/extract.ts
+++ b/lib/manager/helmv3/extract.ts
@@ -17,7 +17,8 @@ export function extractPackageFile(
     dependencies: Array<{ name: string; version: string; repository: string }>;
   };
   try {
-    chart = yaml.safeLoad(content, { json: true });
+    // TODO: fix me
+    chart = yaml.safeLoad(content, { json: true }) as any;
     if (!(chart?.apiVersion && chart.name && chart.version)) {
       logger.debug(
         { fileName },
diff --git a/lib/manager/pub/extract.ts b/lib/manager/pub/extract.ts
index 3b447c147e..44098f1cf5 100644
--- a/lib/manager/pub/extract.ts
+++ b/lib/manager/pub/extract.ts
@@ -44,7 +44,8 @@ export function extractPackageFile(
   packageFile: string
 ): PackageFile | null {
   try {
-    const doc = safeLoad(content, { json: true });
+    // TODO: fix me
+    const doc = safeLoad(content, { json: true }) as any;
     const deps = [
       ...getDeps(doc.dependencies, {
         depType: 'dependencies',
diff --git a/package.json b/package.json
index c9db0c1d3b..85d195c163 100644
--- a/package.json
+++ b/package.json
@@ -201,7 +201,7 @@
     "@types/global-agent": "2.1.0",
     "@types/ini": "1.3.30",
     "@types/jest": "26.0.15",
-    "@types/js-yaml": "3.12.4",
+    "@types/js-yaml": "3.12.5",
     "@types/jsdom": "16.2.4",
     "@types/json-dup-key-validator": "1.0.0",
     "@types/json5": "0.0.30",
diff --git a/yarn.lock b/yarn.lock
index 2ed0cf01db..0452d1c3ea 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1653,10 +1653,10 @@
     jest-diff "^26.0.0"
     pretty-format "^26.0.0"
 
-"@types/js-yaml@3.12.4":
-  version "3.12.4"
-  resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.4.tgz#7d3b534ec35a0585128e2d332db1403ebe057e25"
-  integrity sha512-fYMgzN+9e28R81weVN49inn/u798ruU91En1ZnGvSZzCRc5jXx9B2EDhlRaWmcO1RIxFHL8AajRXzxDuJu93+A==
+"@types/js-yaml@3.12.5":
+  version "3.12.5"
+  resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.5.tgz#136d5e6a57a931e1cce6f9d8126aa98a9c92a6bb"
+  integrity sha512-JCcp6J0GV66Y4ZMDAQCXot4xprYB+Zfd3meK9+INSJeVZwJmHAW30BBEEkPzXswMXuiyReUGOP3GxrADc9wPww==
 
 "@types/jsdom@16.2.4":
   version "16.2.4"
@@ -3509,7 +3509,7 @@ debug@^3.1.0:
   dependencies:
     ms "^2.1.1"
 
-debuglog@*, debuglog@^1.0.1:
+debuglog@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
   integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -5135,7 +5135,7 @@ import-local@^3.0.2:
     pkg-dir "^4.2.0"
     resolve-cwd "^3.0.0"
 
-imurmurhash@*, imurmurhash@^0.1.4:
+imurmurhash@^0.1.4:
   version "0.1.4"
   resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
   integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -6575,11 +6575,6 @@ lockfile@^1.0.4:
   dependencies:
     signal-exit "^3.0.2"
 
-lodash._baseindexof@*:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
-  integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
-
 lodash._baseuniq@~4.6.0:
   version "4.6.0"
   resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -6588,33 +6583,11 @@ lodash._baseuniq@~4.6.0:
     lodash._createset "~4.0.0"
     lodash._root "~3.0.0"
 
-lodash._bindcallback@*:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
-  integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
-
-lodash._cacheindexof@*:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
-  integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
-
-lodash._createcache@*:
-  version "3.1.2"
-  resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
-  integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
-  dependencies:
-    lodash._getnative "^3.0.0"
-
 lodash._createset@~4.0.0:
   version "4.0.3"
   resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
   integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
 
-lodash._getnative@*, lodash._getnative@^3.0.0:
-  version "3.9.1"
-  resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
-  integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
-
 lodash._reinterpolate@^3.0.0:
   version "3.0.0"
   resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -6660,11 +6633,6 @@ lodash.isstring@^4.0.1:
   resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
   integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=
 
-lodash.restparam@*:
-  version "3.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
-  integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
-
 lodash.set@^4.3.2:
   version "4.3.2"
   resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
-- 
GitLab