@node-core/utils 7.2.0 → 7.2.1

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 (182) hide show
  1. package/lib/ci/build-types/test_build.js +3 -3
  2. package/lib/ci/failure_aggregator.js +2 -2
  3. package/lib/ci/run_ci.js +3 -2
  4. package/lib/cli.js +6 -6
  5. package/lib/figures.js +6 -6
  6. package/lib/update-v8/backport.js +3 -4
  7. package/lib/verbosity.js +2 -4
  8. package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/README.md +4 -4
  9. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.d.mts +21 -0
  10. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.mjs +46 -0
  11. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/LICENSE +22 -0
  12. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.d.ts +2 -0
  13. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.js +2 -0
  14. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.d.ts +35 -0
  15. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.js +1 -0
  16. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.d.ts +34 -0
  17. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.js +2 -0
  18. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/package.json +88 -0
  19. package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/package.json +25 -20
  20. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.d.ts +48 -3
  21. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.js +58 -19
  22. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/package.json +1 -1
  23. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/readme.md +36 -1
  24. package/node_modules/ansi-regex/index.js +9 -4
  25. package/node_modules/ansi-regex/package.json +1 -1
  26. package/node_modules/ansi-regex/readme.md +6 -0
  27. package/node_modules/ansi-styles/index.d.ts +12 -12
  28. package/node_modules/ansi-styles/index.js +3 -3
  29. package/node_modules/ansi-styles/package.json +4 -4
  30. package/node_modules/cli-truncate/index.d.ts +3 -3
  31. package/node_modules/cli-truncate/index.js +40 -14
  32. package/node_modules/cli-truncate/node_modules/string-width/index.js +133 -15
  33. package/node_modules/cli-truncate/node_modules/string-width/package.json +4 -4
  34. package/node_modules/cli-truncate/node_modules/string-width/readme.md +1 -1
  35. package/node_modules/cli-truncate/package.json +7 -7
  36. package/node_modules/cli-truncate/readme.md +2 -3
  37. package/node_modules/ghauth/.github/dependabot.yml +11 -3
  38. package/node_modules/ghauth/.github/workflows/depsound.yml +33 -0
  39. package/node_modules/ghauth/.github/workflows/test-and-release.yml +4 -4
  40. package/node_modules/ghauth/CHANGELOG.md +60 -0
  41. package/node_modules/ghauth/package.json +30 -6
  42. package/node_modules/js-yaml/README.md +20 -187
  43. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +1008 -946
  44. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
  45. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
  46. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
  47. package/node_modules/js-yaml/dist/js-yaml.cjs.js +1043 -583
  48. package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
  49. package/node_modules/js-yaml/dist/js-yaml.d.ts +877 -133
  50. package/node_modules/js-yaml/dist/js-yaml.mjs +995 -556
  51. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  52. package/node_modules/js-yaml/package.json +8 -7
  53. package/node_modules/listr2/dist/{index.d.cts → index.d.mts} +90 -60
  54. package/node_modules/listr2/dist/{index.js → index.mjs} +496 -373
  55. package/node_modules/listr2/node_modules/string-width/index.d.ts +39 -0
  56. package/node_modules/listr2/node_modules/string-width/index.js +207 -0
  57. package/node_modules/listr2/node_modules/string-width/package.json +65 -0
  58. package/node_modules/listr2/node_modules/string-width/readme.md +66 -0
  59. package/node_modules/listr2/node_modules/wrap-ansi/index.d.ts +1 -1
  60. package/node_modules/listr2/node_modules/wrap-ansi/index.js +544 -116
  61. package/node_modules/listr2/node_modules/wrap-ansi/package.json +10 -13
  62. package/node_modules/listr2/node_modules/wrap-ansi/readme.md +2 -0
  63. package/node_modules/listr2/package.json +16 -19
  64. package/node_modules/log-update/index.d.ts +64 -1
  65. package/node_modules/log-update/index.js +268 -18
  66. package/node_modules/log-update/node_modules/string-width/index.d.ts +39 -0
  67. package/node_modules/log-update/node_modules/string-width/index.js +207 -0
  68. package/node_modules/log-update/node_modules/string-width/package.json +65 -0
  69. package/node_modules/log-update/node_modules/string-width/readme.md +66 -0
  70. package/node_modules/log-update/node_modules/wrap-ansi/index.d.ts +1 -1
  71. package/node_modules/log-update/node_modules/wrap-ansi/index.js +544 -116
  72. package/node_modules/log-update/node_modules/wrap-ansi/package.json +10 -13
  73. package/node_modules/log-update/node_modules/wrap-ansi/readme.md +2 -0
  74. package/node_modules/log-update/package.json +14 -12
  75. package/node_modules/log-update/readme.md +61 -0
  76. package/node_modules/slice-ansi/index.d.ts +2 -2
  77. package/node_modules/slice-ansi/index.js +260 -112
  78. package/node_modules/slice-ansi/package.json +10 -9
  79. package/node_modules/slice-ansi/readme.md +3 -2
  80. package/node_modules/slice-ansi/tokenize-ansi.js +752 -0
  81. package/node_modules/smol-toml/README.md +205 -191
  82. package/node_modules/smol-toml/dist/date.d.ts +0 -1
  83. package/node_modules/smol-toml/dist/date.js +0 -1
  84. package/node_modules/smol-toml/dist/error.d.ts +0 -1
  85. package/node_modules/smol-toml/dist/error.js +0 -1
  86. package/node_modules/smol-toml/dist/extract.js +32 -65
  87. package/node_modules/smol-toml/dist/index.cjs +302 -288
  88. package/node_modules/smol-toml/dist/index.d.ts +0 -1
  89. package/node_modules/smol-toml/dist/index.js +0 -1
  90. package/node_modules/smol-toml/dist/parse.d.ts +1 -3
  91. package/node_modules/smol-toml/dist/parse.js +22 -21
  92. package/node_modules/smol-toml/dist/primitive.js +75 -76
  93. package/node_modules/smol-toml/dist/stringify.d.ts +0 -1
  94. package/node_modules/smol-toml/dist/stringify.js +43 -30
  95. package/node_modules/smol-toml/dist/struct.js +90 -93
  96. package/node_modules/smol-toml/dist/util.d.ts +1 -1
  97. package/node_modules/smol-toml/dist/util.js +36 -39
  98. package/node_modules/smol-toml/package.json +6 -6
  99. package/node_modules/strip-ansi/index.js +5 -0
  100. package/node_modules/strip-ansi/package.json +5 -5
  101. package/package.json +3 -5
  102. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.cjs +0 -127
  103. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.cts +0 -152
  104. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.ts +0 -152
  105. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.js +0 -92
  106. package/node_modules/chalk/package.json +0 -92
  107. package/node_modules/chalk/readme.md +0 -331
  108. package/node_modules/chalk/source/index.d.ts +0 -437
  109. package/node_modules/chalk/source/index.js +0 -261
  110. package/node_modules/chalk/source/utilities.js +0 -33
  111. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -299
  112. package/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -261
  113. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  114. package/node_modules/chalk/source/vendor/supports-color/browser.js +0 -32
  115. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  116. package/node_modules/chalk/source/vendor/supports-color/index.js +0 -206
  117. package/node_modules/colorette/LICENSE.md +0 -7
  118. package/node_modules/colorette/README.md +0 -134
  119. package/node_modules/colorette/index.cjs +0 -218
  120. package/node_modules/colorette/index.d.ts +0 -93
  121. package/node_modules/colorette/index.js +0 -150
  122. package/node_modules/colorette/package.json +0 -40
  123. package/node_modules/eventemitter3/LICENSE +0 -21
  124. package/node_modules/eventemitter3/README.md +0 -94
  125. package/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
  126. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
  127. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
  128. package/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
  129. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
  130. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
  131. package/node_modules/eventemitter3/index.d.ts +0 -135
  132. package/node_modules/eventemitter3/index.js +0 -336
  133. package/node_modules/eventemitter3/index.mjs +0 -4
  134. package/node_modules/eventemitter3/package.json +0 -67
  135. package/node_modules/figures/index.d.ts +0 -279
  136. package/node_modules/figures/index.js +0 -292
  137. package/node_modules/figures/package.json +0 -49
  138. package/node_modules/figures/readme.md +0 -337
  139. package/node_modules/listr2/dist/index.cjs +0 -2189
  140. package/node_modules/listr2/dist/index.d.ts +0 -1528
  141. package/node_modules/rfdc/.github/workflows/ci.yml +0 -21
  142. package/node_modules/rfdc/LICENSE +0 -15
  143. package/node_modules/rfdc/default.js +0 -3
  144. package/node_modules/rfdc/index.d.ts +0 -13
  145. package/node_modules/rfdc/index.js +0 -198
  146. package/node_modules/rfdc/index.test-d.ts +0 -13
  147. package/node_modules/rfdc/package.json +0 -73
  148. package/node_modules/rfdc/readme.md +0 -181
  149. package/node_modules/rfdc/test/index.js +0 -306
  150. package/node_modules/smol-toml/dist/date.d.ts.map +0 -1
  151. package/node_modules/smol-toml/dist/date.js.map +0 -1
  152. package/node_modules/smol-toml/dist/error.d.ts.map +0 -1
  153. package/node_modules/smol-toml/dist/error.js.map +0 -1
  154. package/node_modules/smol-toml/dist/extract.js.map +0 -1
  155. package/node_modules/smol-toml/dist/index.cjs.map +0 -1
  156. package/node_modules/smol-toml/dist/index.d.ts.map +0 -1
  157. package/node_modules/smol-toml/dist/index.js.map +0 -1
  158. package/node_modules/smol-toml/dist/parse.d.ts.map +0 -1
  159. package/node_modules/smol-toml/dist/parse.js.map +0 -1
  160. package/node_modules/smol-toml/dist/primitive.d.ts +0 -29
  161. package/node_modules/smol-toml/dist/primitive.d.ts.map +0 -1
  162. package/node_modules/smol-toml/dist/primitive.js.map +0 -1
  163. package/node_modules/smol-toml/dist/stringify.d.ts.map +0 -1
  164. package/node_modules/smol-toml/dist/stringify.js.map +0 -1
  165. package/node_modules/smol-toml/dist/struct.js.map +0 -1
  166. package/node_modules/smol-toml/dist/util.d.ts.map +0 -1
  167. package/node_modules/smol-toml/dist/util.js.map +0 -1
  168. package/node_modules/smol-toml/src/date.ts +0 -152
  169. package/node_modules/smol-toml/src/error.ts +0 -77
  170. package/node_modules/smol-toml/src/extract.ts +0 -113
  171. package/node_modules/smol-toml/src/index.ts +0 -42
  172. package/node_modules/smol-toml/src/parse.ts +0 -184
  173. package/node_modules/smol-toml/src/primitive.ts +0 -249
  174. package/node_modules/smol-toml/src/stringify.ts +0 -191
  175. package/node_modules/smol-toml/src/struct.ts +0 -202
  176. package/node_modules/smol-toml/src/util.ts +0 -106
  177. /package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/LICENSE +0 -0
  178. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.d.ts +0 -0
  179. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.js +0 -0
  180. /package/node_modules/{chalk → ansi-escapes}/license +0 -0
  181. /package/node_modules/{figures → listr2/node_modules/string-width}/license +0 -0
  182. /package/node_modules/log-update/node_modules/{ansi-escapes → string-width}/license +0 -0
@@ -5,22 +5,49 @@ import {eastAsianWidth} from 'get-east-asian-width';
5
5
  Logic:
6
6
  - Segment graphemes to match how terminals render clusters.
7
7
  - Width rules:
8
- 1. Skip non-printing clusters (Default_Ignorable, Control, pure Mark, lone Surrogates). Tabs are ignored by design.
8
+ 1. Skip non-printing clusters (Default_Ignorable, Control, pure nonspacing/enclosing Mark, lone Surrogates). Tabs are ignored by design.
9
9
  2. RGI emoji clusters (\p{RGI_Emoji}) are double-width.
10
- 3. Otherwise use East Asian Width of the cluster’s first visible code point, and add widths for trailing Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).
10
+ 3. Minimally-qualified/unqualified emoji clusters (ZWJ sequences with 2+ Extended_Pictographic, or keycap sequences) are double-width.
11
+ 4. Hangul jamo collapse each standard modern Hangul L+V or L+V+T syllable piece to width 2.
12
+ Unmatched repeated leading/vowel/trailing jamo stay additive because that matches how the terminals we target render them.
13
+ 5. Otherwise use East Asian Width of the cluster's first visible code point, and add widths for trailing spacing marks and Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).
11
14
  */
12
15
 
13
16
  const segmenter = new Intl.Segmenter();
14
17
 
15
18
  // Whole-cluster zero-width
16
- const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Mark}|\p{Surrogate})+$/v;
19
+ const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Nonspacing_Mark}|\p{Enclosing_Mark}|\p{Surrogate})+$/v;
17
20
 
18
21
  // Pick the base scalar if the cluster starts with Prepend/Format/Marks
19
- const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
22
+ const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]+/v;
23
+ const spacingMarkRegex = /\p{Spacing_Mark}/v;
20
24
 
21
25
  // RGI emoji sequences
22
26
  const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
23
27
 
28
+ // Detect minimally-qualified/unqualified emoji sequences (missing VS16 but still render as double-width)
29
+ const unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
30
+ const extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
31
+
32
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
33
+ // Real emoji clusters are < 30 chars; guard against pathological input
34
+ if (segment.length > 50) {
35
+ return false;
36
+ }
37
+
38
+ if (unqualifiedKeycapRegex.test(segment)) {
39
+ return true;
40
+ }
41
+
42
+ // ZWJ sequences with 2+ Extended_Pictographic
43
+ if (segment.includes('\u200D')) {
44
+ const pictographics = segment.match(extendedPictographicRegex);
45
+ return pictographics !== null && pictographics.length >= 2;
46
+ }
47
+
48
+ return false;
49
+ }
50
+
24
51
  function baseVisible(segment) {
25
52
  return segment.replace(leadingNonPrintingRegex, '');
26
53
  }
@@ -29,13 +56,91 @@ function isZeroWidthCluster(segment) {
29
56
  return zeroWidthClusterRegex.test(segment);
30
57
  }
31
58
 
32
- function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
33
- let extra = 0;
34
- if (segment.length > 1) {
35
- for (const char of segment.slice(1)) {
36
- if (char >= '\uFF00' && char <= '\uFFEF') {
37
- extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
59
+ function isHangulLeadingJamo(codePoint) {
60
+ return (codePoint >= 0x11_00 && codePoint <= 0x11_5F)
61
+ || (codePoint >= 0xA9_60 && codePoint <= 0xA9_7C);
62
+ }
63
+
64
+ function isHangulVowelJamo(codePoint) {
65
+ return (codePoint >= 0x11_60 && codePoint <= 0x11_A7)
66
+ || (codePoint >= 0xD7_B0 && codePoint <= 0xD7_C6);
67
+ }
68
+
69
+ function isHangulTrailingJamo(codePoint) {
70
+ return (codePoint >= 0x11_A8 && codePoint <= 0x11_FF)
71
+ || (codePoint >= 0xD7_CB && codePoint <= 0xD7_FB);
72
+ }
73
+
74
+ function isHangulJamo(codePoint) {
75
+ return isHangulLeadingJamo(codePoint)
76
+ || isHangulVowelJamo(codePoint)
77
+ || isHangulTrailingJamo(codePoint);
78
+ }
79
+
80
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
81
+ const codePoints = [];
82
+
83
+ for (const character of visibleSegment) {
84
+ if (zeroWidthClusterRegex.test(character)) {
85
+ continue;
86
+ }
87
+
88
+ codePoints.push(character.codePointAt(0));
89
+ }
90
+
91
+ if (codePoints.length === 0) {
92
+ return undefined;
93
+ }
94
+
95
+ let width = 0;
96
+
97
+ for (let index = 0; index < codePoints.length; index++) {
98
+ const codePoint = codePoints[index];
99
+ if (!isHangulJamo(codePoint)) {
100
+ if (width === 0) {
101
+ return undefined;
102
+ }
103
+
104
+ // Mixed cluster (e.g., L + precomposed syllable): use EAW for non-jamo remainder
105
+ for (let remaining = index; remaining < codePoints.length; remaining++) {
106
+ width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
38
107
  }
108
+
109
+ return width;
110
+ }
111
+
112
+ // Modern Hangul L+V(+T) shapes as one syllable block. Unmatched jamo stay additive:
113
+ // U+1100 U+1100 U+1161 => U+1100 + (U+1100 U+1161) => 2 + 2.
114
+ if (
115
+ isHangulLeadingJamo(codePoint)
116
+ && isHangulVowelJamo(codePoints[index + 1])
117
+ ) {
118
+ width += 2;
119
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
120
+ continue;
121
+ }
122
+
123
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
124
+ }
125
+
126
+ return width;
127
+ }
128
+
129
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
130
+ let extra = 0;
131
+ let first = true;
132
+
133
+ for (const character of visibleSegment) {
134
+ if (first) {
135
+ first = false;
136
+ continue;
137
+ }
138
+
139
+ if (
140
+ spacingMarkRegex.test(character)
141
+ || (character >= '\uFF00' && character <= '\uFFEF')
142
+ ) {
143
+ extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
39
144
  }
40
145
  }
41
146
 
@@ -54,7 +159,8 @@ export default function stringWidth(input, options = {}) {
54
159
 
55
160
  let string = input;
56
161
 
57
- if (!countAnsiEscapeCodes) {
162
+ // Avoid calling stripAnsi when there are no ANSI escape sequences (ESC = 0x1B, CSI = 0x9B)
163
+ if (!countAnsiEscapeCodes && (string.includes('\u001B') || string.includes('\u009B'))) {
58
164
  string = stripAnsi(string);
59
165
  }
60
166
 
@@ -62,6 +168,11 @@ export default function stringWidth(input, options = {}) {
62
168
  return 0;
63
169
  }
64
170
 
171
+ // Fast path: printable ASCII (0x20–0x7E) needs no segmenter, regex, or EAW lookup — width equals length.
172
+ if (/^[\u0020-\u007E]*$/.test(string)) {
173
+ return string.length;
174
+ }
175
+
65
176
  let width = 0;
66
177
  const eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};
67
178
 
@@ -72,17 +183,24 @@ export default function stringWidth(input, options = {}) {
72
183
  }
73
184
 
74
185
  // Emoji width logic
75
- if (rgiEmojiRegex.test(segment)) {
186
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
76
187
  width += 2;
77
188
  continue;
78
189
  }
79
190
 
191
+ const visibleSegment = baseVisible(segment);
192
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
193
+ if (hangulWidth !== undefined) {
194
+ width += hangulWidth;
195
+ continue;
196
+ }
197
+
80
198
  // Everything else: EAW of the cluster’s first visible scalar
81
- const codePoint = baseVisible(segment).codePointAt(0);
199
+ const codePoint = visibleSegment.codePointAt(0);
82
200
  width += eastAsianWidth(codePoint, eastAsianWidthOptions);
83
201
 
84
- // Add width for trailing Halfwidth and Fullwidth Forms (e.g., ゙, ゚, ー)
85
- width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
202
+ // Add width for trailing spacing marks and Halfwidth/Fullwidth Forms (e.g., ゙, ゚, ー)
203
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
86
204
  }
87
205
 
88
206
  return width;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-width",
3
- "version": "8.1.0",
3
+ "version": "8.2.2",
4
4
  "description": "Get the visual width of a string - the number of columns required to display it",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/string-width",
@@ -54,12 +54,12 @@
54
54
  "east-asian-width"
55
55
  ],
56
56
  "dependencies": {
57
- "get-east-asian-width": "^1.3.0",
58
- "strip-ansi": "^7.1.0"
57
+ "get-east-asian-width": "^1.5.0",
58
+ "strip-ansi": "^7.1.2"
59
59
  },
60
60
  "devDependencies": {
61
61
  "ava": "^6.4.1",
62
62
  "tsd": "^0.33.0",
63
- "xo": "^1.2.2"
63
+ "xo": "^1.2.3"
64
64
  }
65
65
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Get the visual width of a string - the number of columns required to display it
4
4
 
5
- Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
5
+ Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and do not affect the width.
6
6
 
7
7
  Useful to be able to measure the actual width of command-line output.
8
8
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "cli-truncate",
3
- "version": "5.1.1",
3
+ "version": "6.1.1",
4
4
  "description": "Truncate a string to a specific width in the terminal",
5
5
  "license": "MIT",
6
- "repository": "sindresorhus/cli-truncate",
6
+ "repository": "github:sindresorhus/cli-truncate",
7
7
  "funding": "https://github.com/sponsors/sindresorhus",
8
8
  "author": {
9
9
  "name": "Sindre Sorhus",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "sideEffects": false,
19
19
  "engines": {
20
- "node": ">=20"
20
+ "node": ">=22"
21
21
  },
22
22
  "scripts": {
23
23
  "test": "xo && ava && tsd"
@@ -41,12 +41,12 @@
41
41
  "string"
42
42
  ],
43
43
  "dependencies": {
44
- "slice-ansi": "^7.1.0",
45
- "string-width": "^8.0.0"
44
+ "slice-ansi": "^9.0.0",
45
+ "string-width": "^8.2.0"
46
46
  },
47
47
  "devDependencies": {
48
- "ava": "^6.4.1",
48
+ "ava": "^7.0.0",
49
49
  "tsd": "^0.33.0",
50
- "xo": "^1.2.2"
50
+ "xo": "^2.0.2"
51
51
  }
52
52
  }
@@ -44,7 +44,7 @@ cliTruncate('안녕하세요', 3);
44
44
 
45
45
  // Truncate the paragraph to the terminal width
46
46
  const paragraph = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.';
47
- cliTruncate(paragraph, process.stdout.columns);
47
+ cliTruncate(paragraph, process.stdout.columns ?? 80);
48
48
  //=> 'Lorem ipsum dolor sit amet, consectetuer adipiscing…'
49
49
  ```
50
50
 
@@ -62,7 +62,7 @@ The text to truncate.
62
62
 
63
63
  Type: `number`
64
64
 
65
- The number of columns to occupy in the terminal.
65
+ The finite number of columns to occupy in the terminal.
66
66
 
67
67
  #### options
68
68
 
@@ -145,7 +145,6 @@ cliTruncate('unicorns', 5, {position: 'end', truncationCharacter: '.'});
145
145
 
146
146
  cliTruncate('unicorns', 5, {position: 'end', truncationCharacter: ''});
147
147
  //=> 'unico'
148
-
149
148
  ```
150
149
 
151
150
  ## Related
@@ -3,18 +3,26 @@ updates:
3
3
  - package-ecosystem: 'github-actions'
4
4
  directory: '/'
5
5
  schedule:
6
- interval: 'daily'
6
+ interval: 'weekly'
7
7
  commit-message:
8
8
  prefix: 'chore'
9
9
  include: 'scope'
10
10
  cooldown:
11
- default-days: 5
11
+ default-days: 2
12
+ groups:
13
+ github-actions-minor-patch:
14
+ patterns: ['*']
15
+ update-types: ['minor', 'patch']
12
16
  - package-ecosystem: 'npm'
13
17
  directory: '/'
14
18
  schedule:
15
- interval: 'daily'
19
+ interval: 'monthly'
16
20
  commit-message:
17
21
  prefix: 'chore'
18
22
  include: 'scope'
19
23
  cooldown:
20
24
  default-days: 5
25
+ groups:
26
+ npm-minor-patch:
27
+ patterns: ['*']
28
+ update-types: ['minor', 'patch']
@@ -0,0 +1,33 @@
1
+ # Copy into .github/workflows/ of the repo you want reviewed. One workflow,
2
+ # two jobs: review computes with a read-only token, post holds the write
3
+ # scopes. The README explains the security model.
4
+ #
5
+ # pull_request_target runs the base branch's workflow definition and action
6
+ # pin (a PR cannot modify what executes here), and its token can post the
7
+ # comment, including on Dependabot and fork PRs whose own token is read-only.
8
+ # It is safe here because no PR code is ever checked out or executed: the
9
+ # review job reads the PR's manifest bytes as git objects, and depsound's
10
+ # parsers treat all of it as hostile data.
11
+ name: depsound
12
+ on:
13
+ pull_request_target:
14
+
15
+ permissions: {} # scopes are granted per job below
16
+
17
+ jobs:
18
+ review:
19
+ runs-on: ubuntu-latest
20
+ permissions:
21
+ contents: read # diff the PR's manifests; this job never sees a write token
22
+ steps:
23
+ - uses: rvagg/depsound-action@7c7eb2bfc936dc8242f0592f6d7c4f9835510380 # v0.3.6
24
+ post:
25
+ needs: review
26
+ if: ${{ always() && needs.review.result != 'cancelled' }} # a failed review still posts its failure marker
27
+ runs-on: ubuntu-latest
28
+ permissions:
29
+ pull-requests: write # upsert the sticky comment
30
+ checks: write # set the neutral check
31
+ actions: read # download the report artifact
32
+ steps:
33
+ - uses: rvagg/depsound-action/post@7c7eb2bfc936dc8242f0592f6d7c4f9835510380 # v0.3.6
@@ -11,9 +11,9 @@ jobs:
11
11
  runs-on: ${{ matrix.os }}
12
12
  steps:
13
13
  - name: Checkout Repository
14
- uses: actions/checkout@v6
14
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15
15
  - name: Use Node.js ${{ matrix.node }}
16
- uses: actions/setup-node@v6.4.0
16
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
17
17
  with:
18
18
  node-version: ${{ matrix.node }}
19
19
  - name: Install Dependencies
@@ -37,11 +37,11 @@ jobs:
37
37
  id-token: write
38
38
  steps:
39
39
  - name: Checkout
40
- uses: actions/checkout@v6
40
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
41
41
  with:
42
42
  fetch-depth: 0
43
43
  - name: Setup Node.js
44
- uses: actions/setup-node@v6.4.0
44
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
45
45
  with:
46
46
  node-version: lts/*
47
47
  registry-url: 'https://registry.npmjs.org'
@@ -1,3 +1,63 @@
1
+ ## [7.0.14](https://github.com/rvagg/ghauth/compare/v7.0.13...v7.0.14) (2026-08-03)
2
+
3
+ ### Trivial Changes
4
+
5
+ * **deps-dev:** bump @semantic-release/git from 10.0.1 to 11.0.1 ([#85](https://github.com/rvagg/ghauth/issues/85)) ([4a5388e](https://github.com/rvagg/ghauth/commit/4a5388eeb135a66fa17fd610108ffe42711655e7))
6
+
7
+ ## [7.0.13](https://github.com/rvagg/ghauth/compare/v7.0.12...v7.0.13) (2026-08-03)
8
+
9
+ ### Trivial Changes
10
+
11
+ * **deps-dev:** bump @semantic-release/changelog from 6.0.3 to 7.0.0 ([#86](https://github.com/rvagg/ghauth/issues/86)) ([28fbcb6](https://github.com/rvagg/ghauth/commit/28fbcb692a14d2ca75addd5107df0644c161c219))
12
+
13
+ ## [7.0.12](https://github.com/rvagg/ghauth/compare/v7.0.11...v7.0.12) (2026-08-03)
14
+
15
+ ### Trivial Changes
16
+
17
+ * **deps:** bump the github-actions-minor-patch group with 2 updates ([#84](https://github.com/rvagg/ghauth/issues/84)) ([efc0ade](https://github.com/rvagg/ghauth/commit/efc0adea058134094bf088f8f0a21bace0ec395b))
18
+
19
+ ## [7.0.11](https://github.com/rvagg/ghauth/compare/v7.0.10...v7.0.11) (2026-07-30)
20
+
21
+ ### Trivial Changes
22
+
23
+ * downgrade broken changelog maker, backfill entries ([#83](https://github.com/rvagg/ghauth/issues/83)) ([c3c5116](https://github.com/rvagg/ghauth/commit/c3c51167d5633a04e0b8a304e33c2baee4798131))
24
+
25
+ ## [7.0.10](https://github.com/rvagg/ghauth/compare/v7.0.9...v7.0.10) (2026-07-27)
26
+
27
+ ### Trivial Changes
28
+
29
+ * **deps:** bump the github-actions-minor-patch group with 2 updates ([#82](https://github.com/rvagg/ghauth/issues/82)) ([fb63a52](https://github.com/rvagg/ghauth/commit/fb63a5248cfa7bd49928012399db9f11649a516f))
30
+
31
+ ## [7.0.9](https://github.com/rvagg/ghauth/compare/v7.0.8...v7.0.9) (2026-07-21)
32
+
33
+ ### Trivial Changes
34
+
35
+ * **ci:** slow down dependabot, add depsound, pin actions by hash ([#81](https://github.com/rvagg/ghauth/issues/81)) ([8c926f0](https://github.com/rvagg/ghauth/commit/8c926f0724faba99c24e0c27f5d1cb1beb4ccf00))
36
+
37
+ ## [7.0.8](https://github.com/rvagg/ghauth/compare/v7.0.7...v7.0.8) (2026-07-03)
38
+
39
+ ### Trivial Changes
40
+
41
+ * **deps-dev:** bump conventional-changelog-conventionalcommits ([#79](https://github.com/rvagg/ghauth/issues/79)) ([e3fe99c](https://github.com/rvagg/ghauth/commit/e3fe99c5f9a599cc2a2bd18a33c8dd4bf8868cc7))
42
+
43
+ ## [7.0.7](https://github.com/rvagg/ghauth/compare/v7.0.6...v7.0.7) (2026-06-23)
44
+
45
+ ### Trivial Changes
46
+
47
+ * **deps:** bump actions/checkout from 6.0.3 to 7.0.0 ([#78](https://github.com/rvagg/ghauth/issues/78)) ([89835fa](https://github.com/rvagg/ghauth/commit/89835fa08fd0aca5cd36a0b8721487722e38ae9b))
48
+
49
+ ## [7.0.6](https://github.com/rvagg/ghauth/compare/v7.0.5...v7.0.6) (2026-06-22)
50
+
51
+ ### Trivial Changes
52
+
53
+ * **deps:** bump actions/checkout from 6.0.2 to 6.0.3 ([#77](https://github.com/rvagg/ghauth/issues/77)) ([caff007](https://github.com/rvagg/ghauth/commit/caff007a92d47528b608086f5803059ef37e2958))
54
+
55
+ ## [7.0.5](https://github.com/rvagg/ghauth/compare/v7.0.4...v7.0.5) (2026-06-03)
56
+
57
+ ### Trivial Changes
58
+
59
+ * **deps:** bump actions/checkout from 6 to 6.0.2 ([#76](https://github.com/rvagg/ghauth/issues/76)) ([d501244](https://github.com/rvagg/ghauth/commit/d501244719f3f147576a93d91e7dfa0faa0ed1e0))
60
+
1
61
  ## [7.0.4](https://github.com/rvagg/ghauth/compare/v7.0.3...v7.0.4) (2026-05-21)
2
62
 
3
63
  ### Trivial Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghauth",
3
- "version": "7.0.4",
3
+ "version": "7.0.14",
4
4
  "description": "Create and load persistent GitHub authentication tokens for command-line apps",
5
5
  "type": "module",
6
6
  "exports": "./ghauth.js",
@@ -35,13 +35,13 @@
35
35
  "read": "^6.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@semantic-release/changelog": "^6.0.3",
38
+ "@semantic-release/changelog": "^7.0.0",
39
39
  "@semantic-release/commit-analyzer": "^13.0.0",
40
- "@semantic-release/git": "^10.0.1",
40
+ "@semantic-release/git": "^11.0.1",
41
41
  "@semantic-release/github": "^12.0.0",
42
42
  "@semantic-release/npm": "^13.0.0",
43
43
  "@semantic-release/release-notes-generator": "^14.0.1",
44
- "conventional-changelog-conventionalcommits": "^9.0.0",
44
+ "conventional-changelog-conventionalcommits": "^9.3.1",
45
45
  "semantic-release": "^25.0.0",
46
46
  "standard": "^17.1.2"
47
47
  },
@@ -104,6 +104,30 @@
104
104
  "type": "fix",
105
105
  "section": "Bug Fixes"
106
106
  },
107
+ {
108
+ "type": "perf",
109
+ "section": "Performance Improvements"
110
+ },
111
+ {
112
+ "type": "revert",
113
+ "section": "Reverts"
114
+ },
115
+ {
116
+ "type": "refactor",
117
+ "section": "Code Refactoring"
118
+ },
119
+ {
120
+ "type": "test",
121
+ "section": "Tests"
122
+ },
123
+ {
124
+ "type": "build",
125
+ "section": "Trivial Changes"
126
+ },
127
+ {
128
+ "type": "ci",
129
+ "section": "Trivial Changes"
130
+ },
107
131
  {
108
132
  "type": "chore",
109
133
  "section": "Trivial Changes"
@@ -113,8 +137,8 @@
113
137
  "section": "Trivial Changes"
114
138
  },
115
139
  {
116
- "type": "test",
117
- "section": "Tests"
140
+ "type": "style",
141
+ "section": "Trivial Changes"
118
142
  }
119
143
  ]
120
144
  }