File: export-commonjs.patch

package info (click to toggle)
node-chalk 5.6.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 588 kB
  • sloc: javascript: 487; makefile: 9
file content (52 lines) | stat: -rw-r--r-- 1,315 bytes parent folder | download | duplicates (4)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Yadd <yadd@debian.org>
Date: Tue, 24 Feb 2026 16:28:22 +0100
Subject: export commonjs file

Forwarded: not-needed
Last-Update: 2022-12-02

This patch add a commonjs file which keep old chalk behaviour
---
 package.json | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Index: node-chalk/package.json
===================================================================
--- node-chalk.orig/package.json	2026-02-26 22:41:39.192536004 +0100
+++ node-chalk/package.json	2026-02-26 22:48:42.552380196 +0100
@@ -6,12 +6,17 @@
 	"repository": "chalk/chalk",
 	"funding": "https://github.com/chalk/chalk?sponsor=1",
 	"type": "module",
-	"main": "./source/index.js",
-	"module": "./source/index.js",
+	"types" : "./source/index.d.ts",
 	"exports": {
-		"import": "./source/index.js",
+		"." : {
+			"import": {
+				"default" : "./source/index.js"
+			},
+			"require": {
+				"default" : "./source/index.cjs"
+			}
+		}
 	},
-	"types": "./source/index.d.ts",
 	"sideEffects": false,
 	"engines": {
 		"node": "^12.17.0 || ^14.13 || >=16.0.0"
@@ -21,8 +26,11 @@
 		"bench": "matcha benchmark.js"
 	},
 	"files": [
-		"source",
-		"!source/index.test-d.ts"
+		"source/index.js",
+		"source/index.cjs",
+		"source/index.d.ts",
+		"source/utilities.js",
+		"package.json"
 	],
 	"keywords": [
 		"color",