File: export-commonjs.patch

package info (click to toggle)
node-del 7.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 192 kB
  • sloc: javascript: 625; makefile: 5
file content (35 lines) | stat: -rw-r--r-- 723 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Yadd <yadd@debian.org>
Date: Sun, 21 Dec 2025 23:26:45 +0100
Subject: export commonjs file

Forwarded: not-needed
Last-Update: 2022-09-17
---
 package.json | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index d4e8d25..00b0e3c 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,10 @@
 		"url": "https://sindresorhus.com"
 	},
 	"type": "module",
-	"exports": "./index.js",
+	"exports": {
+		"import": "./index.js",
+		"require": "./index.cjs"
+	},
 	"types": "./index.d.ts",
 	"engines": {
 		"node": ">=14.16"
@@ -21,6 +24,8 @@
 		"bench": "node benchmark.js"
 	},
 	"files": [
+		"dhnodejsBundle.cjs",
+		"index.cjs",
 		"index.js",
 		"index.d.ts"
 	],