cheerio-to-text 0.2.4 → 0.2.5
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/README.md +2 -2
- package/lib/index.js +1 -2
- package/package.json +13 -32
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.render =
|
|
17
|
+
exports.render = render;
|
|
18
18
|
var cheerio_1 = __importDefault(require("cheerio"));
|
|
19
19
|
var inlineElements = new Set("a,abbr,acronym,audio,b,bdi,bdo,big,br,button,canvas,cite,code,data,\n datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,label,map,mark,\n meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,\n select,slot,small,span,strong,sub,sup,svg,template,textarea,time,\n tt,u,var,video,wbr"
|
|
20
20
|
.split(",")
|
|
@@ -56,7 +56,6 @@ function render(node) {
|
|
|
56
56
|
.filter(Boolean)
|
|
57
57
|
.join("\n");
|
|
58
58
|
}
|
|
59
|
-
exports.render = render;
|
|
60
59
|
function walk(root, enter, leave) {
|
|
61
60
|
var e_1, _a;
|
|
62
61
|
enter(root);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cheerio-to-text",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Turn a Cheerio object into plain text",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"import": "./lib/esm/index.js"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"test": "npm run test:
|
|
24
|
-
"test:
|
|
23
|
+
"test": "npm run test:test && npm run lint",
|
|
24
|
+
"test:test": "node --import tsx --test test/*.ts",
|
|
25
25
|
"lint": "npm run lint:es && npm run lint:prettier",
|
|
26
26
|
"lint:es": "eslint src",
|
|
27
27
|
"lint:prettier": "npm run prettier -- --check",
|
|
28
28
|
"format": "npm run format:es && npm run format:prettier",
|
|
29
29
|
"format:es": "npm run lint:es -- --fix",
|
|
30
30
|
"format:prettier": "npm run prettier -- --write",
|
|
31
|
-
"prettier": "prettier '**/*.{ts,md,json,yml}'",
|
|
31
|
+
"prettier": "prettier '**/*.{ts,md,json,yml,mjs}'",
|
|
32
32
|
"build:watch": "tsc --watch",
|
|
33
33
|
"build": "npm run build:cjs && npm run build:esm",
|
|
34
34
|
"build:cjs": "tsc",
|
|
@@ -43,35 +43,16 @@
|
|
|
43
43
|
],
|
|
44
44
|
"author": "Peter Bengtsson",
|
|
45
45
|
"license": "MIT",
|
|
46
|
-
"jest": {
|
|
47
|
-
"preset": "ts-jest",
|
|
48
|
-
"testEnvironment": "node",
|
|
49
|
-
"testMatch": [
|
|
50
|
-
"<rootDir>/test/*.ts"
|
|
51
|
-
],
|
|
52
|
-
"reporters": [
|
|
53
|
-
"default",
|
|
54
|
-
[
|
|
55
|
-
"jest-junit",
|
|
56
|
-
{
|
|
57
|
-
"suiteName": "jest tests"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
46
|
"devDependencies": {
|
|
63
|
-
"@types/
|
|
64
|
-
"@
|
|
65
|
-
"@typescript-eslint/
|
|
66
|
-
"
|
|
67
|
-
"eslint": "
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"prettier": "3.0.3",
|
|
73
|
-
"ts-jest": "29.1.1",
|
|
74
|
-
"typescript": "5.2.2"
|
|
47
|
+
"@types/node": "24.10.1",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "8.49.0",
|
|
49
|
+
"@typescript-eslint/parser": "8.49.0",
|
|
50
|
+
"eslint": "9.39.1",
|
|
51
|
+
"eslint-config-prettier": "10.1.8",
|
|
52
|
+
"np": "10.2.0",
|
|
53
|
+
"prettier": "3.7.4",
|
|
54
|
+
"tsx": "4.21.0",
|
|
55
|
+
"typescript": "5.9.3"
|
|
75
56
|
},
|
|
76
57
|
"peerDependencies": {
|
|
77
58
|
"cheerio": "1.0.0-rc.12"
|