isomorphic-dompurify 0.19.0 → 0.22.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.
Files changed (2) hide show
  1. package/README.md +8 -11
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Isomorphic DOMPurify
2
2
  [![npm version](https://badge.fury.io/js/isomorphic-dompurify.svg)](https://badge.fury.io/js/isomorphic-dompurify)
3
- [![Build Status](https://app.travis-ci.com/kkomelin/isomorphic-dompurify.svg?branch=master)](https://app.travis-ci.com/kkomelin/isomorphic-dompurify)
3
+ [![Test Status](https://github.com/kkomelin/isomorphic-dompurify/actions/workflows/build_test.yml/badge.svg)](https://github.com/kkomelin/isomorphic-dompurify/actions/workflows/build_test.yml)
4
4
  [![Bundlephobia Minified Size](https://badgen.net/bundlephobia/min/isomorphic-dompurify)](https://bundlephobia.com/result?p=isomorphic-dompurify)
5
5
 
6
6
  The library makes it possible to seamlessly use [DOMPurify](https://github.com/cure53/DOMPurify) on server and client in the same way.
@@ -18,6 +18,12 @@ This project was born with the idea of encapsulating DOMPurify initilization det
18
18
 
19
19
  It was inspired by [Isomorphic Unfetch](https://github.com/developit/unfetch/tree/master/packages/isomorphic-unfetch).
20
20
 
21
+ ## Requirements
22
+
23
+ | isomorphic-dompurify | Node.js | Environment |
24
+ | ------------- | ------------- | ------------- |
25
+ | `<=0.19.0` | `>=12` | Server |
26
+ | `>=0.20.0` | `>=14` | Server |
21
27
 
22
28
  ## Installation
23
29
 
@@ -44,18 +50,9 @@ const DOMPurify = require('isomorphic-dompurify');
44
50
  2. Sanitize a string:
45
51
 
46
52
  ```javascript
47
- var clean = DOMPurify.sanitize(dirty);
53
+ const clean = DOMPurify.sanitize(dirty);
48
54
  ```
49
55
 
50
- ## Supported Environments
51
-
52
- The library is aimed to work **everywhere** and has been tested in the following environments:
53
- - Node.js, CommonJS ([automatically](https://app.travis-ci.com/kkomelin/isomorphic-dompurify) & manually)
54
- - Node.js, Webpack, ES6 (manually)
55
- - React.js without SSR (manually)
56
- - Next.js without SSR (manually)
57
- - Next.js with SSR (manually)
58
-
59
56
  ## Known Issues
60
57
 
61
58
  1. [Can't resolve 'canvas' on Next.js serverless app](https://github.com/kkomelin/isomorphic-dompurify/issues/54)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorphic-dompurify",
3
- "version": "0.19.0",
3
+ "version": "0.22.0",
4
4
  "description": "Makes it possible to use DOMPurify on server and client in the same way.",
5
5
  "keywords": [
6
6
  "security",
@@ -30,13 +30,13 @@
30
30
  "browser": "browser.js",
31
31
  "main": "index.js",
32
32
  "dependencies": {
33
- "@types/dompurify": "^2.3.3",
34
- "dompurify": "^2.3.8",
35
- "jsdom": "^19.0.0"
33
+ "@types/dompurify": "^2.3.4",
34
+ "dompurify": "^2.4.0",
35
+ "jsdom": "^20.0.0"
36
36
  },
37
37
  "types": "index.d.ts",
38
38
  "devDependencies": {
39
- "jest": "^28.1.0",
40
- "terser": "^5.13.1"
39
+ "jest": "^28.1.3",
40
+ "terser": "^5.15.0"
41
41
  }
42
42
  }