chore(deps): update linguist-js to 2.0 (#518)
This commit is contained in:
26
package-lock.json
generated
26
package-lock.json
generated
@@ -25,7 +25,7 @@
|
|||||||
"faker": "^5.5.3",
|
"faker": "^5.5.3",
|
||||||
"jimp": "^0.16.1",
|
"jimp": "^0.16.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"linguist-js": "^1.9.1",
|
"linguist-js": "^2.0.0",
|
||||||
"marked": "^3.0.0",
|
"marked": "^3.0.0",
|
||||||
"memory-cache": "^0.2.0",
|
"memory-cache": "^0.2.0",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
@@ -6382,9 +6382,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/linguist-js": {
|
"node_modules/linguist-js": {
|
||||||
"version": "1.9.1",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/linguist-js/-/linguist-js-1.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/linguist-js/-/linguist-js-2.0.0.tgz",
|
||||||
"integrity": "sha512-UMSJU7EOKqkAcRQydt+QCSrTFnHJxbRysb/h8Vx6hzkjpmnWBebzsqsWPgMUUdQSKOpaNDcs0fAg9cEjghCG9Q==",
|
"integrity": "sha512-DPEhkPd1fMIiNedUuSJy9rZiLAXt9mbaMVYa7Daoe5U7+4aZgMsZI7sQJh3PdT+ETRsdbVZ8UK2wNsoeE/smhw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"binary-extensions": "^2.2.0",
|
"binary-extensions": "^2.2.0",
|
||||||
"cross-fetch": "^3.1.4",
|
"cross-fetch": "^3.1.4",
|
||||||
@@ -9041,9 +9041,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tar": {
|
"node_modules/tar": {
|
||||||
"version": "6.1.7",
|
"version": "6.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
|
||||||
"integrity": "sha512-PBoRkOJU0X3lejJ8GaRCsobjXTgFofRDSPdSUhRSdlwJfifRlQBwGXitDItdGFu0/h0XDMCkig0RN1iT7DBxhA==",
|
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chownr": "^2.0.0",
|
"chownr": "^2.0.0",
|
||||||
@@ -14968,9 +14968,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"linguist-js": {
|
"linguist-js": {
|
||||||
"version": "1.9.1",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/linguist-js/-/linguist-js-1.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/linguist-js/-/linguist-js-2.0.0.tgz",
|
||||||
"integrity": "sha512-UMSJU7EOKqkAcRQydt+QCSrTFnHJxbRysb/h8Vx6hzkjpmnWBebzsqsWPgMUUdQSKOpaNDcs0fAg9cEjghCG9Q==",
|
"integrity": "sha512-DPEhkPd1fMIiNedUuSJy9rZiLAXt9mbaMVYa7Daoe5U7+4aZgMsZI7sQJh3PdT+ETRsdbVZ8UK2wNsoeE/smhw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"binary-extensions": "^2.2.0",
|
"binary-extensions": "^2.2.0",
|
||||||
"commander": "^8.1.0",
|
"commander": "^8.1.0",
|
||||||
@@ -17056,9 +17056,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
"version": "6.1.7",
|
"version": "6.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
|
||||||
"integrity": "sha512-PBoRkOJU0X3lejJ8GaRCsobjXTgFofRDSPdSUhRSdlwJfifRlQBwGXitDItdGFu0/h0XDMCkig0RN1iT7DBxhA==",
|
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chownr": "^2.0.0",
|
"chownr": "^2.0.0",
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
"faker": "^5.5.3",
|
"faker": "^5.5.3",
|
||||||
"jimp": "^0.16.1",
|
"jimp": "^0.16.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"linguist-js": "^1.9.1",
|
"linguist-js": "^2.0.0",
|
||||||
"marked": "^3.0.0",
|
"marked": "^3.0.0",
|
||||||
"memory-cache": "^0.2.0",
|
"memory-cache": "^0.2.0",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ export async function recent({login, data, imports, rest, account}, {skipped = [
|
|||||||
async function analyze({login, imports, data}, {results, path, categories = ["programming", "markup"]}) {
|
async function analyze({login, imports, data}, {results, path, categories = ["programming", "markup"]}) {
|
||||||
//Gather language data
|
//Gather language data
|
||||||
console.debug(`metrics/compute/${login}/plugins > languages > indepth > running linguist`)
|
console.debug(`metrics/compute/${login}/plugins > languages > indepth > running linguist`)
|
||||||
const {results:files, languages:languageResults} = await linguist(path)
|
const {files:{results:files}, languages:{results:languageResults}} = await linguist(path)
|
||||||
Object.assign(results.colors, Object.fromEntries(Object.entries(languageResults.all).map(([lang, {color}]) => [lang, color])))
|
Object.assign(results.colors, Object.fromEntries(Object.entries(languageResults).map(([lang, {color}]) => [lang, color])))
|
||||||
|
|
||||||
//Processing diff
|
//Processing diff
|
||||||
const per_page = 1
|
const per_page = 1
|
||||||
@@ -168,9 +168,7 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
|
|||||||
//File marker
|
//File marker
|
||||||
if (/^[+]{3}\sb[/](?<file>[\s\S]+)$/.test(line)) {
|
if (/^[+]{3}\sb[/](?<file>[\s\S]+)$/.test(line)) {
|
||||||
file = `${path}/${line.match(/^[+]{3}\sb[/](?<file>[\s\S]+)$/)?.groups?.file}`.replace(/\\/g, "/")
|
file = `${path}/${line.match(/^[+]{3}\sb[/](?<file>[\s\S]+)$/)?.groups?.file}`.replace(/\\/g, "/")
|
||||||
lang = files[file] ?? null
|
lang = categories.includes(languageResults[lang].type) && files[file] || null
|
||||||
if (["data", "markup", "programming", "prose"].map(type => categories.includes(type) && lang in languageResults[type]).filter(type => type).length === 0)
|
|
||||||
lang = null
|
|
||||||
edited.add(file)
|
edited.add(file)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user