From: Justin Wind Date: Mon, 6 Sep 2021 20:10:38 +0000 (-0700) Subject: update dependencies and devDependencies, fix issue with updated html parser not wanti... X-Git-Tag: v1.2.1^2~3 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fddda3a0f044d889dfa70781d2f415f2d5f64169;p=websub-hub update dependencies and devDependencies, fix issue with updated html parser not wanting a buffer --- diff --git a/package-lock.json b/package-lock.json index 002506d..1d7a47a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -745,11 +745,11 @@ "dev": true }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" } }, "balanced-match": { @@ -1161,17 +1161,17 @@ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" }, "domhandler": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", - "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", "requires": { "domelementtype": "^2.2.0" } }, "domutils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", - "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "requires": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", @@ -1549,9 +1549,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==" + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", + "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" }, "foreground-child": { "version": "2.0.0", @@ -1771,13 +1771,13 @@ "dev": true }, "htmlparser2": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.0.0.tgz", - "integrity": "sha512-IhdltX9BWhYQft4UPA92jFasNajskja0om6vU0DaIEL4OseCg5zE+mHAMr51AT89TbzzECrQWJ4CZ5NVYTPlKw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.1.1.tgz", + "integrity": "sha512-hZb0lfG0hbhR/hB879zbBr8Opv0Be9Zp+JYHgqTw5epF++aotu/zmMTPLy/60iJyR1MaD/3pYRp7xYteXsZMEA==", "requires": { "domelementtype": "^2.0.1", "domhandler": "^4.0.0", - "domutils": "^2.5.2", + "domutils": "^2.8.0", "entities": "^3.0.1" } }, @@ -2236,9 +2236,9 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "mocha": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.0.tgz", - "integrity": "sha512-Kjg/XxYOFFUi0h/FwMOeb6RoroiZ+P1yOfya6NK7h3dNhahrJx1r2XIT3ge4ZQvJM86mdjNA+W5phqRQh7DwCg==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", @@ -3450,9 +3450,9 @@ } }, "tar": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", - "integrity": "sha512-oaWyu5dQbHaYcyZCTfyPpC+VmI62/OM2RTUYavTk1MDr1cwW5Boi3baeYQKiZbY2uSQJGr+iMOzb/JFxLrft+g==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", diff --git a/package.json b/package.json index a16ad0e..a76b7d5 100644 --- a/package.json +++ b/package.json @@ -35,10 +35,10 @@ "@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.1.0", "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.0", "argon2": "^0.28.2", - "axios": "^0.21.1", + "axios": "^0.21.4", "better-sqlite3": "^7.4.3", "feedparser": "^2.2.10", - "htmlparser2": "^7.0.0", + "htmlparser2": "^7.1.1", "iconv": "^3.0.0", "pg-promise": "^10.11.0" }, @@ -47,7 +47,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.10.0", - "mocha": "^9.1.0", + "mocha": "^9.1.1", "mocha-steps": "^1.3.0", "nyc": "^15.1.0", "pre-commit": "^1.2.2", diff --git a/src/link-helper.js b/src/link-helper.js index 2b6a833..93a947b 100644 --- a/src/link-helper.js +++ b/src/link-helper.js @@ -60,7 +60,7 @@ class LinkHelper { if (nonUTF8Charset) { const iconv = new Iconv(nonUTF8Charset, 'utf-8//translit//ignore'); try { - body = iconv.convert(body); + body = iconv.convert(body).toString('utf8'); } catch (e) { /* istanbul ignore next */ this.logger.error(_scope, 'iconv conversion error', { error: e, contentType, url });