@depup/wrap-ansi 10.0.1-depup.0 → 10.0.2-depup.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.
- package/README.md +3 -3
- package/changes.json +2 -2
- package/index.js +14 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/wrap-ansi
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [wrap-ansi](https://www.npmjs.com/package/wrap-ansi) @ 10.0.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [wrap-ansi](https://www.npmjs.com/package/wrap-ansi) @ 10.0.2 |
|
|
17
|
+
| Processed | 2026-09-27 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 2 |
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ npm install @depup/wrap-ansi
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
25
|
| ansi-styles | ^6.2.3 | ^7.0.0 |
|
|
26
|
-
| string-width | ^8.2.0 | ^8.
|
|
26
|
+
| string-width | ^8.2.0 | ^8.3.0 |
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
package/changes.json
CHANGED
package/index.js
CHANGED
|
@@ -639,10 +639,22 @@ const exec = (string, columns, options = {}) => {
|
|
|
639
639
|
return restoreStylesAcrossRows(rows.join('\n'));
|
|
640
640
|
};
|
|
641
641
|
|
|
642
|
+
// Normalize the text, but not the sequences: a combining mark that follows a sequence composes with its last character and destroys it.
|
|
643
|
+
const normalizeText = string => {
|
|
644
|
+
let normalizedString = '';
|
|
645
|
+
|
|
646
|
+
forEachSegment(string, plainText => {
|
|
647
|
+
normalizedString += plainText.normalize();
|
|
648
|
+
}, escape => {
|
|
649
|
+
normalizedString += escape;
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
return normalizedString;
|
|
653
|
+
};
|
|
654
|
+
|
|
642
655
|
// For each newline, invoke the method separately.
|
|
643
656
|
export default function wrapAnsi(string, columns, options) {
|
|
644
|
-
return String(string)
|
|
645
|
-
.normalize()
|
|
657
|
+
return normalizeText(String(string))
|
|
646
658
|
.replaceAll('\r\n', '\n')
|
|
647
659
|
.split('\n')
|
|
648
660
|
.map(line => exec(expandTabs(line), columns, options))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/wrap-ansi",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2-depup.0",
|
|
4
4
|
"description": "Wordwrap a string with ANSI escape codes (with updated dependencies)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "chalk/wrap-ansi",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"ansi-styles": "^7.0.0",
|
|
65
|
-
"string-width": "^8.
|
|
65
|
+
"string-width": "^8.3.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"chalk": "^5.6.2",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
},
|
|
80
80
|
"string-width": {
|
|
81
81
|
"from": "^8.2.0",
|
|
82
|
-
"to": "^8.
|
|
82
|
+
"to": "^8.3.0"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"depsUpdated": 2,
|
|
86
86
|
"originalPackage": "wrap-ansi",
|
|
87
|
-
"originalVersion": "10.0.
|
|
88
|
-
"processedAt": "2026-
|
|
87
|
+
"originalVersion": "10.0.2",
|
|
88
|
+
"processedAt": "2026-09-27T01:05:14.220Z",
|
|
89
89
|
"smokeTest": "passed"
|
|
90
90
|
}
|
|
91
91
|
}
|