@node-core/utils 7.1.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 (232) hide show
  1. package/components/metadata.js +2 -1
  2. package/lib/ci/build-types/test_build.js +3 -3
  3. package/lib/ci/failure_aggregator.js +2 -2
  4. package/lib/ci/run_ci.js +3 -2
  5. package/lib/cli.js +6 -6
  6. package/lib/figures.js +6 -6
  7. package/lib/prepare_security.js +20 -21
  8. package/lib/request.js +1 -1
  9. package/lib/update-v8/backport.js +3 -4
  10. package/lib/utils.js +4 -2
  11. package/lib/verbosity.js +2 -4
  12. package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/README.md +4 -4
  13. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.d.mts +21 -0
  14. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.mjs +46 -0
  15. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/LICENSE +22 -0
  16. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.d.ts +2 -0
  17. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.js +2 -0
  18. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.d.ts +35 -0
  19. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.js +1 -0
  20. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.d.ts +34 -0
  21. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.js +2 -0
  22. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/package.json +88 -0
  23. package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/package.json +25 -20
  24. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.d.ts +48 -3
  25. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/base.js +58 -19
  26. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/package.json +1 -1
  27. package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/readme.md +36 -1
  28. package/node_modules/ansi-regex/index.js +9 -4
  29. package/node_modules/ansi-regex/package.json +1 -1
  30. package/node_modules/ansi-regex/readme.md +6 -0
  31. package/node_modules/ansi-styles/index.d.ts +12 -12
  32. package/node_modules/ansi-styles/index.js +3 -3
  33. package/node_modules/ansi-styles/package.json +4 -4
  34. package/node_modules/cli-truncate/index.d.ts +3 -3
  35. package/node_modules/cli-truncate/index.js +40 -14
  36. package/node_modules/cli-truncate/node_modules/string-width/index.js +133 -15
  37. package/node_modules/cli-truncate/node_modules/string-width/package.json +4 -4
  38. package/node_modules/cli-truncate/node_modules/string-width/readme.md +1 -1
  39. package/node_modules/cli-truncate/package.json +7 -7
  40. package/node_modules/cli-truncate/readme.md +2 -3
  41. package/node_modules/ghauth/.github/dependabot.yml +11 -3
  42. package/node_modules/ghauth/.github/workflows/depsound.yml +33 -0
  43. package/node_modules/ghauth/.github/workflows/test-and-release.yml +4 -4
  44. package/node_modules/ghauth/CHANGELOG.md +60 -0
  45. package/node_modules/ghauth/package.json +30 -6
  46. package/node_modules/js-yaml/README.md +20 -187
  47. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +1008 -946
  48. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
  49. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
  50. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
  51. package/node_modules/js-yaml/dist/js-yaml.cjs.js +1043 -583
  52. package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
  53. package/node_modules/js-yaml/dist/js-yaml.d.ts +877 -133
  54. package/node_modules/js-yaml/dist/js-yaml.mjs +995 -556
  55. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  56. package/node_modules/js-yaml/package.json +8 -7
  57. package/node_modules/listr2/dist/{index.d.cts → index.d.mts} +90 -60
  58. package/node_modules/listr2/dist/{index.js → index.mjs} +496 -373
  59. package/node_modules/listr2/node_modules/string-width/index.d.ts +39 -0
  60. package/node_modules/listr2/node_modules/string-width/index.js +207 -0
  61. package/node_modules/listr2/node_modules/string-width/package.json +65 -0
  62. package/node_modules/listr2/node_modules/string-width/readme.md +66 -0
  63. package/node_modules/listr2/node_modules/wrap-ansi/index.d.ts +1 -1
  64. package/node_modules/listr2/node_modules/wrap-ansi/index.js +544 -116
  65. package/node_modules/listr2/node_modules/wrap-ansi/package.json +10 -13
  66. package/node_modules/listr2/node_modules/wrap-ansi/readme.md +2 -0
  67. package/node_modules/listr2/package.json +16 -19
  68. package/node_modules/log-update/index.d.ts +64 -1
  69. package/node_modules/log-update/index.js +268 -18
  70. package/node_modules/log-update/node_modules/string-width/index.d.ts +39 -0
  71. package/node_modules/log-update/node_modules/string-width/index.js +207 -0
  72. package/node_modules/log-update/node_modules/string-width/package.json +65 -0
  73. package/node_modules/log-update/node_modules/string-width/readme.md +66 -0
  74. package/node_modules/log-update/node_modules/wrap-ansi/index.d.ts +1 -1
  75. package/node_modules/log-update/node_modules/wrap-ansi/index.js +544 -116
  76. package/node_modules/log-update/node_modules/wrap-ansi/package.json +10 -13
  77. package/node_modules/log-update/node_modules/wrap-ansi/readme.md +2 -0
  78. package/node_modules/log-update/package.json +14 -12
  79. package/node_modules/log-update/readme.md +61 -0
  80. package/node_modules/slice-ansi/index.d.ts +2 -2
  81. package/node_modules/slice-ansi/index.js +260 -112
  82. package/node_modules/slice-ansi/package.json +10 -9
  83. package/node_modules/slice-ansi/readme.md +3 -2
  84. package/node_modules/slice-ansi/tokenize-ansi.js +752 -0
  85. package/node_modules/smol-toml/README.md +205 -191
  86. package/node_modules/smol-toml/dist/date.d.ts +0 -1
  87. package/node_modules/smol-toml/dist/date.js +0 -1
  88. package/node_modules/smol-toml/dist/error.d.ts +0 -1
  89. package/node_modules/smol-toml/dist/error.js +0 -1
  90. package/node_modules/smol-toml/dist/extract.js +32 -65
  91. package/node_modules/smol-toml/dist/index.cjs +302 -288
  92. package/node_modules/smol-toml/dist/index.d.ts +0 -1
  93. package/node_modules/smol-toml/dist/index.js +0 -1
  94. package/node_modules/smol-toml/dist/parse.d.ts +1 -3
  95. package/node_modules/smol-toml/dist/parse.js +22 -21
  96. package/node_modules/smol-toml/dist/primitive.js +75 -76
  97. package/node_modules/smol-toml/dist/stringify.d.ts +0 -1
  98. package/node_modules/smol-toml/dist/stringify.js +43 -30
  99. package/node_modules/smol-toml/dist/struct.js +90 -93
  100. package/node_modules/smol-toml/dist/util.d.ts +1 -1
  101. package/node_modules/smol-toml/dist/util.js +36 -39
  102. package/node_modules/smol-toml/package.json +6 -6
  103. package/node_modules/strip-ansi/index.js +5 -0
  104. package/node_modules/strip-ansi/package.json +5 -5
  105. package/package.json +3 -9
  106. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.cjs +0 -127
  107. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.cts +0 -152
  108. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.ts +0 -152
  109. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.js +0 -92
  110. package/node_modules/chalk/package.json +0 -92
  111. package/node_modules/chalk/readme.md +0 -331
  112. package/node_modules/chalk/source/index.d.ts +0 -437
  113. package/node_modules/chalk/source/index.js +0 -261
  114. package/node_modules/chalk/source/utilities.js +0 -33
  115. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -299
  116. package/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -261
  117. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  118. package/node_modules/chalk/source/vendor/supports-color/browser.js +0 -32
  119. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  120. package/node_modules/chalk/source/vendor/supports-color/index.js +0 -206
  121. package/node_modules/colorette/LICENSE.md +0 -7
  122. package/node_modules/colorette/README.md +0 -134
  123. package/node_modules/colorette/index.cjs +0 -218
  124. package/node_modules/colorette/index.d.ts +0 -93
  125. package/node_modules/colorette/index.js +0 -150
  126. package/node_modules/colorette/package.json +0 -40
  127. package/node_modules/eventemitter3/LICENSE +0 -21
  128. package/node_modules/eventemitter3/README.md +0 -94
  129. package/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
  130. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
  131. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
  132. package/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
  133. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
  134. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
  135. package/node_modules/eventemitter3/index.d.ts +0 -135
  136. package/node_modules/eventemitter3/index.js +0 -336
  137. package/node_modules/eventemitter3/index.mjs +0 -4
  138. package/node_modules/eventemitter3/package.json +0 -67
  139. package/node_modules/figures/index.d.ts +0 -279
  140. package/node_modules/figures/index.js +0 -292
  141. package/node_modules/figures/package.json +0 -49
  142. package/node_modules/figures/readme.md +0 -337
  143. package/node_modules/isexe/LICENSE.md +0 -55
  144. package/node_modules/isexe/README.md +0 -80
  145. package/node_modules/isexe/dist/commonjs/index.d.ts +0 -14
  146. package/node_modules/isexe/dist/commonjs/index.d.ts.map +0 -1
  147. package/node_modules/isexe/dist/commonjs/index.js +0 -56
  148. package/node_modules/isexe/dist/commonjs/index.js.map +0 -1
  149. package/node_modules/isexe/dist/commonjs/index.min.js +0 -2
  150. package/node_modules/isexe/dist/commonjs/index.min.js.map +0 -7
  151. package/node_modules/isexe/dist/commonjs/options.d.ts +0 -32
  152. package/node_modules/isexe/dist/commonjs/options.d.ts.map +0 -1
  153. package/node_modules/isexe/dist/commonjs/options.js +0 -3
  154. package/node_modules/isexe/dist/commonjs/options.js.map +0 -1
  155. package/node_modules/isexe/dist/commonjs/package.json +0 -3
  156. package/node_modules/isexe/dist/commonjs/posix.d.ts +0 -18
  157. package/node_modules/isexe/dist/commonjs/posix.d.ts.map +0 -1
  158. package/node_modules/isexe/dist/commonjs/posix.js +0 -67
  159. package/node_modules/isexe/dist/commonjs/posix.js.map +0 -1
  160. package/node_modules/isexe/dist/commonjs/win32.d.ts +0 -18
  161. package/node_modules/isexe/dist/commonjs/win32.d.ts.map +0 -1
  162. package/node_modules/isexe/dist/commonjs/win32.js +0 -63
  163. package/node_modules/isexe/dist/commonjs/win32.js.map +0 -1
  164. package/node_modules/isexe/dist/esm/index.d.ts +0 -14
  165. package/node_modules/isexe/dist/esm/index.d.ts.map +0 -1
  166. package/node_modules/isexe/dist/esm/index.js +0 -16
  167. package/node_modules/isexe/dist/esm/index.js.map +0 -1
  168. package/node_modules/isexe/dist/esm/index.min.js +0 -2
  169. package/node_modules/isexe/dist/esm/index.min.js.map +0 -7
  170. package/node_modules/isexe/dist/esm/options.d.ts +0 -32
  171. package/node_modules/isexe/dist/esm/options.d.ts.map +0 -1
  172. package/node_modules/isexe/dist/esm/options.js +0 -2
  173. package/node_modules/isexe/dist/esm/options.js.map +0 -1
  174. package/node_modules/isexe/dist/esm/package.json +0 -3
  175. package/node_modules/isexe/dist/esm/posix.d.ts +0 -18
  176. package/node_modules/isexe/dist/esm/posix.d.ts.map +0 -1
  177. package/node_modules/isexe/dist/esm/posix.js +0 -62
  178. package/node_modules/isexe/dist/esm/posix.js.map +0 -1
  179. package/node_modules/isexe/dist/esm/win32.d.ts +0 -18
  180. package/node_modules/isexe/dist/esm/win32.d.ts.map +0 -1
  181. package/node_modules/isexe/dist/esm/win32.js +0 -58
  182. package/node_modules/isexe/dist/esm/win32.js.map +0 -1
  183. package/node_modules/isexe/package.json +0 -78
  184. package/node_modules/listr2/dist/index.cjs +0 -2189
  185. package/node_modules/listr2/dist/index.d.ts +0 -1528
  186. package/node_modules/rfdc/.github/workflows/ci.yml +0 -21
  187. package/node_modules/rfdc/LICENSE +0 -15
  188. package/node_modules/rfdc/default.js +0 -3
  189. package/node_modules/rfdc/index.d.ts +0 -13
  190. package/node_modules/rfdc/index.js +0 -198
  191. package/node_modules/rfdc/index.test-d.ts +0 -13
  192. package/node_modules/rfdc/package.json +0 -73
  193. package/node_modules/rfdc/readme.md +0 -181
  194. package/node_modules/rfdc/test/index.js +0 -306
  195. package/node_modules/smol-toml/dist/date.d.ts.map +0 -1
  196. package/node_modules/smol-toml/dist/date.js.map +0 -1
  197. package/node_modules/smol-toml/dist/error.d.ts.map +0 -1
  198. package/node_modules/smol-toml/dist/error.js.map +0 -1
  199. package/node_modules/smol-toml/dist/extract.js.map +0 -1
  200. package/node_modules/smol-toml/dist/index.cjs.map +0 -1
  201. package/node_modules/smol-toml/dist/index.d.ts.map +0 -1
  202. package/node_modules/smol-toml/dist/index.js.map +0 -1
  203. package/node_modules/smol-toml/dist/parse.d.ts.map +0 -1
  204. package/node_modules/smol-toml/dist/parse.js.map +0 -1
  205. package/node_modules/smol-toml/dist/primitive.d.ts +0 -29
  206. package/node_modules/smol-toml/dist/primitive.d.ts.map +0 -1
  207. package/node_modules/smol-toml/dist/primitive.js.map +0 -1
  208. package/node_modules/smol-toml/dist/stringify.d.ts.map +0 -1
  209. package/node_modules/smol-toml/dist/stringify.js.map +0 -1
  210. package/node_modules/smol-toml/dist/struct.js.map +0 -1
  211. package/node_modules/smol-toml/dist/util.d.ts.map +0 -1
  212. package/node_modules/smol-toml/dist/util.js.map +0 -1
  213. package/node_modules/smol-toml/src/date.ts +0 -152
  214. package/node_modules/smol-toml/src/error.ts +0 -77
  215. package/node_modules/smol-toml/src/extract.ts +0 -113
  216. package/node_modules/smol-toml/src/index.ts +0 -42
  217. package/node_modules/smol-toml/src/parse.ts +0 -184
  218. package/node_modules/smol-toml/src/primitive.ts +0 -249
  219. package/node_modules/smol-toml/src/stringify.ts +0 -191
  220. package/node_modules/smol-toml/src/struct.ts +0 -202
  221. package/node_modules/smol-toml/src/util.ts +0 -106
  222. package/node_modules/which/LICENSE +0 -15
  223. package/node_modules/which/README.md +0 -51
  224. package/node_modules/which/bin/which.js +0 -52
  225. package/node_modules/which/lib/index.js +0 -111
  226. package/node_modules/which/package.json +0 -52
  227. /package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/LICENSE +0 -0
  228. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.d.ts +0 -0
  229. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.js +0 -0
  230. /package/node_modules/{chalk → ansi-escapes}/license +0 -0
  231. /package/node_modules/{figures → listr2/node_modules/string-width}/license +0 -0
  232. /package/node_modules/log-update/node_modules/{ansi-escapes → string-width}/license +0 -0
@@ -1,292 +0,0 @@
1
- import isUnicodeSupported from 'is-unicode-supported';
2
-
3
- const common = {
4
- circleQuestionMark: '(?)',
5
- questionMarkPrefix: '(?)',
6
- square: '█',
7
- squareDarkShade: '▓',
8
- squareMediumShade: '▒',
9
- squareLightShade: '░',
10
- squareTop: '▀',
11
- squareBottom: '▄',
12
- squareLeft: '▌',
13
- squareRight: '▐',
14
- squareCenter: '■',
15
- bullet: '●',
16
- dot: '․',
17
- ellipsis: '…',
18
- pointerSmall: '›',
19
- triangleUp: '▲',
20
- triangleUpSmall: '▴',
21
- triangleDown: '▼',
22
- triangleDownSmall: '▾',
23
- triangleLeftSmall: '◂',
24
- triangleRightSmall: '▸',
25
- home: '⌂',
26
- heart: '♥',
27
- musicNote: '♪',
28
- musicNoteBeamed: '♫',
29
- arrowUp: '↑',
30
- arrowDown: '↓',
31
- arrowLeft: '←',
32
- arrowRight: '→',
33
- arrowLeftRight: '↔',
34
- arrowUpDown: '↕',
35
- almostEqual: '≈',
36
- notEqual: '≠',
37
- lessOrEqual: '≤',
38
- greaterOrEqual: '≥',
39
- identical: '≡',
40
- infinity: '∞',
41
- subscriptZero: '₀',
42
- subscriptOne: '₁',
43
- subscriptTwo: '₂',
44
- subscriptThree: '₃',
45
- subscriptFour: '₄',
46
- subscriptFive: '₅',
47
- subscriptSix: '₆',
48
- subscriptSeven: '₇',
49
- subscriptEight: '₈',
50
- subscriptNine: '₉',
51
- oneHalf: '½',
52
- oneThird: '⅓',
53
- oneQuarter: '¼',
54
- oneFifth: '⅕',
55
- oneSixth: '⅙',
56
- oneEighth: '⅛',
57
- twoThirds: '⅔',
58
- twoFifths: '⅖',
59
- threeQuarters: '¾',
60
- threeFifths: '⅗',
61
- threeEighths: '⅜',
62
- fourFifths: '⅘',
63
- fiveSixths: '⅚',
64
- fiveEighths: '⅝',
65
- sevenEighths: '⅞',
66
- line: '─',
67
- lineBold: '━',
68
- lineDouble: '═',
69
- lineDashed0: '┄',
70
- lineDashed1: '┅',
71
- lineDashed2: '┈',
72
- lineDashed3: '┉',
73
- lineDashed4: '╌',
74
- lineDashed5: '╍',
75
- lineDashed6: '╴',
76
- lineDashed7: '╶',
77
- lineDashed8: '╸',
78
- lineDashed9: '╺',
79
- lineDashed10: '╼',
80
- lineDashed11: '╾',
81
- lineDashed12: '−',
82
- lineDashed13: '–',
83
- lineDashed14: '‐',
84
- lineDashed15: '⁃',
85
- lineVertical: '│',
86
- lineVerticalBold: '┃',
87
- lineVerticalDouble: '║',
88
- lineVerticalDashed0: '┆',
89
- lineVerticalDashed1: '┇',
90
- lineVerticalDashed2: '┊',
91
- lineVerticalDashed3: '┋',
92
- lineVerticalDashed4: '╎',
93
- lineVerticalDashed5: '╏',
94
- lineVerticalDashed6: '╵',
95
- lineVerticalDashed7: '╷',
96
- lineVerticalDashed8: '╹',
97
- lineVerticalDashed9: '╻',
98
- lineVerticalDashed10: '╽',
99
- lineVerticalDashed11: '╿',
100
- lineDownLeft: '┐',
101
- lineDownLeftArc: '╮',
102
- lineDownBoldLeftBold: '┓',
103
- lineDownBoldLeft: '┒',
104
- lineDownLeftBold: '┑',
105
- lineDownDoubleLeftDouble: '╗',
106
- lineDownDoubleLeft: '╖',
107
- lineDownLeftDouble: '╕',
108
- lineDownRight: '┌',
109
- lineDownRightArc: '╭',
110
- lineDownBoldRightBold: '┏',
111
- lineDownBoldRight: '┎',
112
- lineDownRightBold: '┍',
113
- lineDownDoubleRightDouble: '╔',
114
- lineDownDoubleRight: '╓',
115
- lineDownRightDouble: '╒',
116
- lineUpLeft: '┘',
117
- lineUpLeftArc: '╯',
118
- lineUpBoldLeftBold: '┛',
119
- lineUpBoldLeft: '┚',
120
- lineUpLeftBold: '┙',
121
- lineUpDoubleLeftDouble: '╝',
122
- lineUpDoubleLeft: '╜',
123
- lineUpLeftDouble: '╛',
124
- lineUpRight: '└',
125
- lineUpRightArc: '╰',
126
- lineUpBoldRightBold: '┗',
127
- lineUpBoldRight: '┖',
128
- lineUpRightBold: '┕',
129
- lineUpDoubleRightDouble: '╚',
130
- lineUpDoubleRight: '╙',
131
- lineUpRightDouble: '╘',
132
- lineUpDownLeft: '┤',
133
- lineUpBoldDownBoldLeftBold: '┫',
134
- lineUpBoldDownBoldLeft: '┨',
135
- lineUpDownLeftBold: '┥',
136
- lineUpBoldDownLeftBold: '┩',
137
- lineUpDownBoldLeftBold: '┪',
138
- lineUpDownBoldLeft: '┧',
139
- lineUpBoldDownLeft: '┦',
140
- lineUpDoubleDownDoubleLeftDouble: '╣',
141
- lineUpDoubleDownDoubleLeft: '╢',
142
- lineUpDownLeftDouble: '╡',
143
- lineUpDownRight: '├',
144
- lineUpBoldDownBoldRightBold: '┣',
145
- lineUpBoldDownBoldRight: '┠',
146
- lineUpDownRightBold: '┝',
147
- lineUpBoldDownRightBold: '┡',
148
- lineUpDownBoldRightBold: '┢',
149
- lineUpDownBoldRight: '┟',
150
- lineUpBoldDownRight: '┞',
151
- lineUpDoubleDownDoubleRightDouble: '╠',
152
- lineUpDoubleDownDoubleRight: '╟',
153
- lineUpDownRightDouble: '╞',
154
- lineDownLeftRight: '┬',
155
- lineDownBoldLeftBoldRightBold: '┳',
156
- lineDownLeftBoldRightBold: '┯',
157
- lineDownBoldLeftRight: '┰',
158
- lineDownBoldLeftBoldRight: '┱',
159
- lineDownBoldLeftRightBold: '┲',
160
- lineDownLeftRightBold: '┮',
161
- lineDownLeftBoldRight: '┭',
162
- lineDownDoubleLeftDoubleRightDouble: '╦',
163
- lineDownDoubleLeftRight: '╥',
164
- lineDownLeftDoubleRightDouble: '╤',
165
- lineUpLeftRight: '┴',
166
- lineUpBoldLeftBoldRightBold: '┻',
167
- lineUpLeftBoldRightBold: '┷',
168
- lineUpBoldLeftRight: '┸',
169
- lineUpBoldLeftBoldRight: '┹',
170
- lineUpBoldLeftRightBold: '┺',
171
- lineUpLeftRightBold: '┶',
172
- lineUpLeftBoldRight: '┵',
173
- lineUpDoubleLeftDoubleRightDouble: '╩',
174
- lineUpDoubleLeftRight: '╨',
175
- lineUpLeftDoubleRightDouble: '╧',
176
- lineUpDownLeftRight: '┼',
177
- lineUpBoldDownBoldLeftBoldRightBold: '╋',
178
- lineUpDownBoldLeftBoldRightBold: '╈',
179
- lineUpBoldDownLeftBoldRightBold: '╇',
180
- lineUpBoldDownBoldLeftRightBold: '╊',
181
- lineUpBoldDownBoldLeftBoldRight: '╉',
182
- lineUpBoldDownLeftRight: '╀',
183
- lineUpDownBoldLeftRight: '╁',
184
- lineUpDownLeftBoldRight: '┽',
185
- lineUpDownLeftRightBold: '┾',
186
- lineUpBoldDownBoldLeftRight: '╂',
187
- lineUpDownLeftBoldRightBold: '┿',
188
- lineUpBoldDownLeftBoldRight: '╃',
189
- lineUpBoldDownLeftRightBold: '╄',
190
- lineUpDownBoldLeftBoldRight: '╅',
191
- lineUpDownBoldLeftRightBold: '╆',
192
- lineUpDoubleDownDoubleLeftDoubleRightDouble: '╬',
193
- lineUpDoubleDownDoubleLeftRight: '╫',
194
- lineUpDownLeftDoubleRightDouble: '╪',
195
- lineCross: '╳',
196
- lineBackslash: '╲',
197
- lineSlash: '╱',
198
- };
199
-
200
- const specialMainSymbols = {
201
- tick: '✔',
202
- info: 'ℹ',
203
- warning: '⚠',
204
- cross: '✘',
205
- squareSmall: '◻',
206
- squareSmallFilled: '◼',
207
- circle: '◯',
208
- circleFilled: '◉',
209
- circleDotted: '◌',
210
- circleDouble: '◎',
211
- circleCircle: 'ⓞ',
212
- circleCross: 'ⓧ',
213
- circlePipe: 'Ⓘ',
214
- radioOn: '◉',
215
- radioOff: '◯',
216
- checkboxOn: '☒',
217
- checkboxOff: '☐',
218
- checkboxCircleOn: 'ⓧ',
219
- checkboxCircleOff: 'Ⓘ',
220
- pointer: '❯',
221
- triangleUpOutline: '△',
222
- triangleLeft: '◀',
223
- triangleRight: '▶',
224
- lozenge: '◆',
225
- lozengeOutline: '◇',
226
- hamburger: '☰',
227
- smiley: '㋡',
228
- mustache: '෴',
229
- star: '★',
230
- play: '▶',
231
- nodejs: '⬢',
232
- oneSeventh: '⅐',
233
- oneNinth: '⅑',
234
- oneTenth: '⅒',
235
- };
236
-
237
- const specialFallbackSymbols = {
238
- tick: '√',
239
- info: 'i',
240
- warning: '‼',
241
- cross: '×',
242
- squareSmall: '□',
243
- squareSmallFilled: '■',
244
- circle: '( )',
245
- circleFilled: '(*)',
246
- circleDotted: '( )',
247
- circleDouble: '( )',
248
- circleCircle: '(○)',
249
- circleCross: '(×)',
250
- circlePipe: '(│)',
251
- radioOn: '(*)',
252
- radioOff: '( )',
253
- checkboxOn: '[×]',
254
- checkboxOff: '[ ]',
255
- checkboxCircleOn: '(×)',
256
- checkboxCircleOff: '( )',
257
- pointer: '>',
258
- triangleUpOutline: '∆',
259
- triangleLeft: '◄',
260
- triangleRight: '►',
261
- lozenge: '♦',
262
- lozengeOutline: '◊',
263
- hamburger: '≡',
264
- smiley: '☺',
265
- mustache: '┌─┐',
266
- star: '✶',
267
- play: '►',
268
- nodejs: '♦',
269
- oneSeventh: '1/7',
270
- oneNinth: '1/9',
271
- oneTenth: '1/10',
272
- };
273
-
274
- export const mainSymbols = {...common, ...specialMainSymbols};
275
- export const fallbackSymbols = {...common, ...specialFallbackSymbols};
276
-
277
- const shouldUseMain = isUnicodeSupported();
278
- const figures = shouldUseMain ? mainSymbols : fallbackSymbols;
279
- export default figures;
280
-
281
- const replacements = Object.entries(specialMainSymbols);
282
-
283
- // On terminals which do not support Unicode symbols, substitute them to other symbols
284
- export const replaceSymbols = (string, {useFallback = !shouldUseMain} = {}) => {
285
- if (useFallback) {
286
- for (const [key, mainSymbol] of replacements) {
287
- string = string.replaceAll(mainSymbol, fallbackSymbols[key]);
288
- }
289
- }
290
-
291
- return string;
292
- };
@@ -1,49 +0,0 @@
1
- {
2
- "name": "figures",
3
- "version": "6.1.0",
4
- "description": "Unicode symbols with fallbacks for older terminals",
5
- "license": "MIT",
6
- "repository": "sindresorhus/figures",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "type": "module",
14
- "exports": {
15
- "types": "./index.d.ts",
16
- "default": "./index.js"
17
- },
18
- "sideEffects": false,
19
- "engines": {
20
- "node": ">=18"
21
- },
22
- "scripts": {
23
- "test": "xo && ava && tsd"
24
- },
25
- "files": [
26
- "index.js",
27
- "index.d.ts"
28
- ],
29
- "keywords": [
30
- "unicode",
31
- "cli",
32
- "cmd",
33
- "command-line",
34
- "characters",
35
- "symbol",
36
- "symbols",
37
- "figure",
38
- "figures",
39
- "fallback"
40
- ],
41
- "dependencies": {
42
- "is-unicode-supported": "^2.0.0"
43
- },
44
- "devDependencies": {
45
- "ava": "^5.3.1",
46
- "tsd": "^0.29.0",
47
- "xo": "^0.56.0"
48
- }
49
- }
@@ -1,337 +0,0 @@
1
- # figures
2
-
3
- > Unicode symbols with fallbacks for older terminals
4
-
5
- [![](screenshot.png)](index.js)
6
-
7
- [*and more...*](index.js)
8
-
9
- Terminals such as Windows Console Host (and CMD) only support a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
10
-
11
- ## Install
12
-
13
- ```sh
14
- npm install figures
15
- ```
16
-
17
- ## Usage
18
-
19
- ```js
20
- import figures, {mainSymbols, fallbackSymbols, replaceSymbols} from 'figures';
21
-
22
- console.log(figures.tick);
23
- // On terminals with Unicode symbols: ✔
24
- // On other terminals: √
25
-
26
- console.log(mainSymbols.tick);
27
- // On all terminals: ✔
28
-
29
- console.log(fallbackSymbols.tick);
30
- // On all terminals: √
31
-
32
- console.log(replaceSymbols('✔ check'));
33
- // On terminals with Unicode symbols: ✔ check
34
- // On other terminals: √ check
35
- ```
36
-
37
- ## API
38
-
39
- ### figures (default export)
40
-
41
- Type: `object`
42
-
43
- Symbols to use on any terminal.
44
-
45
- ### mainSymbols
46
-
47
- Symbols to use when the terminal supports Unicode symbols.
48
-
49
- ### fallbackSymbols
50
-
51
- Symbols to use when the terminal does not support Unicode symbols.
52
-
53
- ### replaceSymbols(string, options?)
54
-
55
- Returns the input with replaced fallback symbols if the terminal has poor Unicode support.
56
-
57
- All the below [figures](#figures) are attached to the default export as shown in the example above.
58
-
59
- #### string
60
-
61
- Type: `string`
62
-
63
- String where the Unicode symbols will be replaced with fallback symbols depending on the terminal.
64
-
65
- #### options
66
-
67
- Type: `object`
68
-
69
- ##### useFallback
70
-
71
- Type: `boolean`\
72
- Default: `true` if the terminal has poor Unicode support
73
-
74
- Whether to replace symbols with fallbacks.
75
-
76
- This can be set to `true` to always use fallback symbols, whether the terminal has poor Unicode support or not.
77
-
78
- ```js
79
- import {replaceSymbols} from 'figures';
80
-
81
- console.log(replaceSymbols('✔ check', {useFallback: true}));
82
- // On terminals with Unicode symbols: √ check
83
- // On other terminals: √ check
84
- ```
85
-
86
- ## Figures
87
-
88
- `Fallback` characters are only shown when they differ from the `Main` ones.
89
-
90
- | Name | Main | Fallback |
91
- | ------------------------------------------- | :--: | :------: |
92
- | tick | `✔` | `√` |
93
- | info | `ℹ` | `i` |
94
- | warning | `⚠` | `‼` |
95
- | cross | `✘` | `×` |
96
- | square | `█` | |
97
- | squareSmall | `◻` | `□` |
98
- | squareSmallFilled | `◼` | `■` |
99
- | squareDarkShade | `▓` | |
100
- | squareMediumShade | `▒` | |
101
- | squareLightShade | `░` | |
102
- | squareTop | `▀` | |
103
- | squareBottom | `▄` | |
104
- | squareLeft | `▌` | |
105
- | squareRight | `▐` | |
106
- | squareCenter | `■` | |
107
- | circle | `◯` | `( )` |
108
- | circleFilled | `◉` | `(*)` |
109
- | circleDotted | `◌` | `( )` |
110
- | circleDouble | `◎` | `( )` |
111
- | circleCircle | `ⓞ` | `(○)` |
112
- | circleCross | `ⓧ` | `(×)` |
113
- | circlePipe | `Ⓘ` | `(│)` |
114
- | circleQuestionMark | `?⃝ ` | `(?)` |
115
- | radioOn | `◉` | `(*)` |
116
- | radioOff | `◯` | `( )` |
117
- | checkboxOn | `☒` | `[×]` |
118
- | checkboxOff | `☐` | `[ ]` |
119
- | checkboxCircleOn | `ⓧ` | `(×)` |
120
- | checkboxCircleOff | `Ⓘ` | `( )` |
121
- | questionMarkPrefix | `?⃝ ` | `?` |
122
- | bullet | `●` | |
123
- | dot | `․` | |
124
- | ellipsis | `…` | |
125
- | pointer | `❯` | `>` |
126
- | pointerSmall | `›` | `›` |
127
- | triangleUp | `▲` | |
128
- | triangleUpSmall | `▴` | |
129
- | triangleUpOutline | `△` | `∆` |
130
- | triangleDown | `▼` | |
131
- | triangleDownSmall | `▾` | |
132
- | triangleLeft | `◀` | `◄` |
133
- | triangleLeftSmall | `◂` | |
134
- | triangleRight | `▶` | `►` |
135
- | triangleRightSmall | `▸` | |
136
- | lozenge | `◆` | `♦` |
137
- | lozengeOutline | `◇` | `◊` |
138
- | home | `⌂` | |
139
- | hamburger | `☰` | `≡` |
140
- | smiley | `㋡` | `☺` |
141
- | mustache | `෴` | `┌─┐` |
142
- | heart | `♥` | |
143
- | star | `★` | `✶` |
144
- | play | `▶` | `►` |
145
- | musicNote | `♪` | |
146
- | musicNoteBeamed | `♫` | |
147
- | nodejs | `⬢` | `♦` |
148
- | arrowUp | `↑` | |
149
- | arrowDown | `↓` | |
150
- | arrowLeft | `←` | |
151
- | arrowRight | `→` | |
152
- | arrowLeftRight | `↔` | |
153
- | arrowUpDown | `↕` | |
154
- | almostEqual | `≈` | |
155
- | notEqual | `≠` | |
156
- | lessOrEqual | `≤` | |
157
- | greaterOrEqual | `≥` | |
158
- | identical | `≡` | |
159
- | infinity | `∞` | |
160
- | subscriptZero | `₀` | |
161
- | subscriptOne | `₁` | |
162
- | subscriptTwo | `₂` | |
163
- | subscriptThree | `₃` | |
164
- | subscriptFour | `₄` | |
165
- | subscriptFive | `₅` | |
166
- | subscriptSix | `₆` | |
167
- | subscriptSeven | `₇` | |
168
- | subscriptEight | `₈` | |
169
- | subscriptNine | `₉` | |
170
- | oneHalf | `½` | |
171
- | oneThird | `⅓` | |
172
- | oneQuarter | `¼` | |
173
- | oneFifth | `⅕` | |
174
- | oneSixth | `⅙` | |
175
- | oneSeventh | `⅐` | `1/7` |
176
- | oneEighth | `⅛` | |
177
- | oneNinth | `⅑` | `1/9` |
178
- | oneTenth | `⅒` | `1/10` |
179
- | twoThirds | `⅔` | |
180
- | twoFifths | `⅖` | |
181
- | threeQuarters | `¾` | |
182
- | threeFifths | `⅗` | |
183
- | threeEighths | `⅜` | |
184
- | fourFifths | `⅘` | |
185
- | fiveSixths | `⅚` | |
186
- | fiveEighths | `⅝` | |
187
- | sevenEighths | `⅞` | |
188
- | line | `─` | |
189
- | lineBold | `━` | |
190
- | lineDouble | `═` | |
191
- | lineDashed0 | `┄` | |
192
- | lineDashed1 | `┅` | |
193
- | lineDashed2 | `┈` | |
194
- | lineDashed3 | `┉` | |
195
- | lineDashed4 | `╌` | |
196
- | lineDashed5 | `╍` | |
197
- | lineDashed6 | `╴` | |
198
- | lineDashed7 | `╶` | |
199
- | lineDashed8 | `╸` | |
200
- | lineDashed9 | `╺` | |
201
- | lineDashed10 | `╼` | |
202
- | lineDashed11 | `╾` | |
203
- | lineDashed12 | `−` | |
204
- | lineDashed13 | `–` | |
205
- | lineDashed14 | `‐` | |
206
- | lineDashed15 | `⁃` | |
207
- | lineVertical | `│` | |
208
- | lineVerticalBold | `┃` | |
209
- | lineVerticalDouble | `║` | |
210
- | lineVerticalDashed0 | `┆` | |
211
- | lineVerticalDashed1 | `┇` | |
212
- | lineVerticalDashed2 | `┊` | |
213
- | lineVerticalDashed3 | `┋` | |
214
- | lineVerticalDashed4 | `╎` | |
215
- | lineVerticalDashed5 | `╏` | |
216
- | lineVerticalDashed6 | `╵` | |
217
- | lineVerticalDashed7 | `╷` | |
218
- | lineVerticalDashed8 | `╹` | |
219
- | lineVerticalDashed9 | `╻` | |
220
- | lineVerticalDashed10 | `╽` | |
221
- | lineVerticalDashed11 | `╿` | |
222
- | lineDownLeft | `┐` | |
223
- | lineDownLeftArc | `╮` | |
224
- | lineDownBoldLeftBold | `┓` | |
225
- | lineDownBoldLeft | `┒` | |
226
- | lineDownLeftBold | `┑` | |
227
- | lineDownDoubleLeftDouble | `╗` | |
228
- | lineDownDoubleLeft | `╖` | |
229
- | lineDownLeftDouble | `╕` | |
230
- | lineDownRight | `┌` | |
231
- | lineDownRightArc | `╭` | |
232
- | lineDownBoldRightBold | `┏` | |
233
- | lineDownBoldRight | `┎` | |
234
- | lineDownRightBold | `┍` | |
235
- | lineDownDoubleRightDouble | `╔` | |
236
- | lineDownDoubleRight | `╓` | |
237
- | lineDownRightDouble | `╒` | |
238
- | lineUpLeft | `┘` | |
239
- | lineUpLeftArc | `╯` | |
240
- | lineUpBoldLeftBold | `┛` | |
241
- | lineUpBoldLeft | `┚` | |
242
- | lineUpLeftBold | `┙` | |
243
- | lineUpDoubleLeftDouble | `╝` | |
244
- | lineUpDoubleLeft | `╜` | |
245
- | lineUpLeftDouble | `╛` | |
246
- | lineUpRight | `└` | |
247
- | lineUpRightArc | `╰` | |
248
- | lineUpBoldRightBold | `┗` | |
249
- | lineUpBoldRight | `┖` | |
250
- | lineUpRightBold | `┕` | |
251
- | lineUpDoubleRightDouble | `╚` | |
252
- | lineUpDoubleRight | `╙` | |
253
- | lineUpRightDouble | `╘` | |
254
- | lineUpDownLeft | `┤` | |
255
- | lineUpBoldDownBoldLeftBold | `┫` | |
256
- | lineUpBoldDownBoldLeft | `┨` | |
257
- | lineUpDownLeftBold | `┥` | |
258
- | lineUpBoldDownLeftBold | `┩` | |
259
- | lineUpDownBoldLeftBold | `┪` | |
260
- | lineUpDownBoldLeft | `┧` | |
261
- | lineUpBoldDownLeft | `┦` | |
262
- | lineUpDoubleDownDoubleLeftDouble | `╣` | |
263
- | lineUpDoubleDownDoubleLeft | `╢` | |
264
- | lineUpDownLeftDouble | `╡` | |
265
- | lineUpDownRight | `├` | |
266
- | lineUpBoldDownBoldRightBold | `┣` | |
267
- | lineUpBoldDownBoldRight | `┠` | |
268
- | lineUpDownRightBold | `┝` | |
269
- | lineUpBoldDownRightBold | `┡` | |
270
- | lineUpDownBoldRightBold | `┢` | |
271
- | lineUpDownBoldRight | `┟` | |
272
- | lineUpBoldDownRight | `┞` | |
273
- | lineUpDoubleDownDoubleRightDouble | `╠` | |
274
- | lineUpDoubleDownDoubleRight | `╟` | |
275
- | lineUpDownRightDouble | `╞` | |
276
- | lineDownLeftRight | `┬` | |
277
- | lineDownBoldLeftBoldRightBold | `┳` | |
278
- | lineDownLeftBoldRightBold | `┯` | |
279
- | lineDownBoldLeftRight | `┰` | |
280
- | lineDownBoldLeftBoldRight | `┱` | |
281
- | lineDownBoldLeftRightBold | `┲` | |
282
- | lineDownLeftRightBold | `┮` | |
283
- | lineDownLeftBoldRight | `┭` | |
284
- | lineDownDoubleLeftDoubleRightDouble | `╦` | |
285
- | lineDownDoubleLeftRight | `╥` | |
286
- | lineDownLeftDoubleRightDouble | `╤` | |
287
- | lineUpLeftRight | `┴` | |
288
- | lineUpBoldLeftBoldRightBold | `┻` | |
289
- | lineUpLeftBoldRightBold | `┷` | |
290
- | lineUpBoldLeftRight | `┸` | |
291
- | lineUpBoldLeftBoldRight | `┹` | |
292
- | lineUpBoldLeftRightBold | `┺` | |
293
- | lineUpLeftRightBold | `┶` | |
294
- | lineUpLeftBoldRight | `┵` | |
295
- | lineUpDoubleLeftDoubleRightDouble | `╩` | |
296
- | lineUpDoubleLeftRight | `╨` | |
297
- | lineUpLeftDoubleRightDouble | `╧` | |
298
- | lineUpDownLeftRight | `┼` | |
299
- | lineUpBoldDownBoldLeftBoldRightBold | `╋` | |
300
- | lineUpDownBoldLeftBoldRightBold | `╈` | |
301
- | lineUpBoldDownLeftBoldRightBold | `╇` | |
302
- | lineUpBoldDownBoldLeftRightBold | `╊` | |
303
- | lineUpBoldDownBoldLeftBoldRight | `╉` | |
304
- | lineUpBoldDownLeftRight | `╀` | |
305
- | lineUpDownBoldLeftRight | `╁` | |
306
- | lineUpDownLeftBoldRight | `┽` | |
307
- | lineUpDownLeftRightBold | `┾` | |
308
- | lineUpBoldDownBoldLeftRight | `╂` | |
309
- | lineUpDownLeftBoldRightBold | `┿` | |
310
- | lineUpBoldDownLeftBoldRight | `╃` | |
311
- | lineUpBoldDownLeftRightBold | `╄` | |
312
- | lineUpDownBoldLeftBoldRight | `╅` | |
313
- | lineUpDownBoldLeftRightBold | `╆` | |
314
- | lineUpDoubleDownDoubleLeftDoubleRightDouble | `╬` | |
315
- | lineUpDoubleDownDoubleLeftRight | `╫` | |
316
- | lineUpDownLeftDoubleRightDouble | `╪` | |
317
- | lineCross | `╳` | |
318
- | lineBackslash | `╲` | |
319
- | lineSlash | `╱` | |
320
-
321
- ## Other characters
322
-
323
- If you cannot find the character you're looking for in the table above, please look at this full list of [cross-platform terminal characters](https://github.com/ehmicky/cross-platform-terminal-characters).
324
-
325
- ## Unsupported terminals
326
-
327
- The following terminals are not officially supported:
328
-
329
- - xterm
330
- - Linux Terminal (kernel)
331
- - cmder
332
-
333
- They can display most but not all of the symbols listed above.
334
-
335
- ## Related
336
-
337
- - [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels