@tryghost/mg-linkfixer 0.5.29 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/lib/LinkFixer.js +5 -3
- package/package.json +7 -7
package/LICENSE
CHANGED
package/README.md
CHANGED
package/lib/LinkFixer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {join} from 'node:path';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import cheerio from 'cheerio';
|
|
3
|
+
import * as cheerio from 'cheerio';
|
|
4
4
|
|
|
5
5
|
// @TODO: expand this list
|
|
6
6
|
const htmlFields = ['html'];
|
|
@@ -129,8 +129,10 @@ export default class LinkFixer {
|
|
|
129
129
|
|
|
130
130
|
async processHTML(html) {
|
|
131
131
|
let $ = cheerio.load(html, {
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
xml: {
|
|
133
|
+
decodeEntities: false,
|
|
134
|
+
scriptingEnabled: false
|
|
135
|
+
}
|
|
134
136
|
}, false); // This `false` is `isDocument`. If `true`, <html>, <head>, and <body> elements are introduced
|
|
135
137
|
|
|
136
138
|
let links = $('a').map(async (i, el) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-linkfixer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-linkfixer",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@tryghost/listr-smart-renderer": "0.5.
|
|
23
|
+
"@tryghost/listr-smart-renderer": "0.5.23",
|
|
24
24
|
"eslint": "8.57.0",
|
|
25
|
-
"jest": "30.0
|
|
26
|
-
"jest-extended": "
|
|
25
|
+
"jest": "30.2.0",
|
|
26
|
+
"jest-extended": "7.0.0",
|
|
27
27
|
"listr": "0.14.3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"cheerio": "1.
|
|
31
|
-
"lodash": "4.17.
|
|
30
|
+
"cheerio": "1.2.0",
|
|
31
|
+
"lodash": "4.17.23"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "ac9a868976ef5963df7fc2426af9e298bd5d8666"
|
|
34
34
|
}
|