dompurify 0.9.0 → 1.0.3

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,48 +1,108 @@
1
1
  {
2
2
  "scripts": {
3
3
  "build-demo": "node scripts/build-demo.js",
4
- "lint": "jshint src/purify.js",
5
- "minify": "scripts/minify.sh",
6
- "amend-minified": "scripts/amend-minified.sh",
7
- "test:jsdom": "node test/jsdom-node-runner --dot",
8
- "test:karma": "karma start test/karma.conf.js --log-level warn --single-run",
9
- "test:ci": "npm run lint && npm run test:jsdom && (([ \"${TRAVIS_PULL_REQUEST}\" != \"false\" ] || [ \"${TEST_BROWSERSTACK}\" != \"true\" ]) || karma start test/karma.conf.js --log-level error --reporters dots --single-run)",
10
- "test": "npm run lint && npm run test:jsdom && npm run test:karma -- --browsers Firefox,Chrome"
4
+ "lint": "xo src/*.js",
5
+ "format": "prettier --write --trailing-comma es5 --single-quote 'src/*.js'",
6
+ "commit-amend-build": "scripts/commit-amend-build.sh",
7
+ "prebuild": "rimraf dist/**",
8
+ "dev": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -w -c -o dist/purify.js",
9
+ "build": "cross-env run-p build:umd build:umd:min build:es build:cjs",
10
+ "build:umd": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f umd -o dist/purify.js",
11
+ "build:umd:min": "cross-env NODE_ENV=production BABEL_ENV=rollup rollup -c -f umd -o dist/purify.min.js",
12
+ "build:es": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f es -o dist/purify.es.js",
13
+ "build:cjs": "cross-env NODE_ENV=development BABEL_ENV=rollup rollup -c -f cjs -o dist/purify.cjs.js",
14
+ "test:jsdom": "cross-env NODE_ENV=test BABEL_ENV=rollup node test/jsdom-node-runner --dot",
15
+ "test:karma": "cross-env NODE_ENV=test BABEL_ENV=rollup karma start test/karma.conf.js --log-level warn ",
16
+ "test:ci": "cross-env NODE_ENV=test BABEL_ENV=rollup npm run lint && npm run test:jsdom && npm run test:karma -- --log-level error --reporters dots --single-run --shouldTestOnBrowserStack=\"${TEST_BROWSERSTACK}\" --shouldProbeOnly=\"${TRAVIS_PULL_REQUEST}\"",
17
+ "test": "cross-env NODE_ENV=test BABEL_ENV=rollup npm run lint && npm run test:jsdom && npm run test:karma -- --browsers Chrome"
11
18
  },
19
+ "main": "dist/purify.cjs.js",
20
+ "module": "dist/purify.es.js",
21
+ "browser": "dist/purify.js",
12
22
  "files": [
13
- "src",
14
- "dist"
23
+ "dist",
24
+ "package.json",
25
+ "yarn.lock",
26
+ "package-lock.json",
27
+ "README.md"
15
28
  ],
16
29
  "pre-commit": [
17
30
  "lint",
18
- "minify",
19
- "amend-minified"
31
+ "build",
32
+ "commit-amend-build"
20
33
  ],
34
+ "xo": {
35
+ "semicolon": true,
36
+ "space": 2,
37
+ "extends": [
38
+ "prettier"
39
+ ],
40
+ "plugins": [
41
+ "prettier"
42
+ ],
43
+ "rules": {
44
+ "prettier/prettier": [
45
+ "error",
46
+ {
47
+ "trailingComma": "es5",
48
+ "singleQuote": true
49
+ }
50
+ ],
51
+ "camelcase": [
52
+ "error",
53
+ {
54
+ "properties": "never"
55
+ }
56
+ ]
57
+ },
58
+ "globals": [
59
+ "window",
60
+ "VERSION"
61
+ ]
62
+ },
21
63
  "devDependencies": {
64
+ "babel": "^6.23.0",
65
+ "babel-core": "^6.26.0",
66
+ "babel-plugin-external-helpers": "^6.22.0",
67
+ "babel-preset-env": "^1.6.0",
68
+ "cross-env": "^5.0.5",
69
+ "eslint-config-prettier": "^2.6.0",
70
+ "eslint-plugin-prettier": "^2.3.1",
71
+ "he": "^1.1.1",
22
72
  "jquery": "^2.2.3",
23
73
  "jsdom": "8.x.x",
24
- "jshint": "^2.9.2",
25
- "json-loader": "^0.5.4",
26
- "karma": "^0.13.22",
27
- "karma-browserstack-launcher": "1.0.0",
28
- "karma-chrome-launcher": "^1.0.1",
74
+ "karma": "^1.7.1",
75
+ "karma-browserstack-launcher": "^1.3.0",
76
+ "karma-chrome-launcher": "^2.2.0",
29
77
  "karma-firefox-launcher": "^1.0.0",
30
78
  "karma-fixture": "^0.2.6",
31
79
  "karma-html2js-preprocessor": "^1.0.0",
32
80
  "karma-json-fixtures-preprocessor": "0.0.6",
33
81
  "karma-qunit": "^1.0.0",
34
- "karma-webpack": "^1.7.0",
82
+ "karma-rollup-preprocessor": "^4.0.4",
83
+ "lodash.isarray": "^4.0.0",
84
+ "lodash.sample": "^4.2.1",
85
+ "minimist": "^1.2.0",
86
+ "npm-run-all": "^4.1.1",
35
87
  "pre-commit": "^1.1.2",
88
+ "prettier": "^1.7.4",
36
89
  "qunit-parameterize": "^0.4.0",
37
90
  "qunit-tap": "^1.5.0",
38
91
  "qunitjs": "^1.23.1",
39
- "uglify-js": "^2.6.2",
40
- "webpack": "^1.13.0"
92
+ "rimraf": "^2.6.2",
93
+ "rollup": "0.47.5",
94
+ "rollup-plugin-babel": "^3.0.2",
95
+ "rollup-plugin-commonjs": "^8.2.1",
96
+ "rollup-plugin-includepaths": "^0.2.2",
97
+ "rollup-plugin-node-resolve": "^3.0.0",
98
+ "rollup-plugin-replace": "^1.2.1",
99
+ "rollup-plugin-uglify": "^2.0.0",
100
+ "rollup-watch": "^4.3.1",
101
+ "xo": "^0.18.1"
41
102
  },
42
103
  "name": "dompurify",
43
104
  "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.",
44
- "version": "0.9.0",
45
- "main": "src/purify.js",
105
+ "version": "1.0.3",
46
106
  "directories": {
47
107
  "test": "test"
48
108
  },