package.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. "scripts": {
  3. "lint": "xo src/*.js",
  4. "format": "npm run format:js && npm run format:md",
  5. "format:md": "prettier --write --parser markdown '**/*.md'",
  6. "format:js": "prettier --write '{src,demos,scripts,test,website}/*.js'",
  7. "commit-amend-build": "scripts/commit-amend-build.sh",
  8. "prebuild": "rimraf dist/**",
  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",
  15. "test:jsdom": "cross-env NODE_ENV=test BABEL_ENV=rollup node test/jsdom-node-runner --dot",
  16. "test:karma": "cross-env NODE_ENV=test BABEL_ENV=rollup karma start test/karma.conf.js --log-level warn ",
  17. "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"
  19. },
  20. "main": "dist/purify.cjs.js",
  21. "module": "dist/purify.es.js",
  22. "browser": "dist/purify.js",
  23. "files": [
  24. "dist"
  25. ],
  26. "pre-commit": [
  27. "lint",
  28. "build",
  29. "commit-amend-build"
  30. ],
  31. "xo": {
  32. "semicolon": true,
  33. "space": 2,
  34. "extends": [
  35. "prettier"
  36. ],
  37. "plugins": [
  38. "prettier"
  39. ],
  40. "rules": {
  41. "import/no-useless-path-segments": 0,
  42. "unicorn/prefer-optional-catch-binding": 0,
  43. "unicorn/prefer-node-remove": 0,
  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. },
  63. "devDependencies": {
  64. "@babel/core": "^7.17.8",
  65. "@babel/preset-env": "^7.16.11",
  66. "@rollup/plugin-babel": "^5.3.1",
  67. "@rollup/plugin-node-resolve": "^13.1.3",
  68. "@rollup/plugin-replace": "^4.0.0",
  69. "@types/dompurify": "^2.3.3",
  70. "@types/estree": "^1.0.0",
  71. "cross-env": "^7.0.3",
  72. "eslint-config-prettier": "^8.5.0",
  73. "eslint-plugin-prettier": "^4.0.0",
  74. "jquery": "^3.6.0",
  75. "jsdom": "^20.0.0",
  76. "karma": "^6.3.17",
  77. "karma-browserstack-launcher": "^1.5.1",
  78. "karma-chrome-launcher": "^3.1.0",
  79. "karma-firefox-launcher": "^2.1.2",
  80. "karma-qunit": "^4.1.2",
  81. "karma-rollup-preprocessor": "^7.0.8",
  82. "lodash.sample": "^4.2.1",
  83. "minimist": "^1.2.6",
  84. "npm-run-all": "^4.1.5",
  85. "pre-commit": "^1.2.2",
  86. "prettier": "^2.5.1",
  87. "qunit": "^2.4.1",
  88. "qunit-tap": "^1.5.0",
  89. "rimraf": "^3.0.2",
  90. "rollup": "^2.70.1",
  91. "rollup-plugin-includepaths": "^0.2.3",
  92. "rollup-plugin-terser": "^7.0.2",
  93. "xo": "^0.48.0"
  94. },
  95. "resolutions": {
  96. "natives": "1.1.6"
  97. },
  98. "name": "dompurify",
  99. "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.",
  100. "version": "3.0.2",
  101. "directories": {
  102. "test": "test"
  103. },
  104. "repository": {
  105. "type": "git",
  106. "url": "git://github.com/cure53/DOMPurify.git"
  107. },
  108. "keywords": [
  109. "dom",
  110. "xss",
  111. "html",
  112. "svg",
  113. "mathml",
  114. "security",
  115. "secure",
  116. "sanitizer",
  117. "sanitize",
  118. "filter",
  119. "purify"
  120. ],
  121. "author": "Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)",
  122. "license": "(MPL-2.0 OR Apache-2.0)",
  123. "bugs": {
  124. "url": "https://github.com/cure53/DOMPurify/issues"
  125. },
  126. "homepage": "https://github.com/cure53/DOMPurify"
  127. }