purifai 1.0.0 → 2.0.0
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 +81 -49
- package/dist/index.cjs +282 -159
- package/dist/index.d.cts +80 -25
- package/dist/index.d.ts +80 -25
- package/dist/index.js +279 -159
- package/package.json +28 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "purifai",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Zero-dependency strip-to-text HTML sanitizer with contextual output encoding (HTML, attribute, URL). ~4.1KB gzipped, no DOM required - runs in Node, browsers and edge runtimes.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,21 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup index.ts --format cjs,esm --clean && pnpm run build:dts",
|
|
23
|
+
"build:dts": "tsc -p tsconfig.dts.json && node -e \"require('fs').copyFileSync('dist/index.d.ts','dist/index.d.cts')\"",
|
|
24
|
+
"test": "pnpm run build && node test/security-test.js && node test/regression-test.js && node test/fuzz-test.js && node test/fair-benchmark.js",
|
|
25
|
+
"test:fuzz": "node test/fuzz-test.js",
|
|
26
|
+
"test:security": "node test/security-test.js",
|
|
27
|
+
"test:regression": "node test/regression-test.js",
|
|
28
|
+
"test:bench": "node test/comprehensive-test.js",
|
|
29
|
+
"test:fair": "node test/fair-benchmark.js",
|
|
30
|
+
"test:perf": "node test/verify-performance.js",
|
|
31
|
+
"prepublishOnly": "pnpm run test",
|
|
32
|
+
"dev": "tsup index.ts --format cjs,esm --watch",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"test:browser": "node test/browser-verify.js"
|
|
35
|
+
},
|
|
21
36
|
"keywords": [
|
|
22
37
|
"sanitizer",
|
|
23
38
|
"xss",
|
|
@@ -53,13 +68,15 @@
|
|
|
53
68
|
"node": ">=14.0.0"
|
|
54
69
|
},
|
|
55
70
|
"devDependencies": {
|
|
56
|
-
"@types/node": "^
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
71
|
+
"@types/node": "^26.0.0",
|
|
72
|
+
"chalk": "^6.0.0",
|
|
73
|
+
"cli-table3": "^0.6.5",
|
|
74
|
+
"isomorphic-dompurify": "^3.19.0",
|
|
75
|
+
"jsdom": "^29.1.1",
|
|
76
|
+
"playwright-core": "^1.62.0",
|
|
77
|
+
"sanitize-html": "^2.17.6",
|
|
78
|
+
"tsup": "^8.5.1",
|
|
79
|
+
"typescript": "^7.0.2",
|
|
80
|
+
"xss": "^1.0.15"
|
|
64
81
|
}
|
|
65
|
-
}
|
|
82
|
+
}
|