⬆️ bump dependencies

This commit is contained in:
platane
2022-03-23 16:57:51 +01:00
parent b4e8fc83ef
commit b7298f7ff7
11 changed files with 543 additions and 495 deletions

View File

@@ -1,5 +1,5 @@
import fetch from "node-fetch";
import cheerio from "cheerio";
import * as cheerio from "cheerio";
import { formatParams, Options } from "./formatParams";
/**
@@ -100,10 +100,12 @@ const parseUserPage = (content: string) => {
// returns the position of the svg elements, accounting for it's transform and it's parent transform
// ( only accounts for translate transform )
const getSvgPosition = (e: cheerio.Element): { x: number; y: number } => {
const getSvgPosition = (
e: cheerio.Element | null
): { x: number; y: number } => {
if (!e || e.tagName === "svg") return { x: 0, y: 0 };
const p = getSvgPosition(e.parent);
const p = getSvgPosition(e.parent as cheerio.Element);
if (e.attribs.x) p.x += +e.attribs.x;
if (e.attribs.y) p.y += +e.attribs.y;

View File

@@ -2,11 +2,10 @@
"name": "@snk/github-user-contribution",
"version": "1.0.0",
"dependencies": {
"cheerio": "~1.0.0-rc.5",
"cheerio": "1.0.0-rc.10",
"node-fetch": "2.6.1"
},
"devDependencies": {
"@types/cheerio": "0.22.22",
"@types/node-fetch": "2.5.10"
"@types/node-fetch": "2.6.1"
}
}