update linguist package

This commit is contained in:
tdurieux
2021-04-26 06:18:31 +02:00
parent 559badad02
commit 3501da773f
+3 -3
View File
@@ -3,7 +3,7 @@ const fs = require("fs").promises;
const path = require("path"); const path = require("path");
const { Octokit } = require("@octokit/rest"); const { Octokit } = require("@octokit/rest");
const gh = require("parse-github-url"); const gh = require("parse-github-url");
const loc = require("@umijs/linguist"); const loc = require("github-linguist").default;
const { isText } = require("istextorbinary"); const { isText } = require("istextorbinary");
const db = require("./database"); const db = require("./database");
@@ -464,8 +464,8 @@ module.exports.getStats = async (options) => {
} catch (error) { } catch (error) {
throw "repo_not_found"; throw "repo_not_found";
} }
const o = loc(repoCache); const o = await loc(repoCache);
delete o.files;
await db.get("anonymized_repositories").updateOne( await db.get("anonymized_repositories").updateOne(
{ repoId: repoConfig.repoId }, { repoId: repoConfig.repoId },
{ {