Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): replace fix-utf8 with faster fix-latin1-to-utf8 #1784

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ updates:
# in their next major version so we can't use them
- dependency-name: file-type
update-types: ["version-update:semver-major"]
- dependency-name: fix-utf8
update-types: ["version-update:semver-major"]
- dependency-name: is-html
update-types: ["version-update:semver-major"]
open-pull-requests-limit: 20
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"javascript.updateImportsOnFileMove.enabled": "always",
"npm.packageManager": "npm",
"prettier.prettierPath": "./node_modules/prettier",
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"redhat.telemetry.enabled": false,
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
Expand Down
217 changes: 120 additions & 97 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@types/jest": "^29.5.11",
"autocannon": "^7.14.0",
"esbuild": "^0.19.8",
"esbuild": "^0.20.0",
"esbuild-plugin-glob": "^2.2.3",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
Expand Down Expand Up @@ -125,7 +125,7 @@
"fastify-plugin": "^4.5.1",
"file-stream-rotator": "^1.0.0",
"file-type": "^16.5.4",
"fix-utf8": "^1.2.1",
"fix-latin1-to-utf8": "^1.0.1",
"fluent-json-schema": "^4.2.1",
"glob": "^10.3.10",
"html-minifier-terser": "^7.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/docx-to-html/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const { randomUUID } = require("node:crypto");
const fixUtf8 = require("fix-utf8");
const { fixLatin1ToUtf8: fixUtf8 } = require("fix-latin1-to-utf8");
const fp = require("fastify-plugin");
const { JSDOM } = require("jsdom");
const { convertToHtml } = require("mammoth");
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const { randomUUID } = require("node:crypto");
const { mkdir, readFile, unlink } = require("node:fs/promises");
const fixUtf8 = require("fix-utf8");
const { fixLatin1ToUtf8: fixUtf8 } = require("fix-latin1-to-utf8");
const fp = require("fastify-plugin");
const { glob } = require("glob");
const { JSDOM } = require("jsdom");
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getConfig = require("../../config");

/**
* Used to check that common incorrectly converted Windows-1252
* to UTF-8 values are removed by the `fix-utf8` module.
* to UTF-8 values are removed by the `fix-latin1-to-utf8` module.
*/
const artifacts =
/€|â€[šž¦¡°¹˜™œ¢“”]|Æ’|Ë[†œ]|Å[½¡¾¸]|Â[¯·´°]|ï‚·|√|[�Â]|Ã[‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿]|â‰[¤¥]|Ã|â€/gu;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-txt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const { randomUUID } = require("node:crypto");
const { mkdir, unlink } = require("node:fs/promises");
const fixUtf8 = require("fix-utf8");
const { fixLatin1ToUtf8: fixUtf8 } = require("fix-latin1-to-utf8");
const fp = require("fastify-plugin");
const { glob } = require("glob");
const { JSDOM } = require("jsdom");
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const { randomUUID } = require("node:crypto");
const { mkdir, rm, unlink, writeFile } = require("node:fs/promises");
const fixUtf8 = require("fix-utf8");
const { fixLatin1ToUtf8: fixUtf8 } = require("fix-latin1-to-utf8");
const fp = require("fastify-plugin");
const { glob } = require("glob");
const { JSDOM } = require("jsdom");
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getConfig = require("../../config");

/**
* Used to check that common incorrectly converted Windows-1252
* to UTF-8 values are removed by the `fix-utf8` module.
* to UTF-8 values are removed by the fix-latin1-to-utf8` module.
*/
const artifacts =
/€|â€[šž¦¡°¹˜™œ¢“”]|Æ’|Ë[†œ]|Å[½¡¾¸]|Â[¯·´°]|ï‚·|√|[�Â]|Ã[‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿]|â‰[¤¥]|Ã|â€/gu;
Expand Down