From b599b30acdcfffc893ad93b7e1a9b32464be52b6 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sat, 19 Jan 2019 16:24:41 +0800 Subject: [PATCH 1/4] Force cheerio to use MarkBind's htmlparser2 --- package-lock.json => npm-shrinkwrap.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) rename package-lock.json => npm-shrinkwrap.json (99%) diff --git a/package-lock.json b/npm-shrinkwrap.json similarity index 99% rename from package-lock.json rename to npm-shrinkwrap.json index b1e97dd603..9e1d605e1a 100644 --- a/package-lock.json +++ b/npm-shrinkwrap.json @@ -837,6 +837,20 @@ "lodash.reduce": "^4.4.0", "lodash.reject": "^4.4.0", "lodash.some": "^4.4.0" + }, + "dependencies": { + "htmlparser2": { + "version": "3.9.2", + "resolved": "github:MarkBind/htmlparser2#815b507c5268a178fa24741d6f74fcc0bc9be4cd", + "requires": { + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + } } }, "chokidar": { From c2b2f95a778fca10faf119ea511eecee9734139b Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sat, 19 Jan 2019 16:25:14 +0800 Subject: [PATCH 2/4] Update npm-shrinkwrap.json --- npm-shrinkwrap.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 9e1d605e1a..b22c04c9a2 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2443,9 +2443,9 @@ "bundled": true, "optional": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "fs.realpath": { @@ -2583,7 +2583,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-typedarray": { @@ -2662,14 +2662,14 @@ "version": "2.1.15", "bundled": true, "requires": { - "mime-db": "1.27.0" + "mime-db": "~1.27.0" } }, "minimatch": { "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.7" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2760,8 +2760,8 @@ "bundled": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -6134,8 +6134,7 @@ "progress": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", - "dev": true + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" }, "proto-list": { "version": "1.2.4", From 0c3e2d2bbe8310b1376353fb4b2e2b563d8c41e1 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sat, 19 Jan 2019 17:34:52 +0800 Subject: [PATCH 3/4] debug --- test/test_site/testUtil/diffHtml.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_site/testUtil/diffHtml.js b/test/test_site/testUtil/diffHtml.js index db4fe2dd3f..f374df70aa 100644 --- a/test/test_site/testUtil/diffHtml.js +++ b/test/test_site/testUtil/diffHtml.js @@ -77,6 +77,7 @@ const diffHtml = (expected, actual) => { let insidePath = false; const diff = jsdiff.diffChars(expected, actual); + console.log(diff); const isDiff = part => part.added || part.removed; // assumes no space between paths From c865494554c8c20b690298749283cfdd9d8efee7 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sat, 19 Jan 2019 17:46:14 +0800 Subject: [PATCH 4/4] debug --- test/test_site/testUtil/diffHtml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_site/testUtil/diffHtml.js b/test/test_site/testUtil/diffHtml.js index f374df70aa..200c05f176 100644 --- a/test/test_site/testUtil/diffHtml.js +++ b/test/test_site/testUtil/diffHtml.js @@ -77,7 +77,6 @@ const diffHtml = (expected, actual) => { let insidePath = false; const diff = jsdiff.diffChars(expected, actual); - console.log(diff); const isDiff = part => part.added || part.removed; // assumes no space between paths @@ -96,6 +95,7 @@ const diffHtml = (expected, actual) => { } if (isDiff(part) && !insidePath) { + console.log(part); throw new Error(`Diff outside path!: '${part.value}'`); } else if (isDiff(part) && !isPathSeparatorDiff(part.value)) { throw new Error(`Diff in path!: '${part.value}'`);