From e3245f8878947276d7ca50adee5053efe2eda109 Mon Sep 17 00:00:00 2001 From: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:14:02 +0800 Subject: [PATCH] fix: remove patch script No longer required since mysql2@3.6.5 see: https://github.com/sidorares/node-mysql2/pull/2292 Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> --- package.json | 3 +-- patches/mysql2+3.6.3.patch | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 patches/mysql2+3.6.3.patch diff --git a/package.json b/package.json index 9a4868e..7449b58 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "pretest": "node pretest.js", "lint": "eslint .", "test": "mocha test/*.test.js", - "posttest": "npm run lint", - "postinstall": "patch-package" + "posttest": "npm run lint" }, "files": [ "intl", diff --git a/patches/mysql2+3.6.3.patch b/patches/mysql2+3.6.3.patch deleted file mode 100644 index 1c49fc2..0000000 --- a/patches/mysql2+3.6.3.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/node_modules/mysql2/lib/connection_config.js b/node_modules/mysql2/lib/connection_config.js -index ec52051..52ddc36 100644 ---- a/node_modules/mysql2/lib/connection_config.js -+++ b/node_modules/mysql2/lib/connection_config.js -@@ -260,11 +260,11 @@ class ConnectionConfig { - static parseUrl(url) { - const parsedUrl = new URL(url); - const options = { -- host: parsedUrl.hostname, -+ host: decodeURIComponent(parsedUrl.hostname), - port: parseInt(parsedUrl.port, 10), -- database: parsedUrl.pathname.slice(1), -- user: parsedUrl.username, -- password: parsedUrl.password -+ database: decodeURIComponent(parsedUrl.pathname.slice(1)), -+ user: decodeURIComponent(parsedUrl.username), -+ password: decodeURIComponent(parsedUrl.password) - }; - parsedUrl.searchParams.forEach((value, key) => { - try {