dompurify 3.0.1 → 3.2.7

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/package.json CHANGED
@@ -1,25 +1,48 @@
1
1
  {
2
2
  "scripts": {
3
- "lint": "xo src/*.js",
3
+ "lint": "xo src/*.ts",
4
4
  "format": "npm run format:js && npm run format:md",
5
5
  "format:md": "prettier --write --parser markdown '**/*.md'",
6
- "format:js": "prettier --write '{src,demos,scripts,test,website}/*.js'",
6
+ "format:js": "prettier --write '{src,demos,scripts,test,website}/*.{js,ts}'",
7
7
  "commit-amend-build": "scripts/commit-amend-build.sh",
8
8
  "prebuild": "rimraf dist/**",
9
9
  "dev": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -w -c -o dist/purify.js",
10
- "build": "cross-env run-p build:umd build:umd:min build:es build:cjs",
11
- "build:umd": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f umd -o dist/purify.js",
12
- "build:umd:min": "cross-env NODE_ENV=production BABEL_ENV=rollup rollup -c -f umd -o dist/purify.min.js",
13
- "build:es": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f es -o dist/purify.es.js",
14
- "build:cjs": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f cjs -o dist/purify.cjs.js",
10
+ "build": "run-s build:types build:rollup build:fix-types build:cleanup",
11
+ "build:types": "tsc --outDir dist/types --declaration --emitDeclarationOnly",
12
+ "build:rollup": "rollup -c",
13
+ "build:fix-types": "node ./scripts/fix-types.js",
14
+ "build:umd": "rollup -c -f umd -o dist/purify.js",
15
+ "build:umd:min": "rollup -c -f umd -o dist/purify.min.js -p terser",
16
+ "build:es": "rollup -c -f es -o dist/purify.es.mjs",
17
+ "build:cjs": "rollup -c -f cjs -o dist/purify.cjs.js",
18
+ "build:cleanup": "rimraf dist/types",
15
19
  "test:jsdom": "cross-env NODE_ENV=test BABEL_ENV=rollup node test/jsdom-node-runner --dot",
16
20
  "test:karma": "cross-env NODE_ENV=test BABEL_ENV=rollup karma start test/karma.conf.js --log-level warn ",
17
21
  "test:ci": "cross-env NODE_ENV=test BABEL_ENV=rollup npm run test:jsdom && npm run test:karma -- --log-level error --reporters dots --single-run --shouldTestOnBrowserStack=\"${TEST_BROWSERSTACK}\" --shouldProbeOnly=\"${TEST_PROBE_ONLY}\"",
18
- "test": "cross-env NODE_ENV=test BABEL_ENV=rollup npm run lint && npm run test:jsdom && npm run test:karma -- --browsers Chrome"
22
+ "test": "cross-env NODE_ENV=test BABEL_ENV=rollup npm run lint && npm run test:jsdom && npm run test:karma -- --browsers Chrome",
23
+ "verify-typescript": "node ./typescript/verify.js"
24
+ },
25
+ "main": "./dist/purify.cjs.js",
26
+ "module": "./dist/purify.es.mjs",
27
+ "browser": "./dist/purify.js",
28
+ "production": "./dist/purify.min.js",
29
+ "types": "./dist/purify.cjs.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "import": {
33
+ "types": "./dist/purify.es.d.mts",
34
+ "default": "./dist/purify.es.mjs"
35
+ },
36
+ "default": {
37
+ "types": "./dist/purify.cjs.d.ts",
38
+ "default": "./dist/purify.cjs.js"
39
+ }
40
+ },
41
+ "./purify.min.js": "./dist/purify.min.js",
42
+ "./purify.js": "./dist/purify.js",
43
+ "./dist/purify.min.js": "./dist/purify.min.js",
44
+ "./dist/purify.js": "./dist/purify.js"
19
45
  },
20
- "main": "dist/purify.cjs.js",
21
- "module": "dist/purify.es.js",
22
- "browser": "dist/purify.js",
23
46
  "files": [
24
47
  "dist"
25
48
  ],
@@ -53,22 +76,39 @@
53
76
  {
54
77
  "properties": "never"
55
78
  }
56
- ]
79
+ ],
80
+ "@typescript-eslint/ban-types": 0,
81
+ "@typescript-eslint/consistent-type-definitions": 0,
82
+ "@typescript-eslint/indent": 0,
83
+ "@typescript-eslint/naming-convention": 0,
84
+ "@typescript-eslint/no-throw-literal": 0,
85
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": 0,
86
+ "@typescript-eslint/no-unsafe-argument": 0,
87
+ "@typescript-eslint/no-unsafe-assignment": 0,
88
+ "@typescript-eslint/no-unsafe-call": 0,
89
+ "@typescript-eslint/no-unsafe-return": 0,
90
+ "@typescript-eslint/prefer-includes": 0,
91
+ "@typescript-eslint/prefer-optional-chain": 0,
92
+ "@typescript-eslint/prefer-nullish-coalescing": 0,
93
+ "@typescript-eslint/restrict-plus-operands": 0
57
94
  },
58
95
  "globals": [
59
96
  "window",
60
97
  "VERSION"
61
98
  ]
62
99
  },
100
+ "optionalDependencies": {
101
+ "@types/trusted-types": "^2.0.7"
102
+ },
63
103
  "devDependencies": {
64
104
  "@babel/core": "^7.17.8",
65
105
  "@babel/preset-env": "^7.16.11",
66
- "@rollup/plugin-babel": "^5.3.1",
67
- "@rollup/plugin-commonjs": "^21.0.3",
68
- "@rollup/plugin-node-resolve": "^13.1.3",
69
- "@rollup/plugin-replace": "^4.0.0",
70
- "@types/dompurify": "^2.3.3",
106
+ "@rollup/plugin-babel": "^6.0.4",
107
+ "@rollup/plugin-node-resolve": "^15.3.0",
108
+ "@rollup/plugin-replace": "^6.0.1",
109
+ "@rollup/plugin-terser": "^0.4.4",
71
110
  "@types/estree": "^1.0.0",
111
+ "@types/node": "^16.18.120",
72
112
  "cross-env": "^7.0.3",
73
113
  "eslint-config-prettier": "^8.5.0",
74
114
  "eslint-plugin-prettier": "^4.0.0",
@@ -88,17 +128,20 @@
88
128
  "qunit": "^2.4.1",
89
129
  "qunit-tap": "^1.5.0",
90
130
  "rimraf": "^3.0.2",
91
- "rollup": "^2.70.1",
92
- "rollup-plugin-includepaths": "^0.2.3",
93
- "rollup-plugin-terser": "^7.0.2",
94
- "xo": "^0.48.0"
131
+ "rollup": "^3.29.5",
132
+ "rollup-plugin-dts": "^6.1.1",
133
+ "rollup-plugin-includepaths": "^0.2.4",
134
+ "rollup-plugin-typescript2": "^0.36.0",
135
+ "tslib": "^2.7.0",
136
+ "typescript": "^5.6.3",
137
+ "xo": "^0.54.1"
95
138
  },
96
139
  "resolutions": {
97
140
  "natives": "1.1.6"
98
141
  },
99
142
  "name": "dompurify",
100
143
  "description": "DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It's written in JavaScript and works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Firefox and Chrome - as well as almost anything else using Blink or WebKit). DOMPurify is written by security people who have vast background in web attacks and XSS. Fear not.",
101
- "version": "3.0.1",
144
+ "version": "3.2.7",
102
145
  "directories": {
103
146
  "test": "test"
104
147
  },