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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Mon, 2 Mar 2026 17:15:49 +0100
Subject: Create cjs package
forwarded: not-needed
---
index.d.ts | 8 ++++----
package.json | 19 ++++++++++++++++---
2 files changed, 20 insertions(+), 7 deletions(-)
Index: node-ansi-styles/index.d.ts
===================================================================
--- node-ansi-styles.orig/index.d.ts 2026-03-08 21:08:23.176087363 +0100
+++ node-ansi-styles/index.d.ts 2026-03-08 21:08:23.175936689 +0100
@@ -209,22 +209,22 @@
/**
Basic modifier names.
*/
-export const modifierNames: readonly ModifierName[];
+export declare const modifierNames: readonly ModifierName[];
/**
Basic foreground color names.
*/
-export const foregroundColorNames: readonly ForegroundColorName[];
+export declare const foregroundColorNames: readonly ForegroundColorName[];
/**
Basic background color names.
*/
-export const backgroundColorNames: readonly BackgroundColorName[];
+export declare const backgroundColorNames: readonly BackgroundColorName[];
/*
Basic color names. The combination of foreground and background color names.
*/
-export const colorNames: readonly ColorName[];
+export declare const colorNames: readonly ColorName[];
declare const ansiStyles: {
readonly modifier: Modifier;
Index: node-ansi-styles/package.json
===================================================================
--- node-ansi-styles.orig/package.json 2026-03-08 21:08:23.176087363 +0100
+++ node-ansi-styles/package.json 2026-03-08 21:08:23.176029454 +0100
@@ -11,7 +11,18 @@
"url": "https://sindresorhus.com"
},
"type": "module",
- "exports": "./index.js",
+ "exports": {
+ "." : {
+ "import" : {
+ "default" : "./index.js",
+ "types": "./index.d.ts"
+ },
+ "require" : {
+ "default" : "./index.cjs",
+ "types": "./index.d.cts"
+ }
+ }
+ },
"engines": {
"node": ">=12"
},
@@ -21,7 +32,9 @@
},
"files": [
"index.js",
- "index.d.ts"
+ "index.cjs",
+ "index.d.ts",
+ "index.d.cts"
],
"keywords": [
"ansi",
|