isomorphic-dompurify 2.25.0 → 2.27.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 +1 -6
  2. package/package.json +16 -4
package/README.md CHANGED
@@ -1,7 +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
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
- [![Bundlephobia Minified Size](https://badgen.net/bundlephobia/min/isomorphic-dompurify)](https://bundlephobia.com/result?p=isomorphic-dompurify)
5
4
 
6
5
  The library makes it possible to seamlessly use [DOMPurify](https://github.com/cure53/DOMPurify) on server and client in the same way.
7
6
  It does nothing by itself except providing an isomorphic/universal wrapper around DOMPurify, so all credits go to DOMPurify authors and contributors.
@@ -26,6 +25,7 @@ It was inspired by [Isomorphic Unfetch](https://github.com/developit/unfetch/tre
26
25
  | `>=0.20.0` | `>=14` | Server |
27
26
  | `>=1.4.0` | `>=16` | Server |
28
27
  | `>=1.10.0` | `>=18` | Server |
28
+ | `>=2.27.0` | `>=20` | Server |
29
29
 
30
30
  ## Installation
31
31
 
@@ -54,11 +54,6 @@ or with [config](https://github.com/cure53/DOMPurify/blob/main/README.md):
54
54
  const clean = DOMPurify.sanitize(dirtyString, { USE_PROFILES: { html: true } });
55
55
  ```
56
56
 
57
- ## Known Issues
58
-
59
- 1. Next.js and Remix are mistakenly trying to use the `browser` entry point on server, which causes the `Window is not defined` issue. [#228](https://github.com/kkomelin/isomorphic-dompurify/issues/228) [#214](https://github.com/kkomelin/isomorphic-dompurify/issues/214) https://github.com/vercel/next.js/discussions/58142
60
- 2. [Can't resolve 'canvas' on Next.js serverless app](https://github.com/kkomelin/isomorphic-dompurify/issues/54)
61
-
62
57
  ## License
63
58
 
64
59
  DOMPurify -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorphic-dompurify",
3
- "version": "2.25.0",
3
+ "version": "2.27.0",
4
4
  "description": "Makes it possible to use DOMPurify on server and client in the same way.",
5
5
  "keywords": [
6
6
  "security",
@@ -29,13 +29,25 @@
29
29
  "browser": "browser.js",
30
30
  "main": "index.js",
31
31
  "types": "index.d.ts",
32
+ "exports": {
33
+ "node": {
34
+ "types": "./index.d.ts",
35
+ "import": "./index.js",
36
+ "require": "./index.js"
37
+ },
38
+ "default": {
39
+ "types": "./index.d.ts",
40
+ "import": "./browser.js",
41
+ "require": "./browser.js"
42
+ }
43
+ },
32
44
  "dependencies": {
33
45
  "dompurify": "^3.2.6",
34
- "jsdom": "^26.1.0"
46
+ "jsdom": "^27.0.0"
35
47
  },
36
48
  "devDependencies": {
37
- "terser": "^5.39.2",
38
- "vitest": "^3.1.4"
49
+ "terser": "^5.44.0",
50
+ "vitest": "^3.2.4"
39
51
  },
40
52
  "engines": {
41
53
  "node": ">=18"