Skip to content

Commit

Permalink
chore(deps): update dependency @types/js-yaml to v3.12.5 (renovatebot…
Browse files Browse the repository at this point in the history
…#6614)


Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Michael Kriese <[email protected]>
  • Loading branch information
3 people authored Oct 23, 2020
1 parent 496314b commit 3f797db
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 46 deletions.
3 changes: 2 additions & 1 deletion lib/datasource/helm/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import is from '@sindresorhus/is';
import yaml from 'js-yaml';

import { logger } from '../../logger';
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/docker-compose/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/gitlabci-include/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/helm-requirements/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/helm-values/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/helmv3/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/pub/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
44 changes: 6 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1653,10 +1653,10 @@
jest-diff "^26.0.0"
pretty-format "^26.0.0"

"@types/[email protected].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/[email protected].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/[email protected]":
version "16.2.4"
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 3f797db

Please sign in to comment.